feat(agc): back extra guest mip levels with storage images #7085
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7085"
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 Amoenus on 2026-10-17T10:51:27Z.
What
Back admitted guest mip levels beyond the physical chain with separate 1x1x1 images, preserving guest offsets, layers, ownership and accounting. Uploads, views, attachments, ClearMip, mirror publication and readback use the selected backing. Unsupported sampled consumers and whole-surface optimizations still refuse. #6280 remains a prerequisite; #22724 is now merged. Original authorship and maintainer history are retained.
Sonic Unleashed Recompiled (PPSA99902, #4443) needs the extra attachment levels in #7066. Historical stop:
AGC graphics: a color target of mip level 10 of a 512x256x1 surface of 12 levels is not implemented: a Vulkan image of that extent holds 10 levels, and the 1x1 levels past floor(log2(max extent)) + 1 are not represented.Tested
3 December: exact head
6e70d4e7eb, frozen main700fae9438. Resolved conflicts with merged #22724 while retaining main's MSAA query setup and this PR's extra-mip fixture. Cache format 113 distinguishes the updated stack from main 99, the previous parent 111 and the earlier sampled-load child 112. Seven relevant backing/barrier/readback/ClearMip bodies and the complete extra-mip rendering fixture are unchanged from prior7f1810d363; source audit attached.Main/change build full native libraries/relinker and selected real fixtures; ordinary/profiling Graphics suites pass. 78/78 focused execution CTests pass across physical RTX 5080/AMD Radeon Graphics (72 diagnostic-clean, six retaining exactly main's depth-plane warnings). Main passes 80/80; 62 matching processes have identical diagnostics, with extra capabilities distinguished from absent main registrations. Added resinfo dimensions, sampled address-draw and relocated-data/recipe checks cover overlapping main changes. Separate BY compiler-refusals pass on both devices without dispatching the unsupported load. Required Vulkan/cache off, actual devices/Khronos 1.4.363 loaded, no new VUIDs/skips, GPU processes below 30 seconds. Complete source-pinned commands, executable hashes and logs.
The ClearMip collected-sibling regression still passes through mirror-before-writeback and complete guest/padding/guard comparisons. Its old-code control and correction retain their 30 November pins; unchanged production/fixture bodies justify retaining that control while rerunning the positive current-source case. Earlier 1 December evidence and external CI retain their older head/base; they are not CI for this new head.
Coordination refreshed 4 December: the latest partial review reports no blocker in its inspected 7 of 33 files, but remains incomplete/COMMENTED, with no independent tests. The older formal change request remains for reviewer reconciliation. #28176 has refreshed the separate #27616 sampled-load capability onto this parent at
e21b758b56, using combined codec 114. Its refreshed Linux retest reports 26/26 passing without skips/VUID-/SYNC-HAZARD lines. External Linux/CircleCI evidence keeps its own source pins and limitations; no local child qualification is claimed. SAROS's original local wait-patching qualification remains.Conventions/template and whitespace pass. No fresh game/FPS, full-CTest/Linux, analyzer-clean, cache-executable or console-equivalence claim. Quarantined executables remain unbuilt/unrun.
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)Summary by CodeRabbit
Imported from boykopovar/AnyPS5. Originally posted by fdfawef324 on 2026-10-19T05:25:52Z.
I checked the unchanged #7085 head
8eb26651441eagainst the rebased #6280 candidate0e1f2ab53b59. Your body lists #6280 and #6934 as prerequisites. When updating the #6280 prerequisite, preserve the safe physical query LOD, LOD>=count zero-extent mask with retained count, pure table size-query support, base7/last7 sampled-load and LOD-query refusal, and repacked-copy cap. Extra storage backing remains your separate implementation.One concrete composition hazard remains: your
CreateExpandImage/RecordExpandBlittrailing arguments aredepth,layers,levels; #6280's aredepth,levels,layers. They are all uint32_t, so reconcile every creation, uploadImage, blit and refresh call by meaning. Keep the commonAllocateImageMemoryrecovery path and preserve main's codec fields pluslevelUses; #6280's exact layout has40 image fields/format41, and the final landing base determines subsequent versions. This is source coordination, with no combined title/device result or new author agreement claimed.AI-assisted: yes (Codex)
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-10-29T06:01:02Z.
Review: APPROVED
Reviewed — approved
The extra 1x1x1 backing images for storage/color levels past the physical chain merge cleanly with
main, build, and pass the focused tests under the Khronos validation layer with no VUIDs. A mutation that drops the extra images from writeback makes the new tests fail. The notes below are non-blocking.What I ran
5b8dd734ff3a9c3afb6d5c0dde1072f9f72770a8main:2fbf1c6d975cd6555aaf1da7ad9cd26c109f7e91.mainhas since moved to2960e9a6e7e1fc99c4ed180c71495b5eb83464c7. That commit has no changes undercore/libs/prx/libSceAgcDriver,core/shaderordocs/dev/debt, and the PR still merges with it without conflicts (git merge-tree).Results
maingit diff --checkcheck_conventions.pyAll conventions checks passed.cmake --build build)agc_driver_extra_mip_color_targetsinglePassStorageagc_driver_image_levels_past_chainagc_driver_graphics(includesRunTextureMipChainTests)main: passed, 4.43 s)agc_shader_disk_cachemain: passed, 1.13 s)agc_storage_hole_copy_barrierVUID-lines, merged /mainwas not found but was requested by env var VK_INSTANCE_LAYERSVK_LAYER_KHRONOS_validationMerged tree, test output excerpts
Negative control
I restored every non-test, non-doc file to
main(and removedTextureStorageImages.cppfrom the source list) while keeping the PR's tests. The tests no longer compile:SurfaceGeometry::imageLevels,StorageTexture::Image(uint32_t),ImageResource::levelUses,ResourceMaterializer::LevelsPastChain,PipelineSpecialization::LevelsPastViewBaseandRuntimeAbi::LevelsPastView*are missing.A behavioural control on the merged tree: I changed
StorageTexture::copyImageToBuffer(TextureStorageImages.cpp:87) to copy from the physical image only (physical < 1u), so writeback skips the extra images. Then:agc_driver_extra_mip_color_targetfails withextra-mip rendering changed a sibling, another layer, padding or an allocation boundary.agc_driver_image_levels_past_chainandagc_driver_graphicsalso fail.After I restored the file, all three pass.
Findings
Blocking
None.
Non-blocking
The storage dump path still uses the guest level count.
Texture.cpp:4575-4578inStorageTexture::FlushDumpSelected(debug path, only runs whenAPS5_DUMP_STORAGE_GATEis set) still:levelCount = texture->descriptor.mipCounton the physical image;CopyRegions()straight tovkCmdCopyImageToBuffer.For a surface with extra levels, both name mip levels the physical image does not have. That is invalid usage, and on the NVIDIA driver that can be a device loss while someone is debugging exactly this kind of surface. Suggested fix: use
geometry.imageLevelswithimageBarrier/copyImageToBuffer, as the other writeback paths do, or refuse to dump surfaces withimageLevels < mipCount.The layer change in
Draw.cppis not mentioned or tested.Draw.cpp:3119andDraw.cpp:3195also change the immediate attachment barriers'baseArrayLayerfromarraySlicetoDescriptor().baseArray + arraySlice.StorageTexture::AttachmentView, so I think it is right: onmain, a color target withbaseArray != 0transitioned different layers from the ones its view renders to.ExtraMipColorTargetclears the extra levels through its own render pass (ClearAttachment), not throughrecordPreparedDraw.Suggested fix: mention it in What, and if possible add a recorded-draw case for an extra-mip target and for an array target with a non-zero base.
Explanatory comments in the new test file.
TextureMipChain.cpp:29-36and lines 69, 356-357, 390-391, 417, 424, 430, 443-444 and 495 are explanatory comments, not technical-debt notes. CONVENTIONS.md allows only debt comments. The checker passes because the PR also editsdocs/dev/debt/. Many existing test files onmainhave similar comments, so I don't count this as blocking. The text came in with the #6280 prerequisite, and the PR description would be a better place for it.Merge readiness. Most of the diff against
main(the shader recompiler,ViewLevelsand the sampled-copy caps) is the adapted #6280, which is still open. The declared merge-order prerequisites #6280, #12559, #12246, #10064, #9999 and #9884 are also all open today. This review covers the tree as submitted, merged onto2fbf1c6d97. The rebase after those PRs land changesTexture.cppandclearImage(the #12559 agreement), so this tree will need the focused tests run again.Not verified
Draw.cppfor extra-mip targets (see finding 2).Imported from boykopovar/AnyPS5. Originally posted by CnRJay on 2026-11-01T19:52:34Z.
Review: COMMENTED
Points on 7085:
Known gap recorded as comments.
TextureTiling.hppandTexture.cppadd "Technical debt:" comment blocks ("the guest's 1x1 levels past them are not represented", "a sampled view of guest levels past the image's reads the image's last level instead of their own texels"). Two problems: comments are not allowed, and the second one describes an approximation, a sampler reading the wrong level's texels. Under exact-or-throw this should throw for those inputs and be listed indocs/dev/debt/libSceAgcDriver.md.Graphics test protocol. AGC change: please run the focused tests on main and on the change with
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, same machine and GPU, and state that no newVUID-lines appear.Size. +1992/-97 across 30 files adding storage images per extra mip level; what is the memory and variant cost for a title with many mipped textures? A trace_digest comparison of main and the change on one scene would answer it.
Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-02T23:08:22Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
This pull request does not merge cleanly into
main(5cb015caaa): head5a1d63064dconflicts incore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppPlease rebase it onto current
main. I will review the change once it merges cleanly.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T06:12:30Z.
Review: APPROVED
Re-checked — approved
Since
5b8dd734ff, the PR has done six things. It routes the selected-storage diagnostic readback through the physical chain and the extra images. It drops thebaseArraychange to the draw barriers. It bounds sampled GPU clears to the allocated levels. It adds recorded, immediate and readback extra-mip draw tests. It removes the explanatory test comments and the refusal pins inherited from #6280. It moves the shader disk cache to format 55. On a clean merge withmain, the focused tests pass under the Khronos layer with noVUID-lines.What changed since my last review
147d25f02f:StorageTexture::FlushDumpSelectednow builds its barrier fromgeometry.imageLevels. It goes throughtexture->imageBarrier/texture->copyImageToBuffer, so the physical image and the extra images are both transitioned and copied.Draw.cppresident attachment barriers go back tomain'sbinding.color.arraySlice. They keepImage(mip)/ImageMipLevel(mip).agc_driver_extra_mip_{recorded,immediate,readback}tests.TextureMipChain.cppare removed.RequireRefusedpins inImageLevelsPastChain.cppare removed, as oneandonlydean asked.337b2d4030,0c036aa126,5a078ed1b0: test synchronisation and diagnostics for the draw test.18feff2d90+47d2d5b951/6211cc24bd: the sampled GPU clear range usesimageInfo.mipLevelsinstead ofdescriptor.mipCount.TestClearedMipRangescovers it.39e56b3b59: PS4 layout physical-level checks inTextureTiling.cpp.9ce21510c6: fixes theTestClearedMipRangescall broken by #12246's newlayerRowsbool. This was theagc_driver_graphicsfailure TechLevelZero's NVIDIA run reported on5a1d630.ecad0bc7e1,420fd2faae: theImageResourcefield count is 47, and the format is now 55. Compiled and plan entries reject 51–54, as oneandonlydean asked.What I ran
420fd2faae754ecc6c250efcfde3662a904bc19f,maind1ae628bc2f62459cce1e9872ba5632c938c71f2, merged with--no-ff(treef335a7df2e8d).git diff --checkcheck_conventions.pyAll conventions checks passed.libs(script)unwrap_self_..._destination_directory_group:os.chowngivesEINVALin the sandbox. It is intools/tests, which the PR doesn't touch, so it is not counted against the PR. The 6 known failures also fail onmain.agc_driver_extra_mip_color_targetagc_driver_extra_mip_recorded/_immediateagc_driver_extra_mip_readbackagc_driver_image_levels_past_chainagc_shader_disk_cacheagc_driver_graphicsagc_storage_hole_copy_barrier/dev/udmabuf)VUID-lines / missing-layer messageVK_LAYER_KHRONOS_validationin every test.Output excerpts
Negative control
Texture.cpp:471back todescriptor.mipCountand rebuiltagc_driver_graphicsfails withAGC graphics: a GPU-cleared sampled texture: a barrier names levels 0+10 of an image of 5 levels.FlushDumpSelected(Texture.cpp:4975-4984) back to the previous rawvkCmdPipelineBarrier/vkCmdCopyImageToBufferwithdescriptor.mipCount.agc_driver_extra_mip_readbackstill passes.VUID-VkImageMemoryBarrier-subresourceRange-01724andVUID-vkCmdCopyImageToBuffer-imageSubresource-07967/-07970/-07971/-07972/-imageOffset-09104. These are absent on the merged tree.git status --porcelainis empty, and the readback test passes again with 0 VUIDs.Previous findings
Texture.cpp:4975-4984usesgeometry.imageLevelsand the extra-image helpers, and control B shows the old code produces VUIDs on this path. Anotherdescriptor.mipCountbarrier remains on the physical image instoreDrawnRect(Texture.cpp:4386). It is unreachable for these surfaces: the drawn-rectangle path requiresdescriptor.mipCount == 1(Texture.cpp:4244).baseArraychange in theDraw.cppbarriers. No longer applies. The PR now keepsmain'sbinding.color.arraySlice(Draw.cpp:3496,Draw.cpp:3573). The recorded and immediate draw paths for an extra-mip target are now tested. The barrier/view mismatch for a target whose descriptorbaseArray != 0(the view usesdescriptor.baseArray + layer,Texture.cpp:2064) exists onmaintoo, so it is not this PR's.TextureMipChain.cpp. Resolved:147d25f02fremoves them. The only added comments left are the twoTechnical debt:notes, and both have entries indocs/dev/debt/.On CnRJay's review (
2b450d3): point 1 still holds as written.Texture.cpp:295-296still documents that a sampled view past the chain reads the last physical level. That behaviour came with the #6280 prerequisite and is listed indocs/dev/debt/libSceAgcDriver.md, so the checker accepts the comment. Whether that approximation is acceptable or should throw is for the maintainers to decide on #6280. I don't add anything new on it. Point 2 (a validation-layer run) is answered by the script's comparison and by my run above.New findings
Blocking
None.
Non-blocking
agc_driver_extra_mip_readbackpassed with the old out-of-range barrier and copy; only the layer flagged it. The dump file it produces could be compared against the guest bytes of the extra levels, so the test fails on its own on CI runs without the layer. Alternatively, the test could assert that the dump contains the extra-level texels.agc_driver_graphicsis close to the 30 s limit. It took 35.8 s alone on lavapipe here. It already ran near 30 s on earlier heads in the NVIDIA runs, and I did not timemainon this machine, so I don't attribute the time to this PR. The newTestClearedMipRanges/TextureMipChaincases use the mock device and look cheap.Not verified
agc_storage_hole_copy_barrier: it skipped on lavapipe (no watched host imports).agc_driver_graphicstakes onmainon this machine.Imported from boykopovar/AnyPS5. Originally posted by XairRrR on 2026-11-03T16:22:36Z.
Review: APPROVED
Re-checked — approved
The only change since
420fd2faaeis mergeae8b4c654d, which brings in currentmainand moves the shader disk cache from format 55 to 56. On a clean merge withmain, the focused tests pass under the Khronos layer with noVUID-lines.What changed since my last review
ae8b4c654d("merge current main into extra mip images with new cache layout").420fd2faaewith its diff againstmainatae8b4c654d. Only three lines differ:ShaderDiskCache::FormatVersionis now56. Onmainit is52, aftermainwidenedimageSamplersto 64-bit elements. SeeShaderDiskCache.hpp:16.tests/ShaderDiskCache.cpp:511and:2193.ImageResourcefield guard is 50, which ismain's 49 pluslevelUses. ThelevelUsesencode/decode lines are unchanged from the previous head.What I ran
PR head
ae8b4c654dab781deb668e9cbfc23446d52b4fda,main4f41f4c375f5abb487dbd184fbc150f31994d762, merged with--no-ff(tree65dc57c55fc7). The machine is a Debian 13 VM with GCC 14.2.0, building Release with Ninja. Vulkan runs through lavapipe (Mesa 26.1.6), with no GPU.git diff --checkcheck_conventions.pyAll conventions checks passed.libs(script)main.agc_driver_alpha_to_coverage_sample_mask_exportpassed on rerun.agc_driver_extra_mip_color_target/_recorded/_immediate/_readbackagc_driver_image_levels_past_chainagc_shader_disk_cacheagc_driver_graphicsagc_storage_hole_copy_barrierVUID-lines / missing-layer messageOutput excerpts
Negative control
I set
FormatVersionback to55and rebuiltagc_shader_disk_cache_tests.agc_shader_disk_cachefails withan entry with another image record layout loads. I then restored the header from the merged tree and rebuilt. The test passes again, andgit status --porcelainis empty.Previous findings
420fd2faae, so last review's control B still applies: the old out-of-range barrier and copy pass, and only the layer flags them.agc_driver_graphicsis close to the 30 s limit (non-blocking): still open, and I don't attribute it to this PR. It took 36.96 s here in the parallel run. I did not timemainon this machine. The PR's added cases use the mock device.New findings
Blocking
None.
Non-blocking
None.
Not verified
agc_storage_hole_copy_barrier: it skips on lavapipe.agc_driver_graphicstakes onmainon this machine.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T20:08:14Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: make single-layer clear operations target the matching separately backed extra mip images.
What I ran
Reviewed head
c53d9a26eb3957a82429a02da9d23a71dd5b9788using the supplied review diff, manifest, and pinned reader. No commands or tests were run.Results
Findings
Blocking
FillClearsupports a one-layer clear whenlayer != WholeImage, but the newclearColorImagehelper clears every extra mip image using the samerangelayer index. In the single-layer case that range names only the selected array layer in the base image; extra images therefore clear that layer rather than all their guest mip contents (and may address an invalid layer when the selected layer exceeds their layer count). This corrupts extra-level texels after a layer-specific fill clear. Pass the selected layer through to each extra image, or refuse this optimization when extra levels are present. Evidence:TextureStorageImages.cpp:100and the changed call pathTexture.cpp:6711.Non-blocking
Not verified
The full contents of
Texture.cpp,tests/Graphics.cpp, andtests/Recorder.cppwere excluded from the review folder; targeted ranges ofTexture.cppwere read throughrepo_read.py, while the two test files were not read. Other changed files were read from the review folder or targeted through the reader. No tests were run. The description reports GPU and CPU test runs on an earlier commit, not this head.To get this to a good state
Fix the per-layer clear handling for separately backed extra mips and add coverage for a layer-specific fill clear when the texture has extra mip levels.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-17T19:12:48Z.
Review: COMMENTED
Partial review — comments
Nothing blocks this among the hunks read; the points below are optional. The rest of the diff is not read, so no verdict on it is given.
What I ran
cbe4e582c6cfea5ce0ceca123972b25541dea682, basemain. No merged-preview check.description.md,commits.md,manifest.json,files.json, anddiff.patchlines 1–434 of 3155.diff.patchfor comments and print calls, and for the cache format version.Results
//or/* */comments added in the excerptFormatVersion = 100in the diff)Findings
Blocking
None verified.
Non-blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:577— the new fallback prints with an unconditionalstd::fprintf(stderr, ...)behind a process-wide counter. The surrounding file reports throughAPS5_LOG_OUTandAPS5_DEBUG_LOG. Consider the same macros so release builds stay quiet. Not confirmed as a defect.Not verified
CMakeLists.txt,Texture.hpp,TextureTiling.hpp,Draw.cpp, and the first part ofTexture.cpp, only through the diff hunks.files.jsonreviewed): the rest ofTexture.cpp,TextureStorageImages.cpp(new file),TextureTiling.cpp, thetests/files, the shader recompiler files (ResourceMaterializer,DescriptorBindingBuilder,ResourceTracker,ShaderDiskCache,SpirvImageEmitter), and the debt note.files/as too large:Texture.cpp,tests/Graphics.cpp,tests/Recorder.cpp. They were not read through the reader.To get this to a good state
Nothing is required. For a full verdict, the rest of the diff needs a read, and the reviewed files need to be read in full through the reader.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T06:29:17Z.
Review: COMMENTED
Reviewed — comments
The prepared bundle describes a broad graphics and shader change; I inspected selected implementation paths, but did not complete a full review or run checks.
What I ran
Reviewed head
55720b90d48152bb02a212e43efc87c9076128d8. No build, test, or negative control was run.Results
Findings
Blocking
None identified in the paths inspected.
Non-blocking
None.
Not verified
This was a partial review. I read
review/description.md,review/commits.md,review/manifest.json, selected ranges ofreview/diff.patch, and selected ranges ofTexture.cpp,TextureStorageImages.cpp,TextureTiling.cpp,ResourceMaterializer.cpp, andSpirvImageEmitter.cpp. The other changed files and uninspected regions were not read, including changed files excluded from the prepared folder because they were too large. I did not verify the reported Windows GPU runs, CI, or the stated outstanding layer-clear review request.To get this to a good state
Nothing is required. The review is incomplete, so this comment does not recommend approval or request changes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T06:22:49Z.
Review: COMMENTED
Reviewed — no blocking findings
The core extra mip backing and shader query changes were reviewed at head
a8a0932ff294be28a34d5d4efe89639f11cfdc76; no verified blocking defect was found in the inspected code. This review is incomplete because four changed files were excluded from the bundle and not read.What I ran
No commands or tests were run. The author reports Windows GPU and host test results in the PR description; these were not independently verified.
Results
Findings
Blocking
None in the files read.
Non-blocking
None.
Not verified
Read the prepared description, commit list, manifest and diff, plus targeted source context for extra mip allocation, image copies/barriers, mip geometry and the shader query path. Full head text was read for
TextureStorageImages.cppand targeted ranges ofTexture.cppandTextureTiling.cpp;TextureMipChain.cppwas searched but not fully read. Other changed files were not fully reviewed.The manifest marks these files excluded because they were too large for the review folder:
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp,core/libs/prx/libSceAgcDriver/tests/Graphics.cpp,core/libs/prx/libSceAgcDriver/tests/Recorder.cpp, andcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp. The report does not list the full set of manifest files that were reviewed, so that comparison is not verified. No local test output or commit-pinned source permalinks were available in the inspected material.To get this to a good state
Nothing is required. Optional: complete review of the excluded files before relying on this review as a merge decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T05:31:03Z.
Review: DISMISSED
Reviewed — changes requested
Changes are required before merge: route the partial
ClearMipcommand barriers through the extra-image helpers, and handle mip clears for separately backed levels.What I ran
f20354c93ad3717b390aaec0e59e73e54b332463using the supplied diff and readerrepo_read.py.Results
Findings
Blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:7476:ClearMipstill sends both layout transitions directly throughvkCmdPipelineBarrier, targeting onlyimage; the updatedclearImagehelper then rejects its one-mip range whenever extra mip images exist (TextureStorageImages.cpp:898). This makesClearMipfail for every storage texture with levels beyond its physical chain, including clears of physical-chain mips. Route those barriers throughimageBarrierfor the root chain and extra images where appropriate. Also, an extra mip’s clear must targetImage(level)andImageMipLevel(level); the current root-image range cannot clear its separate backing. The unchanged direct barrier call is visible in the hunk that changesclearImageatcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:1837.Non-blocking
None.
Not verified
Texture.cpp,Graphics.cpp,Recorder.cpp, orShaderMemory.cpp; targeted ranges and changed hunks were reviewed. All other changed files listed by the review manifest were included, but their full text was not all read.To get this to a good state
Update
ClearMipto transition and clear the correct image(s) for the requested guest mip, then rerun its focused regression coverage and the extra-mip GPU fixtures.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T06:53:09Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional.
What I ran
Reviewed head
c4cb53c03425807f26726e07b76f87d2d0a7b80c. No build or tests were run;repo_read.pywas unavailable in this review interface. The author reports native builds, 36 physical GPU testcase processes, one Graphics host suite, and a negative control indescription.md; these were not independently verified.Results
Findings
Blocking
None identified in the inspected code.
Non-blocking
None.
Not verified
The changed-file inventory was not fully read.
Texture.cpp,TextureStorageImages.cpp,Graphics.cpp,Recorder.cpp,ShaderDiskCache.cpp, and other changed files are excluded from this draft’s source review due to reader limits or unavailable content. The full changes, test coverage, build results, runtime behavior, and GPU claims are therefore not verified.diff.patchwas only partially read. No repository files were read through the reader; only prepared review materials and a few head-file ranges were available.To get this to a good state
Nothing is required. Optional: complete review of the changed-file inventory and independently verify the reported checks before relying on this review as merge evidence.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T19:43:58Z.
Review: COMMENTED
Reviewed — no blocking findings
The targeted source and diff review found no verified blocking defect; material portions of the change remain unreviewed, so a formal approval is not justified.
What I ran
Reviewed head
7e56a07a9425a334d241e6a472b5d3098258349dusing the prepared review bundle andrepo_read.py. No build or test commands were run. The author reports Windows GPU and graphics suite results indescription.md; those runs were not independently verified here.Results
Findings
Blocking
None verified in the inspected areas.
Non-blocking
None.
Not verified
The full content of four changed files was excluded by the review bundle size rule:
Texture.cpp,Graphics.cpp,Recorder.cpp, andShaderMemory.cpp. I inspected only targeted ranges ofTexture.cpp; the other three were not read. I also did not read all included changed files or independently run the reported checks. The description's GPU, fixture, cache, and profiling claims are author-reported.Files read:
description.md,commits.md,manifest.json, targeted ranges ofdiff.patch,Texture.hpp,Texture.cpp,TextureStorageImages.cpp, andSpirvImageEmitter.cpp. Files excluded by rule: the four listed above.To get this to a good state
Nothing is required. Optional: review the excluded files and run the relevant checks before relying on the broader implementation claims.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-26T19:54:23Z.
Review: COMMENTED
Actionable comments posted: 3
e0927bcf-075a-42da-b129-e342e64cfa2bReviewing files that changed from the base of the PR and between
21e1e006c3and7e56a07a94.core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/Texture.hppcore/libs/prx/libSceAgcDriver/Graphics/include/TextureTiling.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureStorageImages.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureTiling.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/GraphicsTests.hppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/TextureMipChain.cppcore/libs/prx/libSceAgcDriver/tests/TextureTiling.cppcore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_extra_mip_color_target_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_graphics_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmakecore/libs/prx/libSceAgcDriver/tests/execution/ExtraMipColorTarget.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageLevelsPastChain.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageResinfoDimension.cppcore/shader/recompiler/IntermediateRepresentation/include/IntermediateRepresentation/IrMetadata/Resources.hppcore/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/shader/recompiler/PipelineSpecialization.hppcore/shader/recompiler/RuntimeAbi.hppcore/shader/recompiler/ShaderDiskCache.cppcore/shader/recompiler/ShaderDiskCache.hppcore/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cppdocs/dev/debt/changes/extra-guest-mip-levels.mddocs/dev/debt/changes/fix-resinfo-mip-past-last-level.mdIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T05:49:36Z.
Review: COMMENTED
Actionable comments posted: 5
441aa8c1-4ceb-4f79-b5e5-63a138f401c4Reviewing files that changed from the base of the PR and between
7e56a07a94and010c276739.core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/Texture.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureTiling.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/TextureMipChain.cppcore/libs/prx/libSceAgcDriver/tests/TextureTiling.cppcore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_extra_mip_color_target_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmakecore/libs/prx/libSceAgcDriver/tests/execution/ExtraMipColorTarget.cppcore/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T05:53:14Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change based on the code inspected; some changed files and runtime claims were not fully verified.
What I ran
Reviewed the prepared diff at head
010c276739bd7050604bbe399d05b73d33772e44and inspected targeted source ranges throughrepo_read.py. No build or test commands were run.Results
Findings
Blocking
None identified in the inspected code.
Non-blocking
None.
Not verified
The review folder’s
files.jsonis unavailable, so I could not compare the files I read against itsreviewedset. I readdescription.md,commits.md,manifest.json,diff.patch,README.md, and targeted ranges fromTextureStorageImages.cpp,Texture.cpp,TextureTiling.cpp, andResourceMaterializer.cpp. The other changed files listed inREADME.mdwere not read in full; in particular, the largeGraphics.cpp,Recorder.cpp, andShaderMemory.cppchanges were not inspected. Author-reported GPU, host-suite, and fixture results were not independently verified. No build, test, negative-control, or console run was performed.To get this to a good state
Nothing is required. Optional: run the reported checks on this exact head and provide the complete review file list so coverage can be confirmed.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T09:43:07Z.
Review: COMMENTED
Reviewed — no blocking findings
The prepared diff at head
45f9951973d7a1208ef4df3ce27bdc4241b6dbd3shows no verified blocking defect in the portions inspected, but the full review is incomplete.What I ran
No commands or tests were run. I read the prepared description, commit list, manifest, and selected diff hunks; I did not fetch the diff again.
Results
Findings
Blocking
None verified in the portions inspected.
Non-blocking
None recorded.
Not verified
I read
description.md,commits.md,manifest.json, and selected sections ofdiff.patch, coveringTextureStorageImages.cpp,TextureTiling.cpp,ResourceMaterializer.cpp,ResourceTracker.cpp, cache metadata, andSpirvImageEmitter.cpp. I did not read every changed file or the complete changed-file content. In particular, fullTexture.cpp,Graphics.cpp, andRecorder.cppcontent was excluded from the review folder; I did not inspect those files throughrepo_read.py. I did not run or independently verify the builds, GPU cases, host suites, or control runs described by the author. No files fromfiles.jsonwere claimed as fully reviewed.To get this to a good state
Nothing is required. Optional: complete the review of the changed files not inspected and independently run relevant checks before treating this as an approval decision.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T09:43:14Z.
Review: COMMENTED
Actionable comments posted: 3
7ccbec7b-5241-4437-8c81-a40d49a3c793Reviewing files that changed from the base of the PR and between
010c276739and45f9951973.core/libs/prx/libSceAgcDriver/CMakeLists.txtcore/libs/prx/libSceAgcDriver/Graphics/include/Texture.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppcore/libs/prx/libSceAgcDriver/Graphics/src/TextureStorageImages.cppcore/libs/prx/libSceAgcDriver/tests/Recorder.cppcore/libs/prx/libSceAgcDriver/tests/ShaderDiskCache.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/TextureMipChain.cppcore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_by_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmakecore/libs/prx/libSceAgcDriver/tests/execution/ExtraMipColorTarget.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageBy.cppcore/libs/prx/libSceAgcDriver/tests/execution/ImageResinfoDimension.cppcore/shader/recompiler/Optimization/include/Optimization/ResourceMaterializer.hppcore/shader/recompiler/Optimization/src/ResourceMaterializer.cppcore/shader/recompiler/Optimization/src/ResourceTracker.cppcore/shader/recompiler/ShaderDiskCache.hppcore/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T10:44:51Z.
Review: COMMENTED
Reviewed — comments
The prepared description reports passing tests, but I did not complete a full audit of the production changes, so a formal approval is not justified.
What I ran
b70329b9b16064453b685f31d277ce076652d1a3.Results
Negative control
Not run during this review. The description reports author-run controls; I did not independently verify them.
Findings
Blocking
None verified in the sections inspected.
Non-blocking
Sources
TextureStorageImages.cpp,Recorder.cpp, andImageLevelsPastChain.cpp.Not verified
To get this to a good state
Nothing is required. The review remains a comment because the full change audit is incomplete; the optional next step is to finish that audit before relying on approval.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T16:49:19Z.
Review: COMMENTED
Actionable comments posted: 1
41d2e51c-91d2-4965-b4b0-28c1f3e1374fReviewing files that changed from the base of the PR and between
b70329b9b1and5cd2f0e0e1.core/libs/prx/libSceAgcDriver/Graphics/include/Texture.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Texture.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-28T16:54:23Z.
Review: CHANGES_REQUESTED
Reviewed — changes requested
Changes are required before merge: fix the extra-mip direct-upload transitions and make image readback handle the separate mip backings.
What I ran
Reviewed head
5cd2f0e0e1f2a2ed38c241ae45cd153ec806dd6cusing the prepared diff and pinned repository reader. No build or tests were run. The GPU and host test results in the PR description are author-reported.Results
Findings
Blocking
core/libs/prx/libSceAgcDriver/Graphics/src/Texture.cpp:598:recordDirectUploadBarriernow limits its transition to the primary image’s physical mip chain, and the matching completion barrier does the same at:609. The directDispatchImageupload loop still writes every guest mip throughelementLayerView, including views targeting the separately allocated extra images. Those images therefore remain inUNDEFINEDwhile shader writes use them, with no completion barrier before later reads. Transition each extra image toGENERALbefore its direct detile writes and include it in the completion barrier. The changed range is visible in the commit-pinned diff.core/libs/prx/libSceAgcDriver/Graphics/src/TextureStorageImages.cpp:1059:copyImageToBufferrequires the source to be the primary image, but its own dispatch loop callsvkCmdCopyImageToBufferwith each extra backing handle.writeBackLayerssupplies regions for every guest mip, so writing back a surface with extra mips reaches this requirement and throws when it encounters the first extra-mip region.PublishIntoMirrorand the dump readback path use the same helper. Remove the primary-image-only restriction and dispatch each selected region group against its matching backing. See the commit-pinned helper.Non-blocking
None.
Sources
The prepared
review/diff.patch, PR description, and pinned source ranges inTexture.cpp,TextureStorageImages.cpp, andTextureMipChain.cppsupport the findings. Full files read:TextureStorageImages.cpp,TextureTiling.cpp, andTextureMipChain.cpp; additional targeted ranges were read fromTexture.cpp,Draw.cpp,ResourceMaterializer.cpp, andSpirvImageEmitter.cpp.Not verified
No build, test, GPU, console, or CI checks were run. Author-reported results were not independently verified. Four changed files were excluded from the prepared review folder as too large:
Texture.cpp,Graphics.cpp,Recorder.cpp, andShaderMemory.cpp; their relevant hunks were inspected through targeted diff and source reads, but not every added line was read. Other included changed files were not all exhaustively read, so this is not a complete line-by-line review.To get this to a good state
Fix both blocking findings, then rerun the extra-mip upload, writeback, and mirror-publication coverage on the updated head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T09:44:48Z.
Review: COMMENTED
Reviewed — no blocking findings
The implementation and available evidence support the extra-mip backing behavior, with no concrete blocking defect found in the inspected code.
What I ran
Reviewed head
b5c59786a10b77cd64c8990d8f1b2e331f4ef034. No commands or tests were run; the description’s test results are author-reported.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full changed-file set was not read. Excluded by the review-folder size rule and not inspected:
Graphics/src/Texture.cpp,tests/Graphics.cpp,tests/Recorder.cpp, andtests/ShaderMemory.cpp. Other included changed files were also not all read. Runtime behavior and the reported GPU/host test results were not independently verified.Read:
description.md,commits.md,manifest.json,diff.patch,Graphics/src/TextureStorageImages.cpp, portions ofGraphics/include/Texture.hpp,Graphics/src/TextureTiling.cpp, andtests/execution/ExtraMipColorTarget.cpp. Thefiles.jsonartifact was unavailable; the changed-file inventory and exclusions were checked using the review listing and manifest.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-02T01:14:00Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this; the points below are optional. No blocking defect was verified in the inspected excerpts, but the review is incomplete.
What I ran
Reviewed head
7f1810d363304d116250330db0d8a2fe3a641707using the prepared diff and manifest,repo_read.pyat the pinned head, and read-only shell inspection. No build or test was run.Results
Negative control
Not run. No test was run, so there was no negative control.
Findings
Blocking
None identified in the inspected excerpts.
Non-blocking
No code issue identified in the inspected excerpts. A formal approval is not justified because the full changed-line audit is incomplete.
Sources
Inspected excerpts at the reviewed head: TextureStorageImages.cpp, Texture.cpp, and SpirvImageEmitter.cpp.
Not verified
The full text of
Texture.cpp,Graphics.cpp,Recorder.cpp, andShaderMemory.cppwas not read; only targetedTexture.cppranges were inspected. The remaining changed files were not all read line by line.files.jsonlists no rule-excluded files. The author-reported GPU, CTest, and control results were not independently verified.To get this to a good state
Nothing is required. Optional: complete the remaining changed-line audit before making a formal approval decision.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T23:02:31Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks the changes inspected; this review is incomplete, so the conclusion does not cover every changed file.
What I ran
Reviewed head
6e70d4e7ebb80cc9e551d1c7b726caea77a274d9. Read the prepared description, commits, manifest, diff, and files list. Usedrepo_read.pyto inspect targeted source ranges. No tests or builds were run. The author-reported test results in the description were not independently verified.Results
Negative control
Not run independently. The description references an earlier ClearMip old-code control; its evidence was not checked.
Findings
Blocking
None identified in the inspected changes.
Non-blocking
None.
Sources
Not verified
The full diff was not audited line by line. Only targeted portions of
Texture.cpp,Texture.hpp, andTextureTiling.cppwere read from the pinned source; the prepared diff was also inspected for portions ofDraw.cpp,Recorder.cpp, andShaderDiskCache.cpp. The remaining changed files were not read from the pinned source. No independent execution, GPU, console, or cache compatibility checks were performed.To get this to a good state
Nothing is required for the inspected changes. Complete the remaining changed-file review before treating this as a full approval.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.