Repository navigation
fix(agc): handle the fill kernel that reads its pattern from a buffer - #4465
Merged
oneandonlydean merged 1 commit intoOct 14, 2026
Merged
Conversation
The 16-byte fill kernel has a variant that loads its pattern with s_buffer_load_dwordx4 through the V# in s[4:7] instead of taking it from the user SGPRs. Vampire Crawlers (PPSA30703) clears its UI canvas HTILE with it every frame; run as a shader, the depth surface never cleared and every UI draw failed its GEQUAL depth test, leaving the screen black.
Open
Contributor
|
Windows run, since the description lists Linux and Windows as not tested. Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU and an Intel Raptor Lake-S iGPU. The head 3bc3e35 merged into
Written with AI assistance. |
This was referenced Oct 12, 2026
mrzacarias
pushed a commit
to mrzacarias/AnyPS5
that referenced
this pull request
Oct 15, 2026
Upstream main now carries the final versions of PRs boykopovar#1193, boykopovar#1201, boykopovar#1202, boykopovar#5216 and boykopovar#4465, so their draft copies on this branch give way to main's: the snapshot ring, the pipeline identity memo, the code-hash memo and APS5_RESIDENT_LINEAR_TARGETS are gone with them. The port of boykopovar#4943 (draw-cache relocation across moved user-data pointers, not merged upstream) is dropped: the draw prefetch replaces it. Kept on top of main: the arm64 FEXCore runner and macOS libraries, the MoltenVK settings, rect-list clip and cull distances, GPU-ordered in-place vertex inputs, the draw pipeline's spin-first locks and lock-free overlap check, SharedVector binding flags, the result-memo admission, the draw prefetch (APS5_DRAW_PREFETCH) and the 1D T# sample modes. New for arm64: fegetenv from the runner's guest control words, and the direct-memory reuse map on macOS. On macOS the guest buffers keep one descriptor array (no buffers_coherent or buffers_u8 aliases): MoltenVK aliases a descriptor array only through Metal argument buffers, which the driver turns off, and Vampire Crawlers' first compute pipeline failed to compile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The fill HLE knows the 16-byte fill kernel that takes its pattern from the user SGPRs s[4:7]. Some titles use a variant that loads the pattern with
s_buffer_load_dwordx4through the V# in s[4:7] instead:That variant ran as a shader, so a uniform fill over an HTILE was never seen as a depth fast clear. Vampire Crawlers clears its 1080p UI canvas HTILE this way every frame. The depth surface kept old depth, every UI draw (reverse-Z,
GEQUAL) failed its depth test, and the screen stayed black while the 3D scene rendered into its own target.matchesFillKernelnow accepts the variant, andfillBufferreads the 16-byte pattern from the V# base address, so the existing HTILE and DCC key handling applies. The descriptor's size and stride are not checked.depth_fast_clear_submitgets a case that fills with the buffer pattern 0xffffffff (no clear) and 0 (clear).Context: #1 (comment)
Tested
macOS arm64 (M1 Pro, MoltenVK), on
mainplus a local macOS arm64 port, FEXCore runner. Vampire Crawlers: black screen before, renders and plays after.depth_fast_clear_submit: the new case fails without the fix and passes with it.agc_driver_graphics_tests,dword_pattern_fill,pattern_buffer_fill,fill_cover_keys,vertex_fetchpass. Linux and Windows not tested.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)