Skip to content

Guard cached compute precompilation against driver faults - #758

Closed
klimovich008 wants to merge 3 commits into
NotRexed:mainfrom
klimovich008:codex/guard-compute-precompile
Closed

klimovich008 wants to merge 3 commits into
NotRexed:mainfrom
klimovich008:codex/guard-compute-precompile

Conversation

@klimovich008

@klimovich008 klimovich008 commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

What this fixes

On Windows, a driver access violation (0xC0000005) during cached compute precompilation terminates startup. This call bypasses the exception guard already used during shader preparation and runtime compilation.

Why merge

  • One-line change. Reuse the existing guard; non-Windows behavior stays the same.
  • Preserve the cache, creation arguments, successful publication and failure cleanup.
  • Keep startup limits, defaults and environment overrides unchanged.

Change

  • gpu/vk/vk_draw.cpp: use guarded_compute(pcache, &ci, &made).
  • tests/test_precompile_compute_guard.py: test the actual wrapper and worker branch with injected Windows faults.
  • tests/run_all.py: run the check on Windows and record a Linux skip.

Tested

  • On Windows: python -I -B tests/run_all.py --strict precompile_compute_guard; checks success, access violations, ordinary errors and abandoned-pipeline cleanup.
  • Fails on the old code, passes now. All five cases pass after the change.
  • Local Windows/Ryzen 7 5700X3D: the injected access violation kills the old child; the fixed child exits normally. No GPU driver is invoked.

All seven CI checks pass after syncing with current main, including the Windows regression and both platform builds.

Not covered

  • Real GPU startup validation is pending. This does not identify the cause of the reported RX 9070 XT startup abort.
  • Driver hangs, fast-fail termination and production worker scheduling are outside this test.

No game data is included.

tickernelz added a commit to tickernelz/Hookshot that referenced this pull request Nov 9, 2026
precompile_run called vkCreateComputePipelines itself, so the guard never covered the phase that builds the cached compute pipelines: on Linux the same invalid shader took the start down there after the warm-up had survived it. This is the call NotRexed#758 changes for Windows; on Linux it is what makes that change reach the driver.
NotRexed pushed a commit that referenced this pull request Nov 9, 2026
@NotRexed

NotRexed commented Nov 9, 2026

Copy link
Copy Markdown
Owner

Merged into main in fa43939 (v2.0.6), thanks!

@NotRexed NotRexed closed this Nov 9, 2026
github-actions Bot pushed a commit to notquiteog/Hookshot that referenced this pull request Nov 9, 2026
## [2.2.0](v2.1.1...v2.2.0) (2026-11-09)

### Features

* the upscalers and frame generation are the native settings, not new rows ([a0ce7de](a0ce7de))
* **vk:** reland the mesh shader fallback for GPUs without mesh shaders ([NotRexed#640](https://github.com/notquiteog/Hookshot/issues/640)) ([07773ab](07773ab))

### Bug Fixes

* **builder:** Linux builder from the Actions tab builds without updating to the release first ([2c6df08](2c6df08)), closes [NotRexed#902](https://github.com/notquiteog/Hookshot/issues/902)
* **build:** preserve compiler failures without stderr ([a65391b](a65391b))
* keep register markers clear of native operands ([add0937](add0937))
* lower direct 1D surface atomic add ([15652af](15652af))
* preserve the changelog when release generation fails ([b03a181](b03a181))
* **video:** a new decoder image pool holds black, not zeros (one green frame at each scene change that opens a movie) ([67451f4](67451f4))
* **vk:** keep background shader threads out of the replay's uniform update list ([400caf1](400caf1))
* **vk:** keep every large ASTC texture as BC3 on 8 GB cards too ([6553378](6553378))
* **vk:** leave out task and mesh stages only for fallback programs ([aec016f](aec016f))
* **vk:** let dead transient targets go after 3 frames, not 16 ([9349f7f](9349f7f))
* **vk:** let go of render targets drawn over from another start ([5bfa6aa](5bfa6aa))
* **vk:** report a driver fault in a pipeline compile on Linux ([2079b41](2079b41))
* **vk:** say in the log when the guard drops a pipeline ([0560ecb](0560ecb))
* **vk:** send the precompile compute worker through the guard ([ff95e92](ff95e92)), closes [NotRexed#758](https://github.com/notquiteog/Hookshot/issues/758)
* **vk:** shorten the rendered-texture keep near the VRAM limit on AMD too ([2d98dcc](2d98dcc))

### Performance Improvements

* coalesce contiguous captured mirror copies ([615d027](615d027))
* **nvn:** QueueSubmitCommands gives up its virtual core for the inline replay, as Present and AcquireTexture do ([ca50be6](ca50be6))
* **vk:** memory_collect_written takes the captured ranges once a submit, not a lock and a pool-list refresh per dirty page ([6769b74](6769b74))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants