mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:50:51 +01:00
[PR #2046] runtime: guard null out pointers, add inspection helpers and unit tests for PlacedDepthTextures (RT-XS-PLACED-DEPTH-GUARDS-AND-TESTS) #2052
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2052
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2046
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/rt-xs-placed-depth-guards-and-tests📝 Commits (1)
0233a9eruntime: guard null out pointers, add inspection helpers and unit tests for PlacedDepthTextures (RT-XS-PLACED-DEPTH-GUARDS-AND-TESTS)📊 Changes
3 files changed (+335 additions, -1 deletions)
View changed files
📝
runtime/CMakeLists.txt(+8 -0)📝
runtime/shims/d3d12_xs_placed_depth.h(+23 -1)➕
runtime/test/d3d12_xs_placed_depth_test.cpp(+304 -0)📄 Description
Claimed in the coordination issue as: RT-XS-PLACED-DEPTH-GUARDS-AND-TESTS (claim)
What and why
runtime/shims/d3d12_xs_placed_depth.hmanages GPU backing for slot-133 depth/UAV textures keyed by Xbox placement ranges.Null out pointer guards:
PlacedDepthTextures::create: Ifoutis null, returnsE_POINTERimmediately before attempting any allocations or lookups.outis non-null, sets*out = nullptrat entry so failures (E_INVALIDARG,E_NOTIMPL, or backing creation failures) guarantee callers receive null.Inspection and cleanup helpers:
clear(),size(), andempty()toPlacedDepthTextures(markingmutex_mutable for const query methods).Portability:
ID3D12Resource::GetDescinPlacedDepthTexture.Unit test suite (
runtime/test/d3d12_xs_placed_depth_test.cpp):outpointer returningE_POINTER.address == 0,Alignment == 0, unaligned address,SizeInBytes == 0, address+size overflow) setting*out = nullptrand returningE_INVALIDARG.create_backingfailure propagation and clearing*out.texture_backingresolution.QueryInterfaceforwarding (kVulkanResourceTagdelegating to backing,ID3D12Resourcereturning wrapper).E_NOTIMPL).E_NOTIMPL).std::erase_if) when all aliases are released.clear()andempty().OptimizedClearmismatch refusal.Registers
d3d12_xs_placed_depth_testand CTest inruntime/CMakeLists.txt.Tested
46/46 checks passed(0 failures).python -I tests/test_ci_registration.py: 16/16 pass.python -I tests/test_text_write_line_endings.py: 3/3 pass.python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.