fix(agc): reject depth maintenance before shader compilation #1371

Merged
TibixDev merged 1 commit from upstream-pr/1371 into main 2026-10-08 12:37:01 +00:00
TibixDev commented 2026-10-08 00:39:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by TibixDev on 2026-10-08T00:39:08Z.


What

Reject unsupported depth-copy, resummarize, and decompress modes before shader compilation. Apply the check before the no-pixel-shader no-op path, even when general draw prechecks are disabled. The state decoder uses the same check.

The register mask follows DB_RENDER_CONTROL in AMD GFX10.3 register definitions. This rejects unsupported work; it does not implement these modes. #1139 changes whether a pixel stage runs and does not add this check.

Tested

Fedora 44 Release: graphics, driver, and PM4 tests pass. New cases cover maintenance with depth tests and color writes disabled, maintenance combined with clear bits, ordinary controls, and absent state. No game or Windows test. Contribution checks pass.

Checklist

  • Current main; related work compared above.
  • One topic.
  • No new code comments.
  • Unsupported paths still throw; UI stubs are documented.
  • No notes, logs, or images in the repository.
  • No new third-party code.
  • General behavior.
  • Depends on: none.
  • AI-assisted: yes.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4780206973 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1371). Originally posted by [TibixDev](https://github.com/TibixDev) on 2026-10-08T00:39:08Z. --- ### What Reject unsupported depth-copy, resummarize, and decompress modes before shader compilation. Apply the check before the no-pixel-shader no-op path, even when general draw prechecks are disabled. The state decoder uses the same check. The register mask follows `DB_RENDER_CONTROL` in [AMD GFX10.3 register definitions](https://github.com/torvalds/linux/blob/v6.18/drivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_sh_mask.h). This rejects unsupported work; it does not implement these modes. #1139 changes whether a pixel stage runs and does not add this check. ### Tested Fedora 44 Release: graphics, driver, and PM4 tests pass. New cases cover maintenance with depth tests and color writes disabled, maintenance combined with clear bits, ordinary controls, and absent state. No game or Windows test. Contribution checks pass. ### Checklist - [x] Current `main`; related work compared above. - [x] One topic. - [x] No new code comments. - [x] Unsupported paths still throw; UI stubs are documented. - [x] No notes, logs, or images in the repository. - [x] No new third-party code. - [x] General behavior. - [x] Depends on: none. - [x] AI-assisted: yes.
adriadam10 commented 2026-10-08 12:36:58 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T12:36:58Z.


Checked on current main: build + ctest 450/450 (agc_driver_graphics passes), CI green on the head. The mask 0x2063 matches DB_RENDER_CONTROL in gc_10_3_0_sh_mask.h (v6.18): clear bits, the two compress-disable bits and PS_INVOKE_DISABLE pass; copy, resummarize, centroid/sample and decompress are rejected, consistent with the existing rule in decodeDepth. The new test needs DepthMaintenanceRejection, so it can't pass on main. Merging.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6060015818 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1371#issuecomment-6060015818). Originally posted by [adriadam10](https://github.com/adriadam10) on 2026-10-08T12:36:58Z. --- Checked on current `main`: build + ctest 450/450 (`agc_driver_graphics` passes), CI green on the head. The mask `0x2063` matches `DB_RENDER_CONTROL` in `gc_10_3_0_sh_mask.h` (v6.18): clear bits, the two compress-disable bits and `PS_INVOKE_DISABLE` pass; copy, resummarize, centroid/sample and decompress are rejected, consistent with the existing rule in `decodeDepth`. The new test needs `DepthMaintenanceRejection`, so it can't pass on `main`. Merging.
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!1371
No description provided.