RTX 4060: refused wave64 compute pipelines (0x80070057), black faces, 3-4 fps in world #1211

Open
opened 2026-11-26 03:59:35 +00:00 by github-bot · 4 comments
Owner

@⁠joyawth on GitHub · 2026-11-26 00:11 UTC · original

TITLE

World scene renders and is lit with a small lower.rs patch (RTX 4060, 8 GB); remaining: 2 untranslated compute shaders, 7 refused host pipelines, texture residency stall

BODY

Setup

  • Windows 11 x64, RTX 4060 (8 GB VRAM), driver: [version]
  • CPU: Ryzen 5 8400F, RAM: [X GB]
  • victory at 6d20eed (origin/main of 25 Nov) in my working tree; the size-only patch below is already covered by newer code there
  • Title exe: game_scarlett_master.exe (Bink2Scarlett.dll, .rpf archives)
  • Run: victory.exe run game_scarlett_master.exe --execute (release build), switch set of run 253 plus VICTORY_CARD_HASH_LEN=1 VICTORY_ABSENT_ONCE=alt VICTORY_TEXTURE_BACK=1

Summary

After pulling c96b4f2 the character and walls are no longer transparent. With the small patch below, 4 more pixel shaders translate and the opening world scene is lit (sun, haze, backlit character); before it was almost black and the host GPU was removed at the first world frame. Screenshots attached.

1. Patch: a descriptor loaded only to read its size

Four pixel shaders failed with a descriptor read only as data is not supported: e5b2121a02f4f741, 7d0f14ce44746d7e, 2fd01fca16993001, 6b6db9f1a526daeb.

Disassembly of e5b2121a02f4f741: at 0x1c14 the shader does s_load_dwordx8 s[20:27] (an image descriptor picked with a dynamic index, param 288 + dynamic offset) and never samples it. It only decodes size fields by hand (width = dw1[30:31] | dw2[0:13]<<2, +1; height = dw2[14:27], +1; base level = dw3[12:15]), converts to float, v_rcp, * 264.0: a manual texture size query used to scale UVs. The samples (image_sample_l at 0x1c94) use other loads with other indices.

In descriptor_data (lower.rs, ~line 5600) there is no instruction using this load as an image and no twin load, so use_at is None and it returns "a descriptor read only as data". The getDimensions reconstruction below it would work if a kind could be inferred. The patch (attached, ~15 lines):

  • in the use_at None branch, after the existing special cases: if count == 8, set size_only = true and continue with (site, 0) instead of the Err;
  • in the match &ui.fields that picks (props, image), add a first arm: _ if size_only => ((4 | u, 0x409), Some(4)).

Caveat: it assumes a 2D texture; a slot that is not a 2D view would get wrong sizes. The patch was written with Claude's help from the disassembly and tested only on my PC (RTX 4060); it builds and runs fine there, but I have not checked other slots or GPUs.

Result (14 min run): untranslated shaders 6 -> 2, no device removed (before: removed at about 2.5 min at the first world frame with 2222 draws and a 2.4 s submission), 4837 draws/frame in the scene with ~368 dropped without a host pipeline, about 2 fps (frames dominated by ~1 s of "preparing": 140-300 MB of copies and 50-100 MB copied back per frame; the GPU is busy 20-300 ms).

2. Still failing

Untranslated compute shaders:

  • ceb5eb68cd99cb07 (1.4 KB): a min-reduction downsample (4 image_load per thread, LDS min tree, one image_store), looks like a depth-pyramid pass. Fails at 0x38 ("a descriptor's address or format read as data"): s_load_dwordx4 s[0:3] from a table entry then used as data at s_cmp_eq_u32 s2, 0.
  • f133e35efed2a48a (169 KB, many SRVs and samplers): fails at 0x1eb4 (s_and_b64 vcc, exec, s[40:41] + s_cbranch_vccz, an any() over a lane mask while exec is partial) after every WAVE64-RETRY form (early-outs, skips, local waves) is exhausted.

Host pipelines refused by D3D12 (Paramètre incorrect. (0x80070057)), almost certainly WaveSize(64) on a 32-lane NVIDIA GPU (lower.rs: "A host whose waves are at most 32 lanes (NVIDIA) refuses WaveSize(64)"):

  • compute: 2da4beb386509b77, 369cbe906ea72764, 2cc4c197ee29e291, 02384a60fda6f2d0, 5dc3b25986622949, 6f225b641c5b0708
  • mesh f5e50eb2108c425b with pixel ce3f0432a08f1d35

VICTORY_WAVE_WIDE=1 changes nothing on this GPU (same refusals).

3. Texture residency stalls at the card limit

Over the 14 min run: 23739 textures uploaded (6351 MB), about 14000 waiting, and the counter stops moving ("textures picked by index: the card has no room for more; they wait"). On an 8 GB card some textures (for example the back of the character's jacket) stay at low quality. I understand room() stops at 90% of the system's budget on purpose.

4. Update (latest runs)

  • Speed: 2.7 to 4.5 fps in the world scenes (cell, yard, cutscenes), 220 to 590 ms/frame. The GPU is almost idle (0 to 45 ms on the GPU per frame): the CPU prepares 120 to 150 ms (copies 40 to 110 ms / 120 to 180 MB, textures 15 to 35 ms), copying back takes 70 to 85 ms (50 to 90 MB), and 840 to 1130 draws per frame are dropped without a host pipeline.
  • Reducing VICTORY_CARD_WINDOWS_MB/VICTORY_CARD_BUFFERS_MB (1024/768) made it worse (1.2 to 1.6 fps), so they are not in the set above.
  • Faces and skin stay black while clothes, hair and walls are textured and lit: consistent with f133e35efed2a48a not translating (any() over a lane mask at 0x1eb4) and no bounce light.
  • Wave64 on a 32-lane GPU, from the disassembly: 369cbe906ea72764 has no s_barrier; lane 0 initializes LDS (ds_write2_b32) and then all 64 lanes ds_add_rtn_u32 on it, so it needs the 64 threads in one wave. 02384a60fda6f2d0 uses v_mbcnt_lo/hi, v_readlane, v_readfirstlane, s_bcnt1_i32_b64 (and 5 s_barrier). These need a 32-lane emulation (shared memory plus barriers, or a two-wave merge) rather than WaveSize(64).
  • Visual: colour noise blocks on a wall texture and a face texture in cutscenes, blocky low-mip textures (screenshots attached).

Other warnings seen

  • a pipeline creation method that is not implemented: the title goes without this pipeline (29 times)
  • a texture picked by index changed after its upload with nothing to tell of it: uploaded again (252 times)
  • host view heap capped at N; views past it read a null slot
  • a shader takes the address of a buffer view that is not there: it reads 0
  • a dispatch without a host pipeline dropped

I can run the diagnostics build and test patches if useful. I did not include any game files here, only hashes, offsets and instruction names.

Capture d'écran 2026-11-26 010349 Capture d'écran 2026-11-26 010356 Capture d'écran 2026-11-26 010451
**@⁠joyawth** on GitHub · 2026-11-26 00:11 UTC · [original](https://github.com/fxceless/victory-fork/issues/1211) # TITLE World scene renders and is lit with a small lower.rs patch (RTX 4060, 8 GB); remaining: 2 untranslated compute shaders, 7 refused host pipelines, texture residency stall # BODY ## Setup - Windows 11 x64, RTX 4060 (8 GB VRAM), driver: [version] - CPU: Ryzen 5 8400F, RAM: [X GB] - victory at 6d20eed (origin/main of 25 Nov) in my working tree; the size-only patch below is already covered by newer code there - Title exe: game_scarlett_master.exe (Bink2Scarlett.dll, .rpf archives) - Run: `victory.exe run game_scarlett_master.exe --execute` (release build), switch set of run 253 plus `VICTORY_CARD_HASH_LEN=1 VICTORY_ABSENT_ONCE=alt VICTORY_TEXTURE_BACK=1` ## Summary After pulling c96b4f2 the character and walls are no longer transparent. With the small patch below, 4 more pixel shaders translate and the opening world scene is lit (sun, haze, backlit character); before it was almost black and the host GPU was removed at the first world frame. Screenshots attached. ## 1. Patch: a descriptor loaded only to read its size Four pixel shaders failed with `a descriptor read only as data is not supported`: e5b2121a02f4f741, 7d0f14ce44746d7e, 2fd01fca16993001, 6b6db9f1a526daeb. Disassembly of e5b2121a02f4f741: at 0x1c14 the shader does `s_load_dwordx8 s[20:27]` (an image descriptor picked with a dynamic index, param 288 + dynamic offset) and never samples it. It only decodes size fields by hand (width = dw1[30:31] | dw2[0:13]<<2, +1; height = dw2[14:27], +1; base level = dw3[12:15]), converts to float, `v_rcp`, `* 264.0`: a manual texture size query used to scale UVs. The samples (`image_sample_l` at 0x1c94) use other loads with other indices. In `descriptor_data` (lower.rs, ~line 5600) there is no instruction using this load as an image and no twin load, so `use_at` is None and it returns "a descriptor read only as data". The `getDimensions` reconstruction below it would work if a kind could be inferred. The patch (attached, ~15 lines): - in the `use_at` None branch, after the existing special cases: if `count == 8`, set `size_only = true` and continue with `(site, 0)` instead of the `Err`; - in the `match &ui.fields` that picks `(props, image)`, add a first arm: `_ if size_only => ((4 | u, 0x409), Some(4))`. Caveat: it assumes a 2D texture; a slot that is not a 2D view would get wrong sizes. The patch was written with Claude's help from the disassembly and tested only on my PC (RTX 4060); it builds and runs fine there, but I have not checked other slots or GPUs. Result (14 min run): untranslated shaders 6 -> 2, no device removed (before: removed at about 2.5 min at the first world frame with 2222 draws and a 2.4 s submission), 4837 draws/frame in the scene with ~368 dropped without a host pipeline, about 2 fps (frames dominated by ~1 s of "preparing": 140-300 MB of copies and 50-100 MB copied back per frame; the GPU is busy 20-300 ms). ## 2. Still failing Untranslated compute shaders: - ceb5eb68cd99cb07 (1.4 KB): a min-reduction downsample (4 image_load per thread, LDS min tree, one image_store), looks like a depth-pyramid pass. Fails at 0x38 ("a descriptor's address or format read as data"): `s_load_dwordx4 s[0:3]` from a table entry then used as data at `s_cmp_eq_u32 s2, 0`. - f133e35efed2a48a (169 KB, many SRVs and samplers): fails at 0x1eb4 (`s_and_b64 vcc, exec, s[40:41]` + `s_cbranch_vccz`, an any() over a lane mask while exec is partial) after every WAVE64-RETRY form (early-outs, skips, local waves) is exhausted. Host pipelines refused by D3D12 (`Paramètre incorrect. (0x80070057)`), almost certainly `WaveSize(64)` on a 32-lane NVIDIA GPU (lower.rs: "A host whose waves are at most 32 lanes (NVIDIA) refuses WaveSize(64)"): - compute: 2da4beb386509b77, 369cbe906ea72764, 2cc4c197ee29e291, 02384a60fda6f2d0, 5dc3b25986622949, 6f225b641c5b0708 - mesh f5e50eb2108c425b with pixel ce3f0432a08f1d35 `VICTORY_WAVE_WIDE=1` changes nothing on this GPU (same refusals). ## 3. Texture residency stalls at the card limit Over the 14 min run: 23739 textures uploaded (6351 MB), about 14000 waiting, and the counter stops moving ("textures picked by index: the card has no room for more; they wait"). On an 8 GB card some textures (for example the back of the character's jacket) stay at low quality. I understand `room()` stops at 90% of the system's budget on purpose. ## 4. Update (latest runs) - Speed: 2.7 to 4.5 fps in the world scenes (cell, yard, cutscenes), 220 to 590 ms/frame. The GPU is almost idle (0 to 45 ms on the GPU per frame): the CPU prepares 120 to 150 ms (copies 40 to 110 ms / 120 to 180 MB, textures 15 to 35 ms), copying back takes 70 to 85 ms (50 to 90 MB), and 840 to 1130 draws per frame are dropped without a host pipeline. - Reducing `VICTORY_CARD_WINDOWS_MB`/`VICTORY_CARD_BUFFERS_MB` (1024/768) made it worse (1.2 to 1.6 fps), so they are not in the set above. - Faces and skin stay black while clothes, hair and walls are textured and lit: consistent with f133e35efed2a48a not translating (any() over a lane mask at 0x1eb4) and no bounce light. - Wave64 on a 32-lane GPU, from the disassembly: 369cbe906ea72764 has no `s_barrier`; lane 0 initializes LDS (`ds_write2_b32`) and then all 64 lanes `ds_add_rtn_u32` on it, so it needs the 64 threads in one wave. 02384a60fda6f2d0 uses `v_mbcnt_lo/hi`, `v_readlane`, `v_readfirstlane`, `s_bcnt1_i32_b64` (and 5 `s_barrier`). These need a 32-lane emulation (shared memory plus barriers, or a two-wave merge) rather than `WaveSize(64)`. - Visual: colour noise blocks on a wall texture and a face texture in cutscenes, blocky low-mip textures (screenshots attached). ## Other warnings seen - `a pipeline creation method that is not implemented: the title goes without this pipeline` (29 times) - `a texture picked by index changed after its upload with nothing to tell of it: uploaded again` (252 times) - `host view heap capped at N; views past it read a null slot` - `a shader takes the address of a buffer view that is not there: it reads 0` - `a dispatch without a host pipeline dropped` I can run the diagnostics build and test patches if useful. I did not include any game files here, only hashes, offsets and instruction names. <img width="1919" height="1076" alt="Capture d&#39;écran 2026-11-26 010349" src="https://github.com/user-attachments/assets/66b42aad-efcd-46b8-9020-6172cc355af7" /> <img width="1919" height="1075" alt="Capture d&#39;écran 2026-11-26 010356" src="https://github.com/user-attachments/assets/71eedb9a-97af-470c-a7ea-6927c09db100" /> <img width="1919" height="1079" alt="Capture d&#39;écran 2026-11-26 010451" src="https://github.com/user-attachments/assets/da11e470-8f52-4320-9af3-1e69648b8e78" />
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:59:35 +00:00
Author
Owner

@⁠HLVM04 on GitHub · 2026-11-26 00:25 UTC · original

Data from an RTX 5070 Ti (also 32-lane waves), for sections 2 and 4:

  • Refused pipelines: at 9376fd6 we had 7 compute pipelines refused with E_INVALIDARG (WaveSize 64). Four of your six compute IDs are among them: 2da4beb386509b77, 369cbe906ea72764, 2cc4c197ee29e291, 02384a60fda6f2d0. #799's loose-LDS fallback built 5 of our 7, those four included. 2da4beb3 turned out to be the wired glass by the window (checked in a PIX capture), so it renders correctly. Only where the hair edge overlaps the window may it be off. We did not check the other three outputs one by one. A similar last-resort wave-wide form of ours built 4 of 7, but cost fps and did not visibly reduce artifacts. Fork main now has VICTORY_WAVE_WIDE=last (#1141, after your 6d20eed), and #854 adds a paired wave64 form.
  • Black faces: on our card they did not track any one untranslated shader. They were intermittent from run to run, and with VICTORY_VIEW_GUARD=0 faces went black, so it looks like stale texture memory rather than a shader failure. One cause we found and fixed locally: small tint-palette textures packed a few hundred bytes apart in one page made each other stale under the default Rule::Start (4 KiB head), so their views went null. Giving each texture a head of min(4 KiB, its size) lit the face in 2 of 2 runs, where before it was black in every run. Her neck from behind and a night-cutscene face stayed black. Details are in #923.

These are a few runs each on one machine, so scene variance applies.

**@⁠HLVM04** on GitHub · 2026-11-26 00:25 UTC · [original](https://github.com/fxceless/victory-fork/issues/1211#issuecomment-7178749299) Data from an RTX 5070 Ti (also 32-lane waves), for sections 2 and 4: - **Refused pipelines:** at 9376fd6 we had 7 compute pipelines refused with E_INVALIDARG (WaveSize 64). Four of your six compute IDs are among them: 2da4beb386509b77, 369cbe906ea72764, 2cc4c197ee29e291, 02384a60fda6f2d0. #799's loose-LDS fallback built 5 of our 7, those four included. 2da4beb3 turned out to be the wired glass by the window (checked in a PIX capture), so it renders correctly. Only where the hair edge overlaps the window may it be off. We did not check the other three outputs one by one. A similar last-resort wave-wide form of ours built 4 of 7, but cost fps and did not visibly reduce artifacts. Fork main now has `VICTORY_WAVE_WIDE=last` (#1141, after your 6d20eed), and #854 adds a paired wave64 form. - **Black faces:** on our card they did not track any one untranslated shader. They were intermittent from run to run, and with `VICTORY_VIEW_GUARD=0` faces went black, so it looks like stale texture memory rather than a shader failure. One cause we found and fixed locally: small tint-palette textures packed a few hundred bytes apart in one page made each other stale under the default `Rule::Start` (4 KiB head), so their views went null. Giving each texture a head of min(4 KiB, its size) lit the face in 2 of 2 runs, where before it was black in every run. Her neck from behind and a night-cutscene face stayed black. Details are in #923. These are a few runs each on one machine, so scene variance applies.
Author
Owner

@⁠Garu667 on GitHub · 2026-11-26 06:25 UTC · original

Same refusals on a 3080 here, so it's a 32-lane thing, not your card. If it helps sort them out, I put the full offline list on #1235 (all 27 compute pipelines a 32-lane card refuses, grouped by what they draw: GPU particles, decal/liquid trails, water volumetrics, hair shadows, the window glass...). In-game you only hit the handful your scene uses, which is why the count moves around between reports.

**@⁠Garu667** on GitHub · 2026-11-26 06:25 UTC · [original](https://github.com/fxceless/victory-fork/issues/1211#issuecomment-7184413502) Same refusals on a 3080 here, so it's a 32-lane thing, not your card. If it helps sort them out, I put the full offline list on #1235 (all 27 compute pipelines a 32-lane card refuses, grouped by what they draw: GPU particles, decal/liquid trails, water volumetrics, hair shadows, the window glass...). In-game you only hit the handful your scene uses, which is why the count moves around between reports.
Author
Owner

@⁠hadrianhola on GitHub · 2026-11-26 14:16 UTC · original

Another RTX 4060 8 GB, on Windows 10 and an older 6-core CPU, at current main:

Machine: RTX 4060 8 GB desktop, driver 610.88, HAGS on · i7-5820K (Haswell-E, 6C/12T) · 32 GB · Windows 10 22H2 19045.
Build: main at a20809d plus #856 (Agility for Windows 10), release, Series X profile. Switches: the timing-run set from diagnostics/README.md without GPU_TIMING/DRED, plus VICTORY_CARD_HASH_LEN=1 VICTORY_LOOKUP_CACHE=1 VICTORY_HEAP_WORKER=1 VICTORY_SETTLE_ROOM=1 VICTORY_PARALLEL_REFRESH=1. Unattended, 600 s from launch, the player idle at the cell window in the prologue.

1. On this card the wall is the GPU too, once the driver has its pipelines. From the corner box's load line, sampled every 5 s from 180 s on:

fps median (max) busiest thread card 3D dropped without a host pipeline being made
1st start of the new build ~2 (2.5) 96 % 25 % 380–2,500 540–2,100
2nd start 4.6 (6.0) 53 % 87 % (≥ 90 % in half the samples) 340–420 0

The same place on c74e173 last night (2nd start, without the four new switches) was 4.5 fps median, 5.6 max, 123 ms a frame preparing against 111 now, and 511 dropped draws against 370. So the new switches take CPU work off as described, but on a 4060 the frame rate barely moves: the card is already full. That matches your note that the card is now the wall on the 4070.

2. A cold cache looks like "no world". My first runs had the world missing: grey or black frames with only the credits and subtitles, and dropped 300–2,000 without a host pipeline (900–1,200 being made) for minutes. victory translate --warm all --jobs 12 (282 s on this CPU) fixed it; README note proposed in #1304. The first start of each new build is still slow while the driver builds its pipelines (table above).

3. Video memory: over budget the whole time in the world, up to 8,066 MB used against a ~6,900 MB budget, with up to ~7,500 textures waiting for memory while loading. Given run 295 (black surfaces were textures with no room on the card), 8 GB cards may show more of those.

4. Refused / untranslated: the same 32-lane set as above and in #1235 (7 refused compute pipelines, 2 untranslated shaders), unchanged between the two builds. No device removal in any run.

AI-assisted (Claude Code).

**@⁠hadrianhola** on GitHub · 2026-11-26 14:16 UTC · [original](https://github.com/fxceless/victory-fork/issues/1211#issuecomment-7194533142) Another RTX 4060 8 GB, on **Windows 10** and an older 6-core CPU, at current `main`: **Machine:** RTX 4060 8 GB desktop, driver 610.88, HAGS on · i7-5820K (Haswell-E, 6C/12T) · 32 GB · Windows 10 22H2 19045. **Build:** `main` at `a20809d` plus #856 (Agility for Windows 10), release, Series X profile. Switches: the `timing-run` set from `diagnostics/README.md` without `GPU_TIMING`/`DRED`, plus `VICTORY_CARD_HASH_LEN=1 VICTORY_LOOKUP_CACHE=1 VICTORY_HEAP_WORKER=1 VICTORY_SETTLE_ROOM=1 VICTORY_PARALLEL_REFRESH=1`. Unattended, 600 s from launch, the player idle at the cell window in the prologue. **1. On this card the wall is the GPU too, once the driver has its pipelines.** From the corner box's load line, sampled every 5 s from 180 s on: | | fps median (max) | busiest thread | card 3D | dropped without a host pipeline | being made | |---|---|---:|---:|---:|---:| | 1st start of the new build | ~2 (2.5) | 96 % | 25 % | 380–2,500 | 540–2,100 | | 2nd start | **4.6 (6.0)** | 53 % | **87 %** (≥ 90 % in half the samples) | 340–420 | 0 | The same place on `c74e173` last night (2nd start, without the four new switches) was 4.5 fps median, 5.6 max, 123 ms a frame preparing against 111 now, and 511 dropped draws against 370. So the new switches take CPU work off as described, but on a 4060 the frame rate barely moves: the card is already full. That matches your note that the card is now the wall on the 4070. **2. A cold cache looks like "no world".** My first runs had the world missing: grey or black frames with only the credits and subtitles, and `dropped 300–2,000 without a host pipeline (900–1,200 being made)` for minutes. `victory translate --warm all --jobs 12` (282 s on this CPU) fixed it; README note proposed in #1304. The first start of each new build is still slow while the driver builds its pipelines (table above). **3. Video memory:** over budget the whole time in the world, up to **8,066 MB used against a ~6,900 MB budget**, with up to ~7,500 textures waiting for memory while loading. Given run 295 (black surfaces were textures with no room on the card), 8 GB cards may show more of those. **4. Refused / untranslated:** the same 32-lane set as above and in #1235 (7 refused compute pipelines, 2 untranslated shaders), unchanged between the two builds. No device removal in any run. _AI-assisted (Claude Code)._
Author
Owner

@⁠Davidjc13 on GitHub · 2026-11-26 18:10 UTC · original

Can you check this??

https://github.com/DoubleGhosty/cool_fox/pull/25

It lower the faces shader to wave32.

**@⁠Davidjc13** on GitHub · 2026-11-26 18:10 UTC · [original](https://github.com/fxceless/victory-fork/issues/1211#issuecomment-7200145193) Can you check this?? https://github.com/DoubleGhosty/cool_fox/pull/25 It lower the faces shader to wave32.
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#1211
No description provided.