Skip to content

fix(graphics): keep discarded import probes from pinning windows - #6097

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
XD3V3LOP3RX:fix/host-import-probe-use-stamp
Oct 18, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
XD3V3LOP3RX:fix/host-import-probe-use-stamp

Conversation

@XD3V3LOP3RX

Copy link
Copy Markdown

What

A stale-registry probe stamps an ordinary prefix host import as used before rejecting it. That false hold can block a valid import of the whole registered allocation. Separate lookup from accepted-use stamping; preserve actual descriptor holds and stamp accepted joined/exact-run reuse.

Related: #5870 promotes genuinely held windows, a different condition. Both patches apply in either order against the same base and produce identical combined blobs. Their combined runtime behavior has not been tested.

Tested

Windows x64, GCC 15.2, Ninja Release:

  • Clean upstream 4808d9c plus the new regression: target build passed; agc_driver_graphics failed at the intended discarded-prefix assertion.
  • Add only the production fix, regression unchanged: target build passed; the same test passed in 5.29 seconds.
  • Rebased onto 038c83b9: rebuilt agc_driver_graphics_tests, reran its CPU/mock test, and passed the upstream convention checker.

The regression checks unheld prefix replacement, protection of an actual held descriptor, and accepted reuse/stamping, including allocation extent, registered owner/import identity, descriptor contents, and unchanged guest bytes. Physical GPU host-import lifetime and Linux CI remain untested. No game-menu or performance claim.

Checklist

  • Based on current main at 038c83b9; open-PR overlap checked, no duplicate discarded-probe fix found
  • One topic per PR; follow-ups go in a new PR
  • No new code comments
  • Unimplemented paths and silent stubs unchanged
  • Only source and synthetic tests added; no reports, images, or game files
  • No new third-party code
  • Generic behavior, not specific to one title
  • Depends on: none
  • Unblocks: none
  • GPUs tested: none; CPU/mock Vulkan allocation on Windows x64 only
  • AI-assisted: yes

@github-actions github-actions Bot added the agc libSceAgc* label Oct 14, 2026
@coltken95

Copy link
Copy Markdown

Tested on Linux x86-64 (Release build, lavapipe / llvmpipe LLVM 20.1.2), with a7730cb merged into main ab9a476:

  • With the PR: all 8 tests built from the changed test file pass, including agc_driver_graphics.
  • With main's GuestBufferMemory.cpp: agc_driver_graphics fails with AGC graphics: a discarded stale probe made an unheld prefix window block the whole import.

Lavapipe refuses the host import (vkAllocateMemory -2) and falls back to copies, so the physical-GPU import path is still untested.

AI-assisted: yes (Claude Code)

This was referenced Oct 15, 2026
@github-actions

github-actions Bot commented Oct 15, 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 2434 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 4448 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 5021 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 5372 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6177 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6185 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6186 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6197 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6222 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6292 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6320 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6373 core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6412 core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp
PR 6472 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6481 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6499 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6548 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6615 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 6786 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
PR 7201 core/libs/prx/libSceAgcDriver/Graphics/src/GuestBufferMemory.cpp
core/libs/prx/libSceAgcDriver/tests/BdaResources.cpp

@adriadam10

Copy link
Copy Markdown
Collaborator

Checked on Linux (merged onto current main): build and the libSceAgcDriver ctest scope are green except agc_driver_tessellation, which segfaults at Vulkan device creation independently of this change. agc_driver_graphics passes with the PR and fails when GuestBufferMemory.cpp is reverted. Lookup/stamp split and the held-descriptor control look right; merging.

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.

3 participants