docs: explain Windows shader-test validator prerequisite #1299

Merged
omeyasawant merged 1 commit from upstream-pr/1299 into main 2026-11-25 00:13:52 +00:00
omeyasawant commented 2026-11-24 17:16:03 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by omeyasawant on 2026-11-24T17:16:03Z.


Windows shader tests can load an installed validator successfully and still fail because that validator predates Shader Model 6.6. Document the Unknown shader model 'ps_6_6' symptom, the VICTORY_DXIL override, the official Microsoft DXC download, and the existing validator lookup order. This changes documentation only.

Reproduction and validation

Tested against main at ffe310eb2098e52169f4c44db5ffdabf43a72622, using Rust 1.98.1 (x86_64-pc-windows-msvc), Windows 11 Pro 10.0.26200, Intel i7-14700K and 192 GiB RAM. Installed adapters: RTX 5090 (driver 32.0.16.1088) and Intel UHD 770 (32.0.101.7088). Tests choose the default D3D12 adapter and WARP; I did not independently record which hardware adapter the helper selected.

With the only installed SDK validator, SDK 10.0.19041.0 / dxil.dll 10.0.19041.685:

cargo test -p victory-shader --lib emit::tests::constant_color_validates --locked -- --exact --nocapture

The isolated test fails with:

load dxil metadata failed -Unknown shader model 'ps_6_6'
Validation failed.

Keeping source, OS and drivers unchanged, selecting the x64 dxil.dll from Microsoft's DXC v1.9.2609 (file version 1.9.2609.5) through VICTORY_DXIL gives:

  • cargo test -p victory-shader --lib --locked -- --test-threads=1 --nocapture: 120 passed, 0 failed, 1 ignored.
  • cargo test --workspace --locked -- --test-threads=1: 342 passed, 0 failed, 6 ignored, exit code 0.
  • git diff --check: passes.
  • cargo xtask policy: passes; staged-file policy hook also passes.

Optional differential tests can return early when their compiler inputs are absent; these totals do not establish that all optional GPU paths ran. No game files, assets, console SDK or game execution were used for this contribution.

Earlier full/sequential shader runs also ended with STATUS_ACCESS_VIOLATION; the modern-validator sequential run completed. The exception's faulting module was not isolated, so I am not claiming this identifies the crash's cause or fixes the parallel WARP race in #181 / #244.

AI assistance

OpenAI Codex investigated the local failure, ran the synthetic tests, and drafted this documentation and report. The account owner reviewed and authorized submission.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6587390046 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1299). Originally posted by [omeyasawant](https://github.com/omeyasawant) on 2026-11-24T17:16:03Z. --- Windows shader tests can load an installed validator successfully and still fail because that validator predates Shader Model 6.6. Document the `Unknown shader model 'ps_6_6'` symptom, the `VICTORY_DXIL` override, the official Microsoft DXC download, and the existing validator lookup order. This changes documentation only. ### Reproduction and validation Tested against `main` at `ffe310eb2098e52169f4c44db5ffdabf43a72622`, using Rust 1.98.1 (`x86_64-pc-windows-msvc`), Windows 11 Pro 10.0.26200, Intel i7-14700K and 192 GiB RAM. Installed adapters: RTX 5090 (driver 32.0.16.1088) and Intel UHD 770 (32.0.101.7088). Tests choose the default D3D12 adapter and WARP; I did not independently record which hardware adapter the helper selected. With the only installed SDK validator, SDK 10.0.19041.0 / `dxil.dll` 10.0.19041.685: ```powershell cargo test -p victory-shader --lib emit::tests::constant_color_validates --locked -- --exact --nocapture ``` The isolated test fails with: ```text load dxil metadata failed -Unknown shader model 'ps_6_6' Validation failed. ``` Keeping source, OS and drivers unchanged, selecting the x64 `dxil.dll` from Microsoft's DXC v1.9.2609 (file version 1.9.2609.5) through `VICTORY_DXIL` gives: - `cargo test -p victory-shader --lib --locked -- --test-threads=1 --nocapture`: **120 passed, 0 failed, 1 ignored**. - `cargo test --workspace --locked -- --test-threads=1`: **342 passed, 0 failed, 6 ignored**, exit code 0. - `git diff --check`: passes. - `cargo xtask policy`: passes; staged-file policy hook also passes. Optional differential tests can return early when their compiler inputs are absent; these totals do not establish that all optional GPU paths ran. No game files, assets, console SDK or game execution were used for this contribution. Earlier full/sequential shader runs also ended with `STATUS_ACCESS_VIOLATION`; the modern-validator sequential run completed. The exception's faulting module was not isolated, so I am not claiming this identifies the crash's cause or fixes the parallel WARP race in #181 / #244. ### AI assistance OpenAI Codex investigated the local failure, ran the synthetic tests, and drafted this documentation and report. The account owner reviewed and authorized submission.
pfhandler commented 2026-11-24 21:03:44 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by pfhandler on 2026-11-24T20:53:04Z.


Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB):

  • VICTORY_NO_HOST_PAD=1 — a connected host pad (e.g. DualShock appearing as XInput pad 0) keeps the keyboard stand-in pad from being enumerated. Hiding the host pad lets VICTORY_KEYS drive the title again.
  • VICTORY_MODE=1920x1080 — the DXGI output mode list is fixed at the console's 3840x2160. Reporting 1920x1080 instead keeps the title's render targets and VRAM use down on smaller hosts (Series S profile + 1080p settled around 3.5 GB VRAM here).

Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above.

