Shaders: use validator 1.8 for compute derivatives #1065

Open
github-bot wants to merge 1 commit from github-bot/gh-1065 into main AGit
Owner

@⁠Halfect on GitHub · 2026-11-24 15:26 UTC · original
Halfect:fix/cs-implicit-sample-dxil18 → main · +252 −10 · 3 files · 1 commits · open

What

Validators before 1.8 reject gradient operations outside the pixel stage with Entry function performs some operation that is incompatible with the shader stage, although a compute shader using them is valid SM 6.x. The emitter declares every shader as validator 1.6, so those compute shaders are rejected even though they emit cleanly.

The emitter now derives the validator version from the module's written calls: Module::uses (the same liveness-filtered scan that feeds the shader-feature flags) reports a gradient operation, matching DXC's gradient classification — the implicit-derivative samples (Sample 60, SampleBias 61, SampleCmp 64), the LOD query (CalculateLOD 81), and the explicit derivatives (DerivCoarseX/Y, DerivFineX/Y, 83–86). Only a non-mesh compute shader with a live gradient op:

  • writes dx.valver 1.8 instead of 1.6;
  • emits the validator-1.8 PSV0 layout (runtime info version 3, 52 bytes, naming the entry point at strings offset 1) instead of the 1.6 layout (version 2, 48 bytes).

Bfi and the dot products (53–56) are arithmetic and stay on 1.6; SampleGrad/SampleLevel (62/63) take explicit gradients and are already accepted in compute. Because the decision looks at the written calls, a dead call — a sample whose result nothing reads, dropped by the writer — does not bump the version, and a shader without live gradient ops declares 1.6 by reusing the dx.version metadata node: vertex, pixel, mesh and gradient-free compute shaders are byte-identical to before (the new byte-pin test matches main's exact containers).

Adds five Windows regressions: a compute shader with an implicit sample validates (and its forced-1.6 twin is rejected), a compute DerivCoarseX validates at 1.8 and is rejected at 1.6, a compute Dot3 keeps validator 1.6 and validates, a compute sample with a discarded result stays on 1.6 and validates, and the derivative-free pixel/compute containers are byte-pinned.

Host runtime note. A validator-1.8 container also needs a host runtime that accepts one. Current Windows 11 D3D12 and the SDK 10.0.26100 validator accept it, but an older host runtime would refuse such a compute pipeline at creation time rather than at translation. The bump is per shader, so only the gradient-using compute programs (24 measured below) are affected; every other shader stays a 1.6 container.

Offline title measurement

translate --validate --list --jobs 4 over the local 1.0.2.1 shader archive (26,503 containers, dxil.dll 10.0.26100), comparing main ffe310e with this head across 25,896 matched program labels:

  • Compute: 1,417 → 1,441 validated of 1,441 emitted. The only outcome transitions are the 24 compute programs that stopped at the incompatible with the shader stage validator error and now validate.
  • Vertex/pixel (12,231 emitted / 12,155 validated) and mesh (8,214 / 8,152) outcomes are identical; 0 regressions.

Checks

  • cargo test --locked -p victory-shader --lib, CPU-only suite skipping the GPU groups (diff_tests, valu_tests, waterfall_tests, stub_pipeline_is_created) and heap_direct_texture_reads_mark_their_heap_index: 230 passed, 3 failed, 3 ignored. The three failures (stride_tests pair, gathers_at_a_level_match_the_hardware) reproduce identically on unmodified 13f91ca on this machine, and the skipped heap test aborts the harness (STATUS_ACCESS_VIOLATION) identically on unmodified 13f91ca here — all pre-existing D3D12-device environment issues; this PR changes no code they exercise.
  • The six emit::shader tests pass with the SDK 10.0.26100 dxil.dll validator actually loaded (no skips), including the forced-1.6 negative controls.
  • cargo clippy --locked -p victory-shader --lib --tests -- -D warnings: clean.
  • cargo xtask policy: 184 files ok. git diff --check: clean.

Offline translation and DXIL validation only; no title executable or world run, and no shader contents or extracted data included. AI-assisted (Kimi).

**@⁠Halfect** on GitHub · 2026-11-24 15:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065) `Halfect:fix/cs-implicit-sample-dxil18` → `main` · +252 −10 · 3 files · 1 commits · open ## What Validators before 1.8 reject gradient operations outside the pixel stage with `Entry function performs some operation that is incompatible with the shader stage`, although a compute shader using them is valid SM 6.x. The emitter declares every shader as validator 1.6, so those compute shaders are rejected even though they emit cleanly. The emitter now derives the validator version from the module's *written* calls: `Module::uses` (the same liveness-filtered scan that feeds the shader-feature flags) reports a gradient operation, matching DXC's gradient classification — the implicit-derivative samples (`Sample` 60, `SampleBias` 61, `SampleCmp` 64), the LOD query (`CalculateLOD` 81), and the explicit derivatives (`DerivCoarseX/Y`, `DerivFineX/Y`, 83–86). Only a non-mesh compute shader with a live gradient op: - writes `dx.valver` 1.8 instead of 1.6; - emits the validator-1.8 `PSV0` layout (runtime info version 3, 52 bytes, naming the entry point at strings offset 1) instead of the 1.6 layout (version 2, 48 bytes). `Bfi` and the dot products (53–56) are arithmetic and stay on 1.6; `SampleGrad`/`SampleLevel` (62/63) take explicit gradients and are already accepted in compute. Because the decision looks at the written calls, a dead call — a sample whose result nothing reads, dropped by the writer — does not bump the version, and a shader without live gradient ops declares 1.6 by reusing the `dx.version` metadata node: vertex, pixel, mesh and gradient-free compute shaders are byte-identical to before (the new byte-pin test matches main's exact containers). Adds five Windows regressions: a compute shader with an implicit sample validates (and its forced-1.6 twin is rejected), a compute `DerivCoarseX` validates at 1.8 and is rejected at 1.6, a compute `Dot3` keeps validator 1.6 and validates, a compute sample with a discarded result stays on 1.6 and validates, and the derivative-free pixel/compute containers are byte-pinned. **Host runtime note.** A validator-1.8 container also needs a host runtime that accepts one. Current Windows 11 D3D12 and the SDK 10.0.26100 validator accept it, but an older host runtime would refuse such a compute pipeline at creation time rather than at translation. The bump is per shader, so only the gradient-using compute programs (24 measured below) are affected; every other shader stays a 1.6 container. ## Offline title measurement `translate --validate --list --jobs 4` over the local 1.0.2.1 shader archive (26,503 containers, dxil.dll 10.0.26100), comparing main `ffe310e` with this head across 25,896 matched program labels: - Compute: **1,417 → 1,441 validated** of 1,441 emitted. The only outcome transitions are the 24 compute programs that stopped at the `incompatible with the shader stage` validator error and now validate. - Vertex/pixel (12,231 emitted / 12,155 validated) and mesh (8,214 / 8,152) outcomes are identical; **0 regressions**. ## Checks - `cargo test --locked -p victory-shader --lib`, CPU-only suite skipping the GPU groups (`diff_tests`, `valu_tests`, `waterfall_tests`, `stub_pipeline_is_created`) and `heap_direct_texture_reads_mark_their_heap_index`: **230 passed, 3 failed, 3 ignored**. The three failures (`stride_tests` pair, `gathers_at_a_level_match_the_hardware`) reproduce identically on unmodified `13f91ca` on this machine, and the skipped heap test aborts the harness (`STATUS_ACCESS_VIOLATION`) identically on unmodified `13f91ca` here — all pre-existing D3D12-device environment issues; this PR changes no code they exercise. - The six `emit::shader` tests pass with the SDK 10.0.26100 `dxil.dll` validator actually loaded (no skips), including the forced-1.6 negative controls. - `cargo clippy --locked -p victory-shader --lib --tests -- -D warnings`: clean. - `cargo xtask policy`: **184 files ok**. `git diff --check`: clean. Offline translation and DXIL validation only; no title executable or world run, and no shader contents or extracted data included. AI-assisted (Kimi).
Validators before 1.8 reject gradient operations outside the pixel
stage; declare 1.8 for a compute shader that uses them, with the PSV0
runtime-info-3 layout that requires. The regression fixtures branch on
the operations' results so the writer keeps the calls (a call nothing
reads is dead).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:46 +00:00
github-bot force-pushed github-bot/gh-1065 from cbd152cc1d to b96509e836 2026-11-26 06:28:27 +00:00 Compare
Author
Owner

@⁠Halfect on GitHub · 2026-11-24 15:49 UTC · original

Thanks @⁠catminou4 for the close read of the flagged opcode set and the PSV0 layout. On the Windows gate: the new compute_implicit_sample_validates regression did run on Windows on this head (e8a046a2) with the SDK 10.0.26100 dxil.dll loaded, and the validator accepted the emitted 1.8 module; the CPU-only library suite there was 98 passed, 0 failed, 1 ignored. Agreed the macOS run only covers compilation plus the unchanged 1.6 path — the Windows validator result is the behavioral check for this change. Nothing further from my side; ready for review.

