GPU: Pre-check wave lane constraints for compute pipelines (fixes #817) #2192

Open
Xvania7 wants to merge 3 commits from upstream-pr/2194 into main
Xvania7 commented 2026-11-25 07:21:59 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T07:21:59Z.


Fixes #817 (supersedes tracking issue #893; related to #468).

Summary

  • Device capability query (crates/victory-gpu/src/device.rs, host.rs): Queries D3D12_FEATURE_DATA_D3D12_OPTIONS1 (WaveLaneCountMin, WaveLaneCountMax).
  • DXIL wave constraint check (crates/victory-shader/src/emit/mod.rs): Reads declared WaveSize from PSV0 via HostShader::required_wave_size().
  • Pre-check (crates/victory-gpu/src/pipeline/host.rs): Checks !(min..=max).contains(&req) via unsupported_compute_wave before CreateComputePipelineState and distinguishes root-signature vs PSO refusal stages in offline ranslate --pipelines (incorporating follow-up commits from @fuzeofficlal and @MichaelSmithAI).

Note: Opened as a PR per maintainer triage (#893); happy to coordinate with #1922 / #2157 if maintainers prefer one consolidated PR.

<!-- greyfinch-sync:Marvisak/VIctory:issue:5486995056 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194). Originally posted by [Xvania7](https://github.com/Xvania7) on 2026-11-25T07:21:59Z. --- Fixes #817 (supersedes tracking issue #893; related to #468). ### Summary - **Device capability query (crates/victory-gpu/src/device.rs, host.rs):** Queries D3D12_FEATURE_DATA_D3D12_OPTIONS1 (WaveLaneCountMin, WaveLaneCountMax). - **DXIL wave constraint check (crates/victory-shader/src/emit/mod.rs):** Reads declared WaveSize from PSV0 via HostShader::required_wave_size(). - **Pre-check (crates/victory-gpu/src/pipeline/host.rs):** Checks !(min..=max).contains(&req) via unsupported_compute_wave before CreateComputePipelineState and distinguishes root-signature vs PSO refusal stages in offline ranslate --pipelines (incorporating follow-up commits from @fuzeofficlal and @MichaelSmithAI). Note: Opened as a PR per maintainer triage (#893); happy to coordinate with #1922 / #2157 if maintainers prefer one consolidated PR.
Dathinel commented 2026-11-25 08:06:43 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Dathinel on 2026-11-25T07:47:23Z.


For the consolidation question: I combined #1922 (24a7bc2, runtime) and #2157 (9771cae, offline CLI) on Windows. The merge includes main 940d32f and needs no manual resolution (tree 884f866b). Seven targeted tests passed: three GPU runtime checks, two shader diagnostic checks, and two CLI checks, including the WARP pipeline test that distinguishes root-signature errors from wave-size refusals.

One behavior worth preserving when deciding between implementations: #1922 explicitly tests the unsized console-wave64 fallback on a host with fewer than 64 lanes. Testing the fixed wave size alone would miss that distinction.

Update for 754fe02: the rebase resolved the four conflicts against main@940d32f. I compared both parsers and pre-check functions using the same synthetic PSV0 metadata (guest Wave64 compute, simulated 32-lane-only host). Both rejected fixed 64 and allowed fixed 32. The current PSV0 writer emits either a fixed size or the unrestricted pair (0, UINT32_MAX). For the unrestricted pair with a Wave64 guest on this host, #1922 rejected early and #2194 deferred to pipeline creation. A separate synthetic 64–128 interval also distinguished the parsers, but that interval does not come from this writer. These are pre-check results; driver behavior was not measured.

AI-assisted; synthetic tests only.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7156254331 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7156254331). Originally posted by [Dathinel](https://github.com/Dathinel) on 2026-11-25T07:47:23Z. --- For the consolidation question: I combined #1922 (`24a7bc2`, runtime) and #2157 (`9771cae`, offline CLI) on Windows. The merge includes main `940d32f` and needs no manual resolution (tree `884f866b`). Seven targeted tests passed: three GPU runtime checks, two shader diagnostic checks, and two CLI checks, including the WARP pipeline test that distinguishes root-signature errors from wave-size refusals. One behavior worth preserving when deciding between implementations: #1922 explicitly tests the unsized console-wave64 fallback on a host with fewer than 64 lanes. Testing the fixed wave size alone would miss that distinction. Update for `754fe02`: the rebase resolved the four conflicts against `main@940d32f`. I compared both parsers and pre-check functions using the same synthetic PSV0 metadata (guest Wave64 compute, simulated 32-lane-only host). Both rejected fixed 64 and allowed fixed 32. The current PSV0 writer emits either a fixed size or the unrestricted pair (0, UINT32_MAX). For the unrestricted pair with a Wave64 guest on this host, #1922 rejected early and #2194 deferred to pipeline creation. A separate synthetic 64–128 interval also distinguished the parsers, but that interval does not come from this writer. These are pre-check results; driver behavior was not measured. AI-assisted; synthetic tests only.
Xvania7 commented 2026-11-25 08:06:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T07:56:17Z.


Thanks for the comparison data, @Dathinel.

Two quick updates on the branch state:

  1. Rebase conflicts resolved: The conflicts you saw at 9d4b8d7 were before the rebase onto main (940d32f). Current head 754fe02 is cleanly rebased onto 940d32f with mergeable_state = clean and green CI, and @MichaelSmithAI also verified 754fe02 on an RTX 4090 under Wine (wave32 pipeline created, wave64 returned the expected host-width diagnostic).
  2. Unsized vs fixed wave size: In HostShader::required_wave_size(), we only extract a fixed constraint (min != 0 && min == max from PSV0), so an unsized shader returns None and is allowed through unsupported_compute_wave(None, ...). Agreed that #1922's explicit test for the unsized console-wave64 fallback on hosts with < 64 lanes is a useful distinction to preserve regardless of which PR pair lands.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7156419958 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7156419958). Originally posted by [Xvania7](https://github.com/Xvania7) on 2026-11-25T07:56:17Z. --- Thanks for the comparison data, @Dathinel. Two quick updates on the branch state: 1. **Rebase conflicts resolved:** The conflicts you saw at `9d4b8d7` were before the rebase onto `main` (`940d32f`). Current head `754fe02` is cleanly rebased onto `940d32f` with `mergeable_state = clean` and green CI, and `@MichaelSmithAI` also verified `754fe02` on an RTX 4090 under Wine (wave32 pipeline created, wave64 returned the expected host-width diagnostic). 2. **Unsized vs fixed wave size:** In `HostShader::required_wave_size()`, we only extract a fixed constraint (`min != 0 && min == max` from `PSV0`), so an unsized shader returns `None` and is allowed through `unsupported_compute_wave(None, ...)`. Agreed that `#1922`'s explicit test for the unsized console-wave64 fallback on hosts with `< 64` lanes is a useful distinction to preserve regardless of which PR pair lands.
catminou4 commented 2026-11-25 08:10:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T08:10:10Z.

Review: APPROVED


Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, cargo test -p victory-shader --locked.

145 passed / 0 failed / 2 ignored. Wave lane constraints pre-checked for compute pipelines (+1 test) — pre-validation of lane constraints; mixed gpu+shader.

<!-- greyfinch-sync:Marvisak/VIctory:review:6053923321 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#pullrequestreview-6053923321). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T08:10:10Z. **Review:** APPROVED --- Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, `cargo test -p victory-shader --locked`. 145 passed / 0 failed / 2 ignored. Wave lane constraints pre-checked for compute pipelines (+1 test) — pre-validation of lane constraints; mixed gpu+shader.
DenRakEiw commented 2026-11-25 09:23:42 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-25T09:23:42Z.

Review: APPROVED


Verified locally merged onto origin/main (940d32f, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC):

  • cargo test -p victory-gpu --lib wave — 4 passed, 0 failed on RTX 5090 (including query_wave_lane_limits_reports_capabilities and wave_size_precheck_rejects_both_outside_bounds)
  • cargo clippy -p victory-gpu -p victory-shader --all-targets — 0 warnings
  • cargo xtask policy — ok (183 files ok)

Clean wave-lane capability query and compute pipeline wave-size pre-check (fixing #817). Looks good.

AI-assisted (Gemini 4 Neon).

<!-- greyfinch-sync:Marvisak/VIctory:review:6054874406 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#pullrequestreview-6054874406). Originally posted by [DenRakEiw](https://github.com/DenRakEiw) on 2026-11-25T09:23:42Z. **Review:** APPROVED --- Verified locally merged onto `origin/main` (`940d32f`, Windows 11 x64, NVIDIA GeForce RTX 5090, Rust 1.98.1 MSVC): - `cargo test -p victory-gpu --lib wave` — **4 passed, 0 failed** on RTX 5090 (including `query_wave_lane_limits_reports_capabilities` and `wave_size_precheck_rejects_both_outside_bounds`) - `cargo clippy -p victory-gpu -p victory-shader --all-targets` — 0 warnings - `cargo xtask policy` — ok (`183 files ok`) Clean wave-lane capability query and compute pipeline wave-size pre-check (fixing #817). Looks good. AI-assisted (Gemini 4 Neon).
GiacomoSignorile commented 2026-11-25 10:07:54 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by GiacomoSignorile on 2026-11-25T09:59:41Z.


Test data from an RTX 5070 (12 GB, NVIDIA, WaveLaneCountMax = 32), Windows, 16 GB RAM, on the vitutu1/victory-perf fork at 97c3aa2 (based on fxceless/victory-fork). Profile: --console series-s, VICTORY_RENDER_SCALE=0.5, VICTORY_OWN_UPSCALER=1, VICTORY_AMBIENT_STUB=1, VICTORY_SHADOWMASK_STUB=1, VICTORY_RELAY=2, VICTORY_LATE_WAIT=3, VICTORY_WIDE_BACK=1, VICTORY_REBAR=0, VICTORY_CARD_BUFFERS_MB=2048.

Four compute pipelines are refused in-game with E_INVALIDARG (0x80070057):

02384a60fda6f2d0  369cbe906ea72764  2cc4c197ee29e291  2da4beb386509b77

Analysed offline, without running the game: the translated DXIL for all four still carries WaveSize = 64 (dxc -dumpbin), which the 32-lane NVIDIA host refuses. The split / local-wave retries all fall back to wave 64. The main reason given is LDS in a group over 32, with an LDS read and write inside one lane-branch region; three of the four also use v_mbcnt / v_readlane / a lane mask read as data.

I ported this PR's check onto that fork (local commit only). It builds in release mode and the targeted tests pass. The four pipelines are now refused before creation with that reason named, instead of the opaque 0x80070057. They still don't run: that needs split-wave lowering for LDS shared across more than 32 lanes.

The same four hashes are refused on the fxceless a26859f and skornuta/victory-fork 9292987 builds too. VICTORY_SHADER_LOOP_LIMIT=32 didn't change that.

Analysis done with Claude Opus 5.5 (claude-opus-5-5) agents; the in-game logs come from real runs.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7159079409 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7159079409). Originally posted by [GiacomoSignorile](https://github.com/GiacomoSignorile) on 2026-11-25T09:59:41Z. --- Test data from an RTX 5070 (12 GB, NVIDIA, `WaveLaneCountMax = 32`), Windows, 16 GB RAM, on the [vitutu1/victory-perf](https://github.com/vitutu1/victory-perf) fork at `97c3aa2` (based on fxceless/victory-fork). Profile: `--console series-s`, `VICTORY_RENDER_SCALE=0.5`, `VICTORY_OWN_UPSCALER=1`, `VICTORY_AMBIENT_STUB=1`, `VICTORY_SHADOWMASK_STUB=1`, `VICTORY_RELAY=2`, `VICTORY_LATE_WAIT=3`, `VICTORY_WIDE_BACK=1`, `VICTORY_REBAR=0`, `VICTORY_CARD_BUFFERS_MB=2048`. Four compute pipelines are refused in-game with `E_INVALIDARG (0x80070057)`: ``` 02384a60fda6f2d0 369cbe906ea72764 2cc4c197ee29e291 2da4beb386509b77 ``` Analysed offline, without running the game: the translated DXIL for all four still carries `WaveSize = 64` (`dxc -dumpbin`), which the 32-lane NVIDIA host refuses. The split / local-wave retries all fall back to wave 64. The main reason given is *LDS in a group over 32, with an LDS read and write inside one lane-branch region*; three of the four also use `v_mbcnt` / `v_readlane` / a lane mask read as data. I ported this PR's check onto that fork (local commit only). It builds in release mode and the targeted tests pass. The four pipelines are now refused before creation with that reason named, instead of the opaque `0x80070057`. They still don't run: that needs split-wave lowering for LDS shared across more than 32 lanes. The same four hashes are refused on the fxceless `a26859f` and skornuta/victory-fork `9292987` builds too. `VICTORY_SHADER_LOOP_LIMIT=32` didn't change that. Analysis done with Claude Opus 5.5 (claude-opus-5-5) agents; the in-game logs come from real runs.
giacbiologicbomb commented 2026-11-25 11:05:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by giacbiologicbomb on 2026-11-25T11:03:15Z.


Test data from an RTX 5070 (12 GB, NVIDIA, WaveLaneCountMax = 32), Windows, 16 GB RAM, on the vitutu1/victory-perf fork at 97c3aa2 (based on fxceless/victory-fork). Profile: --console series-s, VICTORY_RENDER_SCALE=0.5, VICTORY_OWN_UPSCALER=1, VICTORY_AMBIENT_STUB=1, VICTORY_SHADOWMASK_STUB=1, VICTORY_RELAY=2, VICTORY_LATE_WAIT=3, VICTORY_WIDE_BACK=1, VICTORY_REBAR=0, VICTORY_CARD_BUFFERS_MB=2048.

Four compute pipelines are refused in-game with E_INVALIDARG (0x80070057):

02384a60fda6f2d0  369cbe906ea72764  2cc4c197ee29e291  2da4beb386509b77

Analysed offline, without running the game: the translated DXIL for all four still carries WaveSize = 64 (dxc -dumpbin), which is incompatible with the reported maximum wave size; this is the leading explanation for the refusal. The split / local-wave retries all fall back to wave 64. The main reason given is LDS in a group over 32, with an LDS read and write inside one lane-branch region; three of the four also use v_mbcnt / v_readlane / a lane mask read as data.

I ported this PR's check onto that fork (local commit only). It builds in release mode and the targeted tests pass. The four pipelines are now refused before creation with that reason named, instead of the opaque 0x80070057. They still don't run: that needs split-wave lowering for LDS shared across more than 32 lanes.

The same class of refusals was observed on fxceless a26859f and skornuta/victory-fork 9292987. VICTORY_SHADER_LOOP_LIMIT=32 didn't change that.

Analysis done with Claude Opus 5.5 (claude-opus-5-5) agents; the in-game logs come from real runs.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7160524573 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7160524573). Originally posted by [giacbiologicbomb](https://github.com/giacbiologicbomb) on 2026-11-25T11:03:15Z. --- Test data from an RTX 5070 (12 GB, NVIDIA, `WaveLaneCountMax = 32`), Windows, 16 GB RAM, on the [vitutu1/victory-perf](https://github.com/vitutu1/victory-perf) fork at `97c3aa2` (based on fxceless/victory-fork). Profile: `--console series-s`, `VICTORY_RENDER_SCALE=0.5`, `VICTORY_OWN_UPSCALER=1`, `VICTORY_AMBIENT_STUB=1`, `VICTORY_SHADOWMASK_STUB=1`, `VICTORY_RELAY=2`, `VICTORY_LATE_WAIT=3`, `VICTORY_WIDE_BACK=1`, `VICTORY_REBAR=0`, `VICTORY_CARD_BUFFERS_MB=2048`. Four compute pipelines are refused in-game with `E_INVALIDARG (0x80070057)`: ``` 02384a60fda6f2d0 369cbe906ea72764 2cc4c197ee29e291 2da4beb386509b77 ``` Analysed offline, without running the game: the translated DXIL for all four still carries `WaveSize = 64` (`dxc -dumpbin`), which is incompatible with the reported maximum wave size; this is the leading explanation for the refusal. The split / local-wave retries all fall back to wave 64. The main reason given is *LDS in a group over 32, with an LDS read and write inside one lane-branch region*; three of the four also use `v_mbcnt` / `v_readlane` / a lane mask read as data. I ported this PR's check onto that fork (local commit only). It builds in release mode and the targeted tests pass. The four pipelines are now refused before creation with that reason named, instead of the opaque `0x80070057`. They still don't run: that needs split-wave lowering for LDS shared across more than 32 lanes. The same class of refusals was observed on fxceless `a26859f` and skornuta/victory-fork `9292987`. `VICTORY_SHADER_LOOP_LIMIT=32` didn't change that. Analysis done with Claude Opus 5.5 (claude-opus-5-5) agents; the in-game logs come from real runs.
Xvania7 commented 2026-11-25 12:03:52 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T11:40:54Z.


Thanks for the detailed test data and hardware verification on RTX 5070 @giacbiologic! This confirms the exact intent of #2194: catching the wave size mismatch cleanly before pipeline creation so we don't nuke the D3D12 device with an opaque 0x80070057, while diagnosing precisely why the fallback to wave 64 occurred (LDS across >32 lanes with branch regions / lane mask ops). Those 4 pipelines (�2384a60fda6f2d0, 369cbe906ea72764, 2cc4c197ee29e291, 2da4beb386509b77) are great concrete test targets for subsequent split-wave LDS lowering work.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7161360635 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7161360635). Originally posted by [Xvania7](https://github.com/Xvania7) on 2026-11-25T11:40:54Z. --- Thanks for the detailed test data and hardware verification on RTX 5070 @giacbiologic! This confirms the exact intent of #2194: catching the wave size mismatch cleanly before pipeline creation so we don't nuke the D3D12 device with an opaque `0x80070057`, while diagnosing precisely why the fallback to wave 64 occurred (LDS across >32 lanes with branch regions / lane mask ops). Those 4 pipelines (�2384a60fda6f2d0, 369cbe906ea72764, 2cc4c197ee29e291, 2da4beb386509b77) are great concrete test targets for subsequent split-wave LDS lowering work.
Marvisak commented 2026-11-25 13:02:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T12:41:39Z.


Automated triage for the maintainers.

Needs rebase. This PR no longer merges cleanly into main: main has moved since the last triage, and the branch now conflicts in crates/victory-gpu/src/host.rs and crates/victory-shader/src/emit/host.rs. It will be reviewed again once it is rebased onto current main.

Previous verdict for this head: merge candidate.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7162725682 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7162725682). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T12:41:39Z. --- <!-- victory-triage v1 head=754fe024f40a83dc8f224bc197bd0954f1603b66 verdict=needs-rebase at=2026-11-25T22:23:00Z --> Automated triage for the maintainers. **Needs rebase.** This PR no longer merges cleanly into `main`: `main` has moved since the last triage, and the branch now conflicts in `crates/victory-gpu/src/host.rs` and `crates/victory-shader/src/emit/host.rs`. It will be reviewed again once it is rebased onto current `main`. Previous verdict for this head: merge candidate. --- _Generated by [Claude Code](https://claude.ai/code)_
DrDarkDK commented 2026-11-25 14:07:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T13:34:15Z.


Following up on the unsized-shader point in the triage summary, I ran a standalone native D3D12 probe on an RTX 4070 Ti with driver 621.01 and Windows build 26300.9974. D3D12 reported a wave lane range of 32–32.

I compiled the same lane-independent cs_6_6 shader with no WaveSize attribute, with WaveSize(32), and with WaveSize(64). With the same root signature, the unsized and fixed-wave32 variants both created a compute pipeline. Fixed wave64 returned E_INVALIDARG, and GetDeviceRemovedReason() returned S_OK afterward. Both runs produced the same results.

This supports letting unsized shaders reach pipeline creation. The probe used synthetic DXC shaders and covered pipeline creation only.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7163969047 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7163969047). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T13:34:15Z. --- Following up on the unsized-shader point in the triage summary, I ran a standalone native D3D12 probe on an RTX 4070 Ti with driver 621.01 and Windows build 26300.9974. D3D12 reported a wave lane range of 32–32. I compiled the same lane-independent `cs_6_6` shader with no `WaveSize` attribute, with `WaveSize(32)`, and with `WaveSize(64)`. With the same root signature, the unsized and fixed-wave32 variants both created a compute pipeline. Fixed wave64 returned `E_INVALIDARG`, and `GetDeviceRemovedReason()` returned `S_OK` afterward. Both runs produced the same results. This supports letting unsized shaders reach pipeline creation. The probe used synthetic DXC shaders and covered pipeline creation only. *AI-assisted with Codex.*
Xvania7 commented 2026-11-25 14:07:29 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-25T13:43:01Z.


@DrDarkDK Thanks for the native D3D12 probe on the RTX 4070 Ti (32-32 wave range).

That confirms the driver behavior: unsized shaders cleanly default to the native wave lane width (32) and succeed, whereas fixed wave64 fails with E_INVALIDARG without taking down the device. This aligns with keeping unsized shaders eligible for pipeline creation while refusing explicit 64-lane constraints on 32-lane hardware.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7164184986 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7164184986). Originally posted by [Xvania7](https://github.com/Xvania7) on 2026-11-25T13:43:01Z. --- @DrDarkDK Thanks for the native D3D12 probe on the RTX 4070 Ti (32-32 wave range). That confirms the driver behavior: unsized shaders cleanly default to the native wave lane width (32) and succeed, whereas fixed wave64 fails with `E_INVALIDARG` without taking down the device. This aligns with keeping unsized shaders eligible for pipeline creation while refusing explicit 64-lane constraints on 32-lane hardware.
Xvania7 commented 2026-11-26 17:35:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Xvania7 on 2026-11-26T17:35:08Z.


Rebased cleanly onto origin/main (63bcca4) resolving the conflicts in crates/victory-gpu/src/host.rs and crates/victory-shader/src/emit/host.rs:

  • Integrated wave_lanes_from_device queries with the shared WARP device singleton and multi-threaded test harness (#181), preserving depth_bounds_supported and thread serialization.
  • Preserved both existing WARP draw tests and offline wave pre-check classification tests.
  • Verified targeted unit tests in victory-gpu and victory-shader (query_wave_lane_limits_reports_capabilities, wave_size_precheck_rejects_both_outside_bounds, wave_size_precheck_accepts_boundaries_or_unknown_constraints, required_wave_size_reads_the_emitted_constraint all ok).
  • Verified strict Clippy (cargo clippy -p victory-shader -p victory-gpu -- -D warnings) with 0 warnings.
  • cargo xtask policy clean (191 files ok).
<!-- greyfinch-sync:Marvisak/VIctory:comment:7199273280 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7199273280). Originally posted by [Xvania7](https://github.com/Xvania7) on 2026-11-26T17:35:08Z. --- Rebased cleanly onto `origin/main` (`63bcca4`) resolving the conflicts in `crates/victory-gpu/src/host.rs` and `crates/victory-shader/src/emit/host.rs`: - Integrated `wave_lanes_from_device` queries with the shared WARP device singleton and multi-threaded test harness (`#181`), preserving `depth_bounds_supported` and thread serialization. - Preserved both existing WARP draw tests and offline wave pre-check classification tests. - Verified targeted unit tests in `victory-gpu` and `victory-shader` (`query_wave_lane_limits_reports_capabilities`, `wave_size_precheck_rejects_both_outside_bounds`, `wave_size_precheck_accepts_boundaries_or_unknown_constraints`, `required_wave_size_reads_the_emitted_constraint` all ok). - Verified strict Clippy (`cargo clippy -p victory-shader -p victory-gpu -- -D warnings`) with 0 warnings. - `cargo xtask policy` clean (191 files ok).
andrewpozdnakov7-jpg commented 2026-11-26 18:13:46 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-26T18:13:46Z.


I checked f8277a6 after the offline refusal-stage change. The live GPU pipeline precheck uses the advertised minimum and maximum, while the offline Host::compute_pipeline precheck checks only the maximum.

I exercised the offline entry point on verified app-local Agility 1.620.2/WARP 1.0.22. The real device reported 4–128 and created both fixed Wave32 and Wave64 PSOs. With a simulated advertised range of 64–64 on the same WARP device, the old maximum-only gate still creates Wave32. Follow-up b72e1a3 reports the wave constraint before PSO creation. Reciprocal Wave32-only controls and an unsized shader pass. The probe passed three fresh runs, both existing GPU precheck tests passed, and strict GPU/shader Clippy and policy passed. The single-width device ranges in this test are injected.

@Xvania7 the patch is directly on your head if you want to take it. Please retain its Git author on cherry-pick, or add Co-authored-by: andrewpozdnakov7-jpg <[email protected]> if folding it into another commit. AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7200205802 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7200205802). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-26T18:13:46Z. --- I checked `f8277a6` after the offline refusal-stage change. The live GPU pipeline precheck uses the advertised minimum and maximum, while the offline `Host::compute_pipeline` precheck checks only the maximum. I exercised the offline entry point on verified app-local Agility 1.620.2/WARP 1.0.22. The real device reported 4–128 and created both fixed Wave32 and Wave64 PSOs. With a simulated advertised range of 64–64 on the same WARP device, the old maximum-only gate still creates Wave32. [Follow-up `b72e1a3`](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/b72e1a39ab6392dbac698fff66f5474fe1874ec7) reports the wave constraint before PSO creation. Reciprocal Wave32-only controls and an unsized shader pass. The probe passed three fresh runs, both existing GPU precheck tests passed, and strict GPU/shader Clippy and policy passed. The single-width device ranges in this test are injected. @Xvania7 the patch is directly on your head if you want to take it. Please retain its Git author on cherry-pick, or add `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>` if folding it into another commit. AI-assisted with Codex.
andrewpozdnakov7-jpg commented 2026-11-28 02:02:10 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by andrewpozdnakov7-jpg on 2026-11-28T02:02:10Z.


The new Proton report records a fixed WaveSize(64) compute PSO on a host advertising 32–32. This matches the range condition checked here. The log also contains a memory-allocation fallback cluster, so the evidence establishes the PSO refusal and leaves the cause of the process exit open. Proton report

I combined the exact #2194 head f8277a6, the offline lower-bound fix b72e1a3, and #3633's root-signature diagnostics 4982f53 in 47c12a8. The merge was clean.

I compiled three generated cs_6_6 fixtures with DXC 1.9.2609.5 and passed their actual metadata through the PR's live and offline gate logic. The combined code agreed in all nine cases across ranges 32–32, 64–64 and 4–128. The shader with no fixed width passed every gate. A fixed width outside the advertised range was refused. Without b72e1a3, the offline upper-bound-only check still admitted fixed Wave32 on 64–64. This run covered just the metadata and CPU gates. #3633's root-signature diagnostic path is preserved in the merge.

Please preserve the Git author if cherry-picking or rebasing, or keep this trailer if folding the changes into another commit.

Co-authored-by: andrewpozdnakov7-jpg <[email protected]>

<!-- greyfinch-sync:Marvisak/VIctory:comment:7232084163 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2194#issuecomment-7232084163). Originally posted by [andrewpozdnakov7-jpg](https://github.com/andrewpozdnakov7-jpg) on 2026-11-28T02:02:10Z. --- The new Proton report records a fixed WaveSize(64) compute PSO on a host advertising 32–32. This matches the range condition checked here. The log also contains a memory-allocation fallback cluster, so the evidence establishes the PSO refusal and leaves the cause of the process exit open. [Proton report](https://github.com/Marvisak/VIctory/issues/1633#issuecomment-7231993484) I combined the exact #2194 head `f8277a6`, the offline lower-bound fix `b72e1a3`, and #3633's root-signature diagnostics `4982f53` in [47c12a8](https://github.com/andrewpozdnakov7-jpg/VIctory/commit/47c12a895a7c43c4f70ece9a4cddff11eb93c9a6). The merge was clean. I compiled three generated `cs_6_6` fixtures with DXC 1.9.2609.5 and passed their actual metadata through the PR's live and offline gate logic. The combined code agreed in all nine cases across ranges 32–32, 64–64 and 4–128. The shader with no fixed width passed every gate. A fixed width outside the advertised range was refused. Without `b72e1a3`, the offline upper-bound-only check still admitted fixed Wave32 on 64–64. This run covered just the metadata and CPU gates. #3633's root-signature diagnostic path is preserved in the merge. Please preserve the Git author if cherry-picking or rebasing, or keep this trailer if folding the changes into another commit. `Co-authored-by: andrewpozdnakov7-jpg <[email protected]>`
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2194:upstream-pr/2194'
git switch 'upstream-pr/2194'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2194'
git switch 'upstream-pr/2194'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2194'
git switch 'upstream-pr/2194'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2194'
git switch 'main'
git merge --squash 'upstream-pr/2194'
git switch 'main'
git merge --ff-only 'upstream-pr/2194'
git switch 'main'
git merge 'upstream-pr/2194'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Marvisak/VIctory!2192
No description provided.