GPU: turn zero-element buffer SRVs and UAVs into null descriptors #1426
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1427"
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?
Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-24T17:57:52Z.
Fixes #912.
Summary
desc.Anonymous.Buffer.NumElements == 0at the top ofbuffer_srvandbuffer_uav(beforeshadow::find), log viaonce!, and returnNonesoHostHeapwrites a type-matched null buffer descriptor instead of callingCreateShaderResourceView/CreateUnorderedAccessViewwithNumElements == 0and removing the host device (0x887A0001).Verification
HostHeapunit tests and a multi-adapter D3D12 Debug Layer +ID3D12InfoQueuecompute dispatch readback test exercisingNumElements == 0alongside non-empty buffer SRVs/UAVs:0errors)0errors)0errors)cargo clippy --workspace --all-targets --all-featuresandcargo xtask policy: passed.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:40:12Z.
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.Zero-element buffer views already become null views in main (within() requires count > 0, commit
4051149c, with its own test).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.
Pull request closed