fix(agc): draw nothing for resummarize draws without depth or color work #2178

Merged
oneandonlydean merged 1 commit from upstream-pr/2178 into main 2026-10-10 04:44:46 +00:00
oneandonlydean commented 2026-10-09 10:42:01 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T10:42:01Z.


What

A draw with DB_RENDER_CONTROL.RESUMMARIZE_ENABLE (bit 4) recomputes the HTILE summary of the bound depth surface from its depth values. HTILE is not modeled: depth surfaces live in their resident images. So a resummarize draw with depth and stencil tests off (DB_DEPTH_CONTROL bits 0-1 clear) and no color writes changes no modeled state. DepthMaintenanceRejection now passes it, and the draw precheck draws nothing for it. Before, it threw:

DB_RENDER_CONTROL depth copy, resummarize or decompress is unsupported (register 0x0 = 0x00000010)

These still throw:

  • a resummarize draw with a depth or stencil test, with color writes, or without DB_DEPTH_CONTROL/CB_TARGET_MASK/CB_SHADER_MASK set;
  • depth/stencil copy and other maintenance bits.

TechnicalDebt records the rule.

For the reviewers

#1371 (f2fe3f7165) made maintenance draws reject before shader compilation, and its test listed resummarize among the rejected modes. This changes that one case. If the intent is to reject every resummarize draw until HTILE is modeled, this PR should not be merged.

Tested

  • Linux (CachyOS, GCC 16.2, RTX 4090, NVIDIA 610.57), on main a8b032b236: ctest 495/495. tools/check_conventions.py passes.
  • agc_driver_graphics, depthMaintenanceTests: a resummarize draw with no depth/stencil test and no color writes passes, with every clear combination. The same draw with Z_ENABLE or with color writes still rejects. Copy, compress and other modes still reject as before.
  • A heavier title issues such draws (DB_RENDER_CONTROL 0x10, no depth test, no color) in its title passes, and stopped there with the line above. With this, it reaches its title screen.

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 in TechnicalDebt
  • 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
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4799321073 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2178). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-09T10:42:01Z. --- ### What A draw with `DB_RENDER_CONTROL.RESUMMARIZE_ENABLE` (bit 4) recomputes the HTILE summary of the bound depth surface from its depth values. HTILE is not modeled: depth surfaces live in their resident images. So a resummarize draw with depth and stencil tests off (`DB_DEPTH_CONTROL` bits 0-1 clear) and no color writes changes no modeled state. `DepthMaintenanceRejection` now passes it, and the draw precheck draws nothing for it. Before, it threw: ``` DB_RENDER_CONTROL depth copy, resummarize or decompress is unsupported (register 0x0 = 0x00000010) ``` These still throw: - a resummarize draw with a depth or stencil test, with color writes, or without `DB_DEPTH_CONTROL`/`CB_TARGET_MASK`/`CB_SHADER_MASK` set; - depth/stencil copy and other maintenance bits. TechnicalDebt records the rule. #### For the reviewers #1371 (`f2fe3f7165`) made maintenance draws reject before shader compilation, and its test listed resummarize among the rejected modes. This changes that one case. If the intent is to reject every resummarize draw until HTILE is modeled, this PR should not be merged. ### Tested - Linux (CachyOS, GCC 16.2, RTX 4090, NVIDIA 610.57), on `main` a8b032b236: ctest 495/495. `tools/check_conventions.py` passes. - `agc_driver_graphics`, `depthMaintenanceTests`: a resummarize draw with no depth/stencil test and no color writes passes, with every clear combination. The same draw with `Z_ENABLE` or with color writes still rejects. Copy, compress and other modes still reject as before. - A heavier title issues such draws (`DB_RENDER_CONTROL` 0x10, no depth test, no color) in its title passes, and stopped there with the line above. With this, it reaches its title screen. ### 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 in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [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] AI-assisted: yes
popcoder565 commented 2026-10-09 15:24:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:24:34Z.


Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 24876afc, merged onto main d70b8998 in one build with 33 other AGC/shader PRs that had no Windows run.

  • This PR's tests pass: agc_driver_graphics. None of them reported skipping a case.
  • Full ctest in that build: 514 of 515. The one failure is #2257's new test, which is registered without the Windows PATH setup.

No title was run.

🤖 Addressed by Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6083908869 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2178#issuecomment-6083908869). Originally posted by [popcoder565](https://github.com/popcoder565) on 2026-10-09T15:24:34Z. --- Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head `24876afc`, merged onto `main` d70b8998 in one build with 33 other AGC/shader PRs that had no Windows run. - This PR's tests pass: `agc_driver_graphics`. None of them reported skipping a case. - Full ctest in that build: 514 of 515. The one failure is #2257's new test, which is registered without the Windows `PATH` setup. No title was run. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
github-actions[bot] commented 2026-10-09 15:28:34 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-09T15:28:34Z.


Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#2381 docs/dev/TechnicalDebt.md L394-395
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6083975088 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/2178#issuecomment-6083975088). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-10-09T15:28:34Z. --- <!-- pr-overlap --> Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in **Depends on**. | Pull request | Conflicting files (lines on `main`) | Same exports | Same new files | |---|---|---|---| | #2381 | `docs/dev/TechnicalDebt.md` [L394-395](https://github.com/boykopovar/AnyPS5/blob/80d539abcbd0f90a7b6e64f7ab4868556671f241/docs/dev/TechnicalDebt.md#L394-L395) | | |
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!2178
No description provided.