vulkan: start without fragmentShaderBarycentric on GPUs that lack it #1590
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1590
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1590/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@theantipopau on GitHub · 2026-10-17 09:27 UTC · original
theantipopau:optional-barycentric-startup→main· +23 −6 · 1 files · 2 commits · merged 2026-10-17 10:55 UTCUnblocks startup on Pascal (GTX 10xx), RDNA 1 and older drivers: #1432, #1416, #762.
Device selection rejected these GPUs with 'Could not find suitable device: ... fragmentShaderBarycentric is not supported'. But the SPIR-V backend (
spirvEmitterModule.cpp) only emitsCapabilityFragmentBarycentricKHRfor pixel shaders with per-vertex/barycentric inputs, so most games never need it.This makes the extension and feature optional on all platforms: warn at selection and at device creation, append the extension post-selection only when available, and chain
VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHRonly when the device reports support. Shaders that need custom barycentrics fail at pipeline creation instead of blocking startup for every game.Changed file:
src/graphics/presentation/window/vulkanWindow.cpponly.Verified:
git diff --checkclean. Full local build/ctest could not run here (CMake configure fails on the FFmpeg prebuilt download), so CI is the verification path; affected users on GTX 10xx / RX 5700 XT are the real validation.@coderabbitai[bot] on GitHub · 2026-10-17 09:30 UTC · original · edited 2026-10-17 10:33 UTC
📝 Walkthrough
Vulkan physical-device selection no longer rejects devices that lack fragment shader barycentrics. The barycentric extension is optional. Device creation queries and enables the feature only when the extension and feature are supported.
Suggested reviewers:
nmzikPriority: ➖ Normal
Change: Bug fix
Merge Risk: 🟡 Moderate · up to
4cdf5On macOS, the barycentric extension is now enabled but its feature is not, so games whose shaders use barycentric inputs may fail at pipeline creation. Enable the feature in the Apple device-creation path before merging.
Pre-merge checks:
4 ·
1
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-10-17 09:30 UTC · original · edited 2026-10-17 10:30 UTC
On
src/graphics/presentation/window/vulkanWindow.cppline 275 (outdated):🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Keep the barycentric check inside the non-Apple branch.
On macOS,
fragment_barycentricis not declared: its declaration is inside#elseat Lines 224-227. The new read at Line 275 is outside that branch, so this file fails to compile for the supported macOS build. Guard the check with#if !defined(__APPLE__), or use a value declared on both paths.✅ Addressed in commit
4cdf516@coderabbitai[bot] on GitHub · 2026-10-17 09:30 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
3cecc110-dfb7-4c95-8fc8-9f2f906d4de3📥 Commits
Reviewing files that changed from the base of the PR and between
c2173801d4and09d3139a5a.📒 Files selected for processing: 1
src/graphics/presentation/window/vulkanWindow.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
@coderabbitai[bot] on GitHub · 2026-10-17 10:33 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
22c91ea1-3979-4fd1-a367-3c2452a85117📥 Commits
Reviewing files that changed from the base of the PR and between
09d3139a5aand4cdf5160c0.📒 Files selected for processing: 1
src/graphics/presentation/window/vulkanWindow.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@theantipopau on GitHub · 2026-10-17 12:01 UTC · original
Addressed in d4c13487: the Apple device-creation path now chains fragmentShaderBarycentric conditionally like other platforms, so Macs that do expose VK_KHR_fragment_shader_barycentric get the feature enabled instead of silently dropping it.