fix(agc): decode PS4 texture bases, linear-aligned targets and thin-tiled 3D textures #9891
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9891"
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 savvaniss on 2026-10-22T20:49:23Z.
What
The AGC half of Get-fix/AnyPS5#1, moved upstream as Get-fix asked. #9431, which this was stacked on, is merged, and this branch has
mainmerged in. These are four PS4 surface fixes found while bringing up Risk and Monopoly Plus from CUSA03312 on #6977's branch. The shader half is in its own pull request onmain, #9889.PresentDisplayBufferuploaded a tiled display buffer with no resident image throughGpuColorTransfer, in the PS5 render-target layout. That layout needs 64 KiB alignment and doesn't know GCN tiling. Risk flips its 32 KiB-aligned 1920x1080 buffers before drawing into them, and failed with "null or misaligned address". A GCN-tiled buffer with no resident image now goes throughReadDisplayBuffer, which decodes the GCN layout and checks the buffer's own 4 KiB alignment.DecodeDisplayBuffer's 4-byte loop only knew the linear and PS5 layouts. It now usestexelOffset, the same change as #9673, carried here because this path reaches it.maincan't register a tiled PS4 buffer yet (#9432 does that), so titles reach this path once #9432 lands.MTYPE_L2, so the base is 38 bits (shadPS4'sresource.h:base_address : 38; mtype_l2 : 2).DecodeTextureResourceread 40 bits. SoMTYPE_L2 = 1set address bit 46, and a storage texture failed with "storage texture has no committed guest pages".IsNullTextureResourcereads the base the same way now, so a zero base withMTYPE_L2set is null.max(8, 64 / bytes per element)elements, as AddrLib'sSiLib::HwlGetPitchAlignmentLineardoes and as #9431's PS4 texture layout already does.ColorTileMode::GcnLinearcarries that alignment.mainhas resident linear targets since this was written. They keep taking only PS5Lineartargets, so a GCN linear-aligned target is still copied in and out as before. Making it resident is separate work.mainnow draws a DB depth copy through the normal draw path, andRunDepthCopyPassis gone. So the linear check this PR changed there went with it. A depth copy into a GCN linear-aligned target is drawn like any other draw into a linear target that is not resident.POW2_PAD. That is how ac_surface and AddrLib's PostComputeMipLevel count them. It becomes one 3D image of its depth, and thick modes still throw. The debt entry for thick and layered surfaces says so.Tested
Windows 11 Pro 26300, WinLibs GCC 15.2.0, Release, AMD Radeon RX 9070 XT (driver 32.0.31041.1004),
ANYPS5_GPU=AMD,ctest -VwithANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation.Merge of
mainde83e8f270, 31 Oct. Head341659473d. The only conflict was indocs/dev/debt/libSceAgcDriver.md: both sides kept, with main's layer bank text as its own debt entry to stay under the length limit. On the merge before that debt split:agc_driver_graphics,agc_driver_gcn_detileandagc_driver_gcn_display_presentpass, 3 of 3 on the RX 9070 XT, noVUID-line. Not rerun: the other tests, Linux (mainchanged no struct under the size guards in this merge), games.Merge of
maincc26ab4438, 1 Nov. Head825f9b3f7c. Two conflicts.mainmoved the AGC test registrations intotests/cmake, andtools/agc_test_split.py resolvemoved this branch'sdecoder_pnglink toagc_driver_gcn_display_present_tests.cmake. Indocs/dev/debt/libSceAgcDriver.mdthe merge keepsmain's tiling and 2D PRT entries and this branch's thick and array layer bank entries.agc_driver_graphics,agc_driver_gcn_detileandagc_driver_gcn_display_presentpass, 3 of 3 on the RX 9070 XT under the validation layer, noVUID-line. Not rerun: the other tests, Linux, games.Merge of
main1e658521a0, 3 Nov. Head9b9288abc8(onca0255b639). The only conflict was indocs/dev/debt/libSceAgcDriver.md: the merge keeps this branch's thick and layered, array layer bank and resident-image flip entries, andmain's render-target entry with its new PS4 depth-target sentence.FormatVersionstaysmain's 52 (this branch does not change it) and no size guard changes. On the RX 9070 XT (driver 32.0.31041.1004, Windows, Release) withANYPS5_GPU=AMD ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:agc_driver,agc_driver_graphics,agc_driver_flip,agc_shader_memory,agc_driver_gcn_detileandagc_driver_gcn_display_presentpass, 6 of 6, everySelected GPUline names the RX 9070 XT and there is noVUID-line.tools/check_conventions.py --base origin/mainpasses. Not rerun: the rest of the suite, Linux, and the game.Base. #9431 is merged, so this branch is
mainplus this PR's own changes. Tests ran onmain5b913d40c6and on this branch with thatmainmerged in. The final merge ofmainfd41cca5d9touches no AGC, VideoOut or shader file.Results.
VUID-linesmain5b913d40c6video_out_hdr_probe(the monitor reports HDR)agc_driver_gcn_display_present.agc_driver,agc_driver_pm4,agc_driver_graphics,agc_driver_register_key,agc_driver_gcn_detile,agc_driver_gcn_buffer_format_lookupandagc_driver_pattern_buffer_fill;agc_driver_flip, thevideo_out_flip_*modes,video_out_hdr_present,video_out_hdr_probe,linear_display_buffer,agc_display_buffer_dcc,agc_host_hdrandagc_screenshot;agc_gcn_decode,texture_format_lookup,agc_driver_resource_cache_replaced_textureandagc_depth_copy_kept_bytes;agc_driver_pipeline_journalandagc_pipeline_journal*tests, and theagc_driver_depth_*tests.was not found but was requested by env var VK_INSTANCE_LAYERS, and everySelected GPUline names the RX 9070 XT.video_out_flip_*tests ran on a real window here. None of them skipped.Revert checks. One part at a time on this branch, each rebuilt and run with the same environment. The first group is
agc_driver_gcn_display_present; the rest areagc_driver_graphicsoragc_driver_gcn_detile.APS5_FORCE_SDR=1ensureHdrScalerfor a GCN flipDisplayBuffer.cppas onmainIsNullTextureResourceColorTargetLayout.cppas onmainagc_driver_gcn_display_present(new).maincan't register a tiled PS4 buffer yet (#9432 does that), sovideo_out_flip_ps4can't reach this path.agc_driver_gcn_detile(new case).POW2_PAD.POW2_PAD), and the end of the surface after the one level 2 slice. The element comparison alone can't catch a wrong slice count, because the fixture places slices with the same geometry.Texture, so the validation layer sees the image and its per-level copies. The test doesn't read that image back (it has no transfer-source usage) and doesn't sample it.Linux. WSL Ubuntu, g++ 15.2.0, cmake 4.2.3, Unix Makefiles, Release,
-j 4, on the Linux filesystem, at this branch before the lastmainmerge and a debt-only edit. The size guards are active there, sosizeof(State) == 920andsizeof(ShaderStages) == 164were evaluated. Built without errors: all oflibSceAgcDriver, includingGraphics/src/PipelineJournal.cppandcore/shader/recompiler/ShaderDiskCache.cpp, andagc_driver_graphics_tests,agc_driver_gcn_detile_testsandagc_driver_gcn_display_present_tests.CMakeLists.txt. No source file changed.agc_driver_graphicsandagc_driver_gcn_detilepassed there on Mesa's llvmpipe (software Vulkan, no validation layer).agc_driver_gcn_display_presentskipped: SDL has no Vulkan video driver in that build.CUSA03312. Each fix removed a stop in Risk or Monopoly Plus on
ps4/limbo-gpuat93eeee0141(#6977's head then), with Get-fix/AnyPS5#2 and local stand-ins forsceGnmDrawInitDefaultHardwareState200andsceGnmUpdate*Shader(Get-fix/AnyPS5#1 has the details). Not rerun on this base: the titles also need #9432.Other people's runs. On head
375f5630ba, @ycbuzi ran the tests on an RTX 4070 SUPER, a GTX 1650 SUPER and an AMD RDNA2 iGPU, and @DealPotato ran them on an RTX 4070 with the flip tests on a real display. @DealPotato also took inFAMOUS Second Son (CUSA00004) past its "storage texture has no committed guest pages" stop through the T# base change.Conventions.
tools/check_conventions.py --base origin/mainpasses.Overlap.
tools/pr_overlap.py --branch fix/ps4-cusa03312-surfaces, againstmainfd41cca5d9, lists three pull requests:TextureTiling.cppand the thick-surface debt entry, and compose: a 3D T# in a thick mode takes #9674's path, and one in a thin mode takes this one.It could not compare 109 others that conflict with
mainthemselves.#9673 is not listed. Its
DisplayBuffer.cpphunk is byte-identical to the one here, and a simulated merge in either order shows no conflict in that file. Both histories carry #9431's old head, so the simulated merge does report one line ofState.cpp:case 8u, which takes this PR'sGcnLinear.Allocation lookup, 2 Nov. Head
ca0255b639, ona100474e12.main'sTextureResourceAllocationAddressread 40 bits of the T# base, so a PS4 T# with MTYPE_L2 (word 1 bits 6-7) set looked up the allocation of an address above bit 46;descriptorBaseAddressnow applies the same 38-bit mask asdescriptorBaseunder GCN guest shaders.agc_driver_graphicschecks that the lookup address of the MTYPE_L2 T# equals its decoded base, and fails with the fix removed ("a PS4 T# with MTYPE_L2 set looked up its allocation at an address other than its 38-bit base"). Run on Windows 11 Pro 26300 withANYPS5_GPU=AMD,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation:agc_driver_graphicsandagc_shader_memorypass, noVUID-line (neither opens a Vulkan device). Not rerun: the display-present tests, Linux, CUSA03312.check_conventions.pypasses.Level offsets, 3 Nov. Head
cebb30f132, on9b9288abc8. As @RNK123 suggested, the volume case now checks the level offsets above. On the RX 9070 XT (AMD driver 26.8.1, Windows, Release) withANYPS5_GPU=AMD ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,agc_driver_gcn_detilepasses 3 of 3, with noVUID-line. Each of fourTextureTiling.cppmutations fails it 3 of 3 at its own check, and the fixture without this commit passes all four: six slices kept at levels 1 and 2, noPOW2_PADrounding, level 0 rounded too, andguestBytescounting six last-level slices.check_conventions.pypasses. Not rerun: the other tests, Linux, CUSA03312.Checklist
main; no other open PR implements the same functions (mainmerged in; the one-line decode fix is shared with #9673, as asked on this pull request)NotImplemented_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 XairRrR on 2026-10-29T03:59:51Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
The four surface fixes are each pinned by a test that fails when the fix is reverted, but the branch conflicts with current
main, does not compile on Linux, and the new display-buffer early return breaks HDR10 presentation and skips frame dumps and screenshots.What I ran
375f5630ba0e7639d2b1fda7cebc609eb7767dafmain:b433c40f2f46aa2e59e19806010a839ac8572d64Results
mainb433c40f2fGraphics/include/State.hpp,Graphics/src/Draw.cpp,Graphics/src/State.cppgit diff --checktools/check_conventions.py --base origin/mainAll conventions checks passed.static_asserts inPipelineJournal.cppvideo_out_flip_*skips (SDLoffscreen, no Vulkan surface)VUID-lines on the PR headwas not found but was requested by env var VK_INSTANCE_LAYERSVK_LAYER_KHRONOS_validationaddedBuild failure on the PR head itself (no merge)
(GCC 16 prints these in the host locale; translated.)
Focused tests on the PR head, validation layer on
Same focused set on
mainb433c40f2f, same machine, validation layer onVUID-lines: 0 onmainand 0 on the PR head. Neither log haswas not found but was requested by env var VK_INSTANCE_LAYERS.agc_driver_gcn_detiledoes not exist onmain.Negative control
I restored only the production files of one part at a time from
375f5630ba^2(merge/9431-main), rebuiltagc_driver_graphics_testsand ranagc_driver_graphics:Graphics/src/GuestTextureResource.cpp(part 2)a PS4 T# took the MIN_LOD bits above its 38-bit base as address bitsGraphics/src/TextureTiling.cppandGraphics/include/TextureTiling.hpp(part 4)PS4 3D and multisampled textures are not implementedGraphics/src/ColorTargetLayout.cpp(part 3)unsupported color tile modeThis matches the table in the description. Part 1 (
PresentDisplayBuffer) has no test, so it has no negative control.Findings
Blocking
Conflicts with
main. Merging intomainb433c40f2fconflicts incore/libs/prx/libSceAgcDriver/Graphics/include/State.hpp(ShaderStagesgainedhullWaveSize/tessellationGeometryonmainagainstlegacyVertexhere, andDrawKeyRegistersis 50 entries onmainagainst 52 here),Graphics/src/Draw.cpp(thelinearResidentline that #9879 changed, which the description expected) andGraphics/src/State.cpp(decodeDepthPlaneextent,DecodeShaderStagesrouting,DecodeColorFormat). Most of these hunks come from #9431, which is still open. Fix: mergemainagain once #9431 is updated, or land #9431 first.The PR head does not compile on Linux x86-64 with libstdc++.
PipelineJournal.cppL41-L42 assertssizeof(State) == 840andsizeof(ShaderStages) == 112. On this branch they are 848 and 116, after #9431 addedShaderStages::legacyVertex. The asserts sit under#if defined(__linux__) && defined(__x86_64__) && defined(__GLIBCXX__), so the Windows runs in the description and comments could not hit them. This confirms the earlier comment that reported the same failure after a merge withmain. It fails on the PR head too, without any merge. The fix is not to bump the numbers: the recipe codec andCanonicalPipelineStateneed to carry the new field. Otherwise a pipeline restored from the journal loseslegacyVertex. Then update the expected sizes.A non-resident GCN flip on an HDR10 swapchain throws. The new early return at
VulkanDevice.cppL3432-L3435 callspresent(..., pixels, nullptr, nullptr, ..., passthrough). That return comes before L3455,if (passthrough && resident == nullptr) ensureHdrScaler(...). Withpassthroughset, no resident image and pixels given,presenthasdrawn == falseandclearOnly == false, so L3539 requiresstate->hdrScaler != nullptr.useSurfaceFormatresetshdrScaler, so the first such flip after the swapchain picks an HDR10 format fails with "an HDR10 presentation through the scaler needs the HDR10 scaler and dumps on the CPU". If an earlier flip left a scaler for another source format, the texels go through that one instead. The same early return also skips the frame-dump block (L3438) andtakeScreenshot(L3451), so frame dumps and screenshots silently miss these flips. Fix: don't return early. Computepixelsfor this case and fall through to the common tail, passingpixelsinstead of&buffer. Then theensureHdrScaler, dump and screenshot handling applies to it. Avideo_out_flip_ps4case with a GCN buffer and no resident image (as requested in an earlier comment) would cover it.The display decode this path relies on is still wrong for GCN buffers. I confirm the point raised twice in the comments:
DisplayBuffer.cppL198-L199 still uses the linear or 64 KiB PS5 formula forDisplayTilingGcn(value 2). Part 1 now sends every non-resident GCN flip with a 32-bit format through it in SDR. #9673 is still open and the body still says onlyDepends on: #9431. Fix: carry thetexelOffsetchange or addDepends on: #9673.Non-blocking
tests/GuestTextureResource.cppL791: the failure message says "MIN_LOD bits", but the bits above the 38-bit base areMTYPE_L2(word 1 bits 6-7,0xc0in the test word). MIN_LOD is bits 8-19 and a 40-bit mask never reached it. Suggest "took MTYPE_L2 above its 38-bit base as address bits".IsNullTextureResource,GuestTextureResource.cppL123 still masks 40 bits. A PS4 T# with a zero base and a non-zeroMTYPE_L2is reported as not null, andDecodeTextureResourcethen throws "guest texture descriptor has a null base address". Applying the samegcn ? 0x3fffffffff : 0xffffffffffmask there keeps the two consistent.docs/dev/debt/libSceAgcDriver.mdL71 still opens with "3D and thick modes (GB_TILE_MODE 15 and 19 to 26) throw", then says a 3D surface in a thin mode is laid out. "Thick modes (GB_TILE_MODE 15 and 19 to 26) throw" would no longer contradict the next sentence.tests/TextureTiling.cpponly.tests/execution/GcnDetile.cpphas no 3D case, so no test runs the GPU detile and upload of a level-major PS4 volume withimageDepth > 1. A small 3D thin-mode case there would test the image creation and per-level slice counts end to end.Not verified
main07da04f947.static_assertvalues.video_out_flip_*other thanvideo_out_flip_decode: they skip here (SDLoffscreen), so thePresentDisplayBufferchange was not exercised by any test I ran.To get this to a good state
main(after #9431 is updated or merged) and resolve the three conflicts.CanonicalPipelineStatefor the newShaderStages/Statefields, then the expected sizes, and build on Linux.PresentDisplayBufferso the HDR10 scaler, frame dumps and screenshots apply. Add a flip test for it.Depends on.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T19:48:06Z.
Review: APPROVED
Re-checked — approved
All four blocking findings from my last review are resolved. Since then, current
mainwas merged in, the non-resident GCN flip goes through the common present tail, #9673's 4-byte decode fix is carried here,IsNullTextureResourceandTextureResourceAllocationAddressread the 38-bit PS4 base, andGcnDetile.cppgained a thin-mode 3D case.What changed since my last review
My last review was of
375f5630ba. Since then:mainwas merged in several times. #9431 is now onmain, so the diff againstmainis only this PR's 16 files.574321b323:DecodeDisplayBuffer's 4-byte loop usestexelOffset.145e53d6c2: the early return is gone, and a newagc_driver_gcn_display_presenttest was added.83ca6990ae:IsNullTextureResourcereads the base through a shared helper.63cc6f846c: a volume case inGcnDetile.cpp.393648d082: debt text.ca0255b639: 38-bit mask indescriptorBaseAddress, used byTextureResourceAllocationAddress, with a check inagc_driver_graphics.video_out_flip_ps4because VideoOut onmaincannot register a tiled PS4 buffer yet. That reason is valid. The new test calls the driver's present entry point instead.What I ran
ca0255b639dc987f8b9a6a347646b7868a4f6346,maina4eca2a056bf3bbbec98ab42e9d28163e4ea9cb8, merged treee5f2fcc260cc0adbd7d99e94b417b57246b8bfd0.maingit diff --checkcheck_conventions.pyAll conventions checks passed.PipelineJournal.cpp, whose size guards assertState == 928andShaderStages == 164main. 2main_sync_renames_*tests that fail onmainpass here.agc_driver_graphics,agc_driver_gcn_detile,agc_shader_memorywith the validation layeragc_driver_gcn_display_presentoffscreen, no Vulkan surface)VUID-lines /was not found but was requestedVK_LAYER_KHRONOS_validationinserted for the instance and the device.Negative controls
Previous findings
main: Resolved. The script merged the head intoa4eca2a056with no conflict.PipelineJournal.cppsize guards: Resolved. The PR no longer changesStateorShaderStages. The merged tree builds with GCC 14/libstdc++ on x86-64, where the guards atcore/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cpp:44-45are active.ensureHdrScaler, frame dumps and screenshots: Resolved. I checked this by reading the code. The decoded pixels are produced atcore/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp:3650and passed to the commonpresent(...). That call comes after the dump and screenshot handling and afterensureHdrScaleratVulkanDevice.cpp:3642. The overlayplaneis now passed too. The runtime check inagc_driver_gcn_display_present(SDR and HDR10) skipped here, so that run is author-reported.DecodeDisplayBufferuses the PS5 formula for GCN buffers: Resolved. The 4-byte loop now usestexelOffset(buffer, x, y, 4u)(core/libs/prx/libSceAgcDriver/Execution/src/DisplayBuffer.cpp:196), like the half-float loop.IsNullTextureResourcereads 40 bits: Resolved. It usesdescriptorBase(words), and a test pins the zero-base MTYPE_L2 case.detileVolumeintests/execution/GcnDetile.cppdetiles the 6/3/1 slices in four thin modes, with and without POW2_PAD, then creates the 3DTexture. It fails with volumes refused again (negative control 2).New findings
Blocking
None.
Non-blocking
ca0255b639,descriptorBaseAddress(core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp:71-75) anddescriptorBase(GuestTextureResource.cpp:139-141) apply the same GCN/PS5 mask. The only difference is the<< 8.DecodeTextureResourcecallsdescriptorBase(words) << 8u(GuestTextureResource.cpp:175), which is exactlydescriptorBaseAddress(words). Keeping one helper would stop the decode and the allocation lookup from drifting apart again, which is the bug the last commit fixed. Suggested fix: dropdescriptorBase, usedescriptorBaseAddressat line 175, and usedescriptorBaseAddress(words) == 0inIsNullTextureResource.Not verified
agc_driver_gcn_display_presentskipped here (SDLoffscreen, no Vulkan surface). It also skipped in the NVIDIA bot's runs and in the other local run reported on this PR. The SDR/HDR10 presentation, frame-dump and screenshot checks have only run on the author's RX 9070 XT.main: itsmainbaseline (0278ca9831) has no validation run yet. I ranagc_driver_graphicsandagc_driver_gcn_detilewith the layer and saw 0VUID-lines, so there is nothing new to compare. I did not run the layer onmainmyself.agc_driver_graphicstook about 34 s here, with and without the layer. That is over the 30 s rule. The NVIDIA bot reported it at 31-32 s on earlier heads. This PR adds only a few CPU checks to it, so I don't count the time against the PR, but I did not time it onmainon this machine.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T19:33:20Z.
Review: APPROVED
Re-checked — approved
Since my last review,
main1e658521a0was merged in (9b9288abc8) and a test-only commit (cebb30f132) was pushed. The merged tree builds, the focused tests pass and the negative control still fails. The one newVUID-the script flagged comes frommain, not from this PR.What changed since my last review
My last review was of
ca0255b639. Since then:9b9288abc8mergesmain1e658521a0. The PR's eleven own commits are unchanged (delta.patch shows them all as=). The only conflict was indocs/dev/debt/libSceAgcDriver.md. The resolution keeps both sides: this branch's thick-and-layered, array-layer-bank and non-resident-flip entries, andmain's render-target entry with its PS4 depth-target sentence.cebb30f132(test only, after RNK123's comment) adds three asserts todetileVolumeintests/execution/GcnDetile.cpp:POW2_PAD;guestBytesends after the one level 2 slice.The script built and tested
9b9288abc8, so this commit is not in the tree I ran (see Not verified). I read its diff. The asserts are host-side and check what the commit message says.GcnDetile.cppis a test file, so no debt doc change is needed.What I ran
PR head
9b9288abc84fafb1530018d7c6a26ae8895dc0f2,main086c0686c8adff3ee648fdbe34e0b0b647e1d511, merged tree0afca9fbedbfef7aa5655089829115b4ec2b32e5. Debian 13 VM, 32 vCPU (Xeon Gold 6136), GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6), no GPU.maingit diff --checkcheck_conventions.pyAll conventions checks passed.main.VUID-lines:agc_driver_image_gather_volume, marked "test not run on main".agc_driver_image_gather_volumewith the PR's production files restored frommainVkSamplerCreateInfoVUIDs, so they come frommainagc_driver_gcn_detile,agc_driver_graphicswith the layer (merged tree)Validation Error, layer inserted for the instance and the deviceagc_driver_gcn_display_presentoffscreen, no Vulkan surface)The gather-volume VUIDs come from main
agc_driver_image_gather_volumearrived onmainwith #9183 (0bf0563442), after the script's validation baseline1e658521a0. That is why the script marks it "test not run on main". With the PR's production files restored frommain:These are the same four IDs as on the merged tree, so they are not counted against this PR.
Negative control (PR production files from main)
Previous findings
descriptorBaseAddress(core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp:71) anddescriptorBase(GuestTextureResource.cpp:139) still apply the same mask.DecodeTextureResourcestill usesdescriptorBase(words) << 8uat line 183. This does not block the merge, but a single helper would keep the decode and the allocation lookup from drifting apart.All earlier blocking findings stay resolved: the merge is clean, the build passes, the common present tail is used, and the GCN decode goes through
texelOffset.New findings
Blocking
None.
Non-blocking
None.
Not verified
cebb30f132was not built or run here. The script's tree is the merge of9b9288abc8. That commit only adds three host-side asserts toGcnDetile.cpp, and I read them. The author reports thatagc_driver_gcn_detilepasses 3/3 with them on an RX 9070 XT, and that each of fourTextureTiling.cppmutations fails one of them. That evidence is author-reported.agc_driver_gcn_display_presentskipped again (no Vulkan surface under SDLoffscreen). The SDR/HDR10 presentation, frame-dump and screenshot checks have only been run by the author.agc_driver_graphicstook 35.5 s here with the layer, over the 30 s rule, as in my previous review. The PR adds only a few CPU checks to it, and I did not time it onmain.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T19:56:48Z.
Review: APPROVED
Re-checked — approved
The only change since my last review is the test-only commit
cebb30f132, which adds level-offset asserts to the PS4 volume case ofagc_driver_gcn_detile. It is now in the merged tree. It builds, passes with the validation layer and fails under a slice-count mutation. There is one non-blocking issue: when the second volume of a mode fails, the test crashes while unwinding instead of printing its message.What changed since my last review
I last reviewed
9b9288abc8. The script built and tested that commit, withoutcebb30f132, so last time I only read this commit's diff. delta.patch shows the PR's 11 earlier commits unchanged (=). The only new commit iscebb30f132, which adds three host-side asserts todetileVolume(core/libs/prx/libSceAgcDriver/tests/execution/GcnDetile.cpp:98-100). The description gained a "Level offsets, 3 Nov." paragraph. There are no new author replies to my review.What I ran
PR head
cebb30f1323bc3a57657d9147aa8e6d03c86014e,main086c0686c8adff3ee648fdbe34e0b0b647e1d511, merged treedbde32d139517db378e52d9fdb7e44e1319e1c84. Debian 13 VM, 32 vCPU (Xeon Gold 6136), GCC 14.2.0, Release, Ninja, lavapipe (Mesa 26.1.6), no GPU.maingit diff --checkcheck_conventions.pyAll conventions checks passed.mainVUID-lines are inagc_driver_image_gather_volume, marked "test not run on main". Last time I showed they come frommain(#9183): the same fourVkSamplerCreateInfoIDs appear with this PR's production files restored frommain. Nothing in this push touches that path.agc_driver_gcn_detilewith the layerVUID-/Validation Errorlines. The layer was inserted for both the instance and the device.PS4 volume in tile mode 15: level 2 does not start after 3 level 1 slicesPOW2_PADrounding)git status --porcelainis empty, andagc_driver_gcn_detilepasses againNegative control
The commit adds test asserts only. Restoring the PR's production files from
mainstill fails the volume case with "PS4 3D and multisampled textures are not implemented", as in my last review. The new asserts target the slice count per level, so I also mutatedGcnLevelSlicesin two ways (table above). Both mutations make the test fail. The author's report that the fixture without this commit passes these mutations matches RNK123's control. I did not repeat that run.Previous findings
descriptorBaseAddress(core/libs/prx/libSceAgcDriver/Graphics/src/GuestTextureResource.cpp:71) anddescriptorBase(GuestTextureResource.cpp:139) still apply the same mask.DecodeTextureResourceusesdescriptorBase(words) << 8uat line 183. This does not block the merge.cebb30f132was not built or run. Resolved. It is now built and run here (see Results).New findings
Blocking
None.
Non-blocking
core/libs/prx/libSceAgcDriver/tests/execution/GcnDetile.cpp:171-173).POW2_PAD=falsevolume completes. ThePOW2_PAD=truevolume then throws at line 99. Unwinding ends in a segfault (exit 139) beforemain'scatchprints the message, so ctest shows only(SEGFAULT). The author sawVUID-vkEndCommandBuffer-commandBuffer-00059on the same path on Windows.device->WaitIdle()the PR added at line 173 runs only on the success path. The previous volume'sTextureuploads can still be in flight when the exception unwindsdetilerand the device.context/device wait-idle at the end ofdetileVolume, or inmain'scatchbefore the device is reset.Not verified
agc_driver_gcn_display_presentwas not re-run. This push changes nothing on its path, and without a Vulkan surface (SDLoffscreen) it skipped here before.