WARP: a constant buffer read through the title's null SRV at heap slot 0 removes the device (CBV handle over an SRV descriptor) #1595
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#1595
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?
@ThomasSAMP on GitHub · 2026-11-24 19:39 UTC · original
Split out of #653 (comment, point 2), as suggested there.
What happens
On WARP, with #568 and #334 applied (they remove #653's first removal), world loading ends with
0x887A0005after a submission of one list of compute dispatches. GPU-based validation (VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1) reports one message just before:Why
In the DXIL that
ffe310eemits for that program:rawBufferLoadthrough a heapByteAddressBuffer);createHandleFromHeap(i32 %idx)), annotated as a constant buffer ({13, 65536});cbufferLoadLegacy, unconditionally. A compare of the index with 0 (icmp ne) is computed, but nothing branches on it before the load.At run time the index is 0. Heap slot 0 holds the title's null SRV: the device-removed report shows
[heap 0: Shader(0, Some([42, 2, 5768, ...])) -> null], a view of no resource.#568 doesn't cover this: it fills table slots the title left empty with a typed null, but slot 0 here was written by the title, as an SRV.
Possible directions (not tried)
ByteAddressBuffer) instead of aCBufferhandle. That would match the SRV kind the title's heap mostly holds. It still mismatches if a slot holds a typed or structured view.Setup
Windows 11 Pro (build 26300), AMD Radeon RX 9070 XT (driver 32.0.32029.2010) and WARP, diagnostics build of
ffe310e+ #568 (cd6d559) + #334 (c99e429), own retail 1.0.2.1, Series X mode. Seen once with the debug layer alone (removal after 5 min 55) and once with GBV (removal after about 7 min, with the message above).AI-assisted (Claude Code, Claude Opus 5.5); no game data (a shader hash and DXIL op names only).
@BastienRodz on GitHub · 2026-11-24 19:40 UTC · original
From #568's side: right, this is outside it, and #568 can't be stretched to cover it. Its typed nulls rely on two things a computed heap index doesn't have:
shortcut:note);createHandleFromHeapwith a computed index reads the heap directly, so there is no table to swap.Slot 0 here is read both as an SRV and as a CBV, so no single descriptor in that slot can be valid for both readers. That leaves your translator directions: the read itself has to stop going through a CBV handle (or not happen) when the index points at a non-CBV slot.
@Marvisak on GitHub · 2026-11-25 12:47 UTC · original
Automated triage for the maintainers.
The path is still in
main(940d32f): incrates/victory-shader/src/emit/lower.rs,Lower::smem, a scalar buffer load is read as a raw buffer only for heap-direct constants, table entries listed as CBVs, SRVs and root UAVs; any other descriptor (such as a table slot with no used-resource entry, as here) falls through to a constant-buffer handle(13, 0x1_0000)read withcbufferLoadLegacy, unguarded. When that slot holds the title's null SRV, D3D12 sees a CBV handle over an SRV descriptor, which WARP turns into a device removal.Open PR #2068 addresses this (unlisted table constant loads lowered as guarded raw SRVs).
Generated by Claude Code