AGC: agc_driver_mesh_barycentric_emulation fails since #9193 on devices with mesh shaders and VK_KHR_fragment_shader_barycentric #12121

Closed
opened 2026-10-27 21:57:11 +00:00 by maskym · 0 comments
maskym commented 2026-10-27 21:57:11 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by maskym on 2026-10-27T21:57:11Z.


What happens

Since #9193 (merge 6f7cb75291), agc_driver_mesh_barycentric_emulation fails on a device that has both mesh shaders and VK_KHR_fragment_shader_barycentric:

AGC graphics: the pixel shader did not emulate barycentrics

It passed on main 2ee8e9751a (before the merge) and fails on main e0cd1259a9 (after it) on the same machine, 3 of 3 runs each way (the failure is deterministic, 0.3-0.6 s per run).

Title, test or build step

agc_driver_mesh_barycentric_emulation, ctest --test-dir build -R '^agc_driver_mesh_barycentric_emulation$' -V. No title involved.

AnyPS5 commit

e0cd1259a9 (fails), 2ee8e9751a (passes)

System

Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84), Vulkan loader 1.4.357 from the NVIDIA driver, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh), Release, BUILD_TESTING=ON. Also fails with the Khronos validation layer loaded (nightly 1.4.366); no VUID- is reported by the test.

Steps to reproduce

Build main at or after 6f7cb75291 on a device that exposes mesh shaders and VK_KHR_fragment_shader_barycentric, then run the test above.

Log

1146: [src/VulkanDevice.cpp:2170 VulkanDevice] Vulkan device ready device=... queue=... family=0
1146: AGC graphics: the pixel shader did not emulate barycentrics

What was checked

  • core/libs/prx/libSceAgcDriver/tests/execution/MeshBarycentricEmulation.cpp line 116-117 takes device.Target() and clears fragmentShaderBarycentricEnabled to force the emulation path, then line 156 requires pixelResult.barycentricEmulation.active.
  • #9193 added a second flag, fragmentBarycentricBuiltins (VulkanDevice.cpp line 1344 sets it from fragmentShaderBarycentric; line 4048 copies it into the target), and HostInterpolationChecker::Lower now takes barycentricBuiltins: with it set, I/J are read from BaryCoordKHR and no emulation is needed, so active is false. The mesh test never clears that flag, so on a device with the extension the target says "feature disabled, built-ins available", which ShaderDeviceProfile.cpp line 74 treats as inconsistent for device-made targets.
  • PixelBarycentricEmulation.cpp line 89 sets target.fragmentBarycentricBuiltins explicitly for each case and was adapted in #9193; the mesh test was not. Adding target.fragmentBarycentricBuiltins = false; after line 117 of the mesh test makes it pass 3 of 3 runs on this device; whether the test or the recompiler (treating a disabled feature as no built-ins) should change is for the #9193 authors to decide.
  • #9193's own Tested table lists agc_driver_mesh_barycentric_emulation as skipped on both of its platforms: MoltenVK has no VK_EXT_mesh_shader, and the test skips llvmpipe's mesh compiler (MeshBarycentricEmulation.cpp lines 277-282). CI runs the GPU tests on lavapipe only, so the test had not run on any device since the change until this one (Vulkan features ... mesh=1 in its log).

AI-assisted: yes (Claude Code); the runs, the numbers and the line references above were checked on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:6068430293 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/12121). Originally posted by [maskym](https://github.com/maskym) on 2026-10-27T21:57:11Z. --- ### What happens Since #9193 (merge `6f7cb75291`), `agc_driver_mesh_barycentric_emulation` fails on a device that has both mesh shaders and `VK_KHR_fragment_shader_barycentric`: ``` AGC graphics: the pixel shader did not emulate barycentrics ``` It passed on `main` `2ee8e9751a` (before the merge) and fails on `main` `e0cd1259a9` (after it) on the same machine, 3 of 3 runs each way (the failure is deterministic, 0.3-0.6 s per run). ### Title, test or build step `agc_driver_mesh_barycentric_emulation`, `ctest --test-dir build -R '^agc_driver_mesh_barycentric_emulation$' -V`. No title involved. ### AnyPS5 commit `e0cd1259a9` (fails), `2ee8e9751a` (passes) ### System Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84), Vulkan loader 1.4.357 from the NVIDIA driver, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh), Release, `BUILD_TESTING=ON`. Also fails with the Khronos validation layer loaded (nightly 1.4.366); no `VUID-` is reported by the test. ### Steps to reproduce Build `main` at or after `6f7cb75291` on a device that exposes mesh shaders and `VK_KHR_fragment_shader_barycentric`, then run the test above. ### Log ``` 1146: [src/VulkanDevice.cpp:2170 VulkanDevice] Vulkan device ready device=... queue=... family=0 1146: AGC graphics: the pixel shader did not emulate barycentrics ``` ### What was checked - `core/libs/prx/libSceAgcDriver/tests/execution/MeshBarycentricEmulation.cpp` line 116-117 takes `device.Target()` and clears `fragmentShaderBarycentricEnabled` to force the emulation path, then line 156 requires `pixelResult.barycentricEmulation.active`. - #9193 added a second flag, `fragmentBarycentricBuiltins` (`VulkanDevice.cpp` line 1344 sets it from `fragmentShaderBarycentric`; line 4048 copies it into the target), and `HostInterpolationChecker::Lower` now takes `barycentricBuiltins`: with it set, I/J are read from `BaryCoordKHR` and no emulation is needed, so `active` is false. The mesh test never clears that flag, so on a device with the extension the target says "feature disabled, built-ins available", which `ShaderDeviceProfile.cpp` line 74 treats as inconsistent for device-made targets. - `PixelBarycentricEmulation.cpp` line 89 sets `target.fragmentBarycentricBuiltins` explicitly for each case and was adapted in #9193; the mesh test was not. Adding `target.fragmentBarycentricBuiltins = false;` after line 117 of the mesh test makes it pass 3 of 3 runs on this device; whether the test or the recompiler (treating a disabled feature as no built-ins) should change is for the #9193 authors to decide. - #9193's own Tested table lists `agc_driver_mesh_barycentric_emulation` as skipped on both of its platforms: MoltenVK has no `VK_EXT_mesh_shader`, and the test skips llvmpipe's mesh compiler (`MeshBarycentricEmulation.cpp` lines 277-282). CI runs the GPU tests on lavapipe only, so the test had not run on any device since the change until this one (`Vulkan features ... mesh=1` in its log). AI-assisted: yes (Claude Code); the runs, the numbers and the line references above were checked on this machine.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#12121
No description provided.