fix(agc): follow RDNA 2's range checks for strided vertex fetches with OOB_SELECT 2 and 3 #9915

Open
ebarr24 wants to merge 1 commit from upstream-pr/9915 into main
ebarr24 commented 2026-10-22 21:28:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ebarr24 on 2026-10-22T21:28:52Z.


What

A strided vertex fetch with OOB_SELECT 2 or 3 threw whenever its index was at or past NUM_RECORDS, which stopped Kena PPSA01746 (its own descriptor values are not captured yet) with the same message that The Eternal Cylinder PPSA06369 printed for stride 12, NUM_RECORDS 303 and vertex index 319706 (reported by JJenkx on #9604). RDNA 2 checks only NUM_RECORDS == 0 for OOB_SELECT 2, and for OOB_SELECT 3 compares NUM_RECORDS with the fetch's byte range without using the index (Mesa ac_descriptors.c at mesa-26.2.4, measured on gfx1036 in #2241). The fetch is now sized from its index in those cases, and the cases the hardware reads as zeros (NUM_RECORDS 0 for select 2, NUM_RECORDS below the fetch's bytes for select 3) still throw, while an indirect draw, whose counts are unknown when its vertex ranges are copied, still copies the descriptor's NUM_RECORDS range.

Tested

Windows 11, MinGW-w64 GCC 15.2, Release build with tests. agc_vertex_input, agc_vertex_input_validation, agc_driver_strided_indirect_vertex_fetch pass with this change; the new test fails on main.

Validation layer (vulkan-sdk-1.4.363.0), on main 11f976b27c and on this change, with VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, VK_ADD_LAYER_PATH set to the layer, ANYPS5_NO_SHADER_CACHE=1 and ANYPS5_REQUIRE_VULKAN=1: ctest -V -R "strided_indirect|agc_graphics$|agc_vertex_input". Neither log contains was not found but was requested by env var VK_INSTANCE_LAYERS; the change adds no VUID- errors (0 with the change, 0 on main).

ctest -V log, main

The ***Failed result and the failure line at its end are the new regression test failing on main, as intended; they are not an unrelated baseline failure.

gc_vertex_input -V --timeout 120
UpdateCTestConfiguration  from :C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/DartConfiguration.tcl
Test project C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 469
    Start 469: agc_vertex_input

469: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_tests.exe
469: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1
469: Environment variables: 
469:  ANYPS5_NO_SHADER_CACHE=1
469:  APS5_NO_PIPELINE_JOURNAL=1
469: Environment variable modifications: 
469:  PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched
469: Test timeout computed to be: 120
469: AGC graphics: vertex fetch exceeds descriptor record count
1/3 Test #469: agc_vertex_input ...........................***Failed    0.07 sec
test 483
    Start 483: agc_vertex_input_validation

483: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_validation_tests.exe
483: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1
483: Environment variables: 
483:  ANYPS5_NO_SHADER_CACHE=1
483:  APS5_NO_PIPELINE_JOURNAL=1
483: Environment variable modifications: 
483:  PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched
483: Test timeout computed to be: 120
483: vertex input validation matches the input info build in 4410 cases (852 accepted)
2/3 Test #483: agc_vertex_input_validation ................   Passed    0.09 sec
test 913
    Start 913: agc_driver_strided_indirect_vertex_fetch

913: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_driver_strided_indirect_vertex_fetch_tests.exe
913: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1
913: Environment variables: 
913:  ANYPS5_NO_SHADER_CACHE=1
913:  APS5_NO_PIPELINE_JOURNAL=1
913: Environment variable modifications: 
913:  PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched
913: Test timeout computed to be: 120
913: [time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
913: [src\HostCpu.cpp:193 operator()] host CPU AMD Ryzen 7 3700X 8-Core Processor: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none
913: [src\VulkanDevice.cpp:1014 VulkanDevice] VulkanDevice constructor window=0000000000000000
913: [src\VulkanDevice.cpp:1023 VulkanDevice] Vulkan loader loaded library=00007ffb48fe0000
913: 
913: [src\VulkanDevice.cpp:1061 VulkanDevice] Vulkan instance created instance=000001c5c7ee4840
913: [src\VulkanDevice.cpp:1072 VulkanDevice] Physical device count=1
913: [src\VulkanDevice.cpp:1105 VulkanDevice] Physical device candidate=000001c5c9e4c1a0 name=NVIDIA GeForce RTX 3080 api=0x40415f type=2
913: [src\VulkanDevice.cpp:1152 VulkanDevice] Physical device selected physical=000001c5c9e4c1a0 queueFamily=0
913: [src\VulkanDevice.cpp:1166 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3080 vendor=0x10de device=0x2206 subgroup=32
913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 0 size=10053.0 MiB flags=0x1
913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 1 size=16339.5 MiB flags=0x0
913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 2 size=214.0 MiB flags=0x1
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 0 heap=1 flags=0x0
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 1 heap=0 flags=0x1
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 2 heap=0 flags=0x1
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 3 heap=1 flags=0x6
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 4 heap=1 flags=0xe
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 5 heap=2 flags=0x7
913: [src\VulkanDevice.cpp:1242 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0
913: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1
913: [src\VulkanDevice.cpp:1629 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
913: [src\VulkanDevice.cpp:1897 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
913: [src\VulkanDevice.cpp:2008 VulkanDevice] Vulkan device ready device=000001c5803e00d0 queue=000001c5803814d0 family=0
913: [write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking
913: strided indirect vertex fetch tests passed
3/3 Test #913: agc_driver_strided_indirect_vertex_fetch ...   Passed    0.57 sec

The following tests passed:
	agc_vertex_input_validation
	agc_driver_strided_indirect_vertex_fetch

67% tests passed, 1 tests failed out of 3

Total Test time (real) =   0.85 sec

The following tests FAILED:
	469 - agc_vertex_input (Failed)
Errors while running CTest
Output from these tests are in: C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
ctest -V log, this change
dir C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild -R strided_indirect|agc_graphics$|agc_vertex_input -V --timeout 120
UpdateCTestConfiguration  from :C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/DartConfiguration.tcl
Test project C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 469
    Start 469: agc_vertex_input

469: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_tests.exe
469: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1
469: Environment variables: 
469:  ANYPS5_NO_SHADER_CACHE=1
469:  APS5_NO_PIPELINE_JOURNAL=1
469: Environment variable modifications: 
469:  PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched
469: Test timeout computed to be: 120
469: Vertex input cache tests passed
1/3 Test #469: agc_vertex_input ...........................   Passed    0.05 sec
test 483
    Start 483: agc_vertex_input_validation

483: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_validation_tests.exe
483: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1
483: Environment variables: 
483:  ANYPS5_NO_SHADER_CACHE=1
483:  APS5_NO_PIPELINE_JOURNAL=1
483: Environment variable modifications: 
483:  PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched
483: Test timeout computed to be: 120
483: vertex input validation matches the input info build in 4410 cases (852 accepted)
2/3 Test #483: agc_vertex_input_validation ................   Passed    0.09 sec
test 913
    Start 913: agc_driver_strided_indirect_vertex_fetch

913: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_driver_strided_indirect_vertex_fetch_tests.exe
913: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1
913: Environment variables: 
913:  ANYPS5_NO_SHADER_CACHE=1
913:  APS5_NO_PIPELINE_JOURNAL=1
913: Environment variable modifications: 
913:  PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched
913: Test timeout computed to be: 120
913: [time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine)
913: [src\HostCpu.cpp:193 operator()] host CPU AMD Ryzen 7 3700X 8-Core Processor: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none
913: [src\VulkanDevice.cpp:1014 VulkanDevice] VulkanDevice constructor window=0000000000000000
913: [src\VulkanDevice.cpp:1023 VulkanDevice] Vulkan loader loaded library=00007ffb48fe0000
913: 
913: [src\VulkanDevice.cpp:1061 VulkanDevice] Vulkan instance created instance=000001ed9f774670
913: [src\VulkanDevice.cpp:1072 VulkanDevice] Physical device count=1
913: [src\VulkanDevice.cpp:1105 VulkanDevice] Physical device candidate=000001ed9fd86350 name=NVIDIA GeForce RTX 3080 api=0x40415f type=2
913: [src\VulkanDevice.cpp:1152 VulkanDevice] Physical device selected physical=000001ed9fd86350 queueFamily=0
913: [src\VulkanDevice.cpp:1166 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3080 vendor=0x10de device=0x2206 subgroup=32
913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 0 size=10053.0 MiB flags=0x1
913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 1 size=16339.5 MiB flags=0x0
913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 2 size=214.0 MiB flags=0x1
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 0 heap=1 flags=0x0
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 1 heap=0 flags=0x1
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 2 heap=0 flags=0x1
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 3 heap=1 flags=0x6
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 4 heap=1 flags=0xe
913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 5 heap=2 flags=0x7
913: [src\VulkanDevice.cpp:1242 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0
913: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1
913: [src\VulkanDevice.cpp:1629 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1
913: [src\VulkanDevice.cpp:1897 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1
913: [src\VulkanDevice.cpp:2008 VulkanDevice] Vulkan device ready device=000001eda19700d0 queue=000001eda19114d0 family=0
913: [write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking
913: strided indirect vertex fetch tests passed
3/3 Test #913: agc_driver_strided_indirect_vertex_fetch ...   Passed    0.81 sec

The following tests passed:
	agc_vertex_input
	agc_vertex_input_validation
	agc_driver_strided_indirect_vertex_fetch

100% tests passed out of 3

Total Test time (real) =   1.07 sec

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: #9604
  • Fixes: none
  • Unblocks: PPSA01746 #4073
  • GPUs tested: NVIDIA GeForce RTX 3080, driver 32.0.16.1692; Microsoft Windows 11 Pro; Khronos validation layer on main and this change, no new VUIDs
  • AI-assisted: yes

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4974372358 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9915). Originally posted by [ebarr24](https://github.com/ebarr24) on 2026-10-22T21:28:52Z. --- ### What A strided vertex fetch with OOB_SELECT 2 or 3 threw whenever its index was at or past NUM_RECORDS, which stopped Kena PPSA01746 (its own descriptor values are not captured yet) with the same message that The Eternal Cylinder PPSA06369 printed for stride 12, NUM_RECORDS 303 and vertex index 319706 (reported by JJenkx on #9604). RDNA 2 checks only NUM_RECORDS == 0 for OOB_SELECT 2, and for OOB_SELECT 3 compares NUM_RECORDS with the fetch's byte range without using the index (Mesa ac_descriptors.c at mesa-26.2.4, measured on gfx1036 in #2241). The fetch is now sized from its index in those cases, and the cases the hardware reads as zeros (NUM_RECORDS 0 for select 2, NUM_RECORDS below the fetch's bytes for select 3) still throw, while an indirect draw, whose counts are unknown when its vertex ranges are copied, still copies the descriptor's NUM_RECORDS range. ### Tested Windows 11, MinGW-w64 GCC 15.2, Release build with tests. `agc_vertex_input`, `agc_vertex_input_validation`, `agc_driver_strided_indirect_vertex_fetch` pass with this change; the new test fails on `main`. Validation layer (vulkan-sdk-1.4.363.0), on `main` 11f976b27c and on this change, with `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation`, `VK_ADD_LAYER_PATH` set to the layer, `ANYPS5_NO_SHADER_CACHE=1` and `ANYPS5_REQUIRE_VULKAN=1`: `ctest -V -R "strided_indirect|agc_graphics$|agc_vertex_input"`. Neither log contains `was not found but was requested by env var VK_INSTANCE_LAYERS`; the change adds no `VUID-` errors (0 with the change, 0 on `main`). <details><summary>ctest -V log, main</summary> The `***Failed` result and the failure line at its end are the new regression test failing on `main`, as intended; they are not an unrelated baseline failure. ``` gc_vertex_input -V --timeout 120 UpdateCTestConfiguration from :C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/DartConfiguration.tcl Test project C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 469 Start 469: agc_vertex_input 469: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_tests.exe 469: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1 469: Environment variables: 469: ANYPS5_NO_SHADER_CACHE=1 469: APS5_NO_PIPELINE_JOURNAL=1 469: Environment variable modifications: 469: PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched 469: Test timeout computed to be: 120 469: AGC graphics: vertex fetch exceeds descriptor record count 1/3 Test #469: agc_vertex_input ...........................***Failed 0.07 sec test 483 Start 483: agc_vertex_input_validation 483: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_validation_tests.exe 483: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1 483: Environment variables: 483: ANYPS5_NO_SHADER_CACHE=1 483: APS5_NO_PIPELINE_JOURNAL=1 483: Environment variable modifications: 483: PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched 483: Test timeout computed to be: 120 483: vertex input validation matches the input info build in 4410 cases (852 accepted) 2/3 Test #483: agc_vertex_input_validation ................ Passed 0.09 sec test 913 Start 913: agc_driver_strided_indirect_vertex_fetch 913: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_driver_strided_indirect_vertex_fetch_tests.exe 913: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1 913: Environment variables: 913: ANYPS5_NO_SHADER_CACHE=1 913: APS5_NO_PIPELINE_JOURNAL=1 913: Environment variable modifications: 913: PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched 913: Test timeout computed to be: 120 913: [time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine) 913: [src\HostCpu.cpp:193 operator()] host CPU AMD Ryzen 7 3700X 8-Core Processor: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none 913: [src\VulkanDevice.cpp:1014 VulkanDevice] VulkanDevice constructor window=0000000000000000 913: [src\VulkanDevice.cpp:1023 VulkanDevice] Vulkan loader loaded library=00007ffb48fe0000 913: 913: [src\VulkanDevice.cpp:1061 VulkanDevice] Vulkan instance created instance=000001c5c7ee4840 913: [src\VulkanDevice.cpp:1072 VulkanDevice] Physical device count=1 913: [src\VulkanDevice.cpp:1105 VulkanDevice] Physical device candidate=000001c5c9e4c1a0 name=NVIDIA GeForce RTX 3080 api=0x40415f type=2 913: [src\VulkanDevice.cpp:1152 VulkanDevice] Physical device selected physical=000001c5c9e4c1a0 queueFamily=0 913: [src\VulkanDevice.cpp:1166 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3080 vendor=0x10de device=0x2206 subgroup=32 913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 0 size=10053.0 MiB flags=0x1 913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 1 size=16339.5 MiB flags=0x0 913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 2 size=214.0 MiB flags=0x1 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 0 heap=1 flags=0x0 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 1 heap=0 flags=0x1 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 2 heap=0 flags=0x1 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 3 heap=1 flags=0x6 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 4 heap=1 flags=0xe 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 5 heap=2 flags=0x7 913: [src\VulkanDevice.cpp:1242 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0 913: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1 913: [src\VulkanDevice.cpp:1629 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1 913: [src\VulkanDevice.cpp:1897 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1 913: [src\VulkanDevice.cpp:2008 VulkanDevice] Vulkan device ready device=000001c5803e00d0 queue=000001c5803814d0 family=0 913: [write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking 913: strided indirect vertex fetch tests passed 3/3 Test #913: agc_driver_strided_indirect_vertex_fetch ... Passed 0.57 sec The following tests passed: agc_vertex_input_validation agc_driver_strided_indirect_vertex_fetch 67% tests passed, 1 tests failed out of 3 Total Test time (real) = 0.85 sec The following tests FAILED: 469 - agc_vertex_input (Failed) Errors while running CTest Output from these tests are in: C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/Testing/Temporary/LastTest.log Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely. ``` </details> <details><summary>ctest -V log, this change</summary> ``` dir C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild -R strided_indirect|agc_graphics$|agc_vertex_input -V --timeout 120 UpdateCTestConfiguration from :C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/DartConfiguration.tcl Test project C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild Constructing a list of tests Done constructing a list of tests Updating test list for fixtures Added 0 tests to meet fixture requirements Checking test dependency graph... Checking test dependency graph end test 469 Start 469: agc_vertex_input 469: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_tests.exe 469: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1 469: Environment variables: 469: ANYPS5_NO_SHADER_CACHE=1 469: APS5_NO_PIPELINE_JOURNAL=1 469: Environment variable modifications: 469: PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched 469: Test timeout computed to be: 120 469: Vertex input cache tests passed 1/3 Test #469: agc_vertex_input ........................... Passed 0.05 sec test 483 Start 483: agc_vertex_input_validation 483: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_vertex_input_validation_tests.exe 483: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1 483: Environment variables: 483: ANYPS5_NO_SHADER_CACHE=1 483: APS5_NO_PIPELINE_JOURNAL=1 483: Environment variable modifications: 483: PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched 483: Test timeout computed to be: 120 483: vertex input validation matches the input info build in 4410 cases (852 accepted) 2/3 Test #483: agc_vertex_input_validation ................ Passed 0.09 sec test 913 Start 913: agc_driver_strided_indirect_vertex_fetch 913: Test command: C:\Users\ebarr\ps5-emulation\work\s1\.wsbuild\tests\agc_driver_strided_indirect_vertex_fetch_tests.exe 913: Working Directory: C:/Users/ebarr/ps5-emulation/work/s1 913: Environment variables: 913: ANYPS5_NO_SHADER_CACHE=1 913: APS5_NO_PIPELINE_JOURNAL=1 913: Environment variable modifications: 913: PATH=path_list_prepend:C:/Users/ebarr/ps5-emulation/work/s1/.wsbuild/core/libs/libs/unpatched 913: Test timeout computed to be: 120 913: [time] scheduler tick raised to 0.5 ms (was 0.50 ms, now 0.50 ms, timed waits fine) 913: [src\HostCpu.cpp:193 operator()] host CPU AMD Ryzen 7 3700X 8-Core Processor: has SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, LZCNT, BMI1, BMI2, MOVBE, CMPXCHG16B, LAHF/SAHF, AVX, AVX2, FMA, F16C, AES, PCLMULQDQ, RDRAND, RDSEED, ADX, SHA, CLFLUSHOPT, CLWB, RDPID, XSAVEOPT, XSAVEC, SSE4A, PREFETCHW, CLZERO, OS AVX state (XCR0); lacks none 913: [src\VulkanDevice.cpp:1014 VulkanDevice] VulkanDevice constructor window=0000000000000000 913: [src\VulkanDevice.cpp:1023 VulkanDevice] Vulkan loader loaded library=00007ffb48fe0000 913: 913: [src\VulkanDevice.cpp:1061 VulkanDevice] Vulkan instance created instance=000001ed9f774670 913: [src\VulkanDevice.cpp:1072 VulkanDevice] Physical device count=1 913: [src\VulkanDevice.cpp:1105 VulkanDevice] Physical device candidate=000001ed9fd86350 name=NVIDIA GeForce RTX 3080 api=0x40415f type=2 913: [src\VulkanDevice.cpp:1152 VulkanDevice] Physical device selected physical=000001ed9fd86350 queueFamily=0 913: [src\VulkanDevice.cpp:1166 VulkanDevice] Selected GPU name=NVIDIA GeForce RTX 3080 vendor=0x10de device=0x2206 subgroup=32 913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 0 size=10053.0 MiB flags=0x1 913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 1 size=16339.5 MiB flags=0x0 913: [src\VulkanDevice.cpp:1168 VulkanDevice] Memory heap 2 size=214.0 MiB flags=0x1 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 0 heap=1 flags=0x0 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 1 heap=0 flags=0x1 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 2 heap=0 flags=0x1 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 3 heap=1 flags=0x6 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 4 heap=1 flags=0xe 913: [src\VulkanDevice.cpp:1169 VulkanDevice] Memory type 5 heap=2 flags=0x7 913: [src\VulkanDevice.cpp:1242 VulkanDevice] Shader clock driver=4 narrowSubgroupClock=0 913: [gpu] largest sample location grids (vkGetPhysicalDeviceMultisamplePropertiesEXT): 1 samples 4x4, 2 samples 2x4, 4 samples 2x2, 8 samples 1x2; maxSampleLocationGridSize for every count 1x1 913: [src\VulkanDevice.cpp:1629 VulkanDevice] Vulkan features tessellationAvailable=1 mesh=1 depthClip=1 depthRangeUnrestricted=1 pipelineLibrary=1 913: [src\VulkanDevice.cpp:1897 VulkanDevice] Wave32 programs run on subgroups of 32: compute 1, mesh 1 913: [src\VulkanDevice.cpp:2008 VulkanDevice] Vulkan device ready device=000001eda19700d0 queue=000001eda19114d0 family=0 913: [write-watch] host imports of write-watched memory keep the write watch: yes (4096 of 4096 scratch pages reported written at the import, 0 by its 4-byte settle read, 0 after it, 0 after a full GPU read, 0 after a second, 0 after a GPU write, 1 after a CPU store); direct host imports of private memory are settled and stay watched, separate shared aliases retain guest write tracking 913: strided indirect vertex fetch tests passed 3/3 Test #913: agc_driver_strided_indirect_vertex_fetch ... Passed 0.81 sec The following tests passed: agc_vertex_input agc_vertex_input_validation agc_driver_strided_indirect_vertex_fetch 100% tests passed out of 3 Total Test time (real) = 1.07 sec ``` </details> ### 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: #9604 - [x] Fixes: none - [x] Unblocks: PPSA01746 #4073 - [x] GPUs tested: NVIDIA GeForce RTX 3080, driver 32.0.16.1692; Microsoft Windows 11 Pro; Khronos validation layer on `main` and this change, no new VUIDs - [x] AI-assisted: yes 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MarcZX10 commented 2026-10-22 23:33:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T23:33:11Z.

Review: CHANGES_REQUESTED


I’m requesting changes based on the Linux regression report posted in this PR. It reports two existing tests failing on the submitted behavior, in addition to the new execution-path test passing:

  1. agc_driver_native_msaa_vertex_input now fails at SampleMultisampleTarget.cpp:580. Its OOB_SELECT 3 descriptor has stride 16 and NUM_RECORDS 3. Under the byte-range rule this change implements, 3 is shorter than the 16-byte fetch, so the production rejection is expected; the fixture needs a NUM_RECORDS value consistent with the intended three-record test (the report suggests 48 bytes), or an assertion for the rejection if that is what the test intends.
  2. agc_vertex_input still expects VertexBufferReadSize(input[0], 5, 1) to throw for OOB_SELECT 2. This PR changes that case to a valid read size (176 per the report), consistent with the stated RDNA 2 rule. Please update the stale expectation while retaining the zero-record rejection coverage.

The report says these are the only failures among the 15 vertex tests it ran on RADV; agc_driver_graphics and the new stride-16 execution cases pass. Please update the affected fixtures/assertions and rerun the focused vertex test set, including agc_driver_native_msaa_vertex_input, agc_vertex_input, agc_driver_zero_stride_vertex_fetch, and agc_driver_graphics. I have not reproduced the Linux GPU run locally; this request is based on the detailed independent run and the rule this PR implements.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5622190822 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9915#pullrequestreview-5622190822). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T23:33:11Z. **Review:** CHANGES_REQUESTED --- I’m requesting changes based on the Linux regression report posted in this PR. It reports two existing tests failing on the submitted behavior, in addition to the new execution-path test passing: 1. `agc_driver_native_msaa_vertex_input` now fails at `SampleMultisampleTarget.cpp:580`. Its OOB_SELECT 3 descriptor has stride 16 and `NUM_RECORDS` 3. Under the byte-range rule this change implements, 3 is shorter than the 16-byte fetch, so the production rejection is expected; the fixture needs a `NUM_RECORDS` value consistent with the intended three-record test (the report suggests 48 bytes), or an assertion for the rejection if that is what the test intends. 2. `agc_vertex_input` still expects `VertexBufferReadSize(input[0], 5, 1)` to throw for OOB_SELECT 2. This PR changes that case to a valid read size (176 per the report), consistent with the stated RDNA 2 rule. Please update the stale expectation while retaining the zero-record rejection coverage. The report says these are the only failures among the 15 vertex tests it ran on RADV; `agc_driver_graphics` and the new stride-16 execution cases pass. Please update the affected fixtures/assertions and rerun the focused vertex test set, including `agc_driver_native_msaa_vertex_input`, `agc_vertex_input`, `agc_driver_zero_stride_vertex_fetch`, and `agc_driver_graphics`. I have not reproduced the Linux GPU run locally; this request is based on the detailed independent run and the rule this PR implements.
XairRrR commented 2026-11-03 07:34:25 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T07:34:25Z.

Review: CHANGES_REQUESTED


Reviewed — changes requested

This pull request does not merge cleanly into main (d1ae628bc2): head 1749190ad0 conflicts in

  • docs/dev/debt/libSceAgcDriver.md

Please rebase it onto current main. I will review the change once it merges cleanly.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5748583964 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9915#pullrequestreview-5748583964). Originally posted by [XairRrR](https://github.com/XairRrR) on 2026-11-03T07:34:25Z. **Review:** CHANGES_REQUESTED --- # Reviewed — changes requested This pull request does not merge cleanly into `main` (d1ae628bc2f62459cce1e9872ba5632c938c71f2): head 1749190ad04bebffa6e6af7e2e1a87e7cd55b555 conflicts in - `docs/dev/debt/libSceAgcDriver.md` Please rebase it onto current `main`. I will review the change once it merges cleanly. <!-- anyps5-bots job=3063 head=1749190ad04bebffa6e6af7e2e1a87e7cd55b555 -->
MarcZX10 commented 2026-11-22 08:00:30 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T08:00:30Z.

Review: APPROVED


Reviewed — looks good

The reviewed change has no verified blocking defects; the submitted test results support the stated behavior.

What I ran

Reviewed head 1749190ad04bebffa6e6af7e2e1a87e7cd55b555. I read the prepared diff and targeted changed code; I did not run commands or tests in this session.

Results

Check Result Note
Changed-code review passed Read all seven changed files' relevant content
Tests in this session not run Test results below were supplied by the author
Author-reported tests passed Targeted tests passed on the change

Negative control

Not run in this session. The author reports that the new regression test fails on main.

Findings

Blocking

None.

Non-blocking

None.

Sources

Not verified

I did not run the build, tests, or validation layer. The author reports the targeted tests and validation-layer checks passed on Windows 11 with an NVIDIA GeForce RTX 3080. I read the changed hunks in Graphics.cpp; its full 11,418-line text was not read. The other changed files were read at their relevant ranges. No files were excluded from the manifest.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6011142997 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9915#pullrequestreview-6011142997). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-22T08:00:30Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change has no verified blocking defects; the submitted test results support the stated behavior. ## What I ran Reviewed head `1749190ad04bebffa6e6af7e2e1a87e7cd55b555`. I read the prepared diff and targeted changed code; I did not run commands or tests in this session. ## Results | Check | Result | Note | |---|---|---| | Changed-code review | passed | Read all seven changed files' relevant content | | Tests in this session | not run | Test results below were supplied by the author | | Author-reported tests | passed | Targeted tests passed on the change | ## Negative control Not run in this session. The author reports that the new regression test fails on `main`. ## Findings ### Blocking None. ### Non-blocking None. ## Sources - [VertexInput.hpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1749190ad04bebffa6e6af7e2e1a87e7cd55b555/core/libs/prx/libSceAgcDriver/Graphics/include/VertexInput.hpp) - [Draw.cpp at the reviewed head](https://github.com/boykopovar/AnyPS5/blob/1749190ad04bebffa6e6af7e2e1a87e7cd55b555/core/libs/prx/libSceAgcDriver/Graphics/src/Draw.cpp) ## Not verified I did not run the build, tests, or validation layer. The author reports the targeted tests and validation-layer checks passed on Windows 11 with an NVIDIA GeForce RTX 3080. I read the changed hunks in `Graphics.cpp`; its full 11,418-line text was not read. The other changed files were read at their relevant ranges. No files were excluded from the manifest. ## To get this to a good state Nothing is required.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/9915:upstream-pr/9915'
git switch 'upstream-pr/9915'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/9915'
git switch 'upstream-pr/9915'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/9915'
git switch 'upstream-pr/9915'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/9915'
git switch 'main'
git merge --squash 'upstream-pr/9915'
git switch 'main'
git merge --ff-only 'upstream-pr/9915'
git switch 'main'
git merge 'upstream-pr/9915'
git push origin 'main'
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!9915
No description provided.