V100 research: guard/copy path, dropped draws, SV_Barycentrics (patches + data) #2519

Open
opened 2026-11-29 13:50:11 +00:00 by github-bot · 3 comments
Owner

@⁠Joevy-1112 on GitHub · 2026-11-29 13:48 UTC · original

GTA6 (Xbox Series build) on V100 — findings and patches

Measured on 2× Tesla V100-SXM2-16GB (sm70, no mesh shaders, no fragment_shader_barycentric),
2× Xeon E5-2640v4, GE-Proton10-34 + vkd3d-proton master, victory (recompilation) fork.
Target: GTA6.Xbox.v1.0.2.1-CYBERLEEK. Baseline ~9.5-12.8 fps in-game; frame is CPU-bound in
the host-copy/guard path (GPU ~11-20% busy).

Patches (independently built + tested against main)

patch what status
guard-word-ops.patch Blocks::all/not_in/insert_all + Bits::set_all operate on 64-bit words (micro-bench 2,386→139 ns on a 2,656-block range). Semantics unchanged. cargo check + wine tests 452 passed / same 5 pre-existing Wine-env failures; frame effect <1%
change.patch Guards::opened_at evicts by rest() instead of a fixed 50 ms — a rest longer than 50 ms was silently truncated (found while measuring VICTORY_GUARD_REST; default 3000 unchanged). cargo check + unit test; default path identical
fault-unlocked-fix.patch open_unlocked: a block that cannot be opened is not marked OPENED, so settle() cannot clear a still read-only block's guard state. VICTORY_FAULT_UNLOCKED=1 still crashes for a deeper race; default path unaffected. cargo check + unit test
bary-emulate.patch SV_Barycentrics emulation prototype (single-PS feasibility): substitute per-vertex reads with host perspective interpolation; validated against 137/137 attribute groups and 1e6 fp32 samples (error 0.0). prototype; VS/PS signature sync version (15 files,+892/−30) restores 36/37 PS but the binary aborts on long runs (Invalid record, LLVM7.0.1, rc=-11; offline all 45 containers / 2987 runtime DXIL parse clean). Not deliverable yet.

Reports

  • dropped-draws-feasibility.md — "800 dropped" is actually 4,834/frame (800 direct + 4,074 indirect);
    root cause: victory refuses mesh PSOs before creation (Host::mesh_shaders()), because V100 lacks
    VK_EXT_mesh_shader. Mesh records are GPU-generated indirect (no fixed draw to pre-expand);
    fixed cacheable objects are pipelines, not draws. Compute expansion: shadow-only MVP ≈2-3 weeks,
    full ≈5-8 weeks and fps −10..30%; not worth it. Turing+ GPU is the only real fix.
  • pso-diagnosis.md — the 40 refused VS+PS post-processing PSOs are all SV_Barycentrics
    (37 of 540 PS), rejected by vkd3d d3d12_device_validate_shader_meta; state assumptions
    excluded (single-RT/no-depth/no-blend also refused).
  • guard-lock-structure.md — the 266 ms/frame guard lock wait is the sum of 7-8 asker threads'
    parallel waits, not the frame critical path. rest extension, whole-range lock hold, and
    per-run merge all measured: no frame-time gain.
  • barycentrics-feasibility.md — 28/30 unique DXIL are manual perspective interpolation; formula
    equivalent to hardware; the "one-line" fix is blocked by Flat+ExplicitInterpAMD signature
    conflicts; signature sync is the right path (data-safe).
  • signature-sync.md — the 15-file implementation: 40→1 refused pipelines, draws 603→662,
    fps ~9.4 (unchanged), but long-run abort unresolved.

Reproduction

Everything was produced by a remote agent (dsh-superagent) with the game running on the V100;
each report carries the run logs, counters and scripts in its original ticket directory.