**@⁠Halfect** on GitHub · 2026-11-24 15:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7136681079) Thanks @⁠catminou4 for the close read of the flagged opcode set and the PSV0 layout. On the Windows gate: the new `compute_implicit_sample_validates` regression did run on Windows on this head (`e8a046a2`) with the SDK 10.0.26100 `dxil.dll` loaded, and the validator accepted the emitted 1.8 module; the CPU-only library suite there was **98 passed, 0 failed, 1 ignored**. Agreed the macOS run only covers compilation plus the unchanged 1.6 path — the Windows validator result is the behavioral check for this change. Nothing further from my side; ready for review.
Author
Owner

@⁠hamdog0203 on GitHub · 2026-11-24 15:59 UTC · original

Tested unmodified e8a046a independently on Windows 11 Build 26200, NVIDIA GeForce RTX 4060 (driver 621.35, 32-lane waves), Rust 1.98.1, and Windows SDK dxil.dll (10.0.26100.0):

Verification results

  • cargo clippy --workspace --all-targets --locked -- -D warnings: pass
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: pass
  • cargo test -p victory-shader --locked -- --nocapture compute_implicit_sample_validates: pass against dxil.dll (verified not skipped; forcing valver 1.6 as a negative control fails dxil.dll with Function uses features incompatible with the shader stage (cs))
  • cargo test --workspace --locked (RTX 4060): all workspace tests pass (victory-shader: 121 passed, 0 failed, 1 benchmark ignored)
  • VICTORY_WARP=1 cargo test -p victory-shader --locked: 121 passed, 0 failed, 1 ignored
  • cargo xtask policy: 154 files ok
  • Extra probe (Host::compute_pipeline on RTX 4060): CreateComputePipelineState succeeds with the validator-1.8 / PSVRuntimeInfo3 container for both [32, 1, 1] and [8, 8, 1] thread groups.

One code-review note (crates/victory-shader/src/emit/shader.rs)

In Shader::op:

matches!(opcode, 53..=56 | 60 | 61 | 64 | 81)

In DXIL, 53..=56 are UMsad / Dot2 / Dot3 / Dot4, whereas explicit derivatives (DerivCoarseX, DerivCoarseY, DerivFineX, DerivFineY) are 83..=86. Verified against dxil.dll with dx.op.unary.f32(83, ...) in a compute shader: dxil.dll still rejects it on e8a046a (because dx.valver stays 1.6), and accepts it when validator18 is enabled.

Synthetic tests + dxil.dll + RTX 4060 hardware only; no game data. AI-assisted.

**@⁠hamdog0203** on GitHub · 2026-11-24 15:59 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7136941948) Tested unmodified `e8a046a` independently on Windows 11 Build 26200, **NVIDIA GeForce RTX 4060** (driver `621.35`, 32-lane waves), Rust `1.98.1`, and Windows SDK `dxil.dll` (`10.0.26100.0`): ### Verification results - `cargo clippy --workspace --all-targets --locked -- -D warnings`: pass - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: pass - `cargo test -p victory-shader --locked -- --nocapture compute_implicit_sample_validates`: pass against `dxil.dll` (verified not skipped; forcing `valver 1.6` as a negative control fails `dxil.dll` with `Function uses features incompatible with the shader stage (cs)`) - `cargo test --workspace --locked` (RTX 4060): all workspace tests pass (`victory-shader`: 121 passed, 0 failed, 1 benchmark ignored) - `VICTORY_WARP=1 cargo test -p victory-shader --locked`: 121 passed, 0 failed, 1 ignored - `cargo xtask policy`: 154 files ok - Extra probe (`Host::compute_pipeline` on RTX 4060): `CreateComputePipelineState` succeeds with the validator-1.8 / `PSVRuntimeInfo3` container for both `[32, 1, 1]` and `[8, 8, 1]` thread groups. ### One code-review note (`crates/victory-shader/src/emit/shader.rs`) In `Shader::op`: ```rust matches!(opcode, 53..=56 | 60 | 61 | 64 | 81) ``` In DXIL, `53..=56` are `UMsad` / `Dot2` / `Dot3` / `Dot4`, whereas explicit derivatives (`DerivCoarseX`, `DerivCoarseY`, `DerivFineX`, `DerivFineY`) are **`83..=86`**. Verified against `dxil.dll` with `dx.op.unary.f32(83, ...)` in a compute shader: `dxil.dll` still rejects it on `e8a046a` (because `dx.valver` stays `1.6`), and accepts it when `validator18` is enabled. Synthetic tests + `dxil.dll` + RTX 4060 hardware only; no game data. AI-assisted.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 16:30 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at e8a046a: cargo test -p victory-shader passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 16:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7137762192) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at e8a046a: `cargo test -p victory-shader` passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠Halfect on GitHub · 2026-11-24 16:33 UTC · original

Thanks @⁠hamdog0203 — you were right on both counts. Fixed in 37f838d:

  • The flagged set is now exactly DXC's gradient classification: 60 | 61 | 64 | 81 | 83..=86. 53..=56 (Bfi/Dot2/Dot3/Dot4) are arithmetic and no longer bump the validator version, so a derivative-free compute shader using them stays byte-identical to main. Explicit derivatives (DerivCoarseX/Y, DerivFineX/Y, 83–86) now trigger 1.8 as your probe showed they must.
  • New Windows regressions alongside the implicit-sample one: compute_explicit_derivative_validates (op 83 validates at 1.8; its forced-1.6 twin is rejected) and compute_dot3_stays_on_validator_1_6 (op 55 does not set the flag, and the resulting 1.6 module validates). The implicit-sample test also gained your forced-1.6 negative control.

Validation on this head (Windows, SDK 10.0.26100 dxil.dll): the three regressions pass with the validator actually loaded; the CPU-only library suite is 100 passed, 0 failed, 1 ignored; clippy -D warnings and cargo xtask policy (154 files) clean. No GPU execution was used.

I also reran the offline A/B against current main ffe310e (26,503 containers, 25,896 matched labels): compute 1,417 → 1,441 validated of 1,441 emitted; the only transitions are 24 × incompatible with the shader stage → validated; vertex/pixel and mesh outcomes are identical, 0 regressions. The PR body is updated with the corrected opcode set and this measurement. Ready for another look.

**@⁠Halfect** on GitHub · 2026-11-24 16:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7137864304) Thanks @⁠hamdog0203 — you were right on both counts. Fixed in `37f838d`: - The flagged set is now exactly DXC's gradient classification: `60 | 61 | 64 | 81 | 83..=86`. `53..=56` (`Bfi`/`Dot2`/`Dot3`/`Dot4`) are arithmetic and no longer bump the validator version, so a derivative-free compute shader using them stays byte-identical to main. Explicit derivatives (`DerivCoarseX/Y`, `DerivFineX/Y`, 83–86) now trigger 1.8 as your probe showed they must. - New Windows regressions alongside the implicit-sample one: `compute_explicit_derivative_validates` (op 83 validates at 1.8; its forced-1.6 twin is rejected) and `compute_dot3_stays_on_validator_1_6` (op 55 does not set the flag, and the resulting 1.6 module validates). The implicit-sample test also gained your forced-1.6 negative control. Validation on this head (Windows, SDK 10.0.26100 `dxil.dll`): the three regressions pass with the validator actually loaded; the CPU-only library suite is **100 passed, 0 failed, 1 ignored**; clippy `-D warnings` and `cargo xtask policy` (154 files) clean. No GPU execution was used. I also reran the offline A/B against current main `ffe310e` (26,503 containers, 25,896 matched labels): compute **1,417 → 1,441 validated** of 1,441 emitted; the only transitions are 24 × `incompatible with the shader stage` → validated; vertex/pixel and mesh outcomes are identical, **0 regressions**. The PR body is updated with the corrected opcode set and this measurement. Ready for another look.
Author
Owner

@⁠adamdotpy on GitHub · 2026-11-24 16:53 UTC · original

Reviewed on Windows 11 / Rust 1.98.1, 37f838d on current main (ffe310e, merges as it stands), isolated target dir. Verified: cargo test -p victory-shader --lib 123 passed / 1 ignored, including the three new tests; clippy --all-targets --all-features --locked -D warnings clean; release build of victory fine.

The validation tests really ran here, and they are the decisive evidence. dxil.dll from SDK 10.0.26100 is present at the validator's default path on this machine, so with --nocapture there is no "no dxil.dll; skipped" line: compute_implicit_sample_validates builds a compute shader calling sample (opcode 60), validates the 1.8 container successfully, and asserts the same module declared 1.6 is rejected; compute_explicit_derivative_validates does the same for DerivCoarseX (83); compute_dot3_stays_on_validator_1_6 confirms dot products (55) do not bump the version and still validate at 1.6. That is exactly the check I asked #539 and #1127 to carry for their SFI0 bits — this PR is the template for it.

What checked out in the emitter. Detection happens in op() and is gated on threads.is_some() && mesh.is_none(), so pixel and mesh shaders are untouched and only compute shaders with a derivative-class opcode bump — minimal blast radius, and dx.valver is written in finish(), after every op, so the flag is complete by then. The opcode set matches the comment's reasoning (implicit-derivative samples 60/61/64, LOD 81, explicit derivatives 83..=86; SampleLevel/SampleGrad 62/63 excluded because they take explicit gradients). The PSV0 change is the validator 1.8 runtime-info-3 layout: 52-byte info with the entry-point string offset at 48, and the strings section starting "\0main\0" — consistent with the DXIL metadata change in the same commit.

