Debug layer: the title's reserved depth textures (R32G8X24_TYPELESS) cannot be created here, fall back to arena, and are then used uninitialized #940
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl#940
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?
@rocobalt1 on GitHub · 2026-11-24 08:58 UTC · original
D3D12 debug layer run on a title that reaches its menus, with
XCL_D3D12_DEBUG=1. The depth path is the interesting part: the title's reserved depth textures cannot be created on this driver, XCL falls back to an arena texture, and the debug layer then reports the fallback being used in the wrong state.Environment: RTX 4060 Ti 8 GB, driver 32.0.16.1656, Windows 11 Pro 26200.
XCL a1672efplus PR #273 merged locally (declared so the numbers are not read as plainmain). Variables:XCL_D3D12_DEBUG=1,XCL_D3D12_DRED=1,XCL_ASYNC_PSO=1. The run presented 3000 frames at 30 fps with 32 768 draws and 0 skipped before this was collected.Four reserved depth textures are refused, and become arena textures
Each is followed by the fallback:
R32G8X24_TYPELESS)So the scene's depth targets (2560x1440 and 3840x2160) are arena textures, not reserved ones.
What the debug layer reports about them afterwards
ClearRenderTargetView: resource state isUNORDERED_ACCESS(0x8), expectedRENDER_TARGET(0x4)Mapcalled on a resource created withCreateReservedResource(twice)UpdateTileMappings(this is #262, reported as intentional, listed for completeness)The 824 one says at least one reserved resource was created and is then mapped, which the API forbids.
Questions
Mapon a reserved resource (824) a separate path, or the same fallback reached from somewhere else?Nothing game-specific here: sizes, formats, HRESULTs and the layer's own messages.
@artor410 on GitHub · 2026-11-24 09:13 UTC · original
Working on this: arena fallback for refused reserved depth textures (initial state + first-use discard). PR soon.
@ivall on GitHub · 2026-11-24 11:04 UTC · original
#951 (merged in
6828e07) asks the device for tiled support first, so the refused reserved depth textures go to an arena without the failed CreateReservedResource and its debug-layer errors 738 / 723. The rest of this issue (1422, 538, 824) is not changed by it, so it stays open.@thehollowedone on GitHub · 2026-11-24 12:33 UTC · original
Independent check of the merged depth-texture fallback on
47efa2e. Windows 11 build 26300, RTX 3080 Ti / 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC, debug build.Tested.
cargo test --offline --locked -p xcl --lib hle::d3d12x::vram -- --test-threads=1passed 9/9. I also rand32s8_targets_take_their_own_size_of_video_memoryin isolation twice with the D3D12 debug layer enabled and full readback added in scratch. XCL reported no tiled support and used arena placement. All 4,096 depth values and all 4,096 stencil values matched after a clear and copy on the GPU. The device stayed healthy. InfoQueue recorded zero errors or corruption messages. Its only warning was 821 because the fixture deliberately clears to values different from the optimized clear value.Not tested. Retail rendering or first use without a clear. The explicit clear and transitions in this fixture leave the remaining first-use and resource-state paths in this issue open.
AI-assisted. Codex (GPT-6, exact variant unavailable) extended and ran the synthetic test and drafted this report.