Repository navigation
fix(agc): resolve sparse indirect index ranges per record - #6606
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
jotitadev
left a comment
There was a problem hiding this comment.
Ran this on NVIDIA, which the PR's GPU list doesn't include.
Machine: NVIDIA GeForce RTX 3070, driver 595.99.02, Vulkan 1.4.329, Ubuntu 26.04 (kernel 7.0.0-38), i7-8700. GCC 15.2, Release, BUILD_TESTING=ON, selected with ANYPS5_GPU="NVIDIA GeForce RTX 3070". Head 925f9a84b merged into main 5d9dcc42d.
- Test-only (PR tests and CMake, sources from
main):agc_driver_sparse_indirect_indicesandagc_driver_sparse_indirect_indices_unreadablefail withguest memory is not readable at ... (range ...ff0+0x20000000), andagc_driver_pm4with the same check on+0x1fffffffc. That is the full-range check the PR describes. - With the fix: the focused set (
agc_driver_pm4*,draw_offset_indices,indirect_patched_stage, bothsparse_indirect_indicesmodes, 10 tests) passes 3/3, and 1/1 withAPS5_PIPELINED_DRAWS=0. ctest -R "^agc|shader|recompiler" -j1(flip, display andlds_atomics64excluded): same asmainplus the new test. The only failure isagc_driver_store_over_untracked, which fails onmainhere too (#6347);stencil_ref_exportskips (noVK_EXT_shader_stencil_exporton this driver).
GPUs tested: NVIDIA GeForce RTX 3070, driver 595.99.02, Ubuntu 26.04
Written with AI assistance (Claude Code). I ran the builds and tests above on my machine.
|
A run on a second title with the same stop: 007 First Light (PPSA11386 v01.018.000), on Linux 7.2.10, NVIDIA GeForce RTX 3080 10 GB, driver 615.78.08, GCC 16.2.1, Release with The title declares 16-bit indices with
AI-assisted: yes (Claude Code) |
|
Title check for #6526 on Marvel's Guardians of the Galaxy (PPSA01748): with this PR the title gets past the indirect indexed draw that #6526 reports. Same tree with and without this PR's two commits:
That next stop is a separate, already known limit: DetailsLinux (CachyOS), RTX 4090, i9-14900K, GCC 16.2.1, Release. The title was relinked with Tested and written by Claude (AI assistant) on a contributor's machine. |
|
Follow-up: the same result on this PR's own base. Tree That's three runs with this PR, on two bases, against two control runs without it that stop at the #6526 draw. Tested and written by Claude (AI assistant) on a contributor's machine. |
|
Linux NVIDIA data point: Ubuntu 24.04.4, RTX 4000 SFF Ada Generation, driver 595.99.02, GCC 13.3.0, Release. This PR at |
|
I can cross-test this on 007 First Light (PPSA11386) on Windows11/RTX5070Ti617.42. Our integration 8e0bd2c (base e5c2b3c plus public 007/shared-table/resource stack) reaches the rendered offline menu at1.963FPS, then Resume aborts during the level load on a full index-range readability check. The local packet diagnostics show INDEX_BUFFER_SIZE=0x00ffffff followed by DRAW_INDEX_INDIRECT; 16-bit indices give the failing declared0x1fffffe-byte span, with an unreadable gap. This looks like the same class as #6526. Raw title data stays local; no title result claimed for #6606 yet. I fetched925f9a84b and will first build/run the five focused native controls here, then test that level transition. No duplicate implementation. I will report a genuinely unreadable active record separately rather than hiding it or padding the tail. Game has exited; no native tests/builds overlap it. AI-assisted: Codex. |
|
Windows RTX5070Ti/617.42 results on integration ad3586f, carrying exact #6606 head925f9a84b: 5/5 focused controls PASS2.37s; both sparse-indirect modes with APS5_PIPELINED_DRAWS=0 PASS0.98s; four related import-settle/draw-cache/relocation controls PASS1.90s. Zero skips; ANYPS5_REQUIRE_VULKAN=1. Full native binaries are used (ANYPS5_AGC_EXECUTION_TESTS is empty). Conventions pass; source is clean/pushed at https://github.com/Scramblrrrr/AnyPS5/tree/codex/first-light-oct18-current . The seven-file merge was clean. These are integration cross-tests, not a claimed main-only/Guardians title result. Matched patched graphics modules are staged, and 007 is restarting with the same warm cache/settings/guards as the preceding declared-range failure. No title outcome for this candidate yet. No build or GPU test runs concurrently with the game. AI-assisted: Codex; title data stays local. |
|
Checked the per-record path: the CPU fallback reads the records through the checked path, clamps against the declared index limit ( |
What
An indexed indirect draw checks all of
INDEX_BUFFER_SIZEbefore reading its records. Guardians of the Galaxy (PPSA01748 v01.006.000) declares 512 MiB over about 54 MiB of mapped index memory and stops at that check during the first level load. Addresses #6526.Preserve the declared index limit and its address, alignment and overflow checks. If that range is not fully readable, use the existing driver CPU-record path: its checked record/count reads wait for preceding GPU writes, clamp against the original index limit, and validate and prepare only each record's actual index range. Unused holes and tails are not copied or scanned for index values; an active record reaching an unreadable page still throws. Fully readable buffers retain the existing GPU path. The profiler names the fallback
index range not fully readable.The regression compares rendering with a direct reference triangle: 16/32-bit indices, single/counted multi draws, GPU-written records/counts, accessible ranges before and after a hole, and records outside the declared limit. A separate case requires an unreadable active record to fail on its actual six-byte index range. The PM4 test now checks deferred validation while retaining overflow and alignment rejection.
The title report uses #6232 to pass an earlier shader blocker. This fix builds independently of it.
Tested
Merged base
main3259e4c3e; tested head94bd3c387. Release, bundled dependencies, SPIRV-Tools enabled.APS5_PIPELINED_DRAWS=0in 1.05 s, andshader_cache_native_paths1/1 in 1.69 s. No skips.agc_driver_pm4,agc_driver_draw_offset_indices,agc_driver_indirect_patched_stage,agc_driver_sparse_indirect_indicesandagc_driver_sparse_indirect_indices_unreadable. The unreadable case still rejects its active six-byte range.31cbb55d7plus only the new test (62b85a602), both sparse cases fail on Windows and Linux at the full declared-range check.Independent title evidence: Tamalero's comparison reports three Guardians of the Galaxy runs on two bases with this PR and #6232; the index-range stop is removed and the title reaches a separate compute-shader limitation. This is attributed integration evidence, not a local title run.
Not run here: titles, the full CTest suite, or a performance comparison.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)