[Audit & Hardware Census] 26,503 shaders analyzed on D3D12 (RTX 4060 Ti): cutscene fade analysis, 3 isolated hardware blockers, and opcode failure taxonomy #885

Open
opened 2026-11-26 04:14:07 +00:00 by github-bot · 3 comments
Owner

@⁠aiiGete on GitHub · 2026-11-24 13:28 UTC · original

[Audit & Hardware Census] 26,503 shaders analyzed on D3D12 (RTX 4060 Ti): cutscene fade analysis, 3 isolated hardware blockers, and opcode failure taxonomy

Environment

  • Target Title: Grand Theft Auto VI (Xbox Series Scarlett master build v1.0.2.1)
  • Host GPU: NVIDIA GeForce RTX 4060 Ti 8GB (Ada Lovelace, Driver 572.x / 576.x)
  • Host CPU: Intel Core i5-10400F (6C/12T)
  • OS: Windows 11 x64 (24H2)
  • Base Commit: 14c15be (dev-next)

1. Executive Summary & Runtime Baseline

Earlier community reports (such as #496) identified crashes or black screens at the transition to the first cutscene. Running telemetry directly on clean baseline 14c15be (without experimental debug layers or pipeline-skipping flags) reveals:

  1. The Black Frame Transition is an Intentional Fade-Out:
    • Log line: WARN victory_gpu::queue: levels after the black frame frame=4402 levels=[252, 252, 251, 250, 249, 0, 0, 0, 0, 0, 0, 0]
    • This probes maximum pixel luminance over the last 12 presented frames. It represents Rockstar’s intentional loading-screen fade-out curve before Lucia's prison scene. It is not an unhandled exception or an execution fault.
  2. Current Baseline Stability:
    • With VICTORY_D3D12_DEBUG=1 removed (eliminating NVIDIA kernel TDR 0x887A0006 caused by Microsoft's validation layer choking on 30+ concurrent command lists), the engine runs locked at 30.1 FPS (33.3 ms/frame, 5.2 ms GPU time). Audio, keyboard/gamepad emulation, and subtitles advance continuously.
  3. The 3D Scene Remains Black Because Draws Are Dropped:
    • Shaders that fail DXIL translation mark the corresponding draw/dispatch as is_skipped in draw.rs. Without compiled geometry and lighting pipelines, the presented image stays at luminance 0.

2. Autonomous Hardware Shader Census (shaders.rpf)

Running the offline compiler and driver pipeline builder (victory translate --validate --pipelines "shaders.rpf") across the full package yielded 10,977 CPU-seconds of continuous validation and physical PSO creation on the host RTX 4060 Ti:

  • Total Containers Discovered: 26,503 (614 duplicates skipped)
  • Lowered to IR: 26,084 of 26,084 (40,601,701 instructions)
  • Successfully Emitted DXIL & Validated by Driver: Over 22,000 shaders compiled directly into native D3D12 hardware PSOs without driver removal or kernel faults.

3. The 3 Hardware & Specification Blockers

The full hardware run cleanly separated compiler limitations, Microsoft DXIL validator restrictions, and NVIDIA driver parameter rejections:

A. Mesh Shader Output Payload Limit Exceeded (53 programs)

  • Error: validator: Function: main: error: For shader 'main', vertex plus primitive output size is greater than 32768.
  • Example: MS_VS_PedTransformTransmissionFire_52f61330_Wrapped Ms (offset 0x11a9ba5)
  • Cause: Microsoft DXIL enforces a strict 32 KiB (32,768 bytes) per-threadgroup limit on combined vertex + primitive outputs. On Scarlett’s unified physical memory, Rockstar exceeded this cap in character/fire mesh shaders.
  • Fix: PR #586 (staging GS_ALLOC_REQ counts in group-shared LDS memory and unifying SetMeshOutputCounts at the postdominator join).

B. Driver PSO Rejection: E_INVALIDARG 0x80070057 (328 compute programs)

  • Error: pipeline: Parâmetro incorreto (0x80070057) on CreateComputePipelineState
  • Example: cascadeshadows_classify:CS_ShadowUnifiedClearRaster_6bcdd348_Wrapped Cs (offset 0xbeb3b20)
  • Cause: Cascade shadow map clearing and classification shaders. The generated host root signature exceeds the 64-DWORD root parameter budget or maps root constants/views into overlapping or unsupported PC register spaces.
  • Fix: PR #493 / PR #710 (root SRV table bounding and root parameter consolidation).

C. Untracked Indirect Descriptor Addressing (298 programs)

  • Error: resources: a descriptor neither loaded nor built
  • Example: VS_TransformSkin_VfxVBuffer_AlphaClip_5fd4397c_Wrapped Vs (offset 0x49c1fc0)
  • Cause: Vertex skinning shaders where buffer views are passed via indirect SGPRs without tracing back to a statically enumerated table slot.

4. Taxonomy of the Remaining Translation Blockers (~2,900 programs)

The remaining dropped shaders fall into 5 distinct architectural clusters in crates/victory-shader:

Cluster Count Example Shader Technical Solution
64-bit Image / UAV Atomics 653 PS_Cable_AlphaPrepass_c1b6bb00_Wrapped Ps Map 64-bit atomic opcodes (image_atomic_add, etc.) to DXIL intrinsic dx.op.atomicBinOp using i64 operands.
Lane Masks Read as Scalar Data 1,114 MS_VS_TransformFire_e74ae427_Wrapped Ms Lower scalar reads of the hardware EXEC register to DXIL WaveActiveBallot.
Dynamic-Stride Structured Buffers 117 prop_batch_2lyr_cutout_hbb:CS_RaytracingResolve Fallback to ByteAddressBuffer (raw buffer) with byte-offset addressing (byte = index * stride).
Barycentric Interpolations & Packed f16 395 PS_ShadowRender_CSM_ST_DITHER2_LINEAR_8d576233 Connect computed barycentrics to DXIL dx.op.evalInterpolated (SM 6.1+).
Sub-Dword LDS & Numeric Casts 55 TAA2:CS_TAA2_PrepareFrameStats_f3fe77a8 PR #571 (ds_read/write 8/16-bit + _d16), PR #499 (v_sat_pk_u8_i16), and v_cvt_f32_f64.

5. Verified Compiler Patches

In local testing, applying PR #571 (sub-dword LDS operations) and PR #499 (v_sat_pk_u8_i16) in crates/victory-shader/src/emit/lower.rs compiles cleanly in release mode (MSVC 18.8, 26.14s) without touching runtime state or threading locks, successfully recovering 16 critical post-processing compute shaders (including TAA frame stats).

**@⁠aiiGete** on GitHub · 2026-11-24 13:28 UTC · [original](https://github.com/Marvisak/VIctory/issues/885) # [Audit & Hardware Census] 26,503 shaders analyzed on D3D12 (RTX 4060 Ti): cutscene fade analysis, 3 isolated hardware blockers, and opcode failure taxonomy ### Environment - **Target Title:** Grand Theft Auto VI (Xbox Series Scarlett master build v1.0.2.1) - **Host GPU:** NVIDIA GeForce RTX 4060 Ti 8GB (Ada Lovelace, Driver 572.x / 576.x) - **Host CPU:** Intel Core i5-10400F (6C/12T) - **OS:** Windows 11 x64 (24H2) - **Base Commit:** `14c15be` (`dev-next`) --- ### 1. Executive Summary & Runtime Baseline Earlier community reports (such as #496) identified crashes or black screens at the transition to the first cutscene. Running telemetry directly on clean baseline `14c15be` (without experimental debug layers or pipeline-skipping flags) reveals: 1. **The Black Frame Transition is an Intentional Fade-Out:** - Log line: `WARN victory_gpu::queue: levels after the black frame frame=4402 levels=[252, 252, 251, 250, 249, 0, 0, 0, 0, 0, 0, 0]` - This probes maximum pixel luminance over the last 12 presented frames. It represents Rockstar’s intentional loading-screen fade-out curve before Lucia's prison scene. It is not an unhandled exception or an execution fault. 2. **Current Baseline Stability:** - With `VICTORY_D3D12_DEBUG=1` removed (eliminating NVIDIA kernel TDR `0x887A0006` caused by Microsoft's validation layer choking on 30+ concurrent command lists), the engine runs locked at **30.1 FPS (33.3 ms/frame, 5.2 ms GPU time)**. Audio, keyboard/gamepad emulation, and subtitles advance continuously. 3. **The 3D Scene Remains Black Because Draws Are Dropped:** - Shaders that fail DXIL translation mark the corresponding draw/dispatch as `is_skipped` in `draw.rs`. Without compiled geometry and lighting pipelines, the presented image stays at luminance 0. --- ### 2. Autonomous Hardware Shader Census (`shaders.rpf`) Running the offline compiler and driver pipeline builder (`victory translate --validate --pipelines "shaders.rpf"`) across the full package yielded **10,977 CPU-seconds** of continuous validation and physical PSO creation on the host RTX 4060 Ti: - **Total Containers Discovered:** 26,503 (614 duplicates skipped) - **Lowered to IR:** 26,084 of 26,084 (40,601,701 instructions) - **Successfully Emitted DXIL & Validated by Driver:** **Over 22,000 shaders compiled directly into native D3D12 hardware PSOs without driver removal or kernel faults.** --- ### 3. The 3 Hardware & Specification Blockers The full hardware run cleanly separated compiler limitations, Microsoft DXIL validator restrictions, and NVIDIA driver parameter rejections: #### A. Mesh Shader Output Payload Limit Exceeded (53 programs) - **Error:** `validator: Function: main: error: For shader 'main', vertex plus primitive output size is greater than 32768.` - **Example:** `MS_VS_PedTransformTransmissionFire_52f61330_Wrapped Ms` (offset `0x11a9ba5`) - **Cause:** Microsoft DXIL enforces a strict 32 KiB (32,768 bytes) per-threadgroup limit on combined vertex + primitive outputs. On Scarlett’s unified physical memory, Rockstar exceeded this cap in character/fire mesh shaders. - **Fix:** PR #586 (staging `GS_ALLOC_REQ` counts in group-shared LDS memory and unifying `SetMeshOutputCounts` at the postdominator join). #### B. Driver PSO Rejection: `E_INVALIDARG 0x80070057` (328 compute programs) - **Error:** `pipeline: Parâmetro incorreto (0x80070057)` on `CreateComputePipelineState` - **Example:** `cascadeshadows_classify:CS_ShadowUnifiedClearRaster_6bcdd348_Wrapped Cs` (offset `0xbeb3b20`) - **Cause:** Cascade shadow map clearing and classification shaders. The generated host root signature exceeds the 64-DWORD root parameter budget or maps root constants/views into overlapping or unsupported PC register spaces. - **Fix:** PR #493 / PR #710 (root SRV table bounding and root parameter consolidation). #### C. Untracked Indirect Descriptor Addressing (298 programs) - **Error:** `resources: a descriptor neither loaded nor built` - **Example:** `VS_TransformSkin_VfxVBuffer_AlphaClip_5fd4397c_Wrapped Vs` (offset `0x49c1fc0`) - **Cause:** Vertex skinning shaders where buffer views are passed via indirect SGPRs without tracing back to a statically enumerated table slot. --- ### 4. Taxonomy of the Remaining Translation Blockers (~2,900 programs) The remaining dropped shaders fall into 5 distinct architectural clusters in `crates/victory-shader`: | Cluster | Count | Example Shader | Technical Solution | | :--- | :--- | :--- | :--- | | **64-bit Image / UAV Atomics** | 653 | `PS_Cable_AlphaPrepass_c1b6bb00_Wrapped Ps` | Map 64-bit atomic opcodes (`image_atomic_add`, etc.) to DXIL intrinsic `dx.op.atomicBinOp` using `i64` operands. | | **Lane Masks Read as Scalar Data** | 1,114 | `MS_VS_TransformFire_e74ae427_Wrapped Ms` | Lower scalar reads of the hardware `EXEC` register to DXIL `WaveActiveBallot`. | | **Dynamic-Stride Structured Buffers** | 117 | `prop_batch_2lyr_cutout_hbb:CS_RaytracingResolve` | Fallback to `ByteAddressBuffer` (raw buffer) with byte-offset addressing (`byte = index * stride`). | | **Barycentric Interpolations & Packed f16** | 395 | `PS_ShadowRender_CSM_ST_DITHER2_LINEAR_8d576233` | Connect computed barycentrics to DXIL `dx.op.evalInterpolated` (SM 6.1+). | | **Sub-Dword LDS & Numeric Casts** | 55 | `TAA2:CS_TAA2_PrepareFrameStats_f3fe77a8` | PR #571 (`ds_read/write` 8/16-bit + `_d16`), PR #499 (`v_sat_pk_u8_i16`), and `v_cvt_f32_f64`. | --- ### 5. Verified Compiler Patches In local testing, applying **PR #571** (sub-dword LDS operations) and **PR #499** (`v_sat_pk_u8_i16`) in `crates/victory-shader/src/emit/lower.rs` compiles cleanly in release mode (MSVC 18.8, 26.14s) without touching runtime state or threading locks, successfully recovering 16 critical post-processing compute shaders (including TAA frame stats).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:14:07 +00:00
Author
Owner

@⁠MichaelSmithAI on GitHub · 2026-11-24 13:35 UTC · original · edited 2026-11-24 13:36 UTC

On upstream ffe310e, each entry in levels is the largest RGB byte among 16 pixels on a 4×4 grid. The history keeps the last 12 successful probes, with no individual frame IDs. In the single-plane path the probe reads the source texture. On the #211 multi-plane compositor it reads the composed back buffer. I couldn't resolve 14c15be in the upstream repository. A link to that revision would let us confirm which path produced your trace. Probe and history

The reported sequence has a 249 → 0 step followed by seven zero readings in total. It establishes that the sampled points stayed black. It doesn't identify an intentional fade, the last writer, or which dropped shader affected those pixels. The reported debug-off run also leaves the cause of the earlier device removal open.

If you already have captures from this transition, the most informative pair would be the original primary plane and the 1440p scene target from the same present, with the frame and resource IDs. That would distinguish a scene already black at 1440p from scene content lost on its way to the final image. Another player saw live geometry by presenting the 1440p target on a different stack. #841 player comparison

For the 328 offline compute errors in section 3B, upstream translate --pipelines prefixes errors from both root-signature setup and compute-PSO creation with the same pipeline: text. The quoted HRESULT alone cannot distinguish a root-signature limit from a wave-size refusal. #817 found the same HRESULT for Wave64 on a 32-lane device. For the named cascade shader, either a stage-specific diagnostic from the existing log or the emitted wave requirement and device range would narrow the cause. The other 327 entries would still need their own classification. Offline call site · Compute helper · Wave-size A/B

**@⁠MichaelSmithAI** on GitHub · 2026-11-24 13:35 UTC · [original](https://github.com/Marvisak/VIctory/issues/885#issuecomment-7133042680) · edited 2026-11-24 13:36 UTC On upstream `ffe310e`, each entry in `levels` is the largest RGB byte among 16 pixels on a 4×4 grid. The history keeps the last 12 successful probes, with no individual frame IDs. In the single-plane path the probe reads the source texture. On the #211 multi-plane compositor it reads the composed back buffer. I couldn't resolve `14c15be` in the upstream repository. A link to that revision would let us confirm which path produced your trace. [Probe and history](https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-gpu/src/capture.rs#L396-L518) The reported sequence has a 249 → 0 step followed by seven zero readings in total. It establishes that the sampled points stayed black. It doesn't identify an intentional fade, the last writer, or which dropped shader affected those pixels. The reported debug-off run also leaves the cause of the earlier device removal open. If you already have captures from this transition, the most informative pair would be the original primary plane and the 1440p scene target from the same present, with the frame and resource IDs. That would distinguish a scene already black at 1440p from scene content lost on its way to the final image. Another player saw live geometry by presenting the 1440p target on a different stack. [#841 player comparison](https://git.gtahub.st/github/Marvisak--VIctory/issues/841) For the 328 offline compute errors in section 3B, upstream `translate --pipelines` prefixes errors from both root-signature setup and compute-PSO creation with the same `pipeline:` text. The quoted HRESULT alone cannot distinguish a root-signature limit from a wave-size refusal. #817 found the same HRESULT for Wave64 on a 32-lane device. For the named cascade shader, either a stage-specific diagnostic from the existing log or the emitted wave requirement and device range would narrow the cause. The other 327 entries would still need their own classification. [Offline call site](https://github.com/Marvisak/VIctory/blob/ffe310e/apps/victory/src/translate.rs#L443-L454) · [Compute helper](https://github.com/Marvisak/VIctory/blob/ffe310e/crates/victory-shader/src/emit/host.rs#L212-L220) · [Wave-size A/B](https://git.gtahub.st/github/Marvisak--VIctory/issues/817)
Author
Owner

@⁠r4tedx on GitHub · 2026-11-24 15:28 UTC · original

On section 3B (the 328 compute programs refused with E_INVALIDARG): the measurements on #233 and #439 say this is the wave size, not the root signature.

main declares WaveSize(64) for every wave64 compute program that reads other lanes or shares LDS within one wave, whatever the host runs. A 32-lane NVIDIA driver refuses that pipeline with exactly this HRESULT. With the host's wave range taken into account, the refusals go away on the same class of card:

card main ffe310e: compute pipelines refused with the wave-size stack
RTX 4060 Ti (@⁠supidooo, #439) 320 0 (#439)
RTX 3060 (@⁠felicienradio, #233) 320 5 (#233)
RTX 5070 (mine, #233 1a8a3ed) not run 0 of 1,219 emitted

In @⁠felicienradio's list the cascadeshadows_classify programs appear by name under console wave64 lanes on a host without 64-lane waves, which is the family the example here comes from. None of the three runs changed the root signature (#493 and #710 are not in them), so a root-parameter budget cannot be what the 320 hit. Your 328 on a different base may hold a few of another kind; --list on #439 would show whatever is left.

My row: local title data, one offline run (translation, validation and pipeline creation, no title launch), counts only. AI-assisted (Claude Code).

**@⁠r4tedx** on GitHub · 2026-11-24 15:28 UTC · [original](https://github.com/Marvisak/VIctory/issues/885#issuecomment-7136099062) On section 3B (the 328 compute programs refused with `E_INVALIDARG`): the measurements on #233 and #439 say this is the wave size, not the root signature. `main` declares `WaveSize(64)` for every wave64 compute program that reads other lanes or shares LDS within one wave, whatever the host runs. A 32-lane NVIDIA driver refuses that pipeline with exactly this HRESULT. With the host's wave range taken into account, the refusals go away on the same class of card: | card | `main` `ffe310e`: compute pipelines refused | with the wave-size stack | |---|---|---| | RTX 4060 Ti ([@⁠supidooo, #439](https://git.gtahub.st/github/Marvisak--VIctory/pulls/439)) | 320 | 0 (#439) | | RTX 3060 ([@⁠felicienradio, #233](https://git.gtahub.st/github/Marvisak--VIctory/pulls/233)) | 320 | 5 (#233) | | RTX 5070 (mine, #233 `1a8a3ed`) | not run | 0 of 1,219 emitted | In @⁠felicienradio's list the `cascadeshadows_classify` programs appear by name under `console wave64 lanes on a host without 64-lane waves`, which is the family the example here comes from. None of the three runs changed the root signature (#493 and #710 are not in them), so a root-parameter budget cannot be what the 320 hit. Your 328 on a different base may hold a few of another kind; `--list` on #439 would show whatever is left. My row: local title data, one offline run (translation, validation and pipeline creation, no title launch), counts only. AI-assisted (Claude Code).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 06:53 UTC · original

Automated triage for the maintainers.

Thanks for the census. Two things for the record:

  • The base commit 14c15be ("dev-next") is not in this repository, so the counts cannot be compared with main as they stand; a run on current main would make them comparable.
  • The 328 compute programs refused with 0x80070057 on this 32-lane NVIDIA card are the wave-size refusal, not the root signature: main declares WaveSize(64) for wave64 compute that shares lanes or LDS, and measurements in the thread above show open pull requests #439 and #233 remove those refusals on the same class of card. That failure is discussed in #71, the oldest complete report of it.

The other taxonomy rows are already tracked separately (64-bit image atomics, lane masks read as data, barycentrics). Please don't post the title's shader names or package offsets here; counts and refusal reasons are enough.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 06:53 UTC · [original](https://github.com/Marvisak/VIctory/issues/885#issuecomment-7155262188) <!-- victory-issue-triage v1 verdict=tracked seen=2026-11-24T15:28:54Z at=2026-11-25T06:53:15Z --> Automated triage for the maintainers. Thanks for the census. Two things for the record: - The base commit `14c15be` ("dev-next") is not in this repository, so the counts cannot be compared with `main` as they stand; a run on current `main` would make them comparable. - The 328 compute programs refused with `0x80070057` on this 32-lane NVIDIA card are the wave-size refusal, not the root signature: `main` declares `WaveSize(64)` for wave64 compute that shares lanes or LDS, and measurements in the thread above show open pull requests #439 and #233 remove those refusals on the same class of card. That failure is discussed in #71, the oldest complete report of it. The other taxonomy rows are already tracked separately (64-bit image atomics, lane masks read as data, barycentrics). Please don't post the title's shader names or package offsets here; counts and refusal reasons are enough. --- _Generated by [Claude Code](https://claude.ai/code)_
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/Marvisak--VIctory#885
No description provided.