feat(build): Intel graphics in the build settings: shader compiles one at a time or side by side, and a longer shader time limit #97

Merged
HumanBean merged 2 commits from Yeetbot90/LongshotLauncher:feat/intel-shader-compiles into main 2026-11-15 17:44:34 +00:00
Contributor

Players on Intel graphics could only choose how Intel's driver is given shaders from the game's Debug tab, and only after a build. By then the build's own shader preparation had already run one at a time. On a slow Intel GPU, that preparation can also be stopped as "the GPU driver stopped responding" when the driver is only slow (Longshot#407). This adds both choices to the build settings, for the build and the game.

The game's side: MagicBeanDev/Longshot#781 makes the in-game row's hint name these build settings while they hold it.

Build settings on Windows with Intel graphics: One at a time, Normal (the defaults)

The same card on Side by side and Longer

What it is for

  • Intel shader compiles. Longshot holds Intel's compiler to one thread on Windows (IntelDriverGate, gpu/vk/vk_internal.h). Two compiles at once froze an Arc A750 (issue 496) and crashed a UHD in igvk64. The in-game row, or RX_VK_NO_INTEL_SERIAL=1 over it, gives them side by side again. That's faster on a CPU with many cores, at that risk.
  • Shader time limit. With compiles one at a time, Intel's driver can sit on one compile for most of a minute: 57 s on a Core Ultra 9 185H in #407. The build's preparation then stopped after 300 s with no progress, at 262 of 38,809, with no device loss or driver fault in its log. Longshot's limits on a driver that seems stuck are already switches. Longer raises them:
