World's first frame always ends in "a host command list did not close (0x80070057)" on a GPU without mesh shaders #458

Open
opened 2026-11-27 12:10:29 +00:00 by bbing13 · 0 comments
bbing13 commented 2026-11-27 12:10:29 +00:00 (Migrated from github.com)
Contributor

Imported from avatarmanz/VIctory-7900XTX. Originally posted by bbing13 on 2026-11-27T12:10:29Z.


World's first frame: every run ends in a host command list did not close (0x80070057) on a GPU without mesh shaders

Windows 10 + RDNA1 (RX 5700) + the mesh→compute fallback. Menus work; the
world's first frame is refused by D3D12 in 9 of 9 runs, naming a
different pipeline each time. This is not a resources problem and not a
pipeline-creation failure — measurements and the full exclusion list below.

Environment

OS Windows 10 Pro 19045 (22H2) x64
CPU Ryzen 5 3600 (6C/12T)
RAM 16 GiB
GPU Radeon RX 5700 8 GB (Navi 10, RDNA1, MeshShaderTier = 0)
Driver 32.0.21045.29003 (2026-11-17)
Fork avatarmanz/VIctory-7900XTX @ 0dec5dc
Patches on top upstream #969 (Agility SDK) + upstream #961 (mesh→compute fallback)
Agility SDK 1.620.2 (D3D12SDKVersion = 620)
Title GTA VI game_scarlett_master.exe, build b99f876b…, v1.0.2.1

Branch with both patches and one extra fix:
https://github.com/bbing13/VIctory-7900XTX/tree/win10-rdna1-mesh-fallback

What works

Menus are fine: language select → legal notice → main menu, 30 fps,
1.9 GB VRAM, 7.8 GB private memory. Screenshots were taken but are not
attached, per the repository's asset policy.

Agility does its job on Windows 10:

Agility SDK ready version=620 dir=...\D3D12
host D3D12 adapter adapter="AMD Radeon RX 5700" vendor=0x1002 device=0x731f vram_mb=8151
host mesh shader support mesh=false

Mesh translation coverage is complete:

$ victory mesh-compute "<game dir>"
containers   26599
mesh         9282 programs
as compute   9282 translated, 0 failed
layout       128.0 threads, 128.0 vertices, 128.0 primitives a group on average

Shader precompile is also complete: 25790 shaders in the cache, 195 do not translate (all 195 are geometry-shader containers), matching the fork's
README.

What fails

Entering story mode (Series S profile) always ends the run in the same place,
inside the world's first frame:

ERROR victory_gpu::host: a host command list did not close (参数错误。 (0x80070057)):
      a command recorded into it was invalid
VIctory: host GPU failure: a host command list did not close (0x80070057)

The last bind before it varies between runs, e.g.:

first bind pipeline=0x… stage="mesh"  hash=1fa93fcea4869fa8
first bind pipeline=0x… stage="pixel" hash=d603540bd3056c4b
host mesh pipeline, run as compute shaders=[mesh 1fa93fcea4869fa8, pixel d603540bd3056c4b]
→ did not close

and in other runs 95988cc1e16f1d89 (a compute of 8,144 bytes with
user_data=1, samplers=1), f5f5e06abea6e83a, etc. All within the same
frame; the frame line just before shows 616 draws and
dropped 3991 without a host pipeline (1199 being made).

Important: the pipeline is created successfully

With the per-frame wait budget raised to 30 s, the log shows the pipeline
being built, and the failure still comes after it:

05:09:07.763  a pass over the screen was waited for ms=1843 made=true
05:09:08.639  shader translated stage="compute" hash=95988cc1e16f1d89
05:09:25.726  host pipeline shaders=[compute 95988cc1e16f1d89]      ← created
05:09:25.823  ERROR a host command list did not close (0x80070057)   ← 97 ms later

So it is not "the pipeline was not ready". Something about what is recorded
into the list for that pipeline (or around it) is rejected by the runtime.

Ruled out, one run each

