GPU: turn zero-element buffer SRVs and UAVs into null descriptors #1427
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1427
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1427/head"
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?
@fuzeofficlal on GitHub · 2026-11-24 17:57 UTC · original
fuzeofficlal:fix/zero-element-buffer-views-912→main· +636 −25 · 1 files · 1 commits · closed without mergingFixes #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.@Marvisak on GitHub · 2026-11-25 00:40 UTC · original
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