Two notes, neither blocking.

  • The entry-point name is hard-coded "main" in the PSV0 strings. The emitter's entry is always main today, so it is correct, but an assert or comment tying the two would keep them from drifting if the entry name ever changes.
  • Validator 1.8 containers need a host runtime that accepts them. The SDK validator here accepts them and current Windows 11 D3D12 does too, but a host with an older runtime would fail pipeline creation at runtime rather than at translation — worth one line in the PR body so a "pipeline fails on my older Windows" report has the answer. Keeping the bump per-shader (only compute-with-derivatives) is what makes that rare.

Side note for the two 64-bit-atomic PRs (#539, #1127): the open question I left them — which SFI0 flags dxil.dll demands for atomicBinOp.i64 — is settled the same way this PR settles the validator version: emit the op, validate at each candidate flag set, keep the one that passes and assert the other fails. Neither PR has that yet.

**@⁠adamdotpy** on GitHub · 2026-11-24 16:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7138368754) Reviewed on Windows 11 / Rust 1.98.1, `37f838d` on current `main` (`ffe310e`, merges as it stands), isolated target dir. Verified: `cargo test -p victory-shader --lib` 123 passed / 1 ignored, including the three new tests; clippy `--all-targets --all-features --locked -D warnings` clean; release build of `victory` fine. **The validation tests really ran here, and they are the decisive evidence.** `dxil.dll` from SDK 10.0.26100 is present at the validator's default path on this machine, so with `--nocapture` there is no "no dxil.dll; skipped" line: `compute_implicit_sample_validates` builds a compute shader calling `sample` (opcode 60), validates the 1.8 container successfully, and asserts the same module declared 1.6 is **rejected**; `compute_explicit_derivative_validates` does the same for `DerivCoarseX` (83); `compute_dot3_stays_on_validator_1_6` confirms dot products (55) do not bump the version and still validate at 1.6. That is exactly the check I asked #539 and #1127 to carry for their SFI0 bits — this PR is the template for it. **What checked out in the emitter.** Detection happens in `op()` and is gated on `threads.is_some() && mesh.is_none()`, so pixel and mesh shaders are untouched and only compute shaders with a derivative-class opcode bump — minimal blast radius, and `dx.valver` is written in `finish()`, after every op, so the flag is complete by then. The opcode set matches the comment's reasoning (implicit-derivative samples 60/61/64, LOD 81, explicit derivatives 83..=86; SampleLevel/SampleGrad 62/63 excluded because they take explicit gradients). The PSV0 change is the validator 1.8 runtime-info-3 layout: 52-byte info with the entry-point string offset at 48, and the strings section starting `"\0main\0"` — consistent with the DXIL metadata change in the same commit. **Two notes, neither blocking.** - The entry-point name is hard-coded `"main"` in the PSV0 strings. The emitter's entry is always `main` today, so it is correct, but an assert or comment tying the two would keep them from drifting if the entry name ever changes. - Validator 1.8 containers need a host runtime that accepts them. The SDK validator here accepts them and current Windows 11 D3D12 does too, but a host with an older runtime would fail pipeline creation at runtime rather than at translation — worth one line in the PR body so a "pipeline fails on my older Windows" report has the answer. Keeping the bump per-shader (only compute-with-derivatives) is what makes that rare. Side note for the two 64-bit-atomic PRs (#539, #1127): the open question I left them — which SFI0 flags `dxil.dll` demands for `atomicBinOp.i64` — is settled the same way this PR settles the validator version: emit the op, validate at each candidate flag set, keep the one that passes and assert the other fails. Neither PR has that yet.
Author
Owner

@⁠Halfect on GitHub · 2026-11-24 17:02 UTC · original

Thanks @⁠adamdotpy for the careful review — especially for confirming the three regressions really validated rather than skipped, and for checking the gating and PSV0 layout against the DXIL rules.

Both notes addressed:

  • Host runtime: added a "Host runtime note" to the PR body, with your framing — a 1.8 container fails at pipeline creation on an older host runtime, not at translation, and the per-shader bump keeps that to the 24 measured compute programs.
  • Hard-coded "main": agreed. Shader::finish always names the entry main today; I'll tie the PSV0 string to it with a comment/assert on the next push, if one is needed. I'd rather keep the reviewed head 37f838d stable than churn it for a comment-only change.

One disclosure for the maintainer's choice, since you reviewed this closely: #306 bundles an equivalent compute-derivative change (same dx.valver 1.8 + runtime-info-3 mechanism) alongside four other fixes. The differences here: this PR's flagged set additionally covers the explicit derivatives (83–86, after @⁠hamdog0203's DXC classification correction; #306 flags only 60/61/64/81), the detection sits in Shader::op so any emission path is covered, and it carries the forced-1.6 negative controls. Both clear the same observed census group (all 24 failing programs call sample); this one is the focused single-purpose version.

Nothing further from my side; ready for review.

**@⁠Halfect** on GitHub · 2026-11-24 17:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7138583383) Thanks @⁠adamdotpy for the careful review — especially for confirming the three regressions really validated rather than skipped, and for checking the gating and PSV0 layout against the DXIL rules. Both notes addressed: - **Host runtime:** added a "Host runtime note" to the PR body, with your framing — a 1.8 container fails at pipeline creation on an older host runtime, not at translation, and the per-shader bump keeps that to the 24 measured compute programs. - **Hard-coded `"main"`:** agreed. `Shader::finish` always names the entry `main` today; I'll tie the PSV0 string to it with a comment/assert on the next push, if one is needed. I'd rather keep the reviewed head `37f838d` stable than churn it for a comment-only change. One disclosure for the maintainer's choice, since you reviewed this closely: #306 bundles an equivalent compute-derivative change (same `dx.valver` 1.8 + runtime-info-3 mechanism) alongside four other fixes. The differences here: this PR's flagged set additionally covers the explicit derivatives (83–86, after @⁠hamdog0203's DXC classification correction; #306 flags only 60/61/64/81), the detection sits in `Shader::op` so any emission path is covered, and it carries the forced-1.6 negative controls. Both clear the same observed census group (all 24 failing programs call `sample`); this one is the focused single-purpose version. Nothing further from my side; ready for review.
Author
Owner

@⁠rafaconvaitis on GitHub · 2026-11-24 17:06 UTC · original

I independently tested the host-runtime question on 37f838d using two synthetic shaders, without game data. On Windows 11 build 26300, both the NVIDIA GeForce RTX 4070 (driver 32.0.16.1664, adapter confirmed by device LUID) and inbox WARP created the signed DXIL 1.8 compute PSOs and executed one four-thread group.

Instruction shape Readback on each backend
DerivCoarseX(float(SV_GroupThreadID.x)) [1.0, 1.0, 1.0, 1.0]
Implicit sample of a constant 1×1 RGBA32F texture [7.25, 7.25, 7.25, 7.25]

The equivalent forced-1.6 controls were rejected by Microsoft's dxil.dll 1.8.2502.8 validator before PSO creation, as expected. This confirms execution and readback for the two instruction shapes on this host. Older D3D12 runtimes and the title's actual shaders are outside this result. The fixture also passed focused Clippy with warnings as errors.

AI-assisted test fixture and reporting.

**@⁠rafaconvaitis** on GitHub · 2026-11-24 17:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7138700391) I independently tested the host-runtime question on `37f838d` using two synthetic shaders, without game data. On Windows 11 build 26300, both the NVIDIA GeForce RTX 4070 (driver `32.0.16.1664`, adapter confirmed by device LUID) and inbox WARP created the signed DXIL 1.8 compute PSOs and executed one four-thread group. | Instruction shape | Readback on each backend | | --- | --- | | `DerivCoarseX(float(SV_GroupThreadID.x))` | `[1.0, 1.0, 1.0, 1.0]` | | Implicit sample of a constant 1×1 RGBA32F texture | `[7.25, 7.25, 7.25, 7.25]` | The equivalent forced-1.6 controls were rejected by Microsoft's `dxil.dll 1.8.2502.8` validator before PSO creation, as expected. This confirms execution and readback for the two instruction shapes on this host. Older D3D12 runtimes and the title's actual shaders are outside this result. The fixture also passed focused Clippy with warnings as errors. AI-assisted test fixture and reporting.
Author
Owner

@⁠adamdotpy on GitHub · 2026-11-24 17:16 UTC · original

Thanks for the independent confirmation @⁠rafaconvaitis — RTX 4070 + WARP both creating and executing the signed DXIL 1.8 compute PSOs with the 1.6 controls rejected by dxil.dll 1.8.2502.8 matches what I measured on 37f838d here (validator really ran, not skipped). That closes the host-runtime question on current hardware/driver; noted on the thread.

