fix(agc): skip an indexed draw with no indices or instances #5205

Merged
mrfelek merged 2 commits from upstream-pr/5205 into main 2026-10-14 06:18:03 +00:00
mrfelek commented 2026-10-13 14:35:46 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by mrfelek on 2026-10-13T14:35:46Z.


What

A direct indexed draw with zero indices or zero instances threw zero-count indexed draws are unsupported. The auto (non-indexed) path already records nothing for such a draw. The indexed path now does the same: the draw has nothing to rasterize, so no work is recorded. Indirect draws are unchanged.

New case in agc_driver_graphics_tests: an indexed draw with zero indices and one with zero instances are skipped. The zero-index case fails without the change with "an indexed draw without indices was not skipped".

Tested

Ubuntu 26.10, GCC 15.3.0, RTX 3080 Ti (NVIDIA 615.71.09), Release, on main 146f17154.

  • agc_driver_graphics_tests passes; fails without the change.
  • Depth tests that share the code pass: depth_plane_sampling, depth_storage, depth_plane_guest_layers, depth_storage_dispatch, depth_storage_reuse, depth_compare_copy.
  • Diablo II: Resurrected (PPSA03912, 01.039.000): Offline > New Character aborted with this message. With the change the class selection screen draws and the game reaches the Rogue Encampment (very slow, see #3961). That run also had two local depth changes (see #1186, #5003).

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; no silent stubs added
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source (none)
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA03912 #5146
  • GPUs tested: NVIDIA GeForce RTX 3080 Ti, driver 615.71.09, Ubuntu 26.10
  • AI-assisted: yes (Claude Code); I reviewed every line and ran the tests and the title
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4844855814 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/5205). Originally posted by [mrfelek](https://github.com/mrfelek) on 2026-10-13T14:35:46Z. --- ### What A direct indexed draw with zero indices or zero instances threw `zero-count indexed draws are unsupported`. The auto (non-indexed) path already records nothing for such a draw. The indexed path now does the same: the draw has nothing to rasterize, so no work is recorded. Indirect draws are unchanged. New case in `agc_driver_graphics_tests`: an indexed draw with zero indices and one with zero instances are skipped. The zero-index case fails without the change with "an indexed draw without indices was not skipped". ### Tested Ubuntu 26.10, GCC 15.3.0, RTX 3080 Ti (NVIDIA 615.71.09), Release, on main 146f17154. - `agc_driver_graphics_tests` passes; fails without the change. - Depth tests that share the code pass: depth_plane_sampling, depth_storage, depth_plane_guest_layers, depth_storage_dispatch, depth_storage_reuse, depth_compare_copy. - Diablo II: Resurrected (PPSA03912, 01.039.000): Offline > New Character aborted with this message. With the change the class selection screen draws and the game reaches the Rogue Encampment (very slow, see #3961). That run also had two local depth changes (see #1186, #5003). ### 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 - [x] Unimplemented paths throw; no silent stubs added - [x] No notes, investigation `.md` files or images added to the repository - [x] New third-party code is a submodule built from source (none) - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Unblocks: PPSA03912 #5146 - [x] GPUs tested: NVIDIA GeForce RTX 3080 Ti, driver 615.71.09, Ubuntu 26.10 - [x] AI-assisted: yes (Claude Code); I reviewed every line and ran the tests and the title
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!5205
No description provided.