Repository navigation
feat(agc-driver): draw DB_RENDER_CONTROL depth clears - #2219
Conversation
|
Another title that needs this: Ratchet & Clank: Rift Apart (PPSA01474), on Linux with an RX 9070 XT (RADV). Base:
No frame is presented yet, so I can't comment on the clear's visual result. Tested and written by Claude (AI assistant) on a contributor's machine. |
|
Tested with Sonic Origins (PPSA05324) on Linux, R9 380 (RADV, Mesa 26.0.8). It issues the same clears: first On Bring-up thread: #2021 |
|
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
No title was run. 🤖 Addressed by Claude Code |
|
Tested on Windows with a second title that stops on the same draw: Marvel's Wolverine (PPSA03671), also Setup: Windows 11 Pro (10.0.26200), RTX 3070, GCC 15.2.0 UCRT (WinLibs), Release. This PR (d777057) merged onto main 54f28f2 with #1836, #1893, #1709, #1837, #1940, #2022, and a local change that lets Without this PR: the first presentation fails with With this PR: the clear draws pass. The next stop is a null pixel program static ABI miss (#1901, fixed by #1902). Limits: one title, one run each way. No frame is presented yet, so I can't confirm the clear values on screen. |
|
#1534 is in main now, so this needs a rebase onto main (conflicts in |
DEPTH_CLEAR_ENABLE (DB_RENDER_CONTROL bit 0, Mesa sid.h) makes the DB write DB_DEPTH_CLEAR wherever the draw covers. Such a draw is now rasterized as submitted with an always-passing depth write, no depth bounds, no depth bias and the viewport depth range pinned to the clear value, so it touches exactly the pixels the title's geometry covers. Clearing a read-only or absent depth plane throws, at decode and in the draw precheck. Depth and stencil clears combine; copy, resummarize and decompress draws still throw. Uncharted: Legacy of Thieves Collection (PPSA05684) clears with draws that set DB_RENDER_CONTROL to 0x3 and stopped with "depth/stencil clear, copy, resummarize or decompress draws (DB_RENDER_CONTROL) is unsupported (register 0x0 = 0x00000003)".
|
Rebased onto current |
d777057 to
295223f
Compare
…draws feat(agc-driver): draw DB_RENDER_CONTROL depth clears
What
Uncharted: Legacy of Thieves Collection (PPSA05684) clears depth and stencil with draws that set
DB_RENDER_CONTROLto 0x3 and stops onmainwith:#1534 handles
STENCIL_CLEAR_ENABLE; this addsDEPTH_CLEAR_ENABLE(bit 0, Mesasid.h) on top of it, as suggested in #1479.DB_DEPTH_CLEAR. It therefore writes the clear value exactly where the title's geometry covers; nothing is inferred from viewport or scissor state (the blocker feat(agc): add experimental depth clear and copy recognition #1395 describes).tests/Graphics.cpp(DepthStencilTests): depth clear state, read-only plane, combined 0x3 clear; the old expectation that bit 0 throws is replaced.The first two commits are #1534's.
Tested
Arch Linux, GCC 16.2.1, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.71.09).
main(d70b899) with fix(agc): preserve ClearMRT color writes and validate stencil clears #1534:tools/check_conventions.pypasses; of the 513 ctest tests all pass exceptagc_driver_dcc_keys_first_write, which fails the same way onmain, andagc_driver_storage_cache_budget, which passes run alone (a local 3 GB RSS limit stopped it underctest -j8).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)