Skip to content

rendervulkan: do not detach, and stop the pipeline compilation thread at exit#2234

Open
oSoMoN wants to merge 1 commit into
ValveSoftware:masterfrom
oSoMoN:rendervulkan-stop-pipeline-thread
Open

rendervulkan: do not detach, and stop the pipeline compilation thread at exit#2234
oSoMoN wants to merge 1 commit into
ValveSoftware:masterfrom
oSoMoN:rendervulkan-stop-pipeline-thread

Conversation

@oSoMoN

@oSoMoN oSoMoN commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

If the selected backend fails to initialize, gamescope exits early. If main() returns while the pipeline thread is busy compiling shaders, it might try to emplace a pipeline into the map of a deleted object (the static g_device), causing a crash.

This change breaks out of the shader compilation loop at exit, thus saving unnecessary work, and ensuring gamescope exits cleanly.

… at exit

If the selected backend fails to initialize, gamescope exits early.
If main() returns while the pipeline thread is busy compiling shaders,
it might try to emplace a pipeline into the map of a deleted object
(the static g_device), causing a crash.

This change breaks out of the shader compilation loop at exit,
thus saving unnecessary work, and ensuring gamescope exits cleanly.
@nfraprado

Copy link
Copy Markdown

I've tested this locally and indeed it prevents gamescope from crashing in a headless setup.

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