RT-PLACED-DEPTH-OVERLAP: d3d12_xs: a depth placement inside another one's PC extent gets its own image (the boot's texture-creation int3 on RADV) #1544

Manually merged
github merged 1 commit from gh-pr/1544/head into gh-pr/1544/base 2026-11-26 09:56:04 +00:00
Owner

@⁠aslan2142 on GitHub · 2026-11-25 04:03 UTC · original
aslan2142:placed-depth-overlap → main · +58 −10 · 4 files · 1 commits · merged 2026-11-25 04:04 UTC

Item: RT-PLACED-DEPTH-OVERLAP. The claim could not be posted: coordination issue #14 reached GitHub's 2,500-comment limit at 03:46 UTC and no successor exists yet. The claim text is below, to be copied there once there is one:

claiming: RT-PLACED-DEPTH-OVERLAP - a slot-133 depth placement that starts inside an earlier placement's range gets its own image when both layouts are opaque, instead of E_NOTIMPL, and refused depth placements are logged

Searched first: no claim or open pull request covers this case. #689 (QemmHD) is the same-address case, not this one.

What and why

On an RDNA2 iGPU under RADV, the retail boot stops about 30 s in on the title's own int3, inside the title's crash reporter, right after a texture creation returns null. This was measured on main plus the RADV import fix (#1539), without which the device is lost earlier.

  • The cause (measured with a diagnostic build): the title places three D16 depth+UAV targets, all with the opaque layout, in one 8 MiB block of its own through device slot 133, and the next pass in a block exactly 8 MiB higher. d3d12_xs_placed_depth.h records each range's end with the PC allocation's size. RADV sizes the largest of the three (2048×2048) at 8,716,288 bytes, more than the title's block, so the next block's first placement starts inside the previous range at a different address. The registry answered E_NOTIMPL there, and proxy_create_placed_depth wrote no line for it. The trace showed zero failed calls.
  • The fix: a placement that starts inside another range gets a backing of its own when both layouts are opaque. D3D12 allows placed resources to overlap, and an alias's contents are undefined until it is reinitialized. A non-opaque layout there is still refused, and the same-address rules are unchanged.
  • The log: proxy_create_placed_depth now logs the first eight refused depth placements (hr, format, size, layouts, PC size).
  • Docs: the depth-UAV paragraph of docs/d3d12_vulkan.md.
  • Driver scope: drivers that size this target at 8 MiB or less never took the refused path. That is likely why other boots did not stop here.

Tests

  • d3d12_depth_stencil_uav_test (test/d3d12_placed_depth_test.h) places a texture one alignment step inside another. The tiled layout still gets E_NOTIMPL. The opaque layout gets a backing of its own at the right address, and the outer placement keeps its shared backing.
  • Windows suite under Wine 11.22 (clang-cl build), llvmpipe and an RDNA2 iGPU (RADV), against main's baseline: no test goes from pass to fail; d3d12_depth_stencil_uav passes on both.
  • Red check: with only the d3d12_xs_placed_depth.h change reverted (the test and the log kept), d3d12_depth_stencil_uav fails on both devices.

Measured on the retail boot (RDNA2 iGPU, RADV, Wine 11.22, with #1539; counts only)

without with this change
Run time / end 22-31 s, the title's crash reporter (texture creation returned null) 49-51 s, a different stop (being looked at)
D3D12 calls 98,950 111,904 to 112,980
Presents 112 143 to 168
Title state in its crash dump initialising, frame 0 running, frame 82
Refused depth placements 1 per run 0

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 04:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1544) `aslan2142:placed-depth-overlap` → `main` · +58 −10 · 4 files · 1 commits · merged 2026-11-25 04:04 UTC Item: `RT-PLACED-DEPTH-OVERLAP`. **The claim could not be posted:** coordination issue #14 reached GitHub's 2,500-comment limit at 03:46 UTC and no successor exists yet. The claim text is below, to be copied there once there is one: > claiming: RT-PLACED-DEPTH-OVERLAP - a slot-133 depth placement that starts inside an earlier placement's range gets its own image when both layouts are opaque, instead of `E_NOTIMPL`, and refused depth placements are logged Searched first: no claim or open pull request covers this case. #689 (QemmHD) is the same-address case, not this one. ### What and why On an RDNA2 iGPU under RADV, the retail boot stops about 30 s in on the title's own `int3`, inside the title's crash reporter, right after a texture creation returns null. This was measured on `main` plus the RADV import fix (#1539), without which the device is lost earlier. - **The cause (measured with a diagnostic build):** the title places three D16 depth+UAV targets, all with the opaque layout, in one 8 MiB block of its own through device slot 133, and the next pass in a block exactly 8 MiB higher. `d3d12_xs_placed_depth.h` records each range's end with the PC allocation's size. RADV sizes the largest of the three (2048×2048) at 8,716,288 bytes, more than the title's block, so the next block's first placement starts inside the previous range at a different address. The registry answered `E_NOTIMPL` there, and `proxy_create_placed_depth` wrote no line for it. The trace showed zero failed calls. - **The fix:** a placement that starts inside another range gets a backing of its own when both layouts are opaque. D3D12 allows placed resources to overlap, and an alias's contents are undefined until it is reinitialized. A non-opaque layout there is still refused, and the same-address rules are unchanged. - **The log:** `proxy_create_placed_depth` now logs the first eight refused depth placements (hr, format, size, layouts, PC size). - **Docs:** the depth-UAV paragraph of `docs/d3d12_vulkan.md`. - **Driver scope:** drivers that size this target at 8 MiB or less never took the refused path. That is likely why other boots did not stop here. ### Tests - `d3d12_depth_stencil_uav_test` (`test/d3d12_placed_depth_test.h`) places a texture one alignment step inside another. The tiled layout still gets `E_NOTIMPL`. The opaque layout gets a backing of its own at the right address, and the outer placement keeps its shared backing. - Windows suite under Wine 11.22 (clang-cl build), llvmpipe and an RDNA2 iGPU (RADV), against `main`'s baseline: no test goes from pass to fail; `d3d12_depth_stencil_uav` passes on both. - Red check: with only the `d3d12_xs_placed_depth.h` change reverted (the test and the log kept), `d3d12_depth_stencil_uav` fails on both devices. ### Measured on the retail boot (RDNA2 iGPU, RADV, Wine 11.22, with #1539; counts only) | | without | with this change | |---|---|---| | Run time / end | 22-31 s, the title's crash reporter (texture creation returned null) | 49-51 s, a different stop (being looked at) | | D3D12 calls | 98,950 | 111,904 to 112,980 | | Presents | 112 | 143 to 168 | | Title state in its crash dump | initialising, frame 0 | running, frame 82 | | Refused depth placements | 1 per run | 0 | AI-assisted (Claude Code, Claude Opus 5.5).
The slot-133 depth/UAV registry recorded each placement's extent as the PC
allocation size and refused, with E_NOTIMPL, any placement that started
inside another live range. On RADV the PC size of a large D16 target is
above the block the title placed it in, so the title's next block starts
inside the previous range: its first depth target was refused, no trace
line showed it, and the title stopped on its own assert and crash reporter
about 30 s into the boot (Game Init, frame 0) on an RDNA2 iGPU.

Overlapping placements at different addresses never shared a backing, so
between two opaque layouts the inner one now gets an image of its own, as
D3D12 leaves an alias's contents undefined until it is reinitialized. A
non-opaque layout is still refused there, and the same-address rules are
unchanged. A refused depth placement is now logged.

d3d12_depth_stencil_uav_test places a texture one alignment step inside
another one: refused for the tiled Xbox layout, its own backing for the
opaque one, and the outer placement still finds its shared backing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:56:01 +00:00
github manually merged commit d16eb1ff0a into gh-pr/1544/base 2026-11-26 09:56:04 +00:00
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 04:04 UTC · original

Merged as a boot-blocker fix: it moves the retail boot on an RDNA2 iGPU under RADV past the texture-creation stop at about 30 s (counts in the description).

  • Claim: RT-PLACED-DEPTH-OVERLAP, in the description, because #14 is full; to be copied to its successor.
  • Tests: the Windows suite under Wine (llvmpipe and an RDNA2 iGPU) shows nothing going from pass to fail, and the red check fails without the registry change.
  • Review welcome after the fact: the registry is #939's (d3d12_xs_placed_depth.h). The rule only changes a placement that starts inside another range at a different address with both layouts opaque. #689 (the same-address case) is untouched.
  • Checked on main 5129be10d + d16eb1ff0: it merges cleanly; the semantic suite passes (487 files, 6,279 tests, 0 files failed); the 14 docs and writer tests pass; check_no_game_data.py is clean on the 4 changed files.

AI-assisted (Claude Code, Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-25 04:04 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1544#issuecomment-7152507230) Merged as a boot-blocker fix: it moves the retail boot on an RDNA2 iGPU under RADV past the texture-creation stop at about 30 s (counts in the description). - **Claim:** `RT-PLACED-DEPTH-OVERLAP`, in the description, because #14 is full; to be copied to its successor. - **Tests:** the Windows suite under Wine (llvmpipe and an RDNA2 iGPU) shows nothing going from pass to fail, and the red check fails without the registry change. - **Review welcome after the fact:** the registry is #939's (`d3d12_xs_placed_depth.h`). The rule only changes a placement that starts inside another range at a different address with both layouts opaque. #689 (the same-address case) is untouched. - **Checked on `main` `5129be10d` + `d16eb1ff0`:** it merges cleanly; the semantic suite passes (487 files, 6,279 tests, 0 files failed); the 14 docs and writer tests pass; `check_no_game_data.py` is clean on the 4 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.