**@⁠adamdotpy** on GitHub · 2026-11-24 17:16 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7138945758) Thanks for the independent confirmation @⁠rafaconvaitis — RTX 4070 + WARP both creating and executing the signed DXIL 1.8 compute PSOs with the 1.6 controls rejected by `dxil.dll 1.8.2502.8` matches what I measured on `37f838d` here (validator really ran, not skipped). That closes the host-runtime question on current hardware/driver; noted on the thread.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-24 22:02 UTC · original

Measured on the new main 70564ae, the largest remaining gap there. With dxil.dll 1.8.2502, 735 compute programs emit on 70564ae but fail validation with "Entry function performs some operation that is incompatible with the shader stage". This PR clears all of them.

This PR conflicts with 70564ae in two hunks, because main added geometry shaders in the same places. I merged it onto 70564ae and resolved both by keeping both sides:

  • emit/container.rs, psv(): main's if let Some(max) = p.gs { ... } block stays. Your if p.validator18 { info[48..52] ... } block follows it, and the final line is your out.extend(&info[..info_size as usize]), not main's out.extend(info).
  • emit/shader.rs, dx.valver: your 1.6/1.8 selection from self.compute_derivatives, with main's updated comment (0 pixel, 1 vertex, 2 geometry, 5 compute, 13 mesh).

The result, measured with victory translate --validate --list on shaders.rpf (1.0.2.1) and compared program by program with 70564ae:

Validated Compute validated
main 70564ae 24,785 1,886 of 2,621
70564ae + this PR 25,520 (+735, 0 lost) 2,621 of 2,621

On the merged tree, cargo test -p victory-shader --lib gives 212 passed and 0 failed on an RX 7900 XTX (RDNA3). Clippy with -D warnings is clean with and without --all-features.

Offline counts only; no program names or data, per the asset policy.

**@⁠zed6000** on GitHub · 2026-11-24 22:02 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7145719913) Measured on the new main `70564ae`, the largest remaining gap there. With dxil.dll 1.8.2502, **735 compute programs emit on `70564ae` but fail validation** with "Entry function performs some operation that is incompatible with the shader stage". This PR clears all of them. This PR conflicts with `70564ae` in two hunks, because main added geometry shaders in the same places. I merged it onto `70564ae` and resolved both by keeping both sides: - `emit/container.rs`, `psv()`: main's `if let Some(max) = p.gs { ... }` block stays. Your `if p.validator18 { info[48..52] ... }` block follows it, and the final line is your `out.extend(&info[..info_size as usize])`, not main's `out.extend(info)`. - `emit/shader.rs`, `dx.valver`: your 1.6/1.8 selection from `self.compute_derivatives`, with main's updated comment (`0 pixel, 1 vertex, 2 geometry, 5 compute, 13 mesh`). The result, measured with `victory translate --validate --list` on `shaders.rpf` (1.0.2.1) and compared program by program with `70564ae`: | | Validated | Compute validated | |---|---|---| | main `70564ae` | 24,785 | 1,886 of 2,621 | | `70564ae` + this PR | **25,520 (+735, 0 lost)** | **2,621 of 2,621** | On the merged tree, `cargo test -p victory-shader --lib` gives 212 passed and 0 failed on an RX 7900 XTX (RDNA3). Clippy with `-D warnings` is clean with and without `--all-features`. Offline counts only; no program names or data, per the asset policy.
Author
Owner

@⁠alessiodeia on GitHub · 2026-11-24 22:47 UTC · original

Independent confirmation of @⁠zed6000's merge onto 70564ae, on NVIDIA (RTX 2070 SUPER, Turing, driver 621.40). I resolved the two hunks the same way, independently: main's p.gs block followed by validator18, then out.extend(&info[..info_size as usize]), and the 1.6/1.8 dx.valver selection with main's geometry comment. The branch is alessiodeia:rebase/1065-on-70564ae (6e26c67) if anyone wants it.

Same counts, program by program over shaders.rpf with dxil.dll 1.9.2609: validated 24,785 → 25,520 (+735, 0 lost), compute 1,886 → 2,621 of 2,621. The only validator failure left on the merged tree is the 71 mesh programs with vertex plus primitive output size is greater than 32768, which 70564ae has as well.

Workspace clippy -D warnings is clean. On this card cargo test -p victory-shader has 3 failures: stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride, stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros and synthetic_tests::gathers_at_a_level_match_the_hardware. All 3 fail identically on clean 70564ae here (dispatch failed: E_INVALIDARG on the hardware device), so they're NVIDIA-side issues on main, not this PR.

AI-assisted (Claude Code). Offline counts only.

**@⁠alessiodeia** on GitHub · 2026-11-24 22:47 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7146645037) Independent confirmation of @⁠zed6000's merge onto `70564ae`, on **NVIDIA (RTX 2070 SUPER, Turing, driver 621.40)**. I resolved the two hunks the same way, independently: main's `p.gs` block followed by `validator18`, then `out.extend(&info[..info_size as usize])`, and the 1.6/1.8 `dx.valver` selection with main's geometry comment. The branch is [`alessiodeia:rebase/1065-on-70564ae`](https://github.com/alessiodeia/VIctory/tree/rebase/1065-on-70564ae) (`6e26c67`) if anyone wants it. Same counts, program by program over `shaders.rpf` with `dxil.dll` 1.9.2609: validated **24,785 → 25,520 (+735, 0 lost)**, compute **1,886 → 2,621 of 2,621**. The only validator failure left on the merged tree is the 71 mesh programs with `vertex plus primitive output size is greater than 32768`, which `70564ae` has as well. Workspace clippy `-D warnings` is clean. On this card `cargo test -p victory-shader` has 3 failures: `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride`, `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` and `synthetic_tests::gathers_at_a_level_match_the_hardware`. All 3 fail identically on clean `70564ae` here (`dispatch failed: E_INVALIDARG` on the hardware device), so they're NVIDIA-side issues on main, not this PR. AI-assisted (Claude Code). Offline counts only.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-24 22:49 UTC · original

@⁠alessiodeia thanks for the independent confirmation. On the three test failures: on clean 70564ae all three pass on AMD (RX 7900 XTX, RDNA3, hardware device, no WARP):

  • stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride
  • stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros
  • synthetic_tests::gathers_at_a_level_match_the_hardware

That run gives 209 passed, 0 failed, 2 ignored (the opt-in bitcode bench and the documented fused-multiply-add defect). Your dispatch failed: E_INVALIDARG on Turing therefore looks NVIDIA-specific, as you suspected, and unrelated to this PR.

**@⁠zed6000** on GitHub · 2026-11-24 22:49 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7146681150) @⁠alessiodeia thanks for the independent confirmation. On the three test failures: on clean `70564ae` all three pass on AMD (RX 7900 XTX, RDNA3, hardware device, no WARP): - `stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride` - `stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros` - `synthetic_tests::gathers_at_a_level_match_the_hardware` That run gives 209 passed, 0 failed, 2 ignored (the opt-in bitcode bench and the documented fused-multiply-add defect). Your `dispatch failed: E_INVALIDARG` on Turing therefore looks NVIDIA-specific, as you suspected, and unrelated to this PR.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:33 UTC · original · edited 2026-11-26 04:21 UTC

Automated triage for the maintainers.

Needs work. Needs the maintainer's decision. Since cbd152c the only change is the requested comment at the validator-1.8 decision in Shader::finish (emit/shader.rs), explaining that in multi-row groups the host forms quads from 2x2 tiles while the console's quads are four lanes of one row. The decision itself is open: with this PR, 2D compute groups validate but take their implicit level from the host's tiling (RX 6750 XT and RX 7900 XTX read level 3 where the console gives level 1), and #2999 handles the quad layout for multi-row groups. Whether to take 1.8 now, right only for one-row groups, or to wait for that approach is the maintainer's call.

CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 00:33 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7148628009) · edited 2026-11-26 04:21 UTC <!-- victory-triage v1 head=b96509e836ba73866714b37f98cec899b378e2b1 verdict=needs-work at=2026-11-26T04:21:09Z --> Automated triage for the maintainers. **Needs work.** Needs the maintainer's decision. Since `cbd152c` the only change is the requested comment at the validator-1.8 decision in `Shader::finish` (`emit/shader.rs`), explaining that in multi-row groups the host forms quads from 2x2 tiles while the console's quads are four lanes of one row. The decision itself is open: with this PR, 2D compute groups validate but take their implicit level from the host's tiling (RX 6750 XT and RX 7900 XTX read level 3 where the console gives level 1), and #2999 handles the quad layout for multi-row groups. Whether to take 1.8 now, right only for one-row groups, or to wait for that approach is the maintainer's call. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠zed6000 on GitHub · 2026-11-25 00:43 UTC · original

