Series S: the stretch pass builds under Wine once GetDimensions is not used (one file, patch included) #1091

Open
opened 2026-11-26 03:57:15 +00:00 by github-bot · 1 comment
Owner

@⁠YaBulochka on GitHub · 2026-11-25 19:09 UTC · original

Series S renders under Wine once the stretch pass stops calling GetDimensions

Symptom. With --console series-s on Wine, the 3D world is black and only the 2D layer draws. The log ends the upscale with:

INFO  victory_hle::modules::ffx: upscale dispatch list=... colour=... colour_size=(1280, 720) ...
WARN  victory_gpu::over: no pass to stretch the upscaler's input: its output stays as it is error=Call failed. (0x80004005)
WARN  victory_hle::modules::ffx: upscale dispatch not stretched: left to the title's upscaler

Cause. Not the pipeline, the compiler. With VICTORY_LOG=victory_gpu=debug, host::compile says:

WARN victory_gpu::host: a shader of ours: victory:11:10: E5005: Method 'GetDimensions' is not defined on type 'RWTexture2D<float4>'.

Wine's d3dcompiler_47 refuses GetDimensions on a UAV texture. Windows' compiler takes it, which is why the same over.rs works there.

Fix (one file, crates/victory-gpu/src/over.rs). STRETCH takes the sizes as constants instead:

  • the cbuffer gains float2 source_size (the SRV's width and height), written by record_stretch as two more 32-bit constants (root constants 4 → 6, SetComputeRoot32BitConstants 4 → 6);
  • the target's size comes from the texel constant the pass already has (uint2 size = (uint2)round(1.0 / texel);), since texel is 1 / target size;
  • the SRV's size is source_size, so both GetDimensions calls go away.

Nothing else changes: the same scale/texel maths, the same half-texel clamp.

Result. INFO victory_gpu::over: the upscaler's output is made by a plain stretch of its colour input, and the Series S picture reaches the screen: interior, character, lamp light, HUD, at 184 ms to 3.4 s a frame on this card (scene-dependent).

Setup: main d510ee4 + #1052 + #1011 + #1010 + #1054, x86_64-pc-windows-gnu, --features diagnostics; CachyOS 7.3.5, RX 7600 XT 8 GB, RADV (Mesa 27.0.0), Wine 11.22, vkd3d-proton from master; VICTORY_INDIRECT_GATHER=1 VICTORY_HEAP_WORKER=1 VICTORY_RELAY=2 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_BUDGET_MB=4096.

Happy to push a branch with the patch if you want to take it; otherwise it is this one file and I can paste the hunk.

No game files, dumps or screenshots are included.

**@⁠YaBulochka** on GitHub · 2026-11-25 19:09 UTC · [original](https://github.com/fxceless/victory-fork/issues/1091) Series S renders under Wine once the stretch pass stops calling `GetDimensions` **Symptom.** With `--console series-s` on Wine, the 3D world is black and only the 2D layer draws. The log ends the upscale with: ``` INFO victory_hle::modules::ffx: upscale dispatch list=... colour=... colour_size=(1280, 720) ... WARN victory_gpu::over: no pass to stretch the upscaler's input: its output stays as it is error=Call failed. (0x80004005) WARN victory_hle::modules::ffx: upscale dispatch not stretched: left to the title's upscaler ``` **Cause.** Not the pipeline, the compiler. With `VICTORY_LOG=victory_gpu=debug`, `host::compile` says: ``` WARN victory_gpu::host: a shader of ours: victory:11:10: E5005: Method 'GetDimensions' is not defined on type 'RWTexture2D<float4>'. ``` Wine's `d3dcompiler_47` refuses `GetDimensions` on a UAV texture. Windows' compiler takes it, which is why the same `over.rs` works there. **Fix (one file, `crates/victory-gpu/src/over.rs`).** `STRETCH` takes the sizes as constants instead: - the cbuffer gains `float2 source_size` (the SRV's width and height), written by `record_stretch` as two more 32-bit constants (root constants 4 → 6, `SetComputeRoot32BitConstants` 4 → 6); - the target's size comes from the `texel` constant the pass already has (`uint2 size = (uint2)round(1.0 / texel);`), since `texel` is `1 / target size`; - the SRV's size is `source_size`, so both `GetDimensions` calls go away. Nothing else changes: the same scale/texel maths, the same half-texel clamp. **Result.** `INFO victory_gpu::over: the upscaler's output is made by a plain stretch of its colour input`, and the Series S picture reaches the screen: interior, character, lamp light, HUD, at 184 ms to 3.4 s a frame on this card (scene-dependent). **Setup:** `main` `d510ee4` + #1052 + #1011 + #1010 + #1054, `x86_64-pc-windows-gnu`, `--features diagnostics`; CachyOS 7.3.5, RX 7600 XT 8 GB, RADV (Mesa 27.0.0), Wine 11.22, vkd3d-proton from master; `VICTORY_INDIRECT_GATHER=1 VICTORY_HEAP_WORKER=1 VICTORY_RELAY=2 VICTORY_CARD_FETCH_INFLIGHT=1 VICTORY_TEXTURE_BUDGET_MB=4096`. Happy to push a branch with the patch if you want to take it; otherwise it is this one file and I can paste the hunk. No game files, dumps or screenshots are included.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:57:16 +00:00
Author
Owner

@⁠YaBulochka on GitHub · 2026-11-26 07:38 UTC · original

Update: this patch is no longer needed in our tree. With a dxcompiler.dll fallback in host::compile (compile the same source as cs_6_0 when D3DCompile fails), the unmodified over.rs builds and the Series S profile draws: the upscaler's output is made by a plain stretch. I reverted the constants change and confirmed it, so the choice is now "keep this patch" or "take the fallback", not both.

The fallback also builds vs_6_0/ps_6_0 for the overlay pass without changes. Tested on CachyOS 7.3.5, RX 7600 XT 8 GB, RADV Mesa 27.0.0, Wine 11.22: Series S, 152 consecutive world frames, average 3.99 fps, median 215 ms.

Details and the technique are in #1270.

**@⁠YaBulochka** on GitHub · 2026-11-26 07:38 UTC · [original](https://github.com/fxceless/victory-fork/issues/1091#issuecomment-7185668819) Update: this patch is no longer needed in our tree. With a `dxcompiler.dll` fallback in `host::compile` (compile the same source as `cs_6_0` when `D3DCompile` fails), the unmodified `over.rs` builds and the Series S profile draws: `the upscaler's output is made by a plain stretch`. I reverted the constants change and confirmed it, so the choice is now "keep this patch" or "take the fallback", not both. The fallback also builds `vs_6_0`/`ps_6_0` for the overlay pass without changes. Tested on CachyOS 7.3.5, RX 7600 XT 8 GB, RADV Mesa 27.0.0, Wine 11.22: Series S, 152 consecutive world frames, average 3.99 fps, median 215 ms. Details and the technique are in #1270.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/fxceless--victory-fork#1091
No description provided.