[NVIDIA / D3D12] Command list fails to close with E_INVALIDARG (0x80070057) due to invalid ResourceBarrier flags #13
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#13
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?
@domainawareness420-beep on GitHub · 2026-11-25 11:52 UTC · original
Description
When running the title on an NVIDIA GPU, the host command list fails to close during world loading (
frame ~10465–10538) with:victory_gpu::host: a host command list did not close (0x80070057): a command recorded into it was invalidRunning with
VICTORY_D3D12_DEBUG=1reveals the exact D3D12 debug layer error:D3D12: ID3D12GraphicsCommandList::ResourceBarrier: Missing resource bind flags. id=523 severity=1(Note: Running with
VICTORY_D3D12_WARP=1passes this point without crashing, confirming it is a strict NVIDIA D3D12 validation issue).Environment
--console series-s)Partial Fix / Root Cause
In
crates/victory-gpu/src/list.rsinsidehost_barrier(),wantedis sanitized viacrate::host::legal_state(texture, wanted), butbeforeis passed directly without sanitization (and identical before/after states after masking are not filtered out).Sanitizing both
beforeandwantedwithlegal_state(and skipping no-op transitions wherebefore_legal == after_legal) fixes theid=523barrier crash and allows the game to progress further (up toframe=11032, where another0x80070057occurs):@WuDiXiaoBo on GitHub · 2026-11-25 12:31 UTC · original
Applied your
legal_statepatch on a different NVIDIA card (RTX 4060 Ti 16 GB): the world stops being black and becomes visible, with the colour still wrongI hit the "world loads but every frame is black" state on this fork (
#15, with before-captures: mean R+G+B 0.00 across the whole presented image), read your diagnosis in this issue and applied your patch by hand tocrates/victory-gpu/src/list.rs(host_barrier, kind 0): both sides of a transition throughlegal_state, and a transition whose legal states match dropped instead of recorded.Result: the black screen is gone. Same machine, same save, same build otherwise, fresh cache:
So on this card the patch does not change the frame rate but it changes what is broken: from "nothing is composed" to "the scene is composed and badly shaded". That is a much better failure to debug, and worth having in the tree even before the rest is fixed.
Two things that did not reproduce here, so you know what the patch was and was not doing on this card
a host command list did not close/ResourceBarrier: Missing resource bind flagsline appeared before the patch either, in any of the runs. Whatever the patch fixed for me, it was silent here.host view heap capped at 1000000 ... wanted=1245184 made=934464 lost=310720anda view heap shorter than shaders keep their indices instill print, so that is not the black image either, as you suspected.What is still wrong (in case it is the same shape as the next thing you hit at frame 11032): the colours are not merely "no light in shadow" - the sky's clouds are saturated red, the ground is blown out to white, and the whole image is overexposed. If that is the title's tone mapping reading a buffer that a pass has not filled yet, then it may be one more barrier/state problem on a different path, and I can run whatever you want measured on this card (any
VICTORY_*switch, a capture of a named target,VICTORY_D3D12_DEBUG=1for the info-queue text).My report, with the before-patch captures and the log, is #15. I can post the after-patch screenshot and log here too if useful - they are 2.6 MB and 3.9 MB.
Environment: RTX 4060 Ti 16 GB, driver 32.0.16.2114, i5-12400 (6C/12T), 31.8 GB, Windows 11 build 26300, Series X profile, fork
4cbe9d7, diag build, save = the prologue checkpoint.AI-assisted: the runs, the captures and this text were produced with DeepSeek Harness (DeepSeek-V4-Flash) on my machine, at my request. No game data included.
patched-run.log