For the "needs rebase" triage above: a rebase onto current main exists and is measured. This PR merged onto 70564ae with the two-hunk resolution described above (the same resolution as alessiodeia's rebase/1065-on-70564ae) merges cleanly onto main 4118f33. Measured there:

Validated Compute validated
main 4118f33 24,785 1,886 of 2,621
4118f33 + the rebased PR 25,520 (+735, 0 lost) 2,621 of 2,621

cargo test -p victory-shader --lib on the merged tree gives 249 passed, 0 failed on an RX 7900 XTX. The 137 merges between 70564ae and 4118f33 don't change any program's outcome on this data, so the earlier numbers still hold. All 735 are the "Entry function performs some operation that is incompatible with the shader stage" rejections, the largest remaining gap on main. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-25 00:43 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7148809649) For the "needs rebase" triage above: a rebase onto current main exists and is measured. This PR merged onto `70564ae` with the two-hunk resolution described above (the same resolution as alessiodeia's `rebase/1065-on-70564ae`) **merges cleanly onto main `4118f33`**. Measured there: | | Validated | Compute validated | |---|---|---| | main `4118f33` | 24,785 | 1,886 of 2,621 | | `4118f33` + the rebased PR | **25,520 (+735, 0 lost)** | **2,621 of 2,621** | `cargo test -p victory-shader --lib` on the merged tree gives 249 passed, 0 failed on an RX 7900 XTX. The 137 merges between `70564ae` and `4118f33` don't change any program's outcome on this data, so the earlier numbers still hold. All 735 are the "Entry function performs some operation that is incompatible with the shader stage" rejections, the largest remaining gap on main. Offline counts only; no program names or data.
Author
Owner

@⁠Halfect on GitHub · 2026-11-25 01:22 UTC · original

Rebased onto current main ccfb029 and pushed e198449. Both conflict resolutions keep main's geometry-shader handling alongside the validator-1.8 behavior; the PR still changes only emit/container.rs and emit/shader.rs (+155/-10).

Validation on macOS with the project toolchain (Rust 1.98.1):

  • cargo test --locked -p victory-shader --lib -- --skip diff_tests --skip valu_tests --skip waterfall_tests --skip stub_pipeline_is_created: 144 passed, 0 failed, 2 ignored.
  • cargo xtask policy: 182 files ok.
  • cargo clippy --locked -p victory-shader --lib --tests -- -D warnings stops on five warnings that reproduce identically on clean main ccfb029 (checked in a separate worktree). They are in emit/mod.rs / emit/lower.rs, which this PR does not change.

Windows dxil.dll validation was not rerun on macOS; the earlier Windows validation and independent rebased A/B measurements are in the thread above.

**@⁠Halfect** on GitHub · 2026-11-25 01:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7149485485) Rebased onto current main `ccfb029` and pushed `e198449`. Both conflict resolutions keep main's geometry-shader handling alongside the validator-1.8 behavior; the PR still changes only `emit/container.rs` and `emit/shader.rs` (+155/-10). Validation on macOS with the project toolchain (Rust 1.98.1): - `cargo test --locked -p victory-shader --lib -- --skip diff_tests --skip valu_tests --skip waterfall_tests --skip stub_pipeline_is_created`: **144 passed, 0 failed, 2 ignored**. - `cargo xtask policy`: **182 files ok**. - `cargo clippy --locked -p victory-shader --lib --tests -- -D warnings` stops on five warnings that reproduce identically on clean main `ccfb029` (checked in a separate worktree). They are in `emit/mod.rs` / `emit/lower.rs`, which this PR does not change. Windows `dxil.dll` validation was not rerun on macOS; the earlier Windows validation and independent rebased A/B measurements are in the thread above.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-25 01:39 UTC · original

@⁠Halfect confirmed on the title's shaders. Your rebased head e198449, merged onto main ccfb029 (a clean merge), measured with the same method (victory translate --validate --list, shaders.rpf 1.0.2.1, dxil.dll 1.8.2502, program by program):

Validated Compute validated
main ccfb029 24,785 1,886 of 2,621
ccfb029 + e198449 25,520 (+735, 0 lost) 2,621 of 2,621

cargo test -p victory-shader --lib on the merged tree gives 249 passed and 0 failed on an RX 7900 XTX (RDNA3). All 735 are the "Entry function performs some operation that is incompatible with the shader stage" rejections, the largest remaining gap on main. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-25 01:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7149803648) @⁠Halfect confirmed on the title's shaders. Your rebased head **`e198449`**, merged onto main **`ccfb029`** (a clean merge), measured with the same method (`victory translate --validate --list`, `shaders.rpf` 1.0.2.1, dxil.dll 1.8.2502, program by program): | | Validated | Compute validated | |---|---|---| | main `ccfb029` | 24,785 | 1,886 of 2,621 | | `ccfb029` + `e198449` | **25,520 (+735, 0 lost)** | **2,621 of 2,621** | `cargo test -p victory-shader --lib` on the merged tree gives 249 passed and 0 failed on an RX 7900 XTX (RDNA3). All 735 are the "Entry function performs some operation that is incompatible with the shader stage" rejections, the largest remaining gap on main. Offline counts only; no program names or data.
Author
Owner

@⁠hadrianhola on GitHub · 2026-11-25 04:06 UTC · original

#1065 and #1237 on Windows 10 (the "older host runtime" case), program by program. I'm not the author of either.

Host: Windows 10 22H2 (19045), RTX 4060, driver 610.88, dxil.dll 1.8.2502. The D3D12 Agility SDK 1.620 runtime sits beside victory.exe (the #175/#362 exports). The in-box runtime stops at SM 6.5, so without it Host::new refuses the device and nothing gets a pipeline.

Both PRs are merged onto main 940d32f. #1065 (e198449) merges cleanly. #1237 (a3346f9) has one conflict in lower.rs, which I resolved by keeping quad_gradients and helpers_read/helper_reads_own side by side, as @⁠wildheathen did. Measured with victory translate --validate --pipelines --list over shaders.rpf (1.0.2.1) and compared program by program:

compute validated compute pipelines the 735 "incompatible with the shader stage"
940d32f 1,886 of 2,621 2,226 723 get a pipeline, 12 E_INVALIDARG
+ #1065 2,621 2,226 the same 723 / 12
+ #1237 2,621 2,226 the same 723 / 12
  • Windows 10 accepts the validator-1.8 containers. With the Agility 1.620 runtime, all 723 of #1065's containers get a pipeline, the same programs that get one on main. The runtime caveat in the PR body doesn't apply to Windows 10 as long as the Agility runtime is present, which SM 6.6 needs anyway.
  • The 12 refused programs fail the same way on all three trees. @⁠wildheathen identified them as wave64 on the 5080. The other compute pipeline failures are also identical on all three: 382 more E_INVALIDARG and 1 out-of-memory.
  • Neither PR loses a program. Vertex/pixel and mesh outcomes are identical across the three trees. All three also have 867 vertex programs failing "Flags must match usage": that is the cd94d35 regression already tracked in #1973/#1987.
  • So on this host too, the two PRs are equivalent on the dump. The choice between them is about the approach, not about Windows 10.

Counts only; no shader names, hashes or data. AI-assisted (Claude Code).

**@⁠hadrianhola** on GitHub · 2026-11-25 04:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7152540780) **#1065 and #1237 on Windows 10 (the "older host runtime" case), program by program.** I'm not the author of either. Host: Windows 10 22H2 (19045), RTX 4060, driver 610.88, `dxil.dll` 1.8.2502. The D3D12 Agility SDK 1.620 runtime sits beside `victory.exe` (the #175/#362 exports). The in-box runtime stops at SM 6.5, so without it `Host::new` refuses the device and nothing gets a pipeline. Both PRs are merged onto main `940d32f`. #1065 (`e198449`) merges cleanly. #1237 (`a3346f9`) has one conflict in `lower.rs`, which I resolved by keeping `quad_gradients` and `helpers_read`/`helper_reads_own` side by side, as @⁠wildheathen did. Measured with `victory translate --validate --pipelines --list` over `shaders.rpf` (1.0.2.1) and compared program by program: | | compute validated | compute pipelines | the 735 "incompatible with the shader stage" | |---|---:|---:|---| | `940d32f` | 1,886 of 2,621 | 2,226 | 723 get a pipeline, 12 `E_INVALIDARG` | | + #1065 | **2,621** | 2,226 | the same 723 / 12 | | + #1237 | **2,621** | 2,226 | the same 723 / 12 | - **Windows 10 accepts the validator-1.8 containers.** With the Agility 1.620 runtime, all 723 of #1065's containers get a pipeline, the same programs that get one on main. The runtime caveat in the PR body doesn't apply to Windows 10 as long as the Agility runtime is present, which SM 6.6 needs anyway. - **The 12 refused programs fail the same way on all three trees.** @⁠wildheathen identified them as wave64 on the 5080. The other compute pipeline failures are also identical on all three: 382 more `E_INVALIDARG` and 1 out-of-memory. - **Neither PR loses a program.** Vertex/pixel and mesh outcomes are identical across the three trees. All three also have 867 vertex programs failing "Flags must match usage": that is the `cd94d35` regression already tracked in #1973/#1987. - So on this host too, the two PRs are equivalent on the dump. The choice between them is about the approach, not about Windows 10. Counts only; no shader names, hashes or data. AI-assisted (Claude Code).
Author
Owner

@⁠Halfect on GitHub · 2026-11-25 09:53 UTC · original

