D3D12.X: null ID3D12Heap::GetDesc leaves Flags untouched #2773
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 ivall/xcl. Originally posted by Amongus6969 on 2026-11-26T12:24:04Z.
On
b49be18, the null backend’sID3D12Heap::GetDescslot callsHidden_ZeroDesc40, which clears bytes 0–39 of the return buffer. On Windows x64,Flagsoccupies bytes 40–43 of the 48-byteD3D12_HEAP_DESC. The caller therefore gets the buffer’s previous contents as heap flags. This is a missing field, not just uncleared padding.Related: #1902 fixed the return-buffer argument order, not the write size.
Suggested regression test: Create a heap with
D3D12_HEAP_FLAG_NONEon the null device. Fill an aligned return buffer with0xA5, callGetDesc, and check thatFlagsisD3D12_HEAP_FLAG_NONE. Repeat with a freshly filled buffer for the other supported argument order. No GPU or game is needed.Verification: Source inspection only. The proposed test was not run; no game failure is claimed.
AI use (source review and drafting):
ompwithopenai-codex/gpt-6.2-astrachecked the cited code atb49be18and drafted this issue.Imported from ivall/xcl. Originally posted by oni-swr on 2026-11-26T12:37:37Z.
Claiming this: I'm making the null ID3D12Heap::GetDesc fill the full 48-byte D3D12_HEAP_DESC, including Flags, with a regression test. A draft PR will follow.
AI-assisted (Claude Code, Claude Sonnet 5.5).