Repository navigation
GPU: transition shadow buffers between UAV and vertex/index/CBV states - #588
LAKSHYA-cmd-tech wants to merge 1 commit into
Conversation
|
Tested on an RTX 4070 (driver 32.0.16.2101) on top of #493 + #483, the pair that stops the device removal on this GPU. Run with
AI-assisted. |
91ebf66 to
cc8e78d
Compare
- Add Shadow::ensure_state to track and transition buffer states on host command lists. - In prepare_for, ensure vertex and index buffers transition from UNORDERED_ACCESS to VERTEX_AND_CONSTANT_BUFFER and INDEX_BUFFER respectively. - In readable, ensure buffers accessed as UAVs transition to UNORDERED_ACCESS. - In root_view, transition buffers used as root CBV or SRV to their respective states. - Add unit test shadow_buffer_transitions_state_when_requested verifying transitions. - Resolves Marvisak#548 (D3D12 debug layer ERROR id=538 and device hung from buffer state mismatch).
cc8e78d to
54c7c89
Compare
|
Thanks for working on #548! After reviewing the diff and cross-checking with @iurysf's D3D12 debug-layer test results above, there are a few D3D12 state-tracking issues in this approach that explain both the new
Note that #334 already takes the per-list Reviewed against the diff and the code on |
|
Second-read endorsement plus one nit not in @dpalacios69's list. Our independent read of this diff converged on the same prescription he names at the end: main already ships the per-list tool — |
|
@Headache3318 thanks for the second read, and agreed that extending One correction on the nit: in AI-assisted. |
|
windows-gnu cross-target gate on this head merged onto |
|
Automated triage for the maintainers. Closing because by our reading the change is incorrect or would break something that works today. Tracks one D3D12 state per buffer copy in a global atomic and emits transitions from it, but lists are recorded in parallel and in another order than they run, and buffers decay to the common state after every submission: the 'before' state of these barriers is wrong in general. Also carries unrelated reformatting. The promotion problem it reports (#548) deserves a per-list fix. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
Shaders: Read signed and unsigned bytes and halfwords from raw buffers
Summary
Resolves #548 (D3D12 debug layer ERROR id=538 and device hung on RTX 30-series GPUs during world execution).
Problem
In #548, the D3D12 debug layer repeatedly reported:
\`nDrawIndexedInstanced / IASetVertexBuffers on 'title buffer 0x159f0000+0xae00000' (182,452,224 bytes): state UNORDERED_ACCESS, expected VERTEX_AND_CONSTANT_BUFFER.
\`nFollowed by GPU device hung (\DXGI_ERROR_DEVICE_HUNG, \