fix(agc): ignore the reserved DB_RENDER_CONTROL bits #16058

Merged
stuart-russell merged 1 commit from upstream-pr/16058 into main 2026-11-07 11:49:30 +00:00
stuart-russell commented 2026-11-05 13:44:42 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by stuart-russell on 2026-11-05T13:44:42Z.


What

DB_RENDER_CONTROL bits 14 to 31 are reserved and read as zero on the hardware. The maintenance check compared the register against ~0x2fe3, so any reserved bit looked like a depth copy, resummarize or decompress request and the draw was rejected.

The check now compares against the four maintenance bits only (0x101c, with RESUMMARIZE_ENABLE handled separately by the pass-through rule), so reserved bits are ignored as the hardware does, and a maintenance bit beside them is still reported.

Split from #10420; independent of the other pieces.

References

Bits 14 to 31 of DB_RENDER_CONTROL are reserved; the functional bits are the Z and stencil clear enables, the copy/resummarize/decompress requests, the copy sample selection and the copy destination.

Tested

agc_driver_pm4 (18 tests) and agc_driver_graphics pass, and tools/check_conventions.py --base origin/main passes, on d23df92b38. New checks: 0x4000, 0x80000000 and 0xffffc000 decode clean, and each with a maintenance bit added is still reported as DB_RENDER_CONTROL maintenance.

ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'agc_driver_(pm4|graphics)' -V passes with no VUID- lines and without the "was not found but was requested by env var VK_INSTANCE_LAYERS" message. This machine has no Vulkan device, so that run covers the decode path only.

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: none
  • GPUs tested: the branch's Linux test machine has no Vulkan device
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5172574863 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/16058). Originally posted by [stuart-russell](https://github.com/stuart-russell) on 2026-11-05T13:44:42Z. --- ### What `DB_RENDER_CONTROL` bits 14 to 31 are reserved and read as zero on the hardware. The maintenance check compared the register against `~0x2fe3`, so any reserved bit looked like a depth copy, resummarize or decompress request and the draw was rejected. The check now compares against the four maintenance bits only (`0x101c`, with `RESUMMARIZE_ENABLE` handled separately by the pass-through rule), so reserved bits are ignored as the hardware does, and a maintenance bit beside them is still reported. Split from #10420; independent of the other pieces. ### References Bits 14 to 31 of `DB_RENDER_CONTROL` are reserved; the functional bits are the Z and stencil clear enables, the copy/resummarize/decompress requests, the copy sample selection and the copy destination. ### Tested `agc_driver_pm4` (18 tests) and `agc_driver_graphics` pass, and `tools/check_conventions.py --base origin/main` passes, on `d23df92b38`. New checks: `0x4000`, `0x80000000` and `0xffffc000` decode clean, and each with a maintenance bit added is still reported as `DB_RENDER_CONTROL` maintenance. `ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ctest --test-dir build -R 'agc_driver_(pm4|graphics)' -V` passes with no `VUID-` lines and without the "was not found but was requested by env var VK_INSTANCE_LAYERS" message. This machine has no Vulkan device, so that run covers the decode path only. ### 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 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: none - [x] GPUs tested: the branch's Linux test machine has no Vulkan device - [x] AI-assisted: yes
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!16058
No description provided.