Shader stage libraries (RX_VK_GPL) on by default on NVIDIA: about 7x less waiting on a first play #1271

Closed
opened 2026-11-09 20:00:32 +00:00 by jarynclouatre · 2 comments
jarynclouatre commented 2026-11-09 20:00:32 +00:00 (Migrated from github.com)

The idea

Turn the shader stage libraries (RX_VK_GPL) on by default on NVIDIA. They are off for now ("off until the driver step is safe: linked cold, the libraries stall the draw"), but on an RTX 4070 Ti SUPER a first play with them on waited about 7 times less for pipelines.

Setup: Windows 11, RTX 4070 Ti SUPER (driver 621.14), Ryzen 7 9800X3D, 32 GB. Hookshot built from 8b2e1d3 and run headless, each run in a fresh folder: --prepare-shaders, then the same scripted 19-minute route with timed input (child Link teleported through Hyrule Field, Kakariko, Market, Lost Woods, Death Mountain Trail, Goron City, Zora's River, Zora's Domain, Gerudo Valley and Kokiri Forest). The driver's shader cache went to an empty folder per run (__GL_SHADER_DISK_CACHE_PATH). The numbers are the 120-frame "waits for shaders or pipelines" and "draws left out" log lines, added up over the run.

runs pipeline waits time waiting draws left out prepare
default 1 574 88.9 s 167,820 about 4 min
RX_VK_GPL=1 2 32 and 29 11.1 and 12.3 s 4,728 and 4,824 about 16 min

The worst 120-frame window went from 22.4 s (arriving in the Market) to 7.4 s (arriving in Kakariko). With #1129 on top, GPL on, one run: 8.2 s of waiting in all.

The cost is the longer first prepare, 16 minutes instead of 4 here (two prepares side by side in both cases). I have not tried AMD or Intel, so this says nothing about the stall on other drivers. Would GPL on by default for NVIDIA be welcome? I can send it as a PR.

### The idea Turn the shader stage libraries (RX_VK_GPL) on by default on NVIDIA. They are off for now ("off until the driver step is safe: linked cold, the libraries stall the draw"), but on an RTX 4070 Ti SUPER a first play with them on waited about 7 times less for pipelines. Setup: Windows 11, RTX 4070 Ti SUPER (driver 621.14), Ryzen 7 9800X3D, 32 GB. Hookshot built from 8b2e1d3 and run headless, each run in a fresh folder: `--prepare-shaders`, then the same scripted 19-minute route with timed input (child Link teleported through Hyrule Field, Kakariko, Market, Lost Woods, Death Mountain Trail, Goron City, Zora's River, Zora's Domain, Gerudo Valley and Kokiri Forest). The driver's shader cache went to an empty folder per run (`__GL_SHADER_DISK_CACHE_PATH`). The numbers are the 120-frame "waits for shaders or pipelines" and "draws left out" log lines, added up over the run. | | runs | pipeline waits | time waiting | draws left out | prepare | |---|---|---|---|---|---| | default | 1 | 574 | 88.9 s | 167,820 | about 4 min | | RX_VK_GPL=1 | 2 | 32 and 29 | 11.1 and 12.3 s | 4,728 and 4,824 | about 16 min | The worst 120-frame window went from 22.4 s (arriving in the Market) to 7.4 s (arriving in Kakariko). With #1129 on top, GPL on, one run: 8.2 s of waiting in all. The cost is the longer first prepare, 16 minutes instead of 4 here (two prepares side by side in both cases). I have not tried AMD or Intel, so this says nothing about the stall on other drivers. Would GPL on by default for NVIDIA be welcome? I can send it as a PR.
NotRexed commented 2026-11-09 20:18:21 +00:00 (Migrated from github.com)

Thanks for the measured A/B: 574 pipeline waits (88.9 s) down to about 30 (11-12 s) with RX_VK_GPL=1 on an RTX 4070 Ti Super, at the cost of a 16-minute first prepare instead of 4. Linking to the stutter tracker #995 for the maintainer to weigh.

Thanks for the measured A/B: 574 pipeline waits (88.9 s) down to about 30 (11-12 s) with RX_VK_GPL=1 on an RTX 4070 Ti Super, at the cost of a 16-minute first prepare instead of 4. Linking to the stutter tracker #995 for the maintainer to weigh.
NotRexed commented 2026-11-11 21:22:19 +00:00 (Migrated from github.com)

Thanks for the report. Reports of the same problem are now collected in #995, which lists this one with your details and links back here, so one fix closes them together and the open list stays readable. Follow #995 for the fix, and add new details there (or here). If this turns out to be a separate problem it will be reopened.

Thanks for the report. Reports of the same problem are now collected in #995, which lists this one with your details and links back here, so one fix closes them together and the open list stays readable. Follow #995 for the fix, and add new details there (or here). If this turns out to be a separate problem it will be reopened.
Commenting is not possible because the repository is archived.
No milestone
No assignees
1 participant
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/Hookshot#1271
No description provided.