fix(agc): rasterize nothing for an attachment-free draw with an empty screen scissor #6773
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6773"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-16T11:22:54Z.
What
A draw without color or depth targets takes its framebuffer extent from
PA_SC_SCREEN_SCISSOR_BR. When that rectangle is empty (0in Legacy of Thieves Collection's case, about a minute after its menu),DecodeStatethrewempty framebuffer extent for a draw without color writesand the title stopped.An empty screen scissor rasterizes no pixels; the vertex stage still runs. The framebuffer is now one pixel in each empty dimension and the screen scissor clips it to nothing, the same way a collapsed viewport already gets an empty scissor.
#6212 treats an inverted scissor rectangle as empty; this is the attachment-free case of an empty screen scissor, which that PR does not touch.
Tested
agc_driver_graphics: the attachment-free state withPA_SC_SCREEN_SCISSOR_BR = 0decodes to a 1x1 framebuffer with an empty scissor; a screen scissor of 64 columns and no rows keeps its width and clips every row.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-16T11:31:30Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppImported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-16T11:52:19Z.
Review: APPROVED
The fallback keeps the attachment-free framebuffer extent nonzero while intersecting the original screen scissor to an empty rectangle, so the draw can run without rasterizing fragments. The decode tests cover both a fully empty rectangle and a zero-height rectangle with a nonzero width, and the reported game run confirms the original stop is gone. The PR is mergeable and its eligibility, conventions, intake, and report checks pass.
Imported from boykopovar/AnyPS5. Originally posted by savvaniss on 2026-10-17T14:43:22Z.
Intel and AMD Windows data: no failures from this change.
Windows 11 Pro 26300, WinLibs GCC 15.2.0 r7, Release, every execution test built,
ANYPS5_NO_SHADER_CACHE=1, serial CTest,main47a266cf9. Intel UHD Graphics 770 (8086:a780, 32-wide subgroups), driver 32.0.101.7088. AMD Radeon RX 9070 XT (1002:7550, 64-wide subgroups), driver 32.0.31041.1004, withVkCacheemptied first.3659e9a99merged intomain: the 16 tests built fromtests/Graphics.cpp, ×3Full CTest (
--parallel 4) with six open PRs merged intomain(#6638, #6604, #6014, #6773, #6772, #6725): the same failures asmainalone on both GPUs, nothing new.mainalone: UHD 770 1392 of 1398, RX 9070 XT 1396 of 1398. The failures are image tables (#6647) andsample_multisample_target(#6971) on Intel, andquad_pixel_mask(#6255) andlayered_volume_vertex_no_gpl(#4768) on AMD.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-20T09:14:47Z.
Checked the empty screen scissor path (intersect clips the 1x1 extent to 0x0) and the updated Graphics test against current main; merged.