fix(agc): resolve indexed indirect draws on a queue that never set INDEX_BUFFER_SIZE #9424

Merged
hugodearaujo merged 2 commits from upstream-pr/9424 into main 2026-10-24 18:23:28 +00:00
hugodearaujo commented 2026-10-21 21:34:28 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-21T21:34:28Z.


What

This carries @spiff637's #7679, which the open-PR limit closed on 2026-10-18, before any review. The commit keeps spiff637 as its author. It is rebased on current main, where #6606 is merged, and its debt line now sits next to main's newer INDEX_ATTRIBUTES_INDIRECT entry. If spiff637 reopens #7679, I'll close this one.

An indexed indirect draw (DRAW_INDEX_INDIRECT 0x25, DRAW_INDEX_INDIRECT_MULTI 0x38) on a queue that has received neither INDEX_BUFFER_SIZE (0x13) nor INDEX_ATTRIBUTES_INDIRECT (0x91) since its last reset threw INDEX_BUFFER_SIZE has not been set. Marvel's Spider-Man 2 issues DRAW_INDEX_INDIRECT_MULTI that way and never emits either packet: spiff637 probed every 0x13 and every suspend-point reset over a whole run.

The change, as in #7679:

  • QueueState::indexBufferSize becomes std::optional<std::uint32_t>. A size written by 0x13 or by a 0x91 record behaves as before. An explicit 0 still throws, now as INDEX_BUFFER_SIZE is zero.
  • When the size was never written, resolveIndirectDraw marks the draw indexLimitKnown = false and keeps the base and alignment checks.
  • ClassifyIndirectDraw sends such a draw to the CPU record path (IndexLimitUnknown, "index limit unknown" in the profiler). Each record's firstIndex/indexCount range is read as written. It must not overflow, and it goes through #6606's per-record readability check.
  • The console's initial INDEX_BUFFER_SIZE is not measured, and neither is whether DRAW_INDEX_2/DRAW_INDEX_OFFSET_2 MAX_SIZE sets it. The debt entry says so.

The second commit is mine, from @adriadam10's review. Since the earlier head, main gained an empty-indirect skip for programs known to take the CPU path. That skip (recordDraws) and the last-drawable search (drawable) in Draw.cpp kept only records with firstVertexOrIndex < indexCount, and indexCount is 0 when the limit is unknown. So the second submission of the same unknown-limit draw was skipped as empty. Both now count such a record as drawable, as the record loop already does.