**@⁠Joevy-1112** on GitHub · 2026-11-29 13:48 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2519) # GTA6 (Xbox Series build) on V100 — findings and patches Measured on 2× Tesla V100-SXM2-16GB (sm70, no mesh shaders, no fragment_shader_barycentric), 2× Xeon E5-2640v4, GE-Proton10-34 + vkd3d-proton master, victory (recompilation) fork. Target: GTA6.Xbox.v1.0.2.1-CYBERLEEK. Baseline ~9.5-12.8 fps in-game; frame is CPU-bound in the host-copy/guard path (GPU ~11-20% busy). ## Patches (independently built + tested against main) | patch | what | status | |---|---|---| | `guard-word-ops.patch` | Blocks::all/not_in/insert_all + Bits::set_all operate on 64-bit words (micro-bench 2,386→139 ns on a 2,656-block range). Semantics unchanged. | cargo check + wine tests 452 passed / same 5 pre-existing Wine-env failures; frame effect <1% | | `change.patch` | `Guards::opened_at` evicts by `rest()` instead of a fixed 50 ms — a rest longer than 50 ms was silently truncated (found while measuring VICTORY_GUARD_REST; default 3000 unchanged). | cargo check + unit test; default path identical | | `fault-unlocked-fix.patch` | open_unlocked: a block that cannot be opened is not marked OPENED, so settle() cannot clear a still read-only block's guard state. `VICTORY_FAULT_UNLOCKED=1` still crashes for a deeper race; default path unaffected. | cargo check + unit test | | `bary-emulate.patch` | SV_Barycentrics emulation prototype (single-PS feasibility): substitute per-vertex reads with host perspective interpolation; validated against 137/137 attribute groups and 1e6 fp32 samples (error 0.0). | prototype; VS/PS signature sync version (15 files,+892/−30) restores 36/37 PS but the binary aborts on long runs (`Invalid record, LLVM7.0.1`, rc=-11; offline all 45 containers / 2987 runtime DXIL parse clean). Not deliverable yet. | ## Reports - `dropped-draws-feasibility.md` — "800 dropped" is actually 4,834/frame (800 direct + 4,074 indirect); root cause: victory refuses mesh PSOs before creation (`Host::mesh_shaders()`), because V100 lacks `VK_EXT_mesh_shader`. Mesh records are GPU-generated indirect (no fixed draw to pre-expand); fixed cacheable objects are pipelines, not draws. Compute expansion: shadow-only MVP ≈2-3 weeks, full ≈5-8 weeks and fps −10..30%; not worth it. Turing+ GPU is the only real fix. - `pso-diagnosis.md` — the 40 refused VS+PS post-processing PSOs are all SV_Barycentrics (37 of 540 PS), rejected by vkd3d `d3d12_device_validate_shader_meta`; state assumptions excluded (single-RT/no-depth/no-blend also refused). - `guard-lock-structure.md` — the 266 ms/frame guard lock wait is the sum of 7-8 asker threads' parallel waits, not the frame critical path. rest extension, whole-range lock hold, and per-run merge all measured: no frame-time gain. - `barycentrics-feasibility.md` — 28/30 unique DXIL are manual perspective interpolation; formula equivalent to hardware; the "one-line" fix is blocked by Flat+ExplicitInterpAMD signature conflicts; signature sync is the right path (data-safe). - `signature-sync.md` — the 15-file implementation: 40→1 refused pipelines, draws 603→662, fps ~9.4 (unchanged), but long-run abort unresolved. ## Reproduction Everything was produced by a remote agent (dsh-superagent) with the game running on the V100; each report carries the run logs, counters and scripts in its original ticket directory.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-29 13:50:11 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-29 13:48 UTC · original

Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

**@⁠github-actions[bot]** on GitHub · 2026-11-29 13:48 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2519#issuecomment-7256820608) Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
Author
Owner

@⁠Joevy-1112 on GitHub · 2026-11-29 13:51 UTC · original

This is a research report, but here are the logs from the aborting run as requested.

Play log: victory-nvidia-play-20261129-122813-32.log (5.1 MB, in %LOCALAPPDATA%\victory\logs\), run at 20:34 local.

The abort is visible in the runner output, not the game log (the game log ends with its own Breakpad handler):

2026-11-29T12:17:32 INFO victory_gpu::pipeline: first bind pipeline=0x54d99290 frame=11102 stage="compute" size=65448 hash=334cf8d4ab5e2968
Program aborted due to an unhandled Error:
Invalid record (Producer: 'LLVM7.0.1' Reader: 'LLVM 7.0.1')

Note the stage: compute, not the pixel/vertex shaders the experiment touches. That points at a corrupt entry in the shader/pipeline cache (%LOCALAPPDATA%\victory\cache\pipelines\known-shaders.bin) rather than the SV_Barycentrics change itself — the same ticket also found and fixed an shader_cache::encode/decode field-order bug that could have written such entries. I have cleared that cache and am re-running the 400 s validation; will report whether the abort disappears. Full logs/counters/scripts are in the ticket directories referenced by the reports.

