test(agc): run the multisampled single clear case on Windows and macOS #25331
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/25331"
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 rafaconvaitis on 2026-11-21T23:05:15Z.
What
On Windows and macOS, the multisampled comp-to-single clear case in
agc_driver_pipelined_flush_read_order(from #18809) returned before it did anything, so it never checked theDrawPipelinedrain it was added for. With that drain removed fromDriver::dispatch, all threepipelined_flush_read_ordertests still pass on Windows.VirtualAlloccannot reserve0x20f7f0000on Windows: it returns null withERROR_INVALID_ADDRESS, because the guest arena already reserves every free region of the application area there (on8763aeffdc,VirtualQueryshowed the address inside aMEM_RESERVE,MEM_PRIVATEallocation that starts at0x200020000). The case then took itsif (mapped == nullptr) return;. The block now comes fromGuestArenaAllocateFromHint_nid_postfixat that address and is committed like the test's other arena surface. If the arena places it elsewhere, the case fails instead of returning.s[2:3], which the user data makes0x2_0f7f_0008, inside the block, andTakeMultisampledSingleCleardecodes it there. The block held zeros, so once the case ran, the decode threwguest texture descriptor has a null base addressand the test aborted. The block now holds a four-sample 8x8 2D descriptor (type 14,LAST_LEVELandMAX_MIP2) at that address. The clear is recorded, and the case's drain check is the only thing that decides the result.MAP_FIXED_NOREPLACE, so onmainthe case returned there before it allocated anything, and the guest arena covers0x20f7f0000on macOS too. The second commit, suggested and tested on macOS by @Gonic0, gives every host without that flag the same arena block, committed with the protection value0x04thatGuestArenaCommittakes on every host (PAGE_READWRITEon Windows). Linux keeps itsmmappath. The descriptor is written on every platform, because the case reads it wherever it runs.This replaces #25227's guard, which made the case build on macOS by leaving its body empty there. Its author offered to close it if this PR takes the macOS path (comment).
Tested
Windows 11 25H2 (26200), WinLibs GCC 15.2.0 r7, Release.
maind3a7b0bcd8and this branch on it. NVIDIA GeForce RTX 3050 (driver 610.88) and AMD Radeon 760M (1002:15bf, AMD Software 26.11.2, driver 32.0.32029.2010), selected withANYPS5_GPU. Environment:ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1. Layer runs addVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation(1.4.363.1) andVK_LOADER_DEBUG=layer; the loader inserted the layer in every one of them.ctest -R pipelined_flush_read_order -V:agc_driver_pipelined_flush_read_order,_draw_pipelineand_plan_verify.main, 1 runmainwithout #18809's drain, 1 runpipelined flush read order: multisampled comp-to-single clear bypassed DrawPipeline::Queue0().Drainif (DrawPipeline::Active()) DrawPipeline::Queue0().Drain(DrawPipeline::DrainReason::Packet, 0x15);line in theMatchMultisampledSingleClearblock ofDispatch.cpp. Before this change, the test can't see that line go.VUID-,SYNC-HAZARD-orUNASSIGNED-line in any run. Every log'sSelected GPUline names the intended device.8763aeffdc, taking the block from the arena while keeping the zeroed block made every test abort on both GPUs, with and without the layer, withguest texture descriptor has a null base address. #25227 describes the same message from the same arena attempt on macOS.d11282a3bc) on the same base, same setup: this PR 3 runs, 3 of 3 pass on both GPUs with and without the layer; without #18809's drain, 3 of 3 fail with the same message. On Windows it compiles to the same code as the first commit.tools/check_conventions.pypasses.main. If the case reachedTakeMultisampledSingleClearthere, it would have thrown on the zeroed descriptor, so the new descriptor shouldn't change a Linux run that passes today.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)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T11:18:53Z.
Review: APPROVED
Reviewed — looks good
The single changed execution test now allocates and commits its fixed descriptor block through the guest arena on Windows and hosts without
MAP_FIXED_NOREPLACE, and initializes the descriptor; I found no verified defect in the reviewed code.What I ran
Reviewed head
d11282a3bc2605f306829406e0410a87c7744809. No commands or tests were run in this review; the author-reported platform runs are not independently verified here.Read
description.md,commits.md,manifest.json,diff.patch, and the complete changed filecore/libs/prx/libSceAgcDriver/tests/execution/PipelinedFlushReadOrder.cpp. Also read targeted allocator, commit/reset, and allocation-cleanup code incore/libs/prx/libc/src/GuestArena.cpp. The attemptedreview/files.jsonread did not resolve; the manifest lists one changed file, marked included. No repository files were excluded according to the supplied manifest.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
I did not run the tests or independently verify the reported Windows and macOS runs, Linux behavior, or the test's GPU and console behavior.
files.jsonwas not available through the reader, so excluded-file details beyond the manifest were not verified.To get this to a good state
Nothing is required.