Thanks @⁠hadrianhola for the Windows 10 run — that directly closes the host-runtime caveat in the PR body: with the Agility 1.620 runtime beside the executable (which SM 6.6 needs anyway), Windows 10 accepts all 723 of this PR's validator-1.8 containers with the same pipeline outcomes as main, and the 12 E_INVALIDARG refusals are identical on all three trees. Good to have the equivalence with #1237 measured on the older-runtime host as well. Nothing further from my side; ready for review.

**@⁠Halfect** on GitHub · 2026-11-25 09:53 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7158931092) Thanks @⁠hadrianhola for the Windows 10 run — that directly closes the host-runtime caveat in the PR body: with the Agility 1.620 runtime beside the executable (which SM 6.6 needs anyway), Windows 10 accepts all 723 of this PR's validator-1.8 containers with the same pipeline outcomes as main, and the 12 `E_INVALIDARG` refusals are identical on all three trees. Good to have the equivalence with #1237 measured on the older-runtime host as well. Nothing further from my side; ready for review.
Author
Owner

@⁠Halfect on GitHub · 2026-11-25 17:22 UTC · original

Rebased onto current main 13f91ca and pushed d22149a; the emit/shader.rs conflict resolved by keeping both sides (main's UAV-declaration test alongside this PR's derivative tests). The branch merges cleanly again.

One fixture fix the rebase exposed: main's writer now drops a call nothing reads ("a phi or a value nothing reads is dropped"), and these tests called the sample/derivative ops with dead results — so the emitted modules no longer contained a gradient op and the forced-1.6 negative controls were vacuously accepted (caught locally: both negative controls failed after the plain rebase). The fixtures now branch on the operations' results (extract + compare + conditional branch), which keeps the calls live; the negative controls reject again.

Validation on d22149a (Windows, CPU-only, SDK 10.0.26100 dxil.dll really loaded):

  • cargo test --locked -p victory-shader --lib emit::shader: 4 passed / 0 failed — including both forced-1.6 negative controls rejecting and main's uavs_outside_pixel_and_compute_programs_are_declared.
  • Full library suite (skipping heap_direct_texture_reads_mark_their_heap_index, which aborts the harness with an access violation on this machine, identically on unmodified main): 269 passed, 3 failed — the same three D3D12-device dispatch tests (stride_tests pair, gathers_at_a_level_match_the_hardware) that fail on clean main here.
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings: clean. cargo xtask policy: 184 files ok. git diff --check: clean.

No GPU, no game data. AI-assisted (Kimi).

**@⁠Halfect** on GitHub · 2026-11-25 17:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7169405694) Rebased onto current main `13f91ca` and pushed `d22149a`; the `emit/shader.rs` conflict resolved by keeping both sides (main's UAV-declaration test alongside this PR's derivative tests). The branch merges cleanly again. One fixture fix the rebase exposed: main's writer now drops a call nothing reads ("a phi or a value nothing reads is dropped"), and these tests called the sample/derivative ops with dead results — so the emitted modules no longer contained a gradient op and the forced-1.6 negative controls were vacuously accepted (caught locally: both negative controls failed after the plain rebase). The fixtures now branch on the operations' results (`extract` + compare + conditional branch), which keeps the calls live; the negative controls reject again. Validation on `d22149a` (Windows, CPU-only, SDK 10.0.26100 `dxil.dll` really loaded): - `cargo test --locked -p victory-shader --lib emit::shader`: 4 passed / 0 failed — including both forced-1.6 negative controls rejecting and main's `uavs_outside_pixel_and_compute_programs_are_declared`. - Full library suite (skipping `heap_direct_texture_reads_mark_their_heap_index`, which aborts the harness with an access violation on this machine, identically on unmodified main): **269 passed, 3 failed** — the same three D3D12-device dispatch tests (`stride_tests` pair, `gathers_at_a_level_match_the_hardware`) that fail on clean main here. - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings`: clean. `cargo xtask policy`: 184 files ok. `git diff --check`: clean. No GPU, no game data. AI-assisted (Kimi).
Author
Owner

@⁠zed6000 on GitHub · 2026-11-25 18:26 UTC · original

Measured on current main. The rebased head d22149a, merged onto main 13f91ca (a clean merge), with the same method as before (victory translate --validate --list, shaders.rpf 1.0.2.1, dxil.dll 1.8.2502, program by program):

Validated "Entry function ... incompatible with the shader stage"
main 13f91ca 24,846 748
13f91ca + d22149a 25,594 (+748, 0 lost) 0

The count is 748 now rather than 735: since 940d32f, 13 more compute programs reach emission on main and then hit the same validator error, and this PR clears them too. cargo test -p victory-shader --lib on the merged tree gives 273 passed and 0 failed on an RX 7900 XTX. This is the largest single remaining gap on main. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-25 18:26 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7170902883) Measured on current main. The rebased head `d22149a`, merged onto main `13f91ca` (a clean merge), with the same method as before (`victory translate --validate --list`, `shaders.rpf` 1.0.2.1, dxil.dll 1.8.2502, program by program): | | Validated | "Entry function ... incompatible with the shader stage" | |---|---|---| | main `13f91ca` | 24,846 | 748 | | `13f91ca` + `d22149a` | **25,594 (+748, 0 lost)** | **0** | The count is 748 now rather than 735: since `940d32f`, 13 more compute programs reach emission on main and then hit the same validator error, and this PR clears them too. `cargo test -p victory-shader --lib` on the merged tree gives 273 passed and 0 failed on an RX 7900 XTX. This is the largest single remaining gap on main. Offline counts only; no program names or data.
Author
Owner

@⁠Halfect on GitHub · 2026-11-25 19:32 UTC · original

Thanks @⁠zed6000 for the fresh A/B on the rebased head. The numbers line up with the change's intent: 748 compute programs move from incompatible with the shader stage to validated, 0 lost, vertex/pixel and mesh identical — and the 735 → 748 delta is explained by the 13 compute programs that started reaching emission on main since 940d32f and hit the same validator error. Good to also have the merged tree green on the RX 7900 XTX (273 passed). Nothing further from my side; ready for review.

**@⁠Halfect** on GitHub · 2026-11-25 19:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7172445629) Thanks @⁠zed6000 for the fresh A/B on the rebased head. The numbers line up with the change's intent: 748 compute programs move from `incompatible with the shader stage` to validated, 0 lost, vertex/pixel and mesh identical — and the 735 → 748 delta is explained by the 13 compute programs that started reaching emission on main since `940d32f` and hit the same validator error. Good to also have the merged tree green on the RX 7900 XTX (273 passed). Nothing further from my side; ready for review.
Author
Owner

@⁠brainbudt on GitHub · 2026-11-25 20:23 UTC · original

Note

🤖 Gemini 4 Neon (with GPT-6.2 Astra, Mistral Large 4, and DeepSeek V4.1 Flash) responding on behalf of brainbudt

Independently tested d22149ae merged with 13f91cae (Windows 11 + Microsoft dxil.dll 1.8.2505.32 + WARP, Linux x86-64, and Windows MSVC cargo check --tests). All four focused Windows emitter tests passed with dxil.dll 1.8.2505.32 loaded, including both forced-1.6 negative controls, and WARP created the live derivative pipeline.

Two issues found before merge:

  1. Dead image_sample still declares validator 1.8 (crates/victory-shader/src/emit/shader.rs:250): When a synthetic GFX10 compute shader discards its image_sample result, dxc -dumpbin shows zero sample calls on both main and this PR, yet this PR still emits validator 1.8. Microsoft validator 1.7 accepts main's output and rejects this PR's output (Validator version in metadata (1.8) is not supported; maximum: (1.7)). Deriving the 1.8 selection from live emitted calls in Module::uses() (with a dead-sample regression test) avoids this regression.
  2. Extra metadata node changes DXIL bytes on the 1.6 path (crates/victory-shader/src/emit/shader.rs:922): Plain vertex (+8 B), pixel (+8 B), and compute (+4 B) shaders change DXIL bytes and container hashes on the 1.6 path. Reusing the existing version metadata node on the 1.6 path restores the base hashes (verified on pixel and Dot3 compute controls).
**@⁠brainbudt** on GitHub · 2026-11-25 20:23 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7173613065) > [!NOTE] > 🤖 **Gemini 4 Neon (with GPT-6.2 Astra, Mistral Large 4, and DeepSeek V4.1 Flash) responding on behalf of brainbudt** Independently tested `d22149ae` merged with `13f91cae` (Windows 11 + Microsoft `dxil.dll` 1.8.2505.32 + WARP, Linux x86-64, and Windows MSVC `cargo check --tests`). All four focused Windows emitter tests passed with `dxil.dll` 1.8.2505.32 loaded, including both forced-1.6 negative controls, and WARP created the live derivative pipeline. Two issues found before merge: 1. **Dead `image_sample` still declares validator 1.8 (`crates/victory-shader/src/emit/shader.rs:250`):** When a synthetic GFX10 compute shader discards its `image_sample` result, `dxc -dumpbin` shows zero sample calls on both `main` and this PR, yet this PR still emits validator `1.8`. Microsoft validator 1.7 accepts `main`'s output and rejects this PR's output (`Validator version in metadata (1.8) is not supported; maximum: (1.7)`). Deriving the 1.8 selection from live emitted calls in `Module::uses()` (with a dead-sample regression test) avoids this regression. 2. **Extra metadata node changes DXIL bytes on the 1.6 path (`crates/victory-shader/src/emit/shader.rs:922`):** Plain vertex (+8 B), pixel (+8 B), and compute (+4 B) shaders change DXIL bytes and container hashes on the 1.6 path. Reusing the existing `version` metadata node on the 1.6 path restores the base hashes (verified on pixel and Dot3 compute controls).
Author
Owner

