Skip to content

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

Merged
aslan2142 merged 1 commit into
ProjectLeonida:mainfrom
aslan2142:placed-depth-overlap
Nov 25, 2026

Conversation

@aslan2142

Copy link
Copy Markdown
Collaborator

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).

…image

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 <noreply@anthropic.com>
@aslan2142
aslan2142 merged commit c7e82e2 into ProjectLeonida:main Nov 25, 2026
2 of 5 checks passed
@aslan2142

Copy link
Copy Markdown
Collaborator Author

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).

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant