Idea: runs of RX_VK_WB_MAX_KB=1024 wanted on cards without mesh shaders (2.5 ms of GPU less on an RX 5600 XT) #548

Open
opened 2026-11-14 19:15:17 +00:00 by waryxxful · 0 comments

The idea

RX_VK_WB_MAX_KB=1024 is in every build and off by default. The README says it stays off until it shows a gain on more than one machine, and that results are wanted. It now has one card where it gains, and it needs a second one before anyone can argue for a default.

What it gained on an RX 5600 XT 6 GB (no mesh shaders, Windows 11, Adrenalin 26.10.1), Render resolution 50% of 1920x1080, two runs each way, interleaved:

unset RX_VK_WB_MAX_KB=1024
Written back a frame 60.8 / 60.7 MB 16.4 / 16.2 MB
Kokiri Forest 45.9 / 48.0 fps, GPU 14.8 / 14.5 ms 54.2 / 55.5 fps, GPU 12.0 / 12.1 ms
Desert Colossus 39.0 / 42.2 fps, GPU 18.7 / 18.0 ms 43.8 / 47.0 fps, GPU 15.8 / 15.8 ms

No device lost, nothing wrong seen in twelve screenshots. The earlier runs (an RTX 3060 Ti and an RX 580, in the README) wrote back 50 MB a frame less at the same fps, so the gain may be particular to cards on the compute fallback, where the GPU's frame is already long. That is the question a second card answers.

Who can help: anyone with a card that logs no mesh shaders (the compute fallback) at start: RX 5500 XT, RX 5700 / 5700 XT, RX 580 / 590, GTX 10 series, older Intel. A release build is enough, there is nothing to compile.

The run, about ten minutes:

  1. Load a save in Kokiri Forest and stand or walk the same stretch for 30 s. Note the FPS counter's fps and its GPU time (Breakdown level).
  2. Close the game. Add the line RX_VK_WB_MAX_KB=1024 to longshot_env.txt in the game's folder (create the file if it is not there).
  3. Repeat step 1 in the same spot. Do each side twice if you can, alternating.
  4. Comment here with: the card, its driver, the OS, the render resolution, the four fps and GPU numbers, and these two lines from longshot_log.txt of each side:
    • vk: a frame: mirrors ... MB written back
    • vk: write-backs left out (600 submits): ... (only with the switch)

Say so too if anything looks wrong with the switch on (missing or flickering geometry, grass, shadows), with a screenshot.

Anything else

  • The full rows of the RX 5600 XT runs are in #547 (docs/tested/2026-11-14-wb-max-waryxxful-run01.md to run04.md).
  • How the switch decides what to leave out, and its one trade-off (a range the CPU first reads late gets a stale copy once): gpu/vk/wb_learn.h and the README's paragraph on RX_VK_WB_MAX_KB.
  • Where the write-back sits in this card's GPU frame with the switch unset (RX_VK_PASS_TIMING=2): m wb 2.101 ms 12.1% ... 40.40 MB of a 21.5 ms profiled frame, third after the passes (33%) and the fallback's dispatches (22%).
### The idea `RX_VK_WB_MAX_KB=1024` is in every build and off by default. The README says it stays off until it shows a gain on more than one machine, and that results are wanted. It now has one card where it gains, and it needs a second one before anyone can argue for a default. **What it gained on an RX 5600 XT 6 GB (no mesh shaders, Windows 11, Adrenalin 26.10.1)**, Render resolution 50% of 1920x1080, two runs each way, interleaved: | | unset | `RX_VK_WB_MAX_KB=1024` | |---|---|---| | Written back a frame | 60.8 / 60.7 MB | 16.4 / 16.2 MB | | Kokiri Forest | 45.9 / 48.0 fps, GPU 14.8 / 14.5 ms | 54.2 / 55.5 fps, GPU 12.0 / 12.1 ms | | Desert Colossus | 39.0 / 42.2 fps, GPU 18.7 / 18.0 ms | 43.8 / 47.0 fps, GPU 15.8 / 15.8 ms | No device lost, nothing wrong seen in twelve screenshots. The earlier runs (an RTX 3060 Ti and an RX 580, in the README) wrote back 50 MB a frame less at the same fps, so the gain may be particular to cards on the compute fallback, where the GPU's frame is already long. That is the question a second card answers. **Who can help:** anyone with a card that logs `no mesh shaders (the compute fallback)` at start: RX 5500 XT, RX 5700 / 5700 XT, RX 580 / 590, GTX 10 series, older Intel. A release build is enough, there is nothing to compile. **The run, about ten minutes:** 1. Load a save in Kokiri Forest and stand or walk the same stretch for 30 s. Note the FPS counter's fps and its GPU time (Breakdown level). 2. Close the game. Add the line `RX_VK_WB_MAX_KB=1024` to `longshot_env.txt` in the game's folder (create the file if it is not there). 3. Repeat step 1 in the same spot. Do each side twice if you can, alternating. 4. Comment here with: the card, its driver, the OS, the render resolution, the four fps and GPU numbers, and these two lines from `longshot_log.txt` of each side: - `vk: a frame: mirrors ... MB written back` - `vk: write-backs left out (600 submits): ...` (only with the switch) Say so too if anything looks wrong with the switch on (missing or flickering geometry, grass, shadows), with a screenshot. ### Anything else - The full rows of the RX 5600 XT runs are in https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/547 (`docs/tested/2026-11-14-wb-max-waryxxful-run01.md` to `run04.md`). - How the switch decides what to leave out, and its one trade-off (a range the CPU first reads late gets a stale copy once): `gpu/vk/wb_learn.h` and the README's paragraph on `RX_VK_WB_MAX_KB`. - Where the write-back sits in this card's GPU frame with the switch unset (`RX_VK_PASS_TIMING=2`): `m wb 2.101 ms 12.1% ... 40.40 MB` of a 21.5 ms profiled frame, third after the passes (33%) and the fallback's dispatches (22%).
Sign in to join this conversation.
No milestone
No project
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
MagicBeanDev/Longshot#548
No description provided.