Skip to content

fix(agc): cover unaligned guest buffer views - #7001

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
MarcZX10:codex/fix-viewbytes-range-6999
Oct 17, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
MarcZX10:codex/fix-viewbytes-range-6999

Conversation

@MarcZX10

Copy link
Copy Markdown
Contributor

What

Fixes GuestBufferMemory::ViewBytes under-coverage when an off-DWORD adjustment and byte count have remainders whose sum exceeds four. The computed range now rounds the complete adjustment + bytes span up to a DWORD, while retaining the existing aligned-adjustment behavior. Regression coverage includes byte counts 2, 3, 6, 7 and 4098 with unaligned adjustments.

This follow-up is based on xXPBSXx's test commit from #6695, preserved unchanged as the first commit. Depends on: #6695.

Tested

Linux source workspace. python3 tools/check_conventions.py --base upstream/main --head HEAD passed; git diff --check passed; exhaustive formula comparison for byte counts and adjustments 0..63 passed. The AGC CMake test target could not be built because CMake could not find system SDL2 and the pinned SDL2 submodule commit was unavailable from the shallow submodule checkout. No GPU test run.

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; no stubs added
  • No notes, investigation files or images added to the repository
  • No new third-party code
  • Generic behavior, not title-specific
  • Depends on: test(agc): cover the DWORD rounding of guest buffer view ranges #6695
  • Unblocks: none
  • GPUs tested: n/a; no GPU test run
  • AI-assisted: yes

@github-actions

github-actions Bot commented Oct 17, 2026 •

Copy link
Copy Markdown

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.

Pull request Shared files not compared
PR 1191 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1324 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 1395 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 2434 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4040 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4449 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4650 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5390 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 5441 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5499 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5500 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 5925 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6188 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6215 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6222 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6235 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6297 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6320 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6447 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6457 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6479 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6529 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6535 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6647 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6730 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6808 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6947 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6973 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6987 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6989 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 6995 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp
PR 7002 core/libs/prx/libSceAgcDriver/tests/Graphics.cpp

@github-actions github-actions Bot added the agc libSceAgc* label Oct 17, 2026
@akkadbakkad89

Copy link
Copy Markdown
Contributor

GPU test run for the head 45be3c0 (filling the Tested gap):

  • Windows 11, RTX 3070 (driver 617.42), WinLibs GCC 15.2: agc_driver_graphics passes — the extended guestBufferViewBytesTests cases included.
  • Ubuntu/WSL, lavapipe (Mesa 25.2.8): agc_driver_graphics passes.

Independently reproduced the bug first: the same test binary built on main's formula fails with "a guest buffer view range did not cover the whole view" (I had a parallel fix in #7019, now closed in favour of this one).

@oneandonlydean
oneandonlydean merged commit 660cf7b into boykopovar:main Oct 17, 2026
9 checks passed
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.

4 participants