@⁠gmankab on GitHub · 2026-11-25 20:24 UTC · original

I adapted this commit to the native Linux branch and ran the three derivative regressions with Microsoft's Linux libdxil 1.9.2609. All three executed and passed. The implicit-sample and explicit-derivative controls with validator 1.6 were rejected as expected, and the arithmetic control kept validator 1.6.

In a separate native RX 6800 test, both descriptor paths hit a GPUVM invalid read in the same compute-indirect breadcrumb range. The translated shader in that range contains implicit samples and the Linux validator rejects its original 1.6 container with the stage error described here. That identifies a validation defect in the suspect shader. The patched hardware run will test whether the GPU fault persists.

Tested-on: Fedora Linux 45, Microsoft Linux DXIL validator 1.9.2609
Assisted-by: gpt-6.2 sol xhigh

**@⁠gmankab** on GitHub · 2026-11-25 20:24 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7173635669) I adapted this commit to the native Linux branch and ran the three derivative regressions with Microsoft's Linux libdxil 1.9.2609. All three executed and passed. The implicit-sample and explicit-derivative controls with validator 1.6 were rejected as expected, and the arithmetic control kept validator 1.6. In a separate native RX 6800 test, both descriptor paths hit a GPUVM invalid read in the same compute-indirect breadcrumb range. The translated shader in that range contains implicit samples and the Linux validator rejects its original 1.6 container with the stage error described here. That identifies a validation defect in the suspect shader. The patched hardware run will test whether the GPU fault persists. Tested-on: Fedora Linux 45, Microsoft Linux DXIL validator 1.9.2609 Assisted-by: gpt-6.2 sol xhigh
Author
Owner

@⁠Halfect on GitHub · 2026-11-25 21:12 UTC · original

Thanks @⁠brainbudt — both findings were real, fixed in cbd152c.

1. Dead image_sample declaring 1.8. The eager flag in Shader::op is gone. Module::uses — the liveness-filtered scan that already feeds the SFI0 feature flags — now also reports gradient operations, reading a live dx.op call's opcode (its first argument); finish derives the decision as uses.derivatives && compute && !mesh, so a call the writer drops declares nothing. Your regression exists as a_dead_sample_stays_on_validator_1_6: a compute image_sample with a discarded result declares 1.6 and validates with the SDK 10.0.26100 dxil.dll.

2. Extra metadata node on the 1.6 path. dx.valver now reuses the dx.version node unless 1.8 is actually declared. Pinned by a_shader_without_derivatives_reuses_the_version_node (len + FNV of a minimal pixel and a minimal compute container); I also verified those pins against unmodified 13f91ca in a scratch test — pixel (1268, 0x0cf4762f4d364c15), compute (1252, 0xe811e2546d1c9513), identical on both — so the 1.6 path is byte-identical to before this PR.

The forced-1.6 negative controls survive through a test-only override (force_validator18), since the live-call derivation would otherwise re-derive 1.8 for the control module.

@⁠gmankab Thanks for the native-Linux run — good to have all three regressions passing with the Linux libdxil 1.9.2609, and the 1.6 controls rejected as expected.

Validation on cbd152c (Windows, CPU-only): the six emit::shader tests pass with dxil.dll actually loaded; the CPU-only library suite is 230 passed, 3 failed — the same three pre-existing D3D12-device failures (stride_tests pair, gathers_at_a_level_match_the_hardware) that fail identically on unmodified 13f91ca on this machine, and the heap_direct_texture_reads_mark_their_heap_index harness abort also reproduces on unmodified 13f91ca; clippy -D warnings clean; cargo xtask policy 184 files ok; git diff --check clean. The PR body is updated to match.

AI-assisted: Kimi.

**@⁠Halfect** on GitHub · 2026-11-25 21:12 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7174755561) Thanks @⁠brainbudt — both findings were real, fixed in `cbd152c`. **1. Dead `image_sample` declaring 1.8.** The eager flag in `Shader::op` is gone. `Module::uses` — the liveness-filtered scan that already feeds the SFI0 feature flags — now also reports gradient operations, reading a live `dx.op` call's opcode (its first argument); `finish` derives the decision as `uses.derivatives && compute && !mesh`, so a call the writer drops declares nothing. Your regression exists as `a_dead_sample_stays_on_validator_1_6`: a compute `image_sample` with a discarded result declares 1.6 and validates with the SDK 10.0.26100 `dxil.dll`. **2. Extra metadata node on the 1.6 path.** `dx.valver` now reuses the `dx.version` node unless 1.8 is actually declared. Pinned by `a_shader_without_derivatives_reuses_the_version_node` (len + FNV of a minimal pixel and a minimal compute container); I also verified those pins against unmodified `13f91ca` in a scratch test — pixel `(1268, 0x0cf4762f4d364c15)`, compute `(1252, 0xe811e2546d1c9513)`, identical on both — so the 1.6 path is byte-identical to before this PR. The forced-1.6 negative controls survive through a test-only override (`force_validator18`), since the live-call derivation would otherwise re-derive 1.8 for the control module. @⁠gmankab Thanks for the native-Linux run — good to have all three regressions passing with the Linux libdxil 1.9.2609, and the 1.6 controls rejected as expected. Validation on `cbd152c` (Windows, CPU-only): the six `emit::shader` tests pass with `dxil.dll` actually loaded; the CPU-only library suite is **230 passed, 3 failed** — the same three pre-existing D3D12-device failures (`stride_tests` pair, `gathers_at_a_level_match_the_hardware`) that fail identically on unmodified `13f91ca` on this machine, and the `heap_direct_texture_reads_mark_their_heap_index` harness abort also reproduces on unmodified `13f91ca`; clippy `-D warnings` clean; `cargo xtask policy` 184 files ok; `git diff --check` clean. The PR body is updated to match. AI-assisted: Kimi.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-25 21:22 UTC · original

Re-measured the new head cbd152c on main 13f91ca (a clean merge), with the same method (shaders.rpf 1.0.2.1, dxil.dll 1.8.2502, program by program): +748, 0 lost (25,594). These are exactly the same 748 programs as d22149a, so the narrower 1.8 detection changes no program's outcome on this title. cargo test -p victory-shader --lib gives 275 passed and 0 failed on an RX 7900 XTX. Offline counts only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-25 21:22 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7174992403) Re-measured the new head **`cbd152c`** on main `13f91ca` (a clean merge), with the same method (`shaders.rpf` 1.0.2.1, dxil.dll 1.8.2502, program by program): **+748, 0 lost (25,594)**. These are exactly the same 748 programs as `d22149a`, so the narrower 1.8 detection changes no program's outcome on this title. `cargo test -p victory-shader --lib` gives 275 passed and 0 failed on an RX 7900 XTX. Offline counts only; no program names or data.
Author
Owner

@⁠Halfect on GitHub · 2026-11-25 21:32 UTC · original

Thanks @⁠zed6000 for the quick re-measure on cbd152c — the same 748 programs at +748 / 0 lost confirms the liveness-based detection (and the reused dx.version node on the 1.6 path) changed no program's outcome, which is exactly what @⁠brainbudt's two findings required. CI is green on this head as well (check passed in run 45702073311). Nothing further from my side; ready for review.

**@⁠Halfect** on GitHub · 2026-11-25 21:32 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7175206146) Thanks @⁠zed6000 for the quick re-measure on `cbd152c` — the same 748 programs at +748 / 0 lost confirms the liveness-based detection (and the reused `dx.version` node on the 1.6 path) changed no program's outcome, which is exactly what @⁠brainbudt's two findings required. CI is green on this head as well (`check` passed in run 45702073311). Nothing further from my side; ready for review.
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 01:31 UTC · original

Code review and Windows SDK 10.0.26100.0 dxil.dll + RTX 5090 + WARP verification at head cbd152cc1d92 merged cleanly onto main (63bcca43c6a0; emit/lower.rs untouched):

  • Code review (emit/bitcode.rs:528-558, emit/shader.rs:914-925, emit/container.rs:169-251):
    • Module::uses() scans only live emitted instructions (plan.live) for DXIL derivative/implicit-sample ops (60 | 61 | 64 | 81 | 83..=86), so dead samples eliminated before writing do not bump the validator version.
    • Only non-mesh compute shaders with live derivatives declare dx.valver = (1, 8) and PSV0 RuntimeInfo v3 (52 B with entry name offset 1); all other shaders stay byte-for-byte on validator 1.6 and PSV0 v2 (48 B).
  • Verified (Windows 11, Windows SDK 10.0.26100.0 dxil.dll, NVIDIA RTX 5090 + WARP, VICTORY_D3D12_DEBUG=1, Rust 1.98.1):
    • cargo xtask policy: 191 files ok; cargo clippy (default + --features diagnostics): 0 warnings
    • emit::shader::tests (6/6, including live dxil.dll validation of compute implicit sample & explicit derivatives and 1.6 preservation on dead/non-derivative shaders), emit::container:: (1/1), emit::bitcode:: (12/12, 1 ignored), and emit::semantics_tests (34/34 on both RTX 5090 and WARP, 1 ignored) all passed.

LGTM.

**@⁠fuzeofficlal** on GitHub · 2026-11-26 01:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7179849557) Code review and Windows SDK `10.0.26100.0` `dxil.dll` + RTX 5090 + WARP verification at head `cbd152cc1d92` merged cleanly onto `main` (`63bcca43c6a0`; `emit/lower.rs` untouched): - **Code review (`emit/bitcode.rs:528-558`, `emit/shader.rs:914-925`, `emit/container.rs:169-251`)**: - `Module::uses()` scans only live emitted instructions (`plan.live`) for DXIL derivative/implicit-sample ops (`60 | 61 | 64 | 81 | 83..=86`), so dead samples eliminated before writing do not bump the validator version. - Only non-mesh compute shaders with live derivatives declare `dx.valver = (1, 8)` and `PSV0` RuntimeInfo v3 (52 B with entry name offset `1`); all other shaders stay byte-for-byte on validator `1.6` and `PSV0` v2 (48 B). - **Verified (Windows 11, Windows SDK `10.0.26100.0` `dxil.dll`, NVIDIA RTX 5090 + WARP, `VICTORY_D3D12_DEBUG=1`, Rust 1.98.1)**: - `cargo xtask policy`: `191 files ok`; `cargo clippy` (default + `--features diagnostics`): 0 warnings - `emit::shader::tests` (6/6, including live `dxil.dll` validation of compute implicit sample & explicit derivatives and 1.6 preservation on dead/non-derivative shaders), `emit::container::` (1/1), `emit::bitcode::` (12/12, 1 ignored), and `emit::semantics_tests` (34/34 on both RTX 5090 and WARP, 1 ignored) all passed. LGTM.
Author
Owner

@⁠Halfect on GitHub · 2026-11-26 02:10 UTC · original

Thanks @⁠fuzeofficlal for the careful code review and the RTX 5090 + WARP verification — especially for confirming the liveness-based detection in Module::uses (dead samples no longer bump the version) and the byte-identical 1.6 path for non-derivative shaders. Good to have the six emitter tests validating with the SDK dxil.dll really loaded on another machine. Nothing further from my side; ready for review.

**@⁠Halfect** on GitHub · 2026-11-26 02:10 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7180539816) Thanks @⁠fuzeofficlal for the careful code review and the RTX 5090 + WARP verification — especially for confirming the liveness-based detection in `Module::uses` (dead samples no longer bump the version) and the byte-identical 1.6 path for non-derivative shaders. Good to have the six emitter tests validating with the SDK `dxil.dll` really loaded on another machine. Nothing further from my side; ready for review.
Author
Owner

@⁠wwwwwwww3333333 on GitHub · 2026-11-26 03:06 UTC · original

For comparison: #2999 (on top of #1237) has a GPU test with an [8, 8, 1] group whose lane quads give level 1 and whose 2x2 tiles give level 3. With this PR rebased onto main 63bcca4 it read 3 on an RX 6750 XT, since the host's compute derivatives use 2x2 tiles of threads in a two-dimensional group, while the console's quad is four threads of one row. In one-row groups the two agree, as the earlier comparisons found.

**@⁠wwwwwwww3333333** on GitHub · 2026-11-26 03:06 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7181395786) For comparison: #2999 (on top of #1237) has a GPU test with an `[8, 8, 1]` group whose lane quads give level 1 and whose 2x2 tiles give level 3. With this PR rebased onto main 63bcca4 it read 3 on an RX 6750 XT, since the host's compute derivatives use 2x2 tiles of threads in a two-dimensional group, while the console's quad is four threads of one row. In one-row groups the two agree, as the earlier comparisons found.
Author
Owner

@⁠zed6000 on GitHub · 2026-11-26 03:36 UTC · original

The same on RDNA3, to go with the RX 6750 XT result above. I applied #2999's synthetic_tests.rs (only the test, none of its lowering) to this PR's head cbd152c merged onto main 63bcca4 and ran compute_samples_take_derivatives_from_lane_quads on an RX 7900 XTX: it fails with wave32 hardware: thread (0, 0) sampled level 3, the lane quads give 1 (2x2 tiles give 3). So RDNA3 also forms compute quads from 2x2 tiles in an [8, 8, 1] group. On #2999 itself the same test reads level 1 on every lane, in Wave32 and Wave64, on hardware and WARP.

On this title's census the two tie: #1065 and #2999 each gain exactly the same 748 programs on 63bcca4, 0 lost (measured on #2999 and in #1247). The difference is which mip 2D compute groups sample on the host. Offline tests only; no program names or data.

**@⁠zed6000** on GitHub · 2026-11-26 03:36 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7181862082) The same on RDNA3, to go with the RX 6750 XT result above. I applied #2999's `synthetic_tests.rs` (only the test, none of its lowering) to this PR's head `cbd152c` merged onto `main` `63bcca4` and ran `compute_samples_take_derivatives_from_lane_quads` on an **RX 7900 XTX**: it fails with `wave32 hardware: thread (0, 0) sampled level 3, the lane quads give 1 (2x2 tiles give 3)`. So RDNA3 also forms compute quads from 2x2 tiles in an `[8, 8, 1]` group. On #2999 itself the same test reads level 1 on every lane, in Wave32 and Wave64, on hardware and WARP. On this title's census the two tie: #1065 and #2999 each gain exactly the same 748 programs on `63bcca4`, 0 lost (measured on #2999 and in #1247). The difference is which mip 2D compute groups sample on the host. Offline tests only; no program names or data.
Author
Owner

@⁠Halfect on GitHub · 2026-11-26 04:05 UTC · original

Addressed the triage's needs-work point in b96509e (comment-only change; the declaration logic is untouched).

The 1.8 decision in Shader::finish now states the limitation in place: declaring 1.8 makes a derivative-using compute program accepted, but the host's derivative semantics are not the console's — console compute lanes are x-major, so a quad of a multi-row group is four lanes of one row, while the host forms 2x2 tiles; an implicit level (and DerivCoarseY/FineY) of a multi-row group therefore comes from the host's tiling, not the console's row. One-row groups agree either way, which is why the earlier one-row measurements showed no difference. Reproducing the console's quad layout for multi-row groups (the #2999 direction) is noted as future work that does not gate this declaration.

That framing also matches the measurement position: this PR is the validation step — it moves the 748 measured compute programs from incompatible with the shader stage to validated with 0 losses; the quad-layout correctness question applies to what those programs then compute and belongs to the follow-up work.

Validation on b96509e (Windows, CPU-only, SDK 10.0.26100 dxil.dll really loaded): the six emit::shader tests pass, including both forced-1.6 negative controls; cargo clippy --locked -p victory-shader --lib --tests -- -D warnings clean; cargo xtask policy 184 files ok; git diff --check clean. No GPU, no game data. AI-assisted (Kimi).

**@⁠Halfect** on GitHub · 2026-11-26 04:05 UTC · [original](https://github.com/Marvisak/VIctory/pull/1065#issuecomment-7182283684) Addressed the triage's needs-work point in `b96509e` (comment-only change; the declaration logic is untouched). The 1.8 decision in `Shader::finish` now states the limitation in place: declaring 1.8 makes a derivative-using compute program *accepted*, but the host's derivative semantics are not the console's — console compute lanes are x-major, so a quad of a multi-row group is four lanes of one row, while the host forms 2x2 tiles; an implicit level (and `DerivCoarseY`/`FineY`) of a multi-row group therefore comes from the host's tiling, not the console's row. One-row groups agree either way, which is why the earlier one-row measurements showed no difference. Reproducing the console's quad layout for multi-row groups (the #2999 direction) is noted as future work that does not gate this declaration. That framing also matches the measurement position: this PR is the validation step — it moves the 748 measured compute programs from `incompatible with the shader stage` to validated with 0 losses; the quad-layout correctness question applies to what those programs then compute and belongs to the follow-up work. Validation on `b96509e` (Windows, CPU-only, SDK 10.0.26100 `dxil.dll` really loaded): the six `emit::shader` tests pass, including both forced-1.6 negative controls; `cargo clippy --locked -p victory-shader --lib --tests -- -D warnings` clean; `cargo xtask policy` 184 files ok; `git diff --check` clean. No GPU, no game data. AI-assisted (Kimi).
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1065/head:github-bot/gh-1065'
git switch 'github-bot/gh-1065'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1065'
git switch 'github-bot/gh-1065'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1065'
git switch 'github-bot/gh-1065'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1065'
git switch 'main'
git merge --squash 'github-bot/gh-1065'
git switch 'main'
git merge --ff-only 'github-bot/gh-1065'
git switch 'main'
git merge 'github-bot/gh-1065'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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!1065
No description provided.