**@⁠Joevy-1112** on GitHub · 2026-11-29 13:51 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2519#issuecomment-7256855772) This is a research report, but here are the logs from the aborting run as requested. Play log: `victory-nvidia-play-20261129-122813-32.log` (5.1 MB, in `%LOCALAPPDATA%\victory\logs\`), run at 20:34 local. The abort is visible in the runner output, not the game log (the game log ends with its own Breakpad handler): ``` 2026-11-29T12:17:32 INFO victory_gpu::pipeline: first bind pipeline=0x54d99290 frame=11102 stage="compute" size=65448 hash=334cf8d4ab5e2968 Program aborted due to an unhandled Error: Invalid record (Producer: 'LLVM7.0.1' Reader: 'LLVM 7.0.1') ``` Note the stage: **compute**, not the pixel/vertex shaders the experiment touches. That points at a corrupt entry in the shader/pipeline cache (`%LOCALAPPDATA%\victory\cache\pipelines\known-shaders.bin`) rather than the SV_Barycentrics change itself — the same ticket also found and fixed an `shader_cache::encode/decode` field-order bug that could have written such entries. I have cleared that cache and am re-running the 400 s validation; will report whether the abort disappears. Full logs/counters/scripts are in the ticket directories referenced by the reports.
Author
Owner

@⁠Joevy-1112 on GitHub · 2026-11-29 14:13 UTC · original

Update: the abort was the shader cache.

I backed up and cleared %LOCALAPPDATA%\victory\cache\pipelines\known-pipelines.bin + known-shaders.bin, redeployed the signature-sync build, and it ran 998 s without aborting (fail=None). So the Invalid record (Producer: 'LLVM7.0.1' Reader: 'LLVM 7.0.1') came from corrupt cache entries — consistent with the shader_cache::encode/decode field-order bug the same ticket found and fixed (that bug could write such entries). Not the SV_Barycentrics change itself.

But the recovered picture has a real cost. With the cache cold the first load took ~11 min (full shader recompile), then in-scene:

build draws/frame in-scene fps GPU time
baseline (36/37 PS refused) ~662 ~9.4 ~17 ms
signature-sync (36/37 PS recovered) 613–1168 ~2.0 ~119 ms

So ~9.4 fps was the incomplete picture (post-processing/UI passes missing); ~2.0 fps is the complete one (the recovered passes actually render). The education hints ("使用 L 四处移动 / 使用 R 移动镜头") now appear, which confirms the UI passes are back.

Practical implication: the change is worth landing for correctness, but on this V100 it trades fps for completeness — the user should decide whether to keep it on by default. The cache-clear is not part of the patch; it is a one-time fix for installations with stale caches.

**@⁠Joevy-1112** on GitHub · 2026-11-29 14:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2519#issuecomment-7257131092) **Update: the abort was the shader cache.** I backed up and cleared `%LOCALAPPDATA%\victory\cache\pipelines\known-pipelines.bin` + `known-shaders.bin`, redeployed the signature-sync build, and it ran **998 s without aborting** (`fail=None`). So the `Invalid record (Producer: 'LLVM7.0.1' Reader: 'LLVM 7.0.1')` came from corrupt cache entries — consistent with the `shader_cache::encode/decode` field-order bug the same ticket found and fixed (that bug could write such entries). Not the SV_Barycentrics change itself. **But the recovered picture has a real cost.** With the cache cold the first load took ~11 min (full shader recompile), then in-scene: | build | draws/frame | in-scene fps | GPU time | |---|---|---|---| | baseline (36/37 PS refused) | ~662 | ~9.4 | ~17 ms | | signature-sync (36/37 PS recovered) | 613–1168 | **~2.0** | **~119 ms** | So ~9.4 fps was the *incomplete* picture (post-processing/UI passes missing); ~2.0 fps is the *complete* one (the recovered passes actually render). The education hints ("使用 L 四处移动 / 使用 R 移动镜头") now appear, which confirms the UI passes are back. Practical implication: the change is worth landing for correctness, but on this V100 it trades fps for completeness — the user should decide whether to keep it on by default. The cache-clear is not part of the patch; it is a one-time fix for installations with stale caches.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA#2519
No description provided.