fix(agc): do not use fragment barycentric on MoltenVK #1653
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1653"
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?
Imported from boykopovar/AnyPS5. Originally posted by morten-holm on 2026-10-08T15:44:52Z.
What
MoltenVK reports
VK_KHR_fragment_shader_barycentric, but its SPIR-V to MSL step rejects thePerVertexKHRdecoration that the barycentric path of the translator uses ("SPIR-V to MSL conversion error: PerVertexKHR decoration is not supported in MSL"). Every pixel shader on that path then fails withVK_ERROR_INITIALIZATION_FAILED("Fragment shader function could not be compiled into pipeline"), and the draw is skipped.The feature is now treated as unavailable when the driver is MoltenVK (
VK_KHR_driver_properties,VK_DRIVER_ID_MOLTENVK), so the existing no-barycentric path is used. The rule isFragmentShaderBarycentricUsable, a small header likeSubgroupClock, so it has a unit test that needs no GPU.Related: #1547 improves the no-barycentric path that MoltenVK now uses. On
maintoday that path does not write the I/J VGPRs, so a shader that reads them for anything other than a plainv_interp_p1/p2pair gets 0. Both PRs changeVulkanDevice.cppnear the same lines; whichever lands second needs a small rebase.Tested
agc_fragment_barycentric(7 cases: MoltenVK reported or not, RADV, NVIDIA and AMD proprietary, Intel): passes, and the MoltenVK case fails when the rule is removed.VulkanDevice.cppcompiles on this branch.maindoes not build libc on macOS yet, so I could not run the full suite here.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T19:43:42Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
5333a205, merged ontomain8b393b6ein one build with 31 other PRs that had no Windows run.agc_fragment_barycentricand the rest still pass.guest_offline_imports, broken by #2359 (reported there).No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T04:18:03Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/libs/prx/libSceAgcDriver/Execution/include/FragmentBarycentric.hppcore/libs/prx/libSceAgcDriver/tests/FragmentBarycentric.cpp