Hypothesis What was tried Result
Game files incomplete 208.6 GB, all 5 modules bound, 0 missing imports not it
Shader translation 9,282/9,282 mesh → compute; 25,790 cached not it
Per-frame wait budget too small VICTORY_PIPELINE_WAIT_MS=30000, VICTORY_SCREEN_WAIT_MS=30000 crash only moved 17 s later
Dropped dispatches leave a bad record scripts\play.ps1 -Safe (VICTORY_UNDER_WIDE=0, VICTORY_LAND_ECHO=0) 0 drops, still crashed
VRAM exhaustion VICTORY_TEXTURE_BUDGET_MB=3072, VICTORY_RESIDENCY=1, VICTORY_RESIDENCY_LIMITED=1 still crashed
Resolution / fill rate VICTORY_OUTPUT=1280x720, VICTORY_RENDER_SCALE=0.5 still crashed
Pipeline worker races VICTORY_PIPELINE_WORKERS=1 (from 8) still crashed
Descriptor-heap synchronisation VICTORY_HEAP_PASS_ASIDE=0, VICTORY_SYNC_FINE=1, VICTORY_SYNC_IN_PLACE=0, VICTORY_SPANS_QUICK=0 still crashed
Pipelines made too late VICTORY_EARLY_ALL=1 still crashed
FSR4 upscaler path VICTORY_UPSCALER=6 (title's own upscaler) avoids FFX_FSR4_* DeserializeComputePipelineStateX FAILED, crash remains
Overlay hooks (RTSS) RTSS + MSI Afterburner processes stopped still crashed
List concurrency VICTORY_JOIN_LISTS=1 still crashed

Failure counts: 9 of 9 runs, across every configuration above.

Two facts that may save the next person time

1. The D3D12 debug layer could not be used here.

WARN victory_gpu::host: no D3D12 debug layer
  error=应用程序请求的操作依赖于已缺失或不匹配的 SDK 组件。 (0x887A002D)

That is with D3D12\D3D12Core.dll + d3d12SDKLayers.dll + all three Agility
1.620.2 files beside the executable and in the D3D12\ subdirectory, in a
diagnostics build with VICTORY_D3D12_DEBUG=1. GetConfigurationInterface(CLSID_D3D12Debug)
on the Agility factory returns 0x887A002D. So GPU-based validation and any
message naming the offending command were unavailable.

2. Dropping the refused list is not a fix — the runtime is already damaged.

I added a switch that marks a list spoiled when Close() fails, skips it in
submission, and keeps the process alive:

WARN a host command list did not close: its work is left out and the run goes on
     error=参数错误。 (0x80070057)

The process survived that point, but died a moment later in the runtime:

unhandled exception 0xc0000005 at D3D12Core.dll+0x111961
  (read 0xffffffffffffffd0)
  rdi = 0x80070057

D3D12 de-referencing the E_INVALIDARG value means state inside the runtime
is already inconsistent once Close() has failed, not just that one list is
unusable. Recovery at that level is not possible from the caller.

One change in this branch that might be relevant

Static samplers used to be numbered per stage while all sharing
SAMPLER_SPACE = 0, so a pixel shader's s0 and the compute form of a mesh
program's s0 named the same register in the same space. I changed each
stage to take its own sampler space
(SAMPLER_SPACE_PER_STAGE = 4 in crates/victory-gpu/src/pipeline/host.rs).

That fixed a real defect: the pipeline that used to fail after 297 ms
(95988cc1e16f1d89) now builds and runs. It did not stop the world's
first frame from failing — the refusal simply moved to another pipeline — so
there is at least one more cause of the same signature.

What I would try next

  1. Get the debug layer working somewhere else. On a machine where
    d3d12SDKLayers.dll loads, VICTORY_D3D12_DEBUG=1 should name the command
    and its argument directly, which would end this hunt in one run.
  2. Bisect what the first world frame records. The candidates, in the order
    I would cut them in: indirect arguments / ExecuteIndirect records, depth
    twins, texture tables picked by index, and the fallback's u0…u2/t0…t2
    root descriptors (MESH_OUT_SPACE).
  3. Try a GPU that has mesh shaders but a small amount of VRAM (e.g.
    RX 6600 8 GB). If the first frame succeeds there, the problem is specific
    to the compute form of the mesh path rather than to the frame's content.

Reproduction

$env:VICTORY_GAME_DIR         = '<your dump>'
$env:VICTORY_UPSCALER         = '6'
$env:VICTORY_LEVELS_ON_DEMAND = '1'
$env:VICTORY_PIPELINE_WAIT_MS = '0'
$env:VICTORY_SCREEN_WAIT_MS   = '60000'

target\release\victory.exe run '<dump>\game_scarlett_master.exe' `
    --execute --console series-s

Then choose a language on the first-boot screens and enter story mode.

Logs

Happy to attach full runs on request (each is 1–1.7 MB of INFO tracing).
Nothing from the game itself — no assets, no shader dumps, no screenshots —
is included, per the repository's asset policy.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6646151271 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/issues/458). Originally posted by [bbing13](https://github.com/bbing13) on 2026-11-27T12:10:29Z. --- # World's first frame: every run ends in `a host command list did not close (0x80070057)` on a GPU without mesh shaders Windows 10 + RDNA1 (RX 5700) + the mesh→compute fallback. Menus work; the world's first frame is refused by D3D12 in **9 of 9 runs**, naming a different pipeline each time. This is not a resources problem and not a pipeline-creation failure — measurements and the full exclusion list below. ## Environment | | | |---|---| | OS | Windows 10 Pro 19045 (22H2) x64 | | CPU | Ryzen 5 3600 (6C/12T) | | RAM | 16 GiB | | GPU | Radeon RX 5700 8 GB (Navi 10, RDNA1, `MeshShaderTier = 0`) | | Driver | 32.0.21045.29003 (2026-11-17) | | Fork | `avatarmanz/VIctory-7900XTX` @ `0dec5dc` | | Patches on top | upstream #969 (Agility SDK) + upstream #961 (mesh→compute fallback) | | Agility SDK | 1.620.2 (`D3D12SDKVersion = 620`) | | Title | GTA VI `game_scarlett_master.exe`, build `b99f876b…`, v1.0.2.1 | Branch with both patches and one extra fix: `https://github.com/bbing13/VIctory-7900XTX/tree/win10-rdna1-mesh-fallback` ## What works Menus are fine: language select → legal notice → main menu, **30 fps**, 1.9 GB VRAM, 7.8 GB private memory. Screenshots were taken but are not attached, per the repository's asset policy. Agility does its job on Windows 10: ``` Agility SDK ready version=620 dir=...\D3D12 host D3D12 adapter adapter="AMD Radeon RX 5700" vendor=0x1002 device=0x731f vram_mb=8151 host mesh shader support mesh=false ``` Mesh translation coverage is complete: ``` $ victory mesh-compute "<game dir>" containers 26599 mesh 9282 programs as compute 9282 translated, 0 failed layout 128.0 threads, 128.0 vertices, 128.0 primitives a group on average ``` Shader precompile is also complete: `25790 shaders in the cache, 195 do not translate` (all 195 are geometry-shader containers), matching the fork's README. ## What fails Entering story mode (Series S profile) always ends the run in the same place, inside the world's **first** frame: ``` ERROR victory_gpu::host: a host command list did not close (参数错误。 (0x80070057)): a command recorded into it was invalid VIctory: host GPU failure: a host command list did not close (0x80070057) ``` The last bind before it varies between runs, e.g.: ``` first bind pipeline=0x… stage="mesh" hash=1fa93fcea4869fa8 first bind pipeline=0x… stage="pixel" hash=d603540bd3056c4b host mesh pipeline, run as compute shaders=[mesh 1fa93fcea4869fa8, pixel d603540bd3056c4b] → did not close ``` and in other runs `95988cc1e16f1d89` (a compute of 8,144 bytes with `user_data=1, samplers=1`), `f5f5e06abea6e83a`, etc. All within the same frame; the frame line just before shows `616 draws` and `dropped 3991 without a host pipeline (1199 being made)`. ### Important: the pipeline is created successfully With the per-frame wait budget raised to 30 s, the log shows the pipeline being **built**, and the failure still comes after it: ``` 05:09:07.763 a pass over the screen was waited for ms=1843 made=true 05:09:08.639 shader translated stage="compute" hash=95988cc1e16f1d89 05:09:25.726 host pipeline shaders=[compute 95988cc1e16f1d89] ← created 05:09:25.823 ERROR a host command list did not close (0x80070057) ← 97 ms later ``` So it is not "the pipeline was not ready". Something about what is recorded into the list for that pipeline (or around it) is rejected by the runtime. ## Ruled out, one run each | Hypothesis | What was tried | Result | |---|---|---| | Game files incomplete | 208.6 GB, all 5 modules bound, `0 missing` imports | not it | | Shader translation | 9,282/9,282 mesh → compute; 25,790 cached | not it | | Per-frame wait budget too small | `VICTORY_PIPELINE_WAIT_MS=30000`, `VICTORY_SCREEN_WAIT_MS=30000` | crash only moved 17 s later | | Dropped dispatches leave a bad record | `scripts\play.ps1 -Safe` (`VICTORY_UNDER_WIDE=0`, `VICTORY_LAND_ECHO=0`) | 0 drops, still crashed | | VRAM exhaustion | `VICTORY_TEXTURE_BUDGET_MB=3072`, `VICTORY_RESIDENCY=1`, `VICTORY_RESIDENCY_LIMITED=1` | still crashed | | Resolution / fill rate | `VICTORY_OUTPUT=1280x720`, `VICTORY_RENDER_SCALE=0.5` | still crashed | | Pipeline worker races | `VICTORY_PIPELINE_WORKERS=1` (from 8) | still crashed | | Descriptor-heap synchronisation | `VICTORY_HEAP_PASS_ASIDE=0`, `VICTORY_SYNC_FINE=1`, `VICTORY_SYNC_IN_PLACE=0`, `VICTORY_SPANS_QUICK=0` | still crashed | | Pipelines made too late | `VICTORY_EARLY_ALL=1` | still crashed | | FSR4 upscaler path | `VICTORY_UPSCALER=6` (title's own upscaler) | avoids `FFX_FSR4_* DeserializeComputePipelineStateX FAILED`, crash remains | | Overlay hooks (RTSS) | RTSS + MSI Afterburner processes stopped | still crashed | | List concurrency | `VICTORY_JOIN_LISTS=1` | still crashed | Failure counts: **9 of 9** runs, across every configuration above. ## Two facts that may save the next person time **1. The D3D12 debug layer could not be used here.** ``` WARN victory_gpu::host: no D3D12 debug layer error=应用程序请求的操作依赖于已缺失或不匹配的 SDK 组件。 (0x887A002D) ``` That is with `D3D12\D3D12Core.dll` + `d3d12SDKLayers.dll` + all three Agility 1.620.2 files beside the executable *and* in the `D3D12\` subdirectory, in a `diagnostics` build with `VICTORY_D3D12_DEBUG=1`. `GetConfigurationInterface(CLSID_D3D12Debug)` on the Agility factory returns `0x887A002D`. So GPU-based validation and any message naming the offending command were unavailable. **2. Dropping the refused list is not a fix — the runtime is already damaged.** I added a switch that marks a list spoiled when `Close()` fails, skips it in submission, and keeps the process alive: ``` WARN a host command list did not close: its work is left out and the run goes on error=参数错误。 (0x80070057) ``` The process survived that point, but died a moment later in the runtime: ``` unhandled exception 0xc0000005 at D3D12Core.dll+0x111961 (read 0xffffffffffffffd0) rdi = 0x80070057 ``` D3D12 de-referencing the `E_INVALIDARG` value means state inside the runtime is already inconsistent once `Close()` has failed, not just that one list is unusable. Recovery at that level is not possible from the caller. ## One change in this branch that might be relevant Static samplers used to be numbered per stage while all sharing `SAMPLER_SPACE = 0`, so a pixel shader's `s0` and the compute form of a mesh program's `s0` named the same register in the same space. I changed each stage to take its own sampler space (`SAMPLER_SPACE_PER_STAGE = 4` in `crates/victory-gpu/src/pipeline/host.rs`). That fixed a real defect: the pipeline that used to fail after 297 ms (`95988cc1e16f1d89`) now builds and runs. It did **not** stop the world's first frame from failing — the refusal simply moved to another pipeline — so there is at least one more cause of the same signature. ## What I would try next 1. **Get the debug layer working somewhere else.** On a machine where `d3d12SDKLayers.dll` loads, `VICTORY_D3D12_DEBUG=1` should name the command and its argument directly, which would end this hunt in one run. 2. **Bisect what the first world frame records.** The candidates, in the order I would cut them in: indirect arguments / `ExecuteIndirect` records, depth twins, texture tables picked by index, and the fallback's `u0…u2`/`t0…t2` root descriptors (`MESH_OUT_SPACE`). 3. **Try a GPU that has mesh shaders but a small amount of VRAM** (e.g. RX 6600 8 GB). If the first frame succeeds there, the problem is specific to the compute form of the mesh path rather than to the frame's content. ## Reproduction ```powershell $env:VICTORY_GAME_DIR = '<your dump>' $env:VICTORY_UPSCALER = '6' $env:VICTORY_LEVELS_ON_DEMAND = '1' $env:VICTORY_PIPELINE_WAIT_MS = '0' $env:VICTORY_SCREEN_WAIT_MS = '60000' target\release\victory.exe run '<dump>\game_scarlett_master.exe' ` --execute --console series-s ``` Then choose a language on the first-boot screens and enter story mode. ## Logs Happy to attach full runs on request (each is 1–1.7 MB of `INFO` tracing). Nothing from the game itself — no assets, no shader dumps, no screenshots — is included, per the repository's asset policy.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
avatarmanz/VIctory-7900XTX#458
No description provided.