Switch (Longshot) What it limits Normal (Longshot's default) Longer
RX_VK_PREPARE_STALL_S the build's --prepare-shaders watchdog (vk_main.cpp prepare_watchdog): stops the preparation when nothing moves 300 s 1800 s
RX_VK_PRECOMPILE_STALL_S the noted pipelines go on without the last stragglers (vk_draw.cpp precompile_run) 30 s 180 s
RX_VK_PREDICT_STALL_S the predicted pipelines, the same (vk_draw.cpp predict_run) 30 s 180 s

180 s is about three times the longest pause seen in #407. 1800 s still ends a real hang within half an hour. make_game.py's own limit, 15 minutes with no line, doesn't cut in: the watchdog prints a waiting line every 30 s while it waits.

What changed

  • Build settings, Windows with Intel graphics only: an INTEL GRAPHICS card with Intel shader compiles, One at a time (the default) or Side by side, and Shader time limit, Normal (the default) or Longer. Both are remembered in settings.json (IntelSideBySide, IntelLongerLimits). The card isn't shown on NVIDIA, AMD, Linux, or when no card was found (SystemInfo.IntelCompilesApply). On Linux, Longshot doesn't hold Intel's compiler.
  • The build (MakeGameCommand.For) and Play (GamePlay.Environment): Side by side gives RX_VK_NO_INTEL_SERIAL=1, and Longer gives the three switches above (GamePlay.IntelLongerLimits). make_game.py passes both on to --prepare-shaders (it drops only LONGSHOT_*, PYTHON* and the AppImage's variables). With Side by side on, the game's own row shows Side by side and is held by the variable.
  • The defaults set nothing, so the game's own row decides, and a variable set on the PC still applies.
  • tools/screenshots: the scenes set GpuCards, which replaced Gpus; the tool didn't build without this. Two new scenes, settings-windows-intel and settings-windows-intel-side, are above.
  • README: the Settings step and the scene list.

How it was tested

  • python -I tests/test_launcher_core.py: 1099 checks passed on this branch. New checks:

    • A Windows build: Side by side gives RX_VK_NO_INTEL_SERIAL=1, and Longer gives the three switches at 1800, 180 and 180. The defaults give none of them, and neither choice sets the other's switches.
    • Play on Windows: the same.
    • A Linux build and Linux Play: none.
    • IntelCompilesApply holds for Windows with an Intel card, an NVIDIA laptop with Intel graphics, AMD, no card, and Linux.

    On main @ fa3a444 the run already stops at ReleaseChecks ("The release's SHA256SUMS is not signed by a key this launcher trusts"), before any of these. To get the numbers above I commented that one call out locally and didn't commit the change. That failure isn't from this PR.

  • dotnet build App -c Release: 0 warnings, 0 errors.

  • The screenshots: dotnet run --project tools/screenshots -- <out> settings-windows-intel settings-windows-intel-side settings-windows. The NVIDIA scene still has no Intel card.

What isn't tested

  • No Intel GPU here (RX 9070 XT, Ryzen 9 7900X). I haven't run a build or Play on Intel graphics with either choice. What to check on one:
    • Side by side: the game's log has no vk: Intel's compiler is entered by one thread line. On One at a time it has that line once.
    • Longer: a preparation's waiting lines end in Stopped at 1800 s if nothing moves, not 300 s.
  • Whether Longer gets a slow Intel preparation to the end. #407's run moved about 7 work slots a minute, so it may only take longer before it stops.
  • The new texts aren't translated yet (the catalogs show them in English).

Risks

  • Side by side brings back the driver faults the gate was added for. It stays opt-in, the default is unchanged, and the description says it can crash or freeze the PC.
  • Longer makes a real driver hang take up to 30 minutes, not 5, before the preparation gives up, and up to 3 minutes before the game's start goes on without the last pipelines. It's opt-in, and the description says so.
  • If Longshot#500 merges, the game's row gets an Auto default: side by side on Arc B-series. One at a time here sets nothing, so on those cards the game would compile side by side while this row says One at a time. Then this row needs an Auto choice too, or One at a time has to set RX_VK_NO_INTEL_SERIAL=0.
Players on Intel graphics could only choose how Intel's driver is given shaders from the game's Debug tab, and only after a build. By then the build's own shader preparation had already run one at a time. On a slow Intel GPU, that preparation can also be stopped as "the GPU driver stopped responding" when the driver is only slow ([Longshot#407](https://git.magicbean.dev/MagicBeanDev/Longshot/issues/407)). This adds both choices to the build settings, for the build and the game. The game's side: [MagicBeanDev/Longshot#781](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/781) makes the in-game row's hint name these build settings while they hold it. ![Build settings on Windows with Intel graphics: One at a time, Normal (the defaults)](https://git.magicbean.dev/attachments/7119f5ac-6ae7-43c9-bbd9-7155f31f8b42) ![The same card on Side by side and Longer](https://git.magicbean.dev/attachments/1ff49b56-e628-49e2-8d5e-f842e95cf919) ## What it is for - **Intel shader compiles.** Longshot holds Intel's compiler to one thread on Windows (`IntelDriverGate`, gpu/vk/vk_internal.h). Two compiles at once froze an Arc A750 (issue 496) and crashed a UHD in igvk64. The in-game row, or `RX_VK_NO_INTEL_SERIAL=1` over it, gives them side by side again. That's faster on a CPU with many cores, at that risk. - **Shader time limit.** With compiles one at a time, Intel's driver can sit on one compile for most of a minute: 57 s on a Core Ultra 9 185H in #407. The build's preparation then stopped after 300 s with no progress, at 262 of 38,809, with no device loss or driver fault in its log. Longshot's limits on a driver that seems stuck are already switches. *Longer* raises them: | Switch (Longshot) | What it limits | Normal (Longshot's default) | Longer | |---|---|---|---| | `RX_VK_PREPARE_STALL_S` | the build's `--prepare-shaders` watchdog (`vk_main.cpp prepare_watchdog`): stops the preparation when nothing moves | 300 s | 1800 s | | `RX_VK_PRECOMPILE_STALL_S` | the noted pipelines go on without the last stragglers (`vk_draw.cpp precompile_run`) | 30 s | 180 s | | `RX_VK_PREDICT_STALL_S` | the predicted pipelines, the same (`vk_draw.cpp predict_run`) | 30 s | 180 s | 180 s is about three times the longest pause seen in #407. 1800 s still ends a real hang within half an hour. make_game.py's own limit, 15 minutes with no line, doesn't cut in: the watchdog prints a waiting line every 30 s while it waits. ## What changed - **Build settings, Windows with Intel graphics only:** an *INTEL GRAPHICS* card with **Intel shader compiles**, *One at a time* (the default) or *Side by side*, and **Shader time limit**, *Normal* (the default) or *Longer*. Both are remembered in `settings.json` (`IntelSideBySide`, `IntelLongerLimits`). The card isn't shown on NVIDIA, AMD, Linux, or when no card was found (`SystemInfo.IntelCompilesApply`). On Linux, Longshot doesn't hold Intel's compiler. - **The build** (`MakeGameCommand.For`) and **Play** (`GamePlay.Environment`): Side by side gives `RX_VK_NO_INTEL_SERIAL=1`, and Longer gives the three switches above (`GamePlay.IntelLongerLimits`). make_game.py passes both on to `--prepare-shaders` (it drops only `LONGSHOT_*`, `PYTHON*` and the AppImage's variables). With Side by side on, the game's own row shows Side by side and is held by the variable. - **The defaults set nothing**, so the game's own row decides, and a variable set on the PC still applies. - **tools/screenshots:** the scenes set `GpuCards`, which replaced `Gpus`; the tool didn't build without this. Two new scenes, `settings-windows-intel` and `settings-windows-intel-side`, are above. - README: the Settings step and the scene list. ## How it was tested - `python -I tests/test_launcher_core.py`: **1099 checks passed** on this branch. New checks: - A Windows build: Side by side gives `RX_VK_NO_INTEL_SERIAL=1`, and Longer gives the three switches at 1800, 180 and 180. The defaults give none of them, and neither choice sets the other's switches. - Play on Windows: the same. - A Linux build and Linux Play: none. - `IntelCompilesApply` holds for Windows with an Intel card, an NVIDIA laptop with Intel graphics, AMD, no card, and Linux. On `main` @ fa3a444 the run already stops at `ReleaseChecks` ("The release's SHA256SUMS is not signed by a key this launcher trusts"), before any of these. To get the numbers above I commented that one call out locally and didn't commit the change. That failure isn't from this PR. - `dotnet build App -c Release`: 0 warnings, 0 errors. - The screenshots: `dotnet run --project tools/screenshots -- <out> settings-windows-intel settings-windows-intel-side settings-windows`. The NVIDIA scene still has no Intel card. ## What isn't tested - **No Intel GPU here** (RX 9070 XT, Ryzen 9 7900X). I haven't run a build or Play on Intel graphics with either choice. What to check on one: - *Side by side:* the game's log has no `vk: Intel's compiler is entered by one thread` line. On *One at a time* it has that line once. - *Longer:* a preparation's waiting lines end in `Stopped at 1800 s if nothing moves`, not `300 s`. - Whether Longer gets a slow Intel preparation to the end. #407's run moved about 7 work slots a minute, so it may only take longer before it stops. - The new texts aren't translated yet (the catalogs show them in English). ## Risks - Side by side brings back the driver faults the gate was added for. It stays opt-in, the default is unchanged, and the description says it can crash or freeze the PC. - Longer makes a real driver hang take up to 30 minutes, not 5, before the preparation gives up, and up to 3 minutes before the game's start goes on without the last pipelines. It's opt-in, and the description says so. - If [Longshot#500](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/500) merges, the game's row gets an Auto default: side by side on Arc B-series. *One at a time* here sets nothing, so on those cards the game would compile side by side while this row says One at a time. Then this row needs an Auto choice too, or One at a time has to set `RX_VK_NO_INTEL_SERIAL=0`.
feat(build): Intel shader compiles in the build settings, one at a time or side by side
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
ec8d9a9759
On Windows with Intel graphics the build settings offer Longshot's Intel shader compiles choice. One at a time, the default, sets nothing; Side by side gives the build's shader preparation and the game RX_VK_NO_INTEL_SERIAL=1. The screenshot tool sets GpuCards, which replaced Gpus, and has the Intel scenes.

Co-authored-by: Cursor <[email protected]>
Yeetbot90 changed title from probe to feat(build): Intel shader compiles in the build settings, one at a time or side by side 2026-11-15 11:51:01 +00:00
Yeetbot90 force-pushed feat/intel-shader-compiles from ec8d9a9759
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
to 230ec85fed
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
2026-11-15 11:55:14 +00:00
Compare
feat(build): Shader time limit for Intel graphics, Normal or Longer
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
cb01c8c0d7
Intel's compiler one at a time can sit on one compile for most of a minute, and Longshot's preparation was stopped at 300 s without a fault (Longshot issue 407). Longer gives the build and the game RX_VK_PREPARE_STALL_S=1800, RX_VK_PRECOMPILE_STALL_S=180 and RX_VK_PREDICT_STALL_S=180; Normal sets nothing.

Co-Authored-By: Cursor <[email protected]>
Yeetbot90 changed title from feat(build): Intel shader compiles in the build settings, one at a time or side by side to feat(build): Intel graphics in the build settings: shader compiles one at a time or side by side, and a longer shader time limit 2026-11-15 12:00:31 +00:00
Author
Contributor

New commit cb01c8c: Shader time limit for Intel graphics, Normal or Longer, in the same card. Longer gives the build and Play RX_VK_PREPARE_STALL_S=1800, RX_VK_PRECOMPILE_STALL_S=180 and RX_VK_PREDICT_STALL_S=180 (Longshot's 300, 30 and 30 s), for the preparation stopped without a fault in Longshot#407. The description, the table of switches and both screenshots are updated. test_launcher_core.py: 1099 checks passed (ReleaseChecks commented out locally, as before); dotnet build App: 0 warnings.

New commit cb01c8c: **Shader time limit** for Intel graphics, *Normal* or *Longer*, in the same card. Longer gives the build and Play `RX_VK_PREPARE_STALL_S=1800`, `RX_VK_PRECOMPILE_STALL_S=180` and `RX_VK_PREDICT_STALL_S=180` (Longshot's 300, 30 and 30 s), for the preparation stopped without a fault in [Longshot#407](https://git.magicbean.dev/MagicBeanDev/Longshot/issues/407). The description, the table of switches and both screenshots are updated. `test_launcher_core.py`: 1099 checks passed (ReleaseChecks commented out locally, as before); `dotnet build App`: 0 warnings.
HumanBean force-pushed feat/intel-shader-compiles from cb01c8c0d7
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
to 23e814fefb
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 13s
2026-11-15 17:42:15 +00:00
Compare
HumanBean deleted branch feat/intel-shader-compiles 2026-11-15 17:44:35 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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/LongshotLauncher!97
No description provided.