fix(agc): accept a stored refill of a pending HTILE clear #15446
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15446"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by edubox on 2026-11-03T10:37:23Z.
What
A whole-HTILE fill that repeats the value of a clear transition still pending in the depth sampling state was refused as
overlapping native multisample depth clear transitions are not implemented. The existing refill path only recognized a fill still queued in the recorder.When the metadata already holds the same pattern and was stored after the pending fill began, the second fill is the same clear: it now takes the newer generation and store stamp so
CheckCurrentcan consume it. A different pattern, or the same pattern before the metadata is stored, is still refused.With #15443, 7th Guest (PPSA17019) advances from the overlapping-clear refusal to the next, separate blocker (
sample-preserving guest publication of native multisample depth is not implemented).Tested
Linux x86-64 (CachyOS), GCC 16.2.1, Release, NVIDIA GeForce RTX 4080 SUPER (driver 615.78.8.0):
agc_driver_native_depth_stored_repeat_fill: a stored same-value refill is accepted, an unstored same-value refill and a partially stored same-value refill are refused, and a stored same-value refill after a draw is accepted, with 2, 4 and 8 samples.ANYPS5_REQUIRE_VULKAN=1 ctest --test-dir build -R 'agc_driver_native_depth|^agc_driver_graphics$|^agc_driver_key_miss$|^agc_driver_bda_device$|^agc_driver_recorder$': 18/18 pass on the change, 17/17 onmain(4f41f4c375) before the new test existed.VK_LAYER_KHRONOS_validationcomparison on this head andmain4f41f4c375(NVIDIA GeForce RTX 4080 SUPER, driver 615.78.8.0) inserts the layer on both sides, passes the focused depth tests on both and logs noVUID-. The repository AMD GPU run on this head reports no new validation IDs versus main (924 tests run on the GPU) after merging ontomain4f41f4c375and comparing both sides withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_LAYER_KHRONOS_validation(TechLevelZero, 2026-11-03 11:13 UTC, https://gist.github.com/TechLevelZero/9f35362949002d87f61e630f49108311).tools/check_conventions.py --base origin/mainandgit diff --checkare clean.tools/pr_overlap.py --branch fix/agc-repeat-htile-clearflags #15443 only for the shared test list/CMake lines; the source change is inNoteDepthMetadataFill, while #15443 is in the sampling prepare/check path, so this is independent and only needs a trivial test-list rebase after #15443.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T11:19:20Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The new stored-refill path is narrowly tested, but the PR leaves an overlapping test-list change unsequenced and omits the repository-required Vulkan validation comparison.
What I ran
Reviewed head
dd299f7b39749d1d116344cdd0fb717be6d0a31aagainst base4f41f4c375f5abb487dbd184fbc150f31994d762; the stack checker preview was clean. Environment: Debian Linux x86_64, Python 3.11.2, GCC 12.2.0, Git 2.39.5. I did not build locally.Results
main; no dependency declared.avplayer_http_patched_modulesfailed; this test is not in the changed files.main.Precheck table and raw command output
Diff-check command output:
Precheck command stdout:
Full precheck table:
The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check 4f41f4c375f5abb487dbd184fbc150f31994d762...dd299f7b39749d1d116344cdd0fb717be6d0a31a/usr/bin/python3 tools/check_conventions.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 --head dd299f7b39749d1d116344cdd0fb717be6d0a31a --title fix(agc): accept a stored refill of a pending HTILE clear --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15446-dd299f7b3974/pr-body.md/usr/bin/python3 tools/pr_abi_audit.py --base 4f41f4c375f5abb487dbd184fbc150f31994d762 --head dd299f7b39749d1d116344cdd0fb717be6d0a31a --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 15446 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15446-dd299f7b3974/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./usr/bin/python3 /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15446-dd299f7b3974/head-dd299f7b3974-1e6d7cb2/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-15446-dd299f7b3974/head-dd299f7b3974-1e6d7cb2 --json core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_native_multisample_depth_tests.cmake core/libs/prx/libSceAgcDriver/tests/execution/NativeMultisampleDepth.cppNo changed Python test module in tools/ can be run as a no-build base-source control.Precheck stderr for missing optional scripts:
Stack-check stdout:
Hosted-check output:
Windows failure summary from the job log:
Negative control
Findings
Blocking
set_tests_propertieslist inagc_driver_native_multisample_depth_tests.cmake. The PR description says its test-list change needs to rebase after #15443, but the checklist saysDepends on: none.CONTRIBUTING.mdrequires overlapping PR authors to agree on order and record it withDepends on. Please agree with #15443's author and declare the agreed order.CONTRIBUTING.mdrequires AGC changes to run the same focused tests onmainand the change withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1, then compare logs for missing-layer markers and new VUIDs. The PR reports that the validation layer was unavailable, so this required comparison is missing. Please provide the paired logs and comparison from a machine where the layer is installed.Non-blocking
avplayer_http_patched_modules, which is not among the changed files. I did not verify whether it also fails on the base; resolve or rerun this check before approval.Sources
Not verified
No local build or CTest, no validation-layer run or VUID comparison, and no check of whether the Windows failure reproduces on base. Linux and specialized hosted jobs were skipped. The Linux test counts and GPU details are author-reported, not independently reproduced here.
To get this to a good state
Agree and record the order with #15443, provide the required paired validation-layer logs and comparison, and resolve the failed Windows job. I will rerun the same precheck and review the updated head.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T16:54:59Z.
Review: APPROVED
Reviewed — approved
A second whole-HTILE fill can now take over a pending clear transition when it repeats the same value and the metadata was stored after the first fill. The new test pins both conditions of that check, and nothing regresses in the focused native depth set on lavapipe.
What I ran
Head
8e681944325b635c7dbd81a8be2b0eec54d6ed93, merged with--no-ffontomain4f41f4c375f5abb487dbd184fbc150f31994d762(merged tree95c6e140b210b43a174b95086b90eb5db3fa4cba). Debian 13 VM, GCC 14.2.0, Release, Vulkan through lavapipe (Mesa 26.1.6, LLVM 19), no GPU.Results
git diff --checkcheck_conventions.pylibsOKmain(denormal/division tests,unwrap_self_...,vector_constant_factor_tininess)layer_missing_inempty, 0 tests with newVUID-vsmainagc_driver_native_(depth|multisample_depth)agc_driver_native_depth_bda_clear, expected skip)agc_driver_native_depth_stored_repeat_fillagc_driver_native_depth_stencil(same-valueFillOverlapfixture restored after the earlier review)git status --porcelainempty, focused set passes again after the rebuildNew test output
Negative control
stored_repeat_fillDepthSurface.cpptaken frommainAGC graphics: overlapping native multisample depth clear transitions are not implemented);agc_driver_native_depth_stencilstill passedsameStoredwithout theNewestStamp(...) > clearStoreStampconditionrefusal did not match overlapping ...: native multisample depth clear has no complete tracked HTILE store)sameStoredwithout the all-words-equal conditionThis confirms the author's reply to oneandonlydean's third point: each half of the check is now pinned by a test case. In both mutations,
CheckCurrentstill refuses later with "no complete tracked HTILE store". The cases therefore pin where the refusal is raised, and an unsafe acceptance still cannot reach sampling.Findings
Blocking
None.
Non-blocking
Unblocks: PPSA17019 (7th Guest), with #15443has no Game bring-up discussion number. CONTRIBUTING.md asks for the formUnblocks: PPSA01325 #3232. Please add the discussion number if one exists.core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:3231-3232sizes the vector asmetadata.bytes / 4and thenmemcpysmetadata.bytes. If the size were not a multiple of 4, this would write past the end of the vector.CheckCurrentalready makes the same assumption (DepthSurface.cpp:558-559), and HTILE sizes are whole words, so this is not new risk. It is noted only in case the two copies are ever shared in a helper.The earlier review points (oneandonlydean: guarded
GuestMemory::Read, the restoredFillOverlapvalue, the throw pins; MarcZX10:Depends onand the validation comparison) are all addressed at this head. The plainmemcpyis atDepthSurface.cpp:3232.agc_driver_native_depth_stencilpasses, and the validation comparison on lavapipe shows no newVUID-.Not verified
avplayer_http_patched_modules) was not rerun; that test is not among the changed files.