Repository navigation
fix(agc): rasterize nothing for an attachment-free draw with an empty screen scissor - #6773
Conversation
… screen scissor A draw without color or depth targets takes its framebuffer extent from PA_SC_SCREEN_SCISSOR_BR. When that rectangle is empty the hardware still runs the vertex stage but produces no pixels; it no longer throws. The framebuffer is one pixel in the empty dimension and the screen scissor clips it to nothing. AI-assisted: yes
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
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.
|
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,
Full CTest ( AI-assisted: yes (Claude Code) |
|
Checked the empty screen scissor path (intersect clips the 1x1 extent to 0x0) and the updated Graphics test against current main; merged. |
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)