victory-gpu: compile two-plane composer as sm_5_0 with explicit root signature #409

Closed
kwaadrat wants to merge 0 commits from upstream-pr/409 into main
kwaadrat commented 2026-12-01 23:03:50 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by kwaadrat on 2026-12-01T23:03:50Z.


Summary

  • Compile the Series S two-plane Composer shaders (vs, ps in crates/victory-gpu/src/compose.rs) as vs_5_0 / ps_5_0 via crate::host::compile instead of vs_5_1 / ps_5_1 with inline [RootSignature(RS)].
  • Build the root signature explicitly in Rust via D3D12SerializeVersionedRootSignature (make_root_signature), keeping the exact same pixel SRV descriptor table (t0..t1) and s0 linear clamp static sampler.

Why

Neither vs nor ps in compose.rs uses Shader Model 5.1 features — 5_1 was only required for [RootSignature(RS)]. Under Wine/Proton (d3dcompiler_47), compiling 5_1 shaders with [RootSignature(...)] fails with E_FAIL (0x80004005):

WARN victory_gpu::host: two-plane composer not made; showing base plane only error=Call failed. (0x80004005)

When Composer::new fails, the second (over) plane is never composited onto the base plane on Series S, hiding loading screens, menus, and HUD overlays.

Using crate::host::compile also logs any D3DCompile error blob instead of discarding it.

Verification

  • Built victory.exe on windows-latest (cargo build --release --locked -p victory) and tested on RTX 3060 12 GB under Proton Experimental (vkd3d-proton) with the Series S (1080p) profile: two-plane composer not made no longer occurs and the over plane (HUD/notifications) renders properly.
<!-- greyfinch-sync:readmet3xt-lab/foxhound:issue:5596249401 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/409). Originally posted by [kwaadrat](https://github.com/kwaadrat) on 2026-12-01T23:03:50Z. --- ## Summary - Compile the Series S two-plane `Composer` shaders (`vs`, `ps` in `crates/victory-gpu/src/compose.rs`) as `vs_5_0` / `ps_5_0` via `crate::host::compile` instead of `vs_5_1` / `ps_5_1` with inline `[RootSignature(RS)]`. - Build the root signature explicitly in Rust via `D3D12SerializeVersionedRootSignature` (`make_root_signature`), keeping the exact same pixel SRV descriptor table (`t0..t1`) and `s0` linear clamp static sampler. ## Why Neither `vs` nor `ps` in `compose.rs` uses Shader Model 5.1 features — `5_1` was only required for `[RootSignature(RS)]`. Under Wine/Proton (`d3dcompiler_47`), compiling `5_1` shaders with `[RootSignature(...)]` fails with `E_FAIL (0x80004005)`: ```text WARN victory_gpu::host: two-plane composer not made; showing base plane only error=Call failed. (0x80004005) ``` When `Composer::new` fails, the second (`over`) plane is never composited onto the base plane on Series S, hiding loading screens, menus, and HUD overlays. Using `crate::host::compile` also logs any `D3DCompile` error blob instead of discarding it. ## Verification - Built `victory.exe` on `windows-latest` (`cargo build --release --locked -p victory`) and tested on RTX 3060 12 GB under Proton Experimental (`vkd3d-proton`) with the Series S (`1080p`) profile: `two-plane composer not made` no longer occurs and the `over` plane (HUD/notifications) renders properly.
readmet3xt-lab commented 2026-12-02 01:48:49 +00:00 (Migrated from github.com)

Imported from readmet3xt-lab/foxhound. Originally posted by readmet3xt-lab on 2026-12-02T01:48:49Z.


Thank you. These pin down exactly which of our own shaders fail under Proton's built-in compiler and what it costs when the card-side compare is missing, which is the clearest data we have on #407. We're going to solve it one level lower: our shaders will ship already compiled, so no shader compiler is asked at run time on any system, and Windows keeps exactly the bytecode it has today. Because of that we won't merge these three as they are (they change the shader model and two buffer types on Windows too). Your findings and measurements go into that change, with credit. When the build is out, a run under Proton with Full logs from you would be the best test we could get.

<!-- greyfinch-sync:readmet3xt-lab/foxhound:comment:7332136700 --> Imported from [readmet3xt-lab/foxhound](https://github.com/readmet3xt-lab/foxhound/pull/409#issuecomment-7332136700). Originally posted by [readmet3xt-lab](https://github.com/readmet3xt-lab) on 2026-12-02T01:48:49Z. --- Thank you. These pin down exactly which of our own shaders fail under Proton's built-in compiler and what it costs when the card-side compare is missing, which is the clearest data we have on #407. We're going to solve it one level lower: our shaders will ship already compiled, so no shader compiler is asked at run time on any system, and Windows keeps exactly the bytecode it has today. Because of that we won't merge these three as they are (they change the shader model and two buffer types on Windows too). Your findings and measurements go into that change, with credit. When the build is out, a run under Proton with Full logs from you would be the best test we could get.

Pull request closed

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
readmet3xt-lab/foxhound!409
No description provided.