Skip to content

Gracefully fail startup when only CPU Vulkan adapters are available#3743

Draft
ShivangSingh68 wants to merge 2 commits intoGraphiteEditor:masterfrom
ShivangSingh68:vulkan-fix
Draft

Gracefully fail startup when only CPU Vulkan adapters are available#3743
ShivangSingh68 wants to merge 2 commits intoGraphiteEditor:masterfrom
ShivangSingh68:vulkan-fix

Conversation

@ShivangSingh68
Copy link

Fixes #3560

This PR fixes a startup crash that occurs on systems without a Vulkan-capable GPU.

Previously, Graphite would select a CPU-based Vulkan adapter (such as llvmpipe) and continue initialization. This would later trigger a wgpu validation error, followed by a panic and segmentation fault, making it difficult for users to understand that their system does not meet the graphics requirements.

Summary of changes

  • Detect and reject CPU-based Vulkan adapters during context initialization.

  • Fail early when no supported GPU adapter is available, instead of continuing into an invalid wgpu state.

  • Preserve existing adapter-selection logic while adding a clear support check to prevent crashes.

Impact

  • Prevents crashes and undefined behavior on unsupported systems.

  • Makes Graphite’s GPU requirements clearer to users.

  • Improves robustness and error handling during graphics initialization.

Testing

  • Confirmed normal startup on systems with a supported GPU.

  • Confirmed graceful failure (no panic or segmentation fault) when only CPU Vulkan adapters are present.

  • Verified with cargo check and cargo clippy --all-targets --all-features.

@timon-schelling
Copy link
Member

Gracefully shutting down when we know that a adapter is not supported is generally a good idea, but this is to harsh. There are adapters reported as CPU that support all features we need (for example my development VM). An acceptable approach would be checking if the adapter supports all features we need.

@timon-schelling timon-schelling marked this pull request as draft February 13, 2026 11:05
@ShivangSingh68
Copy link
Author

@timon-schelling yes I agree on your thought and made the respective changes to the file, can you please review?

@Keavon
Copy link
Member

Keavon commented Feb 14, 2026

@ShivangSingh68 for your reference, you will need to mark the PR as Ready for Review if you want it to be not ignored by us on the review team.

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.

Crash on startup when only llvmpipe (CPU Vulkan) is available instead of graceful error

3 participants