Tested

  • Linux 7.2.11 (Arch), GCC 16.2.1, Release, AMD Radeon RX 9070 XT, RADV Mesa 26.2.5.
  • This head (3dbab5725c, rebased on main 11e8ad2934):
    • ctest -R agc -j16: 953 tests, 938 pass, 10 skip and 5 fail. Four of them also fail on main 11e8ad2934 on this machine: agc_driver_bda_reads_shadowed_results, agc_driver_bda_reads_shadowed_results_per_build, agc_unit_shadow_completion_store and agc_driver_tessellation. agc_driver_sgpr_pattern_fill_keys failed under -j16 and passed alone 4 times out of 4.
    • Negative control: without the second commit, agc_driver_sparse_indirect_indices_no_size passes its first Run and fails the second with the sparse indexed indirect draw differs from the reference triangle. With only the recordDraws change, it passes.
    • Everything below was run on the earlier head, fed7f1970d.
  • Marvel's Spider-Man 2 (PPSA03016 01.004.003, the US release):
    • main 0c6a5bd593 aborts at 151 s with INDEX_BUFFER_SIZE has not been set.
    • With this change, from a cold shader cache with APS5_PROFILE_DRAW=1, there is no INDEX_BUFFER_SIZE error. The [draws] profile counts 567 draws on the "index limit unknown" path in one 10 s window.
    • The title then stops at 142 s on the #6191 descriptor chain (compute 0x11e2b44c00; the address changes between runs), as spiff637 saw on PPSA08338. That stop is in #8939's thread.
    • Since #9137, it stops earlier on main, in its first 40 s, on sceSystemServiceParamGetInt: parameter 100, then 208 and 210 (seen with main cc0078595d). This PR doesn't touch that.
  • spiff637's run of the same change on PPSA08338 (the EU release, 01.005.001) is in #7679: Windows 11, RTX 3080, driver 617.42. So is the negative control, where the old throw makes agc_driver_pm4 and the three no_size tests fail.
  • Focused tests on main 0c6a5bd593 and on this branch, same machine and GPU. The pattern covers agc_driver_pm4*, agc_driver_draw_offset_indices, agc_driver_sparse_indirect_indices*, agc_driver_pipelined_indirect_draw, agc_driver_rect_list_indirect, agc_driver_prepared_shaders_indirect and agc_driver_*indirect_arguments*. The runs used ctest -V with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation (layer 1.4.363).
    • main: 26 of 26 pass.
    • This branch: 29 of 29 pass, the same 26 plus the three agc_driver_sparse_indirect_indices_no_size*.
    • The loader logged the layer being added in both runs, and neither log has was not found but was requested by env var VK_INSTANCE_LAYERS. Neither log has a VUID- line.
  • The same focused set on current main 8b3a6ba88d and on this branch merged onto it (a clean merge), with the same environment and validation layer:
    • main 8b3a6ba88d: 26 of 26 pass.
    • Merged: 29 of 29 pass, the same 26 plus the three no_size tests.
    • The loader added the layer in both runs, and neither log has a VUID- line.
  • ctest -R ^agc_ -j8 on this branch: 869 tests, 858 pass, 8 skip and 3 fail. The three also fail on main 0c6a5bd593 on this machine: agc_idle_publish_wait, agc_driver_image_array_window_past_layer_limit and agc_driver_tessellation (#5444).
  • tools/check_conventions.py --base origin/main passes. tools/pr_overlap.py finds no PR on the same lines. Of the PRs it couldn't compare, none touches the index-size, record-range or indirect-path lines.
  • Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0, Release, RTX 4070 SUPER (NVIDIA 616.92), run by @ycbuzi on fed7f1970d merged onto main a6dcea9279 (comment): the 19 tests that agc_driver_pm4_tests and agc_driver_sparse_indirect_indices_tests register on Windows pass on both repeats of ctest --repeat until-fail:2, with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1.
  • Windows 11 (10.0.26300), WinLibs GCC 15.2.0, Release, run by @wachi35676 on fed7f19 merged onto main a6dcea927 (comment), on an RTX 5070 Ti (NVIDIA 617.42) and an AMD Radeon RDNA2 iGPU 1002:13c0 (AMD 32.0.21042.62):
    • The three no_size tests pass on both GPUs.
    • An 81-test related set matches main. The only failures also fail on main there: agc_driver_image_array_window_past_layer_limit doesn't compile under MinGW, and agc_driver_tessellation fails on AMD.
    • Negative control: with the PR's tests and main's Execution and Graphics, the three no_size tests fail with INDEX_BUFFER_SIZE has not been set.

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: PPSA03016 #10195 (also PPSA08338, the EU release)
  • GPUs tested: AMD Radeon RX 9070 XT, RADV Mesa 26.2.5, Linux 7.2.11; NVIDIA GeForce RTX 3080, driver 617.42, Windows 11 (spiff637, #7679); NVIDIA GeForce RTX 4070 SUPER, driver 616.92, Windows 11 (ycbuzi); NVIDIA GeForce RTX 5070 Ti, driver 617.42, and AMD Radeon RDNA2 iGPU, AMD 32.0.21042.62, Windows 11 (wachi35676)
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4958678084 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9424). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-21T21:34:28Z. --- ### What This carries @spiff637's #7679, which the open-PR limit closed on 2026-10-18, before any review. The commit keeps spiff637 as its author. It is rebased on current `main`, where #6606 is merged, and its debt line now sits next to main's newer INDEX_ATTRIBUTES_INDIRECT entry. If spiff637 reopens #7679, I'll close this one. An indexed indirect draw (`DRAW_INDEX_INDIRECT` 0x25, `DRAW_INDEX_INDIRECT_MULTI` 0x38) on a queue that has received neither `INDEX_BUFFER_SIZE` (0x13) nor `INDEX_ATTRIBUTES_INDIRECT` (0x91) since its last reset threw `INDEX_BUFFER_SIZE has not been set`. Marvel's Spider-Man 2 issues `DRAW_INDEX_INDIRECT_MULTI` that way and never emits either packet: spiff637 probed every 0x13 and every suspend-point reset over a whole run. The change, as in #7679: - `QueueState::indexBufferSize` becomes `std::optional<std::uint32_t>`. A size written by 0x13 or by a 0x91 record behaves as before. An explicit 0 still throws, now as `INDEX_BUFFER_SIZE is zero`. - When the size was never written, `resolveIndirectDraw` marks the draw `indexLimitKnown = false` and keeps the base and alignment checks. - `ClassifyIndirectDraw` sends such a draw to the CPU record path (`IndexLimitUnknown`, "index limit unknown" in the profiler). Each record's `firstIndex`/`indexCount` range is read as written. It must not overflow, and it goes through #6606's per-record readability check. - The console's initial `INDEX_BUFFER_SIZE` is not measured, and neither is whether `DRAW_INDEX_2`/`DRAW_INDEX_OFFSET_2` MAX_SIZE sets it. The debt entry says so. The second commit is mine, from @adriadam10's review. Since the earlier head, `main` gained an empty-indirect skip for programs known to take the CPU path. That skip (`recordDraws`) and the last-drawable search (`drawable`) in `Draw.cpp` kept only records with `firstVertexOrIndex < indexCount`, and `indexCount` is 0 when the limit is unknown. So the second submission of the same unknown-limit draw was skipped as empty. Both now count such a record as drawable, as the record loop already does. ### Tested - Linux 7.2.11 (Arch), GCC 16.2.1, Release, AMD Radeon RX 9070 XT, RADV Mesa 26.2.5. - This head (3dbab5725c, rebased on `main` 11e8ad2934): - `ctest -R agc -j16`: 953 tests, 938 pass, 10 skip and 5 fail. Four of them also fail on `main` 11e8ad2934 on this machine: `agc_driver_bda_reads_shadowed_results`, `agc_driver_bda_reads_shadowed_results_per_build`, `agc_unit_shadow_completion_store` and `agc_driver_tessellation`. `agc_driver_sgpr_pattern_fill_keys` failed under `-j16` and passed alone 4 times out of 4. - Negative control: without the second commit, `agc_driver_sparse_indirect_indices_no_size` passes its first `Run` and fails the second with `the sparse indexed indirect draw differs from the reference triangle`. With only the `recordDraws` change, it passes. - Everything below was run on the earlier head, fed7f1970d. - Marvel's Spider-Man 2 (PPSA03016 01.004.003, the US release): - `main` 0c6a5bd593 aborts at 151 s with `INDEX_BUFFER_SIZE has not been set`. - With this change, from a cold shader cache with `APS5_PROFILE_DRAW=1`, there is no `INDEX_BUFFER_SIZE` error. The `[draws]` profile counts 567 draws on the "index limit unknown" path in one 10 s window. - The title then stops at 142 s on the #6191 descriptor chain (compute `0x11e2b44c00`; the address changes between runs), as spiff637 saw on PPSA08338. That stop is in #8939's thread. - Since #9137, it stops earlier on `main`, in its first 40 s, on `sceSystemServiceParamGetInt`: parameter 100, then 208 and 210 (seen with `main` cc0078595d). This PR doesn't touch that. - spiff637's run of the same change on PPSA08338 (the EU release, 01.005.001) is in #7679: Windows 11, RTX 3080, driver 617.42. So is the negative control, where the old throw makes `agc_driver_pm4` and the three `no_size` tests fail. - Focused tests on `main` 0c6a5bd593 and on this branch, same machine and GPU. The pattern covers `agc_driver_pm4*`, `agc_driver_draw_offset_indices`, `agc_driver_sparse_indirect_indices*`, `agc_driver_pipelined_indirect_draw`, `agc_driver_rect_list_indirect`, `agc_driver_prepared_shaders_indirect` and `agc_driver_*indirect_arguments*`. The runs used `ctest -V` with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` (layer 1.4.363). - `main`: 26 of 26 pass. - This branch: 29 of 29 pass, the same 26 plus the three `agc_driver_sparse_indirect_indices_no_size*`. - The loader logged the layer being added in both runs, and neither log has `was not found but was requested by env var VK_INSTANCE_LAYERS`. Neither log has a `VUID-` line. - The same focused set on current `main` 8b3a6ba88d and on this branch merged onto it (a clean merge), with the same environment and validation layer: - `main` 8b3a6ba88d: 26 of 26 pass. - Merged: 29 of 29 pass, the same 26 plus the three `no_size` tests. - The loader added the layer in both runs, and neither log has a `VUID-` line. - `ctest -R ^agc_ -j8` on this branch: 869 tests, 858 pass, 8 skip and 3 fail. The three also fail on `main` 0c6a5bd593 on this machine: `agc_idle_publish_wait`, `agc_driver_image_array_window_past_layer_limit` and `agc_driver_tessellation` (#5444). - `tools/check_conventions.py --base origin/main` passes. `tools/pr_overlap.py` finds no PR on the same lines. Of the PRs it couldn't compare, none touches the index-size, record-range or indirect-path lines. - Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0, Release, RTX 4070 SUPER (NVIDIA 616.92), run by @ycbuzi on fed7f1970d merged onto `main` a6dcea9279 ([comment](https://github.com/boykopovar/AnyPS5/pull/9424#issuecomment-6328165168)): the 19 tests that `agc_driver_pm4_tests` and `agc_driver_sparse_indirect_indices_tests` register on Windows pass on both repeats of `ctest --repeat until-fail:2`, with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`. - Windows 11 (10.0.26300), WinLibs GCC 15.2.0, Release, run by @wachi35676 on fed7f19 merged onto `main` a6dcea927 ([comment](https://github.com/boykopovar/AnyPS5/pull/9424#issuecomment-6328441085)), on an RTX 5070 Ti (NVIDIA 617.42) and an AMD Radeon RDNA2 iGPU `1002:13c0` (AMD 32.0.21042.62): - The three `no_size` tests pass on both GPUs. - An 81-test related set matches `main`. The only failures also fail on `main` there: `agc_driver_image_array_window_past_layer_limit` doesn't compile under MinGW, and `agc_driver_tessellation` fails on AMD. - Negative control: with the PR's tests and `main`'s `Execution` and `Graphics`, the three `no_size` tests fail with `INDEX_BUFFER_SIZE has not been set`. ### 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: PPSA03016 #10195 (also PPSA08338, the EU release) - [x] GPUs tested: AMD Radeon RX 9070 XT, RADV Mesa 26.2.5, Linux 7.2.11; NVIDIA GeForce RTX 3080, driver 617.42, Windows 11 (spiff637, #7679); NVIDIA GeForce RTX 4070 SUPER, driver 616.92, Windows 11 (ycbuzi); NVIDIA GeForce RTX 5070 Ti, driver 617.42, and AMD Radeon RDNA2 iGPU, AMD 32.0.21042.62, Windows 11 (wachi35676) - [x] AI-assisted: yes
ycbuzi commented 2026-10-21 22:41:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ycbuzi on 2026-10-21T22:41:50Z.


Windows run of fed7f1970d merged onto main a6dcea9279 (6b664c633c, clean), the platform the description lists as not tested. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, BUILD_TESTING=ON. RTX 4070 SUPER, NVIDIA 616.92 (ANYPS5_GPU=4070), with ANYPS5_REQUIRE_VULKAN=1 and ANYPS5_NO_SHADER_CACHE=1.

Built libSceAgcDriver, agc_driver_pm4_tests and agc_driver_sparse_indirect_indices_tests with no errors. The build prints two memcmp bound warnings, which main prints the same way from Graphics/src/PipelineLibrary.cpp, a file this PR does not change. ctest --repeat until-fail:2 on the 19 tests these executables register on Windows: all pass on both repeats. Not run: a title.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6328165168 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9424#issuecomment-6328165168). Originally posted by [ycbuzi](https://github.com/ycbuzi) on 2026-10-21T22:41:50Z. --- Windows run of fed7f1970d merged onto `main` a6dcea9279 (6b664c633c, clean), the platform the description lists as not tested. Windows 11 Home 10.0.26200, MinGW-w64 GCC 15.2.0 (ucrt-posix-seh r7), Release, `BUILD_TESTING=ON`. RTX 4070 SUPER, NVIDIA 616.92 (`ANYPS5_GPU=4070`), with `ANYPS5_REQUIRE_VULKAN=1` and `ANYPS5_NO_SHADER_CACHE=1`. Built `libSceAgcDriver`, `agc_driver_pm4_tests` and `agc_driver_sparse_indirect_indices_tests` with no errors. The build prints two `memcmp` bound warnings, which `main` prints the same way from `Graphics/src/PipelineLibrary.cpp`, a file this PR does not change. `ctest --repeat until-fail:2` on the 19 tests these executables register on Windows: all pass on both repeats. Not run: a title.
wachi35676 commented 2026-10-21 22:59:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by wachi35676 on 2026-10-21T22:59:21Z.


Windows check of head fed7f19 merged onto main a6dcea927 (clean merge), on the two GPUs this PR has not been run on so far: AMD's proprietary Windows driver and an RTX 50-series card.

Host: Windows 11 (10.0.26300), Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, Ninja. GPUs: NVIDIA GeForce RTX 5070 Ti (driver 617.42) and AMD Radeon RDNA2 iGPU 1002:13c0 (proprietary driver 32.0.21042.62, selected with ANYPS5_GPU=AMD). ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1. The validation layer was not used.

  • The 3 new tests pass on both GPUs: agc_driver_sparse_indirect_indices_no_size, _no_size_unreadable and _no_size_unreadable_record. _no_size prints all 8 "sparse indices … no index size passed" lines (2- and 4-byte indices, single and counted multi, before and after the gap).
  • 81-test related set (agc_driver_pm4*, sparse_indirect*, *indirect_arguments*, pipelined_indirect_draw, rect_list_indirect, prepared_shaders_indirect, draw_offset_indices, graphics*, mesh*, tessellation, pipeline journal and others): the results match main on both GPUs. The only failures are ones main also has on this machine: agc_driver_image_array_window_past_layer_limit, which does not compile under MinGW on main (alignas(65536)), and agc_driver_tessellation, which fails on AMD only.
  • Negative control: I kept the PR's tests and reverted libSceAgcDriver/Execution and Graphics to main. All three no_size tests then fail on both GPUs with INDEX_BUFFER_SIZE has not been set. The two existing sparse_indirect_indices tests still pass.
  • tools/check_conventions.py --base a6dcea927 passes.

I have no PPSA03016/PPSA08338 here, so no title run.

AI-assisted: yes (Claude Code); results above were run on this machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6328441085 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9424#issuecomment-6328441085). Originally posted by [wachi35676](https://github.com/wachi35676) on 2026-10-21T22:59:21Z. --- Windows check of head `fed7f19` merged onto main `a6dcea927` (clean merge), on the two GPUs this PR has not been run on so far: AMD's proprietary Windows driver and an RTX 50-series card. Host: Windows 11 (10.0.26300), Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, Ninja. GPUs: NVIDIA GeForce RTX 5070 Ti (driver 617.42) and AMD Radeon RDNA2 iGPU `1002:13c0` (proprietary driver 32.0.21042.62, selected with `ANYPS5_GPU=AMD`). `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1`. The validation layer was not used. - The 3 new tests pass on both GPUs: `agc_driver_sparse_indirect_indices_no_size`, `_no_size_unreadable` and `_no_size_unreadable_record`. `_no_size` prints all 8 "sparse indices … no index size passed" lines (2- and 4-byte indices, single and counted multi, before and after the gap). - 81-test related set (`agc_driver_pm4*`, `sparse_indirect*`, `*indirect_arguments*`, `pipelined_indirect_draw`, `rect_list_indirect`, `prepared_shaders_indirect`, `draw_offset_indices`, `graphics*`, `mesh*`, `tessellation`, pipeline journal and others): the results match main on both GPUs. The only failures are ones main also has on this machine: `agc_driver_image_array_window_past_layer_limit`, which does not compile under MinGW on main (`alignas(65536)`), and `agc_driver_tessellation`, which fails on AMD only. - Negative control: I kept the PR's tests and reverted `libSceAgcDriver/Execution` and `Graphics` to main. All three `no_size` tests then fail on both GPUs with `INDEX_BUFFER_SIZE has not been set`. The two existing `sparse_indirect_indices` tests still pass. - `tools/check_conventions.py --base a6dcea927` passes. I have no PPSA03016/PPSA08338 here, so no title run. AI-assisted: yes (Claude Code); results above were run on this machine.
MarcZX10 commented 2026-10-22 04:54:04 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-22T04:54:04Z.

Review: DISMISSED


The new branch documents and tests the no-size draw path thoroughly, including paired Vulkan validation. There are two repository issues to resolve before this change can proceed:

  1. The PR says it carries the patch from #7679, which was closed by the repository's automatic open-PR limit before review. The user's operating constraint for this review is not to reuse work from intake-paused/limit-closed PRs through a different author's branch. Please stop this transfer and let the original author reopen #7679 when eligible, preserving the original patch and authorship there. The commit's author field is preserved, which is good, but does not resolve the intake constraint.

  2. The body reports a title-specific stop for Marvel's Spider-Man 2 (PPSA03016), but the checklist says Unblocks: none. The repository checklist requires a title ID and Game bring-up discussion for a stop seen on a title. Please add the verified discussion reference, or explain that no qualifying bring-up discussion exists and update the claim accordingly.

The paired focused tests and validation-layer report are author-provided and use 0c6a5bd593; current main is 417 commits ahead of that comparison base. If this work is reopened as its original PR, it will still need a current-main update and focused rerun. Hosted eligibility, conventions, intake, labels, and report checks pass; product/relinker jobs are skipped. I did not run the tests locally because no matching checkout/build is available here.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5609423715 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9424#pullrequestreview-5609423715). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-22T04:54:04Z. **Review:** DISMISSED --- The new branch documents and tests the no-size draw path thoroughly, including paired Vulkan validation. There are two repository issues to resolve before this change can proceed: 1. The PR says it carries the patch from #7679, which was closed by the repository's automatic open-PR limit before review. The user's operating constraint for this review is not to reuse work from intake-paused/limit-closed PRs through a different author's branch. Please stop this transfer and let the original author reopen #7679 when eligible, preserving the original patch and authorship there. The commit's author field is preserved, which is good, but does not resolve the intake constraint. 2. The body reports a title-specific stop for Marvel's Spider-Man 2 (PPSA03016), but the checklist says `Unblocks: none`. The repository checklist requires a title ID and Game bring-up discussion for a stop seen on a title. Please add the verified discussion reference, or explain that no qualifying bring-up discussion exists and update the claim accordingly. The paired focused tests and validation-layer report are author-provided and use `0c6a5bd593`; current `main` is 417 commits ahead of that comparison base. If this work is reopened as its original PR, it will still need a current-main update and focused rerun. Hosted eligibility, conventions, intake, labels, and report checks pass; product/relinker jobs are skipped. I did not run the tests locally because no matching checkout/build is available here.
hugodearaujo commented 2026-10-22 11:56:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-22T11:56:54Z.


@MarcZX10 thanks for the review.

  1. Carrying #7679. CONTRIBUTING doesn't rule out carrying a closed PR, and the commit keeps spiff637 as its author. spiff637 can't reopen #7679 yet: with no PR merged they can have one open, and #7604 is that one. As the description says, I'll close this PR if spiff637 reopens #7679. @spiff637, if you'd rather carry it yourself once you can, say so and I'll close this one then. Whether a carry like this can go ahead is the maintainers' call.
  2. Bring-up discussion. The checklist line reads Unblocks: PPSA03016, PPSA08338 (no Game bring-up discussion yet), not none. No Game bring-up discussion exists for either release: I listed the category's threads and searched for both IDs and the title's name.
  3. Current main. I'll rerun the focused set with the validation layer on this branch merged onto current main and update the Tested section.

@ycbuzi @wachi35676 thank you both for the Windows runs, on three GPUs this PR hadn't seen. Both are now in the Tested section.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340146064 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9424#issuecomment-6340146064). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-22T11:56:54Z. --- @MarcZX10 thanks for the review. 1. **Carrying #7679.** CONTRIBUTING doesn't rule out carrying a closed PR, and the commit keeps spiff637 as its author. spiff637 can't reopen #7679 yet: with no PR merged they can have one open, and #7604 is that one. As the description says, I'll close this PR if spiff637 reopens #7679. @spiff637, if you'd rather carry it yourself once you can, say so and I'll close this one then. Whether a carry like this can go ahead is the maintainers' call. 2. **Bring-up discussion.** The checklist line reads `Unblocks: PPSA03016, PPSA08338 (no Game bring-up discussion yet)`, not `none`. No Game bring-up discussion exists for either release: I listed the category's threads and searched for both IDs and the title's name. 3. **Current `main`.** I'll rerun the focused set with the validation layer on this branch merged onto current `main` and update the Tested section. @ycbuzi @wachi35676 thank you both for the Windows runs, on three GPUs this PR hadn't seen. Both are now in the Tested section.
hugodearaujo commented 2026-10-22 12:11:48 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by hugodearaujo on 2026-10-22T12:11:48Z.


@MarcZX10 the focused set is rerun on current main 8b3a6ba88d and on this branch merged onto it (a clean merge), with ANYPS5_REQUIRE_VULKAN=1, ANYPS5_NO_SHADER_CACHE=1 and VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation on the RX 9070 XT. main passes 26 of 26 and the merge 29 of 29, the same 26 plus the three no_size tests. The loader added the layer in both runs, and neither log has a VUID- line. check_conventions.py passes on the merge. It's in the Tested section now.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6340421508 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9424#issuecomment-6340421508). Originally posted by [hugodearaujo](https://github.com/hugodearaujo) on 2026-10-22T12:11:48Z. --- @MarcZX10 the focused set is rerun on current `main` 8b3a6ba88d and on this branch merged onto it (a clean merge), with `ANYPS5_REQUIRE_VULKAN=1`, `ANYPS5_NO_SHADER_CACHE=1` and `VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation` on the RX 9070 XT. `main` passes 26 of 26 and the merge 29 of 29, the same 26 plus the three `no_size` tests. The loader added the layer in both runs, and neither log has a `VUID-` line. `check_conventions.py` passes on the merge. It's in the Tested section now.
adriadam10 commented 2026-10-23 21:04:45 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-23T21:04:45Z.

Review: CHANGES_REQUESTED


Thanks for carrying this. One logic problem on the unknown-limit path, both places in Execution/src/Driver/Draw/Draw.cpp:

  • When the limit is unknown resolveIndirectDraw sets indexCount = 0, but two record filters still test arguments.firstVertexOrIndex < drawParameters.indexCount, so no record counts as drawable:
    • Draw.cpp:404 (recordDraws), used at :413 by the empty-indirect skip. For a program already known to take the CPU path, any stays false and the whole draw is skipped as empty (empty_indirect_skipped). That is a silent drop of the exact draws this PR is meant to enable.
    • Draw.cpp:940 (drawable) feeds lastDrawable. It never matches, so record == lastDrawable at :999 is never true for these draws and the pipelined commit of the last record doesn't happen.
  • Fix: in both lambdas, treat the index range as drawable when !indirect.indexLimitKnown, as the :966 branch already does.
  • Please add a test that fails without it: an unknown-limit indexed indirect draw where the program is already in CpuIndirectPrograms (second submission of the same draw), checking that the triangle is drawn. The current no_size tests submit it once, so they don't reach :413.

On the carry: the author stays credited, and which PRs may be carried is a maintainer call, not something this review decides.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5634432067 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/9424#pullrequestreview-5634432067). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-23T21:04:45Z. **Review:** CHANGES_REQUESTED --- Thanks for carrying this. One logic problem on the unknown-limit path, both places in `Execution/src/Driver/Draw/Draw.cpp`: - When the limit is unknown `resolveIndirectDraw` sets `indexCount = 0`, but two record filters still test `arguments.firstVertexOrIndex < drawParameters.indexCount`, so no record counts as drawable: - `Draw.cpp:404` (`recordDraws`), used at `:413` by the empty-indirect skip. For a program already known to take the CPU path, `any` stays false and the whole draw is skipped as empty (`empty_indirect_skipped`). That is a silent drop of the exact draws this PR is meant to enable. - `Draw.cpp:940` (`drawable`) feeds `lastDrawable`. It never matches, so `record == lastDrawable` at `:999` is never true for these draws and the pipelined commit of the last record doesn't happen. - Fix: in both lambdas, treat the index range as drawable when `!indirect.indexLimitKnown`, as the `:966` branch already does. - Please add a test that fails without it: an unknown-limit indexed indirect draw where the program is already in `CpuIndirectPrograms` (second submission of the same draw), checking that the triangle is drawn. The current `no_size` tests submit it once, so they don't reach `:413`. On the carry: the author stays credited, and which PRs may be carried is a maintainer call, not something this review decides.
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!9424
No description provided.