graphics: make VK_KHR_fragment_shader_barycentric optional for GPUs without native support #1346
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!1346
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1346/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?
@Olavo635 on GitHub · 2026-10-10 00:20 UTC · original
Olavo635:fix/barycentric-gpu-support→main· +46 −30 · 3 files · 2 commits · closed without mergingProblem
vulkanWindow.cpprejects every device that lacksfragmentShaderBarycentricon non-Apple platforms (#if !defined(__APPLE__)), causing the emulator to exit immediately at startup on GPUs without native barycentrics (e.g. AMD Radeon RX 5700 XT / RDNA 1 on Windows: #1340). Meanwhile, macOS already runs without this requirement because MoltenVK does not expose it.Changes
VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAMEfrom mandatorydevice_extensionsand probe it among optional device extensions instead.VulkanFindPhysicalDevice, do not reject devices that lackfragmentShaderBarycentric.VulkanCreateDevice, probesupported_barycentric.fragmentShaderBarycentricand recordGraphicContext::supports_fragment_barycentric. If supported, enablefragmentShaderBarycentric = VK_TRUEin the device featurespNextchain; if unsupported, omit the struct, log a warning, and proceed.README.mdto note that modern GPUs supportingVK_KHR_fragment_shader_barycentric(such as AMD RDNA 2+) are recommended for full shader fidelity.Fixes #1340
@chatgpt-codex-connector[bot] on GitHub · 2026-10-10 00:22 UTC · original
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
ddba4a0ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@coderabbitai[bot] on GitHub · 2026-10-10 00:23 UTC · original · edited 2026-10-10 00:38 UTC
📝 Walkthrough
Walkthrough
Vulkan device selection no longer rejects devices that lack
VK_KHR_fragment_shader_barycentricor its feature. Device creation records support when both are available and enables the feature only in that case. TheGraphicContextstruct adds a support flag. The README recommends an AMD RDNA 2-or-newer GPU or a modern GPU with barycentric support for full shader fidelity.Priority: ➖ Normal
Change: Bug fix · Severity of issue fixed: Medium
Merge Risk: 🟡 Moderate · up to
8c74cGames using affected shaders may still exit on GPUs the change is intended to support. Provide a shader fallback before merging, or explicitly accept that limitation.
Pre-merge checks |
4 |
1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
#1340requires the emulator to start when a GPU does not reportfragmentShaderBarycentric, or to document the requirement.VulkanFindPhysicalDevicenow enumeratesavailable_extensionsbefo…#1340.vulkanWindow.cppmakes barycentric support optional,graphicContext.hrecords the capability, andREADME.mddocuments the hardware recommendation. These chan…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.@ -223,2 +226,2 @@features12.pNext = &fragment_barycentric;#endifconst bool has_barycentric_ext =HasExtension(available_extensions, VK_KHR_FRAGMENT_SHADER_BARYCENTRIC_EXTENSION_NAME);@coderabbitai[bot] on GitHub · 2026-10-10 00:23 UTC · original · edited 2026-10-10 00:34 UTC
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
Enumerate device extensions before checking barycentric support.
available_extensionsis not in scope at Line 220. Its later declaration is inside a separate block at Lines 323-343. This preventsvulkanWindow.cppfrom compiling. Enumerate extensions for the currentdevicebefore the feature query, then reuse that result for the required-extension check.✅ Addressed in commit
8c74ca5@coderabbitai[bot] on GitHub · 2026-10-10 00:23 UTC · original · reviewed
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
785ba77e-d309-4041-b82d-7c83dc62f5b1📥 Commits
Reviewing files that changed from the base of the PR and between
59183dbfa8andddba4a0f29.📒 Files selected for processing (3)
README.mdsrc/graphics/host_gpu/graphicContext.hsrc/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.
@coderabbitai[bot] on GitHub · 2026-10-10 00:38 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
de68e7ba-8662-4a9e-a7f6-fae4ffb062f3📥 Commits
Reviewing files that changed from the base of the PR and between
ddba4a0f29and8c74ca5e51.📒 Files selected for processing (1)
src/graphics/presentation/window/vulkanWindow.cpp🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
@theantipopau on GitHub · 2026-10-10 02:38 UTC · original
Evidence from a Windows fork build (AMD RX-series host, clang-cl): both commits (
ddba4a0f+8c74ca5e) apply cleanly on top of current fork main (ccfb55d9, which includes f3836bb8's upstream/main merge) as pickse4349251+c1800f87.fragmentShaderBarycentricoptional, cards without native barycentric support no longer fail device creation, so we can no longer attribute those local Vulkan-harness failures to missing perms without double-checking driver state.LGTM from the fork side; happy to smoke-test a release artifact on a barycentric-less GPU if you want one more data point upstream.
Pull request closed