diff --git a/crates/victory-gpu/src/dxgi.rs b/crates/victory-gpu/src/dxgi.rs
index c7f7c45..2535b68 100644
--- a/crates/victory-gpu/src/dxgi.rs
+++ b/crates/victory-gpu/src/dxgi.rs
@@ -219,6 +219,19 @@ struct Mode {
 }
 const _: () = assert!(size_of::<Mode>() == 32);
 
+/// The console's fixed output mode, overridable for hosts smaller than the
+/// console's 4K target: `VICTORY_MODE=1920x1080` reports that instead.
+fn mode_size() -> (u32, u32) {
+    const DEFAULT: (u32, u32) = (3840, 2160);
+    let Some(text) = std::env::var_os("VICTORY_MODE") else {
+        return DEFAULT;
+    };
+    let text = text.to_string_lossy();
+    text.split_once('x')
+        .and_then(|(w, h)| Some((w.trim().parse().ok()?, h.trim().parse().ok()?)))
+        .unwrap_or(DEFAULT)
+}
+
 /// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks
 /// for a 120 Hz one to allow 120 Hz frame intervals).
 /// shortcut: fixed mode, not the host display's; report the host's rates if
@@ -242,9 +255,10 @@ extern "system" fn modes(
         return MORE_DATA;
     }
     *count = 1;
+    let (width, height) = mode_size();
     let mode = Mode {
-        width: 3840,
-        height: 2160,
+        width,
+        height,
         refresh: [60, 1],
         format: 0,
         scanlines: 1, // progressive
diff --git a/crates/victory-hle/src/modules/gameinput.rs b/crates/victory-hle/src/modules/gameinput.rs
index a411bd0..da8d66c 100644
--- a/crates/victory-hle/src/modules/gameinput.rs
+++ b/crates/victory-hle/src/modules/gameinput.rs
@@ -1134,6 +1134,11 @@ mod host {
 
     impl Source for Host {
         fn pad(&mut self, slot: usize) -> Option<PadState> {
+            // The keyboard stand-in pad only exists while no host pad is
+            // connected; this hides a host pad the title mis-handles.
+            if std::env::var_os("VICTORY_NO_HOST_PAD").is_some() {
+                return None;
+            }
             if self.empty_until[slot].is_some_and(|until| Instant::now() < until) {
                 return None;
             }
<!-- greyfinch-sync:Marvisak/VIctory:comment:7144184814 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1299#issuecomment-7144184814). Originally posted by [pfhandler](https://github.com/pfhandler) on 2026-11-24T20:53:04Z. --- Local patches for two issues hit while running GTA VI 1.0.2.1 through VIctory on Linux (GE-Proton 11-14, vkd3d-proton 3.2.0, RTX 4060 Ti 8 GB): - `VICTORY_NO_HOST_PAD=1` — a connected host pad (e.g. DualShock appearing as XInput pad 0) keeps the keyboard stand-in pad from being enumerated. Hiding the host pad lets `VICTORY_KEYS` drive the title again. - `VICTORY_MODE=1920x1080` — the DXGI output mode list is fixed at the console's 3840x2160. Reporting 1920x1080 instead keeps the title's render targets and VRAM use down on smaller hosts (Series S profile + 1080p settled around 3.5 GB VRAM here). Both are local uncommitted diffs, posted here for reuse. Tested only on the configuration above. ```diff diff --git a/crates/victory-gpu/src/dxgi.rs b/crates/victory-gpu/src/dxgi.rs index c7f7c45..2535b68 100644 --- a/crates/victory-gpu/src/dxgi.rs +++ b/crates/victory-gpu/src/dxgi.rs @@ -219,6 +219,19 @@ struct Mode { } const _: () = assert!(size_of::<Mode>() == 32); +/// The console's fixed output mode, overridable for hosts smaller than the +/// console's 4K target: `VICTORY_MODE=1920x1080` reports that instead. +fn mode_size() -> (u32, u32) { + const DEFAULT: (u32, u32) = (3840, 2160); + let Some(text) = std::env::var_os("VICTORY_MODE") else { + return DEFAULT; + }; + let text = text.to_string_lossy(); + text.split_once('x') + .and_then(|(w, h)| Some((w.trim().parse().ok()?, h.trim().parse().ok()?))) + .unwrap_or(DEFAULT) +} + /// The console's mode list: one 4K mode at 60 Hz (Grand Theft Auto VI looks /// for a 120 Hz one to allow 120 Hz frame intervals). /// shortcut: fixed mode, not the host display's; report the host's rates if @@ -242,9 +255,10 @@ extern "system" fn modes( return MORE_DATA; } *count = 1; + let (width, height) = mode_size(); let mode = Mode { - width: 3840, - height: 2160, + width, + height, refresh: [60, 1], format: 0, scanlines: 1, // progressive diff --git a/crates/victory-hle/src/modules/gameinput.rs b/crates/victory-hle/src/modules/gameinput.rs index a411bd0..da8d66c 100644 --- a/crates/victory-hle/src/modules/gameinput.rs +++ b/crates/victory-hle/src/modules/gameinput.rs @@ -1134,6 +1134,11 @@ mod host { impl Source for Host { fn pad(&mut self, slot: usize) -> Option<PadState> { + // The keyboard stand-in pad only exists while no host pad is + // connected; this hides a host pad the title mis-handles. + if std::env::var_os("VICTORY_NO_HOST_PAD").is_some() { + return None; + } if self.empty_until[slot].is_some_and(|until| Instant::now() < until) { return None; } ```
upstream-sync closed this pull request 2026-11-25 01:06:10 +00:00
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!1299
No description provided.