Repository navigation
Conversation
… RENDER_TARGET or DEPTH_WRITE
…so the state map is checked with the riid and output in place
…VC leaves the upper half of the stack slot), and else-branch the generic forwarder (C4702); found by MartinIndra02 on ProjectLeonida#7356
…S (CLAIM 7110346733) Stacked on ProjectLeonida#7356's pc_initial_state_word. Barrier layout 0x3 was refused as buffer-only bits; with ALLOW_UNORDERED_ACCESS it becomes UNORDERED_ACCESS.
|
Independent native Windows check of 443a179b with MSVC 19.44.35230 x64, Release. The tested revision includes #7356. The focused I also checked a UAV-only RGBA8 texture following the coordination report. All three slots forwarded |
|
Tested Heads-up: this conflicts with #8372 (CPU descriptor handles in the list methods, 37 files) in |
tupacfan04
left a comment
There was a problem hiding this comment.
The 0x3 → UNORDERED_ACCESS mapping for RT+UAV is correct (runtime/shims/d3d12_xs_device.cpp:1473-1475), and the RT-only/buffer controls are fine. One real defect remains in the full diff:
A plain texture's 0x6 SHADER_RESOURCE layout is still forwarded as 0x6 and refused. :1476-1479 maps 0x6 only for ALLOW_RENDER_TARGET/ALLOW_DEPTH_STENCIL; a plain texture falls through to return state_word, forwarding 0x6. 0x6 is D3D12_BARRIER_LAYOUT_SHADER_RESOURCE; its legacy state is PIXEL_SHADER_RESOURCE | NON_PIXEL_SHADER_RESOURCE (0xC0), not 0x6. The PC layer refuses it at d3d12_vulkan_device.cpp:1531 (s & ~(writes | reads) includes the buffer-only 0x2 bit), so CreateCommittedResource returns E_INVALIDARG.
The mock test hides it: runtime/test/xs_proxy_mock_test.cpp:845 calls the mock with the plain descriptor and kConsole=0x6 and asserts state_of(...) == kConsole; the mock returns S_OK without reaching the layer. The comment at :842 (“a texture without a use flag … left alone”) is the wrong expectation for a valid SHADER_RESOURCE layout.
This is not hypothetical: issue #8344 comment 7110441457 reports 2/2 retail runs where a 2D texture with flags 0 and state 0x6 is refused 6 times per run during the first drawing phase, and the title fails. Fix: map a plain 0x6 to 0xC0 in pc_initial_state_word (or apply the full state_for_barrier_layout table from #7218) and change the test at :845 to expect 0xC0.
Test gap: the new 0x3 block (:861-877) covers RT+UAV, RT-only and a buffer, but not a texture with only ALLOW_UNORDERED_ACCESS and layout 0x3 — the next retail case in the same comment. The code handles it, but a regression requiring both RT and UAV would pass; add UAV-only for slots 27/53/76. Synthetic/code-read only; no game files. AI-assisted (OpenCode).
Summary
pc_initial_state_wordfor console barrier layouts in the initial-state slot).ALLOW_RENDER_TARGET | ALLOW_UNORDERED_ACCESSand console layout0x3was refused as buffer-only bits (VERTEX_AND_CONSTANT_BUFFER | INDEX_BUFFER). Map0x3→UNORDERED_ACCESSwhen the description hasALLOW_UNORDERED_ACCESS(measured barrier-layout table: layout 3 = UAV).0x6→ RENDER_TARGET / DEPTH_WRITE by flags. Syntheticxs_proxy_mock_testcoverage for slots 27, 53 and 76.Coordination claim in #8344. AI-assisted (Cursor / Composer).
Verification
Linux host; the mock test is Windows/MSVC-only (
xs_proxy_mock_test). Logic review + diff check here. A Windows second check ofctest -R xs_proxy_mockon this head (after #7356) would help.0x3on RT+UAV → UAV; RT-only and buffers leave0x3unchanged.xs_proxy_mock_test(needs a Win runner / reviewer).Made with Cursor