Skip to content

fix(libSceAgcDriver): accept scissors that apply the zero window offset - #452

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
SP4C3B4R-8:fix/scissor-window-offset
Oct 4, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
SP4C3B4R-8:fix/scissor-window-offset

Conversation

@SP4C3B4R-8

Copy link
Copy Markdown
Contributor

What

intersect rejected any generic, window or viewport scissor whose WINDOW_OFFSET_DISABLE bit (bit 31 of the TL register) is clear. PA_SC_WINDOW_OFFSET is already required to be zero for every draw, so such a scissor selects exactly the same rectangle as one that sets the bit. Only the reserved bits (TL bit 15, BR bits 15 and 31) are still rejected.

A retail title issues thousands of draws per minute with PA_SC_VPORT_SCISSOR_0_TL = 0 and a zero window offset; all of them were skipped with "scissor window offsets or reserved bits are unsupported".

Tested

Windows 11, MinGW-w64 GCC 15.2.0. agc_driver_graphics_tests passes on this branch alone, with a new check that a generic scissor without the disable bit decodes to the same rectangle and that reserved bits still fail. With a retail title the skipped draws are gone and its frames render.

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 in TechnicalDebt
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes (Claude). I reviewed and take responsibility for every line.

🤖 Generated with Claude Code

https://claude.ai/code/session_018m6Ad8zkQKPKZmyUQK9vfE

PA_SC_WINDOW_OFFSET is already required to be zero, so a generic,
window or viewport scissor whose WINDOW_OFFSET_DISABLE bit is clear
selects the same rectangle as one that sets it. Only the reserved
bits are still rejected.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018m6Ad8zkQKPKZmyUQK9vfE
@github-actions github-actions Bot added the agc libSceAgc* label Oct 3, 2026
@oneandonlydean
oneandonlydean merged commit 2cb95da into boykopovar:main Oct 4, 2026
4 of 5 checks passed
SP4C3B4R-8 pushed a commit to SP4C3B4R-8/AnyPS5 that referenced this pull request Oct 6, 2026
Takes the 13 gate-batch PRs that merged upstream (boykopovar#319 boykopovar#329 boykopovar#330 boykopovar#331 boykopovar#325
boykopovar#435 boykopovar#471 boykopovar#294 boykopovar#376 boykopovar#404 boykopovar#394 boykopovar#401 boykopovar#446) in place of astrobot's local
versions, as integ/gate-batch cab0eab had them: boykopovar#294 and boykopovar#376 in
astrobot's depth model (DepthTarget, state.depth), boykopovar#394 with the thick mip
tails, boykopovar#401 over astrobot's slab pool, boykopovar#471 keeping the settled single-lane
path. Also takes the rest of main since a818bee (boykopovar#532 boykopovar#340 boykopovar#486 boykopovar#484 boykopovar#316
boykopovar#243 boykopovar#334 boykopovar#434 boykopovar#437 boykopovar#470 boykopovar#373 boykopovar#452 boykopovar#455 and our upstreamed PRs, where
astrobot keeps its later revisions and env switches).

Resolution notes: relinker converter/matcher/tests are upstream's (boykopovar#432
decoder covers VEX RIP-relative followers); RecompileResult gains boykopovar#316's
hostSubgroupSize (set from request.target.subgroupSize); shader disk cache
format 9; boykopovar#452's scissor message; upstream's later live-stack and
memory-copy decode tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Mgp3oZvembQziVNE2xARQK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants