fix(shader): hand a geometry program strip and fan triangles in the order of its provoking vertex mode #7893

Merged
thuanquang merged 2 commits from upstream-pr/7893 into main 2026-11-02 12:25:32 +00:00
thuanquang commented 2026-10-19 12:44:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-19T12:44:48Z.


What

Title that needs it: MediEvil: Resurrection (PPSA07550) stops on main at its main menu's first draw with AGC graphics: last provoking vertex is unsupported for triangle fans assembled for a geometry program, the refusal this PR removes; with this PR it reaches gameplay in the first level (title test by beardsciences, NVIDIA RTX 3060 Ti).

Follow-up to #7883, built on it. #7883 measured on an RX 6700 XT (probe source and output) the order in which AMD's geometry engine hands a geometry program its input triangles:

Input First provoking vertex Last provoking vertex
strip, odd triangle i (i, i+2, i+1) (i+1, i, i+2)
fan, triangle i (i+1, i+2, 0) (0, i+1, i+2)

The translator's mesh entry gives odd strip triangles as (i+1, i, i+2) in both modes, so in first mode a geometry program's flat values for odd strip triangles come from v[i+1] instead of v[i]. It also gives fans as (i+1, i+2, 0) in both modes, which is why #7883 kept refusing last-mode fans.

This change makes the order follow the mode (mesh.provokingVertex, which is 0 in first mode and the output's last slot in last mode):

  • first-mode strips get odd triangles as (i, i+2, i+1);
  • last-mode fans get (0, i+1, i+2);
  • last-mode strips and first-mode fans are unchanged.

The refusal of last-mode fans assembled for a geometry program goes away. For strips and for fans, the two orders are rotations of each other, so each triangle keeps its winding and culling does not change. Restart handling and the parity reset are untouched.

mesh.provokingVertex is already part of every key that holds a translated module (pipeline, draw and register keys, pipeline journal and request serializer), and translated modules are keyed by the recompiler's source hash. So no key or format version changes.

The console's order is not measured, and the debt entry says so. The entry also gets shorter, since this change closes the strip and fan part of the gap: 1449 characters against 1480 on main. Both are over the 1000 at which check_conventions warns, because #6741 added a sentence on drawing a last provoking vertex that nothing observes without the extension.

Tested

Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON, ANYPS5_NO_SHADER_CACHE=1; driver 32.0.21045.16010 on this head, 32.0.21045.5002 on the earlier heads below.

Merged main bb04a4f1ea (2026-10-30) into the branch (head cf711c7281) for a conflict in docs/dev/debt/libSceAgcDriver.md: #12706 reworded the entry right after this PR's PROVOKING_VTX_LAST entry (triangle strips through the barycentric tessellation stages, now with primitive restart). Both edits are kept as they are; the code files merged without conflicts, and git diff bb04a4f1ea cf711c7281 is the same five files as before. On this head the seven tests listed below pass 3 of 3 with ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, AMD Windows driver 32.0.21045.16010. With the Khronos validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ctest -V), on main bb04a4f1ea and on this head: seven of seven pass on both, the loader inserts the layer six times on each, neither log has a VUID- line, a Validation Error or was not found but was requested, and both have the same ten WARNING- lines.

Before that: rebased again onto main 2ee8e9751a (2026-10-28) for a conflict in docs/dev/debt/libSceAgcDriver.md: #11364 added the 11_11_10 float CB resolve entry right before this PR's PROVOKING_VTX_LAST entry. Both entries are kept as they are; the code files merged without conflicts, and git diff origin/main HEAD is the same five files as before. On this head (76bea988bf), one commit on main, the seven tests listed below (agc_driver_graphics, agc_driver_unobserved_provoking_vertex, agc_driver_mesh, agc_driver_mesh_provoking_vertex, agc_driver_mesh_provoking_layer, agc_driver_provoking_vertex, agc_driver_pixel_barycentric_emulation) pass 3 of 3 with ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1, AMD Windows driver 32.0.21045.16010. With the Khronos validation layer (VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_LOADER_DEBUG=layer, ctest -V) the same seven pass, the loader inserts the layer six times (the two agc_driver_graphics tests create no instance), and no log has a VUID- line or was not found but was requested.

Earlier: rebased onto main 65ac1d3b50 for the conflict with #6741 in the PROVOKING_VTX_LAST debt entry, which now keeps #6741's sentence on drawing a last provoking vertex that nothing observes without VK_EXT_provoking_vertex as main has it and leaves geometry-program fans out of what throws with the extension. On that head (c790cd09fc), still one commit on main:

  • agc_driver_graphics, agc_driver_unobserved_provoking_vertex (#6741's, which also runs ProvokingVertexTests, where this PR validates last-mode fans), agc_driver_mesh, agc_driver_mesh_provoking_vertex, agc_driver_mesh_provoking_layer, agc_driver_provoking_vertex and agc_driver_pixel_barycentric_emulation pass 3 of 3.
  • Khronos validation layer (vulkan-sdk-1.4.363.0) A (main 65ac1d3b50) and B (this head), the same seven tests with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1 and ctest -V: seven of seven pass on both, with no VUID- line and no was not found but was requested. With VK_LOADER_DEBUG=layer, the layer is inserted six times on each (the two agc_driver_graphics tests create no instance), and its only output on both is the same ten WARNING-VkImageSubresourceRange-layerCount-compatibility lines from agc_driver_mesh_provoking_layer.
  • python tools/check_conventions.py --base origin/main: no errors, and one debt-length warning for the 1449-character entry.

The results below were measured on the previous head 40bd67bef.

  • agc_driver_mesh_provoking_vertex:
    • The strip case now also checks that in first mode, triangle 1 takes vertex 1's colour.
    • A new fan case (indices {1, 0, 2, 3}) checks that in last mode, triangle 0 takes vertex 2's colour and triangle 1 vertex 3's, and in first mode, vertex 0's and vertex 2's.
  • agc_driver_graphics: last-mode fans through a geometry program now validate.
  • Red, with the translator as on #7883: triangle strip, first provoking vertex, triangle 1 (the color of vertex 1): pixel (26, 48) channel 1 is 0, expected 255.
  • With the strip fixed but the fan order unchanged: triangle fan, last provoking vertex, triangle 0 (the color of vertex 2): pixel (12, 32) channel 1 is 255, expected 0.
  • With the fan refusal put back, both tests fail with last provoking vertex is unsupported for triangle fans assembled for a geometry program.
  • Green: agc_driver_graphics, agc_driver_mesh, agc_driver_mesh_provoking_layer, agc_driver_mesh_provoking_vertex and agc_driver_provoking_vertex pass 3 of 3.
  • Khronos validation layer (vulkan-sdk-1.4.363.0), VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, ANYPS5_NO_SHADER_CACHE=1, ANYPS5_REQUIRE_VULKAN=1, ctest -V, same RX 6700 XT, on main 38de0a470 (other test files modified locally; none of these tests' sources), on #7883 59cabc57b and on #7893 606321886: agc_driver_graphics, agc_driver_mesh, agc_driver_mesh_provoking_vertex, agc_driver_mesh_provoking_layer and agc_driver_provoking_vertex pass on all three. No log reports was not found but was requested or any VUID- error. The layer's only output is the same WARNING-VkImageSubresourceRange-layerCount-compatibility warning in agc_driver_mesh_provoking_layer on all three trees.
  • Other GPUs, from reviewers:
    • AMD RX 9070 XT and Intel UHD 770 on Windows (@savvaniss): with this branch's tests on main as the red side, the last-provoking-vertex geometry draws fail on main and pass here. The UHD 770 has no mesh shaders, so the mesh test skips there.
    • AMD RX 7900 XT on Linux, RADV (@DavidAmsellem): full suite 1636 of 1638, the same two failures as on main.
    • NVIDIA RTX 5070 Ti (621.01) and an AMD RDNA2 iGPU on the AMD Windows driver, Windows 11 26300, this head merged onto main 504ea3b53b2 (wachi35676): 89 of 91 provoking-vertex, mesh, geometry, NGG, tessellation and pixel/subgroup tests pass on both, agc_driver_graphics included; the two failures (agc_host_import_cut_lifetime, #10746, and agc_driver_depth_plane_partial_store, #10664) also fail without this change. With main's InstructionTranslator.cpp and Pipeline.cpp, the strip and fan tests fail with the messages above on both GPUs.
  • Title, from a reviewer (beardsciences): MediEvil: Resurrection (PPSA07550, content version 01.000.003; the PSP game UCUS98620 in the PS5's PSP emulator), Windows 11 26200, Ryzen 5 5600X, NVIDIA GeForce RTX 3060 Ti (621.01). Arm A main 66e1f7f993, arm B the same main with this head cf711c7281 merged, only libSceAgcDriver.prx and libSceVideoOut.prx swapped, ANYPS5_NO_SHADER_CACHE=1, runs A, B, A, B of 540 s with the same scripted pad input: both main runs stop at the menu's first draw (log 210 s and 158 s) with AGC graphics: last provoking vertex is unsupported for triangle fans assembled for a geometry program, exit 0xc0000409; both runs with this PR have no stop: the menu, the opening movie, and the first level (Dan's Crypt) loads at 473 s and 353 s. A further interactive run reached gameplay there with no errors in the log. agc_driver_mesh_provoking_vertex passes 2 of 2 with and 2 of 2 without VK_LAYER_KHRONOS_validation on that machine.
  • Not tested: the console.

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: #7883 (merged)
  • Fixes: none
  • Unblocks: PPSA07550 (MediEvil: Resurrection; no bring-up discussion yet, the title test is linked under Tested)
  • GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.16010 (32.0.21045.5002 on the earlier heads), Windows 11 26200
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4921134450 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7893). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-19T12:44:48Z. --- ### What **Title that needs it:** MediEvil: Resurrection (PPSA07550) stops on `main` at its main menu's first draw with `AGC graphics: last provoking vertex is unsupported for triangle fans assembled for a geometry program`, the refusal this PR removes; with this PR it reaches gameplay in the first level ([title test by beardsciences](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6567590038), NVIDIA RTX 3060 Ti). Follow-up to #7883, built on it. #7883 measured on an RX 6700 XT ([probe source and output](https://gist.github.com/thuanquang/c69953e8d1693eab19ce88a781da4e5c)) the order in which AMD's geometry engine hands a geometry program its input triangles: | Input | First provoking vertex | Last provoking vertex | |---|---|---| | strip, odd triangle i | (i, i+2, i+1) | (i+1, i, i+2) | | fan, triangle i | (i+1, i+2, 0) | (0, i+1, i+2) | The translator's mesh entry gives odd strip triangles as (i+1, i, i+2) in both modes, so in first mode a geometry program's flat values for odd strip triangles come from v[i+1] instead of v[i]. It also gives fans as (i+1, i+2, 0) in both modes, which is why #7883 kept refusing last-mode fans. This change makes the order follow the mode (`mesh.provokingVertex`, which is 0 in first mode and the output's last slot in last mode): - first-mode strips get odd triangles as (i, i+2, i+1); - last-mode fans get (0, i+1, i+2); - last-mode strips and first-mode fans are unchanged. The refusal of last-mode fans assembled for a geometry program goes away. For strips and for fans, the two orders are rotations of each other, so each triangle keeps its winding and culling does not change. Restart handling and the parity reset are untouched. `mesh.provokingVertex` is already part of every key that holds a translated module (pipeline, draw and register keys, pipeline journal and request serializer), and translated modules are keyed by the recompiler's source hash. So no key or format version changes. The console's order is not measured, and the debt entry says so. The entry also gets shorter, since this change closes the strip and fan part of the gap: 1449 characters against 1480 on `main`. Both are over the 1000 at which `check_conventions` warns, because #6741 added a sentence on drawing a last provoking vertex that nothing observes without the extension. ### Tested Windows 11 26200, AMD Radeon RX 6700 XT (gfx1031), WinLibs GCC 15.2.0 r7, Release, `BUILD_TESTING=ON`, `ANYPS5_NO_SHADER_CACHE=1`; driver 32.0.21045.16010 on this head, 32.0.21045.5002 on the earlier heads below. Merged `main` `bb04a4f1ea` (2026-10-30) into the branch (head `cf711c7281`) for a conflict in `docs/dev/debt/libSceAgcDriver.md`: #12706 reworded the entry right after this PR's `PROVOKING_VTX_LAST` entry (triangle strips through the barycentric tessellation stages, now with primitive restart). Both edits are kept as they are; the code files merged without conflicts, and `git diff bb04a4f1ea cf711c7281` is the same five files as before. On this head the seven tests listed below pass 3 of 3 with `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`, AMD Windows driver 32.0.21045.16010. With the Khronos validation layer (`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, `ctest -V`), on `main` `bb04a4f1ea` and on this head: seven of seven pass on both, the loader inserts the layer six times on each, neither log has a `VUID-` line, a `Validation Error` or `was not found but was requested`, and both have the same ten `WARNING-` lines. Before that: rebased again onto `main` `2ee8e9751a` (2026-10-28) for a conflict in `docs/dev/debt/libSceAgcDriver.md`: #11364 added the 11_11_10 float CB resolve entry right before this PR's `PROVOKING_VTX_LAST` entry. Both entries are kept as they are; the code files merged without conflicts, and `git diff origin/main HEAD` is the same five files as before. On this head (`76bea988bf`), one commit on `main`, the seven tests listed below (`agc_driver_graphics`, `agc_driver_unobserved_provoking_vertex`, `agc_driver_mesh`, `agc_driver_mesh_provoking_vertex`, `agc_driver_mesh_provoking_layer`, `agc_driver_provoking_vertex`, `agc_driver_pixel_barycentric_emulation`) pass 3 of 3 with `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`, AMD Windows driver 32.0.21045.16010. With the Khronos validation layer (`VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_LOADER_DEBUG=layer`, `ctest -V`) the same seven pass, the loader inserts the layer six times (the two `agc_driver_graphics` tests create no instance), and no log has a `VUID-` line or `was not found but was requested`. Earlier: rebased onto `main` `65ac1d3b50` for the conflict with #6741 in the `PROVOKING_VTX_LAST` debt entry, which now keeps #6741's sentence on drawing a last provoking vertex that nothing observes without `VK_EXT_provoking_vertex` as `main` has it and leaves geometry-program fans out of what throws with the extension. On that head (`c790cd09fc`), still one commit on `main`: - `agc_driver_graphics`, `agc_driver_unobserved_provoking_vertex` (#6741's, which also runs `ProvokingVertexTests`, where this PR validates last-mode fans), `agc_driver_mesh`, `agc_driver_mesh_provoking_vertex`, `agc_driver_mesh_provoking_layer`, `agc_driver_provoking_vertex` and `agc_driver_pixel_barycentric_emulation` pass 3 of 3. - Khronos validation layer (vulkan-sdk-1.4.363.0) A (`main` `65ac1d3b50`) and B (this head), the same seven tests with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1` and `ctest -V`: seven of seven pass on both, with no `VUID-` line and no `was not found but was requested`. With `VK_LOADER_DEBUG=layer`, the layer is inserted six times on each (the two `agc_driver_graphics` tests create no instance), and its only output on both is the same ten `WARNING-VkImageSubresourceRange-layerCount-compatibility` lines from `agc_driver_mesh_provoking_layer`. - `python tools/check_conventions.py --base origin/main`: no errors, and one `debt-length` warning for the 1449-character entry. The results below were measured on the previous head `40bd67bef`. - `agc_driver_mesh_provoking_vertex`: - The strip case now also checks that in first mode, triangle 1 takes vertex 1's colour. - A new fan case (indices {1, 0, 2, 3}) checks that in last mode, triangle 0 takes vertex 2's colour and triangle 1 vertex 3's, and in first mode, vertex 0's and vertex 2's. - `agc_driver_graphics`: last-mode fans through a geometry program now validate. - Red, with the translator as on #7883: `triangle strip, first provoking vertex, triangle 1 (the color of vertex 1): pixel (26, 48) channel 1 is 0, expected 255`. - With the strip fixed but the fan order unchanged: `triangle fan, last provoking vertex, triangle 0 (the color of vertex 2): pixel (12, 32) channel 1 is 255, expected 0`. - With the fan refusal put back, both tests fail with `last provoking vertex is unsupported for triangle fans assembled for a geometry program`. - Green: `agc_driver_graphics`, `agc_driver_mesh`, `agc_driver_mesh_provoking_layer`, `agc_driver_mesh_provoking_vertex` and `agc_driver_provoking_vertex` pass 3 of 3. - Khronos validation layer (vulkan-sdk-1.4.363.0), `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `ANYPS5_NO_SHADER_CACHE=1`, `ANYPS5_REQUIRE_VULKAN=1`, `ctest -V`, same RX 6700 XT, on `main` `38de0a470` (other test files modified locally; none of these tests' sources), on #7883 `59cabc57b` and on #7893 `606321886`: `agc_driver_graphics`, `agc_driver_mesh`, `agc_driver_mesh_provoking_vertex`, `agc_driver_mesh_provoking_layer` and `agc_driver_provoking_vertex` pass on all three. No log reports `was not found but was requested` or any `VUID-` error. The layer's only output is the same `WARNING-VkImageSubresourceRange-layerCount-compatibility` warning in `agc_driver_mesh_provoking_layer` on all three trees. - Other GPUs, from reviewers: - AMD RX 9070 XT and Intel UHD 770 on Windows ([@savvaniss](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6269111815)): with this branch's tests on `main` as the red side, the last-provoking-vertex geometry draws fail on `main` and pass here. The UHD 770 has no mesh shaders, so the mesh test skips there. - AMD RX 7900 XT on Linux, RADV ([@DavidAmsellem](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6271203528)): full suite 1636 of 1638, the same two failures as on `main`. - NVIDIA RTX 5070 Ti (621.01) and an AMD RDNA2 iGPU on the AMD Windows driver, Windows 11 26300, this head merged onto `main` `504ea3b53b2` ([wachi35676](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6407142897)): 89 of 91 provoking-vertex, mesh, geometry, NGG, tessellation and pixel/subgroup tests pass on both, `agc_driver_graphics` included; the two failures (`agc_host_import_cut_lifetime`, #10746, and `agc_driver_depth_plane_partial_store`, #10664) also fail without this change. With `main`'s `InstructionTranslator.cpp` and `Pipeline.cpp`, the strip and fan tests fail with the messages above on both GPUs. - Title, from a reviewer ([beardsciences](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6567590038)): MediEvil: Resurrection (PPSA07550, content version 01.000.003; the PSP game UCUS98620 in the PS5's PSP emulator), Windows 11 26200, Ryzen 5 5600X, NVIDIA GeForce RTX 3060 Ti (621.01). Arm A `main` 66e1f7f993, arm B the same `main` with this head cf711c7281 merged, only `libSceAgcDriver.prx` and `libSceVideoOut.prx` swapped, `ANYPS5_NO_SHADER_CACHE=1`, runs A, B, A, B of 540 s with the same scripted pad input: both `main` runs stop at the menu's first draw (log 210 s and 158 s) with `AGC graphics: last provoking vertex is unsupported for triangle fans assembled for a geometry program`, exit `0xc0000409`; both runs with this PR have no stop: the menu, the opening movie, and the first level (Dan's Crypt) loads at 473 s and 353 s. A further interactive run reached gameplay there with no errors in the log. `agc_driver_mesh_provoking_vertex` passes 2 of 2 with and 2 of 2 without `VK_LAYER_KHRONOS_validation` on that machine. - Not tested: the console. ### Checklist - [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: #7883 (merged) - [x] Fixes: none - [x] Unblocks: PPSA07550 (MediEvil: Resurrection; no bring-up discussion yet, the title test is linked under Tested) - [x] GPUs tested: AMD Radeon RX 6700 XT (gfx1031), driver 32.0.21045.16010 (32.0.21045.5002 on the earlier heads), Windows 11 26200 - [x] AI-assisted: yes (Claude Code) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
savvaniss commented 2026-10-19 14:04:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-19T14:04:26Z.


Intel and AMD Windows data: with this PR's test changes, the last-provoking-vertex geometry draws fail on main and pass with the PR, on an AMD RX 9070 XT and an Intel UHD 770.

Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, ANYPS5_NO_SHADER_CACHE=1, serial CTest. Intel UHD Graphics 770 (8086:a780), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550), driver 32.0.31041.1004, with VkCache emptied first. This head 606321886 (which carries #7883) merged into main 85029a00f. "Without" means only this branch's diff to tests/Graphics.cpp and tests/execution/MeshProvokingVertex.cpp, applied to main 85029a00f.

Tests, ×3 UHD 770 RX 9070 XT
This head: the 30 tests built from those files 29 pass; agc_driver_mesh_provoking_vertex skips (no mesh shaders on this GPU) 30 of 30 pass
Without agc_driver_graphics fails: last provoking vertex is unsupported for triangle strips or fans assembled for a geometry program; the mesh test skips agc_driver_graphics fails the same way, and agc_driver_mesh_provoking_vertex aborts with that error

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6269111815 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6269111815). Originally posted by [savvaniss](https://github.com/savvaniss) on 2026-10-19T14:04:26Z. --- Intel and AMD Windows data: with this PR's test changes, the last-provoking-vertex geometry draws fail on `main` and pass with the PR, on an AMD RX 9070 XT and an Intel UHD 770. Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built, `ANYPS5_NO_SHADER_CACHE=1`, serial CTest. Intel UHD Graphics 770 (`8086:a780`), driver 32.0.101.7088. AMD Radeon RX 9070 XT (`1002:7550`), driver 32.0.31041.1004, with `VkCache` emptied first. This head `606321886` (which carries #7883) merged into `main` `85029a00f`. "Without" means only this branch's diff to `tests/Graphics.cpp` and `tests/execution/MeshProvokingVertex.cpp`, applied to `main` `85029a00f`. | Tests, ×3 | UHD 770 | RX 9070 XT | |---|---|---| | This head: the 30 tests built from those files | 29 pass; `agc_driver_mesh_provoking_vertex` skips (no mesh shaders on this GPU) | 30 of 30 pass | | Without | `agc_driver_graphics` fails: `last provoking vertex is unsupported for triangle strips or fans assembled for a geometry program`; the mesh test skips | `agc_driver_graphics` fails the same way, and `agc_driver_mesh_provoking_vertex` aborts with that error | AI-assisted: yes (Claude Code)
DavidAmsellem commented 2026-10-19 15:44:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by DavidAmsellem on 2026-10-19T15:44:23Z.


First AMD-on-Linux (RADV) run of this PR. Merged onto main 43a2abaf7 (clean merge), built in full and compared with the same main, on the same machine.

AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release.

Full suite (ANYPS5_REQUIRE_VULKAN=1 ctest -j8): 1636/1638 with this PR, against 1636/1638 on main. The failures are the same two on both, so this PR adds none: agc_driver_image_table_vouched_lookups (#7766, fixed by #7916) and agc_driver_guest_memory_lifetime (#7784). The PR adds no new ctest entry; every existing test it touches passed.

GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6271203528 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6271203528). Originally posted by [DavidAmsellem](https://github.com/DavidAmsellem) on 2026-10-19T15:44:23Z. --- First AMD-on-Linux (RADV) run of this PR. Merged onto `main` `43a2abaf7` (clean merge), built in full and compared with the same `main`, on the same machine. AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 (Ubuntu 24.04 base), kernel 7.0.0-38, GCC 13.3, Release. Full suite (`ANYPS5_REQUIRE_VULKAN=1 ctest -j8`): **1636/1638 with this PR**, against 1636/1638 on `main`. The failures are the same two on both, so this PR adds none: `agc_driver_image_table_vouched_lookups` (#7766, fixed by #7916) and `agc_driver_guest_memory_lifetime` (#7784). The PR adds no new ctest entry; every existing test it touches passed. GPUs tested: AMD Radeon RX 7900 XT (RADV NAVI31, gfx1100), Mesa 25.2.8, Linux Mint 22.3 / kernel 7.0.0-38 AI-assisted: yes
oneandonlydean commented 2026-10-21 11:24:13 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-21T11:24:13Z.


@thuanquang a heads-up for the rebase: main has since taken the last provoking vertex through the barycentric tessellation path (#7426), and that change touched the same checks this PR relies on, so the conflict needs a decision rather than keep-both.

  • In ValidateProvokingVertex (Pipeline.cpp), main dropped !BarycentricPatches(...) from the generated-primitive Require and added a new one: Require(!meshPrimitives || (topology != TRIANGLE_STRIP && topology != TRIANGLE_FAN), "last provoking vertex is unsupported for triangle strips or fans assembled for a geometry program"). That guard refuses exactly the case this PR implements, so after a plain merge your strip/fan ordering is unreachable in last mode. Please remove or narrow it as part of the rebase and check how it combines with your own triangle-strip Require on the line after it.
  • The PA_SU_SC_MODE_CNTL.PROVOKING_VTX_LAST entry in docs/dev/debt/libSceAgcDriver.md was rewritten on both sides (yours from the first sentence, main in a later part), so it needs one combined entry rather than both versions.

A last-mode strip case through a geometry program that would have hit main's new refusal would pin the result.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6314723410 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6314723410). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-21T11:24:13Z. --- @thuanquang a heads-up for the rebase: `main` has since taken the last provoking vertex through the barycentric tessellation path (#7426), and that change touched the same checks this PR relies on, so the conflict needs a decision rather than keep-both. - In `ValidateProvokingVertex` (`Pipeline.cpp`), `main` dropped `!BarycentricPatches(...)` from the generated-primitive `Require` and added a new one: `Require(!meshPrimitives || (topology != TRIANGLE_STRIP && topology != TRIANGLE_FAN), "last provoking vertex is unsupported for triangle strips or fans assembled for a geometry program")`. That guard refuses exactly the case this PR implements, so after a plain merge your strip/fan ordering is unreachable in last mode. Please remove or narrow it as part of the rebase and check how it combines with your own triangle-strip `Require` on the line after it. - The `PA_SU_SC_MODE_CNTL.PROVOKING_VTX_LAST` entry in `docs/dev/debt/libSceAgcDriver.md` was rewritten on both sides (yours from the first sentence, `main` in a later part), so it needs one combined entry rather than both versions. A last-mode strip case through a geometry program that would have hit `main`'s new refusal would pin the result.
thuanquang commented 2026-10-22 06:28:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by thuanquang on 2026-10-22T06:28:56Z.


@oneandonlydean thanks for the heads-up. The rebase to d054ce3afb handles it, and since #7883 has merged, this PR's diff against main is its one commit:

  • ValidateProvokingVertex: #7426's refusal of last-mode triangle strips and fans assembled for a geometry program is removed. main's generated-primitive Require stays as it is.
  • This PR's own triangle-strip Require still refuses last mode with explicit per-vertex interpolation (the expectFailure in ProvokingVertexTests). Flat and smooth inputs validate for strips and fans.
  • MeshProvokingVertex now draws a triangle strip and a triangle fan in last mode through a geometry program, the case main's refusal threw on, and the fan in first mode.
  • The PROVOKING_VTX_LAST debt entry is one combined entry.

The test runs are in the description.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6334332227 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/7893#issuecomment-6334332227). Originally posted by [thuanquang](https://github.com/thuanquang) on 2026-10-22T06:28:56Z. --- @oneandonlydean thanks for the heads-up. The rebase to d054ce3afb handles it, and since #7883 has merged, this PR's diff against `main` is its one commit: - `ValidateProvokingVertex`: #7426's refusal of last-mode triangle strips and fans assembled for a geometry program is removed. `main`'s generated-primitive `Require` stays as it is. - This PR's own triangle-strip `Require` still refuses last mode with explicit per-vertex interpolation (the `expectFailure` in `ProvokingVertexTests`). Flat and smooth inputs validate for strips and fans. - `MeshProvokingVertex` now draws a triangle strip and a triangle fan in last mode through a geometry program, the case `main`'s refusal threw on, and the fan in first mode. - The `PROVOKING_VTX_LAST` debt entry is one combined entry. The test runs are in the description.
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!7893
No description provided.