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

Open
opened 2026-11-25 19:09:22 +00:00 by YaBulochka · 1 comment
YaBulochka commented 2026-11-25 19:09:22 +00:00 (Migrated from github.com)
Contributor

Imported from fxceless/victory-fork. Originally posted by YaBulochka on 2026-11-25T19:09:22Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6611740747 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1091). Originally posted by [YaBulochka](https://github.com/YaBulochka) on 2026-11-25T19:09:22Z. --- 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 commented 2026-11-26 08:04:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from fxceless/victory-fork. Originally posted by YaBulochka on 2026-11-26T07:38:09Z.


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.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7185668819 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/issues/1091#issuecomment-7185668819). Originally posted by [YaBulochka](https://github.com/YaBulochka) on 2026-11-26T07:38:09Z. --- 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.
Sign in to join this conversation.
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
fxceless/victory-fork#1088
No description provided.