test(agc): disable barycentric built-ins in the mesh barycentric emulation test #12062

Merged
Lancito01 merged 1 commit from upstream-pr/12062 into main 2026-10-28 09:45:25 +00:00
Lancito01 commented 2026-10-27 18:16:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Lancito01 on 2026-10-27T18:16:33Z.


What

agc_driver_mesh_barycentric_emulation fails on every run on a device with VK_KHR_fragment_shader_barycentric since #9193:

AGC graphics: the pixel shader did not emulate barycentrics

#9193 added SpirvTarget::fragmentBarycentricBuiltins and cleared it in PixelBarycentricEmulation's Draw, but MeshBarycentricEmulation's Draw still copies it from the device target and only clears fragmentShaderBarycentricEnabled. With the built-ins left on, HostInterpolationChecker::Lower reads the I/J VGPRs from BaryCoordKHR, so barycentricEmulation.active stays false and the test stops at its first Require. This sets target.fragmentBarycentricBuiltins = false there, as #9193 did for the pixel test. Test-only change.

Tested

Windows 10 22H2 (19045), WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, all AGC execution tests built. ctest --test-dir build -R "^agc_driver_(mesh|pixel)_barycentric_emulation$" -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, 5 fresh-process runs each:

tree agc_driver_mesh_barycentric_emulation agc_driver_pixel_barycentric_emulation
main 228cd64b538 fails 5/5 (the pixel shader did not emulate barycentrics) passes 5/5
this change on 228cd64b538 passes 5/5 (mesh barycentric emulation tests passed: 932 perspective and 932 linear I/J pixels, 932 raw vertex value pixels) passes 5/5
this PR, rebased on main 14332cd8d0 passes 3/3 passes 3/3

VK_LOADER_DEBUG=layer shows VK_LAYER_KHRONOS_validation inserted (Khronos nightly Windows build); no log contains VUID- or was not found but was requested by env var VK_INSTANCE_LAYERS. tools/check_conventions.py --base origin/main passes and tools/pr_overlap.py reports no overlap.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: NVIDIA GeForce RTX 3080 (10de:2216, Ampere), driver 610.62, Windows 10 22H2 (19045)
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5038943002 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12062). Originally posted by [Lancito01](https://github.com/Lancito01) on 2026-10-27T18:16:33Z. --- ### What `agc_driver_mesh_barycentric_emulation` fails on every run on a device with `VK_KHR_fragment_shader_barycentric` since #9193: ``` AGC graphics: the pixel shader did not emulate barycentrics ``` #9193 added `SpirvTarget::fragmentBarycentricBuiltins` and cleared it in `PixelBarycentricEmulation`'s `Draw`, but `MeshBarycentricEmulation`'s `Draw` still copies it from the device target and only clears `fragmentShaderBarycentricEnabled`. With the built-ins left on, `HostInterpolationChecker::Lower` reads the I/J VGPRs from `BaryCoordKHR`, so `barycentricEmulation.active` stays false and the test stops at its first `Require`. This sets `target.fragmentBarycentricBuiltins = false` there, as #9193 did for the pixel test. Test-only change. ### Tested Windows 10 22H2 (19045), WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, all AGC execution tests built. `ctest --test-dir build -R "^agc_driver_(mesh|pixel)_barycentric_emulation$" -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, 5 fresh-process runs each: | tree | `agc_driver_mesh_barycentric_emulation` | `agc_driver_pixel_barycentric_emulation` | |---|---|---| | `main` `228cd64b538` | fails 5/5 (`the pixel shader did not emulate barycentrics`) | passes 5/5 | | this change on `228cd64b538` | passes 5/5 (`mesh barycentric emulation tests passed: 932 perspective and 932 linear I/J pixels, 932 raw vertex value pixels`) | passes 5/5 | | this PR, rebased on `main` `14332cd8d0` | passes 3/3 | passes 3/3 | `VK_LOADER_DEBUG=layer` shows `VK_LAYER_KHRONOS_validation` inserted (Khronos nightly Windows build); no log contains `VUID-` or `was not found but was requested by env var VK_INSTANCE_LAYERS`. `tools/check_conventions.py --base origin/main` passes and `tools/pr_overlap.py` reports no overlap. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: NVIDIA GeForce RTX 3080 (`10de:2216`, Ampere), driver 610.62, Windows 10 22H2 (19045) - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
copilot-pull-request-reviewer[bot] commented 2026-10-27 18:16:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by copilot-pull-request-reviewer[bot] on 2026-10-27T18:16:45Z.

Review: COMMENTED


Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5672180725 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12062#pullrequestreview-5672180725). Originally posted by [copilot-pull-request-reviewer[bot]](https://github.com/apps/copilot-pull-request-reviewer) on 2026-10-27T18:16:45Z. **Review:** COMMENTED --- Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
MarcZX10 commented 2026-10-27 18:35:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-27T18:35:36Z.

Review: APPROVED


Reviewed exact head 552d38908301cdbf6cb8a41ce7256de121f65a23. The one-line test setup change clears fragmentBarycentricBuiltins alongside fragmentShaderBarycentricEnabled, matching the existing pixel barycentric emulation setup and the described mesh-test failure. The PR includes repeated main-versus-change runs with validation enabled on an RTX 3080; this host has no compatible Vulkan device for independently reproducing those GPU results.\n\nValidation here: tools/check_conventions.py --base refs/remotes/upstream/main passed and git diff --check passed. No local GPU runtime result is claimed.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5672418007 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/12062#pullrequestreview-5672418007). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-27T18:35:36Z. **Review:** APPROVED --- Reviewed exact head `552d38908301cdbf6cb8a41ce7256de121f65a23`. The one-line test setup change clears `fragmentBarycentricBuiltins` alongside `fragmentShaderBarycentricEnabled`, matching the existing pixel barycentric emulation setup and the described mesh-test failure. The PR includes repeated main-versus-change runs with validation enabled on an RTX 3080; this host has no compatible Vulkan device for independently reproducing those GPU results.\n\nValidation here: `tools/check_conventions.py --base refs/remotes/upstream/main` passed and `git diff --check` passed. No local GPU runtime result is claimed.
Sign in to join this conversation.
No reviewers
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!12062
No description provided.