feat(agc): draw color-writing draws over a depth target with fewer samples at the rasterizer's samples #27698
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/27698"
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 frankea on 2026-11-27T03:01:36Z.
What
#25525 draws a depth/stencil target with fewer stored samples than the rasterizer covers (EQAA, 1 < Z < N with
DB_Z_INFO.NUM_SAMPLESbelowPA_SC_AA_CONFIG.MSAA_NUM_SAMPLESandPA_SC_MODE_CNTL_0.MSAA_ENABLEset) at Z samples, but only for draws that write no color. A draw that writes a color target still throws "a depth target with fewer samples than the rasterizer is unsupported for draws that write a color target". It cannot simply be drawn at Z samples, because its color target holds N coverage samples, and Vulkan cannot render an N-sample color attachment with a Z-sample depth attachment.This PR draws such a draw at N samples against a temporary N-sample copy (the twin) of the Z-sample depth/stencil target, for draws that only read depth and stencil:
DecodeState: when the draw exports color,requireAnchoredDepthSampleschecks it and the state keeps N samples and its N sample locations, withState::depthAnchorSamples= Z andState::depthAnchorMap, one map per pixel of the 2x2 location grid. Draws that write no color keep #25525's leading-sample path unchanged. The final "the depth target's sample count differs from the rasterizer's" check accepts the new state.anchorMapOf): coverage sample i < Z reads stored sample i. Each later coverage sample reads the stored sample nearest to it, by squared distance on the 1/16-pixel grid of that pixel's location bytes, with the lower index on a tie. For GT7's locations (-6,6), (6,-6), (-2,-2), (2,2), samples 2 and 3 are equally far from both stored samples, so both read stored sample 0 (map 0x76540010).prepareDrawtakes the Z-sample surface (DepthSurfaceAnchorSource, which requires a resident multisampled surface of its own) and an N-sample twin from a small per-device pool (DepthSurfaceAnchorTwin, at most 4; an eviction bumps the surface release counter so framebuffers are rebuilt;ClearDepthSurfacesfrees them), and binds the twin as the depth attachment. Before the render pass,RecordDepthAnchorExpandcalls the newSampleOrders::Expand. It copies the stored samples into a sampleable copy, with the source's located transitions at the sample locations, grid and sample count the surface was last rendered with (sourcePass). Each draw over a multisampled depth surface records those on the surface, a stencil clear pass records the default locations, and any other write forgets them. It moves the twin from UNDEFINED to GENERAL, with the N locations when the draw's pipeline uses sample locations (twinPass). Then it draws the copy into the twin with the existing SampleOrder depth and stencil passes (drawDepth, the map ORed with 0x88888888). No new shader is added. The method is the oneDepthSampleOrderMethodalready picks: stencil bits on the RTX 4090, stencil export on MoltenVK.Depth()now shares the copy step (copySamples) withExpand. The twin is never written back: the draw cannot change depth or stencil, and nothing is copied back into the stored surface.recordDrawpath and inrecordPreparedDraw. Anchored draws always start a new render pass, so each one records its own expansion. They are not made into draw recipes, andprepareDrawthrows if a remembered attachment would serve one.passDepthLocationsreturns nothing for them.ValidateSampleLocationschecks the depth format's sample-location compatibility at N samples for these draws, which is the twin's count.depthAnchorSamplesis encoded and canonicalised (format 20,sizeof(State)guard 1024). The map does not affect the pipeline, so the canonical state clears it.Driver::sameDecodecompares both fields.DecodeState("a depth target with fewer samples than the rasterizer ... color-writing draws ..."): a depth test or depth-bounds test; a depth write or a stencil write (DepthStencilWrites: an op other than KEEP on a face with a non-zero write mask, so REPLACE under write mask 0, or a back-face op withoutBACKFACE_ENABLE, is accepted); alpha-to-coverage;PS_ITER_SAMPLE; centroid, sample, ancillary or coverage pixel inputs; a depth or sample-mask export (DB_SHADER_CONTROLbits 0 and 8); overrasterization (DB_EQAAbits 24-27); andDB_EQAA.MAX_ANCHOR_SAMPLESbelow log2(Z), which includes a draw that never writesDB_EQAA.planDraw), because the twin counts N samples per pixel and this PR does not model which count the console uses. Also a draw whose sample locations differ between the pixels of the 2x2 grid, since the expanded copy is written at one pixel's locations, and a device that cannot expand the stored samples (DepthAnchorRefusalinplanDraw: nosampleRateShading, the depth format or its stencil not sampleable at Z, or the format not attachable at N), a device that puts the guest's samples in order (pipeline->ReordersSamples()inprepareDraw), and a depth target that no draw has rendered since its last other write, or that its last draw rendered at another sample count (DepthAnchorSourcePass), because the source copy's layout transitions must name the locations it was rendered with.Register semantics (field positions from Mesa's
src/amd/registers/gfx10.jsonat tag mesa-25.0.0,DB_EQAAat line 12738):MAX_ANCHOR_SAMPLESis bits 0-2,INTERPOLATE_COMP_Zbit 18,STATIC_ANCHOR_ASSOCIATIONSbit 20,OVERRASTERIZATION_AMOUNTbits 24-26 andENABLE_POSTZ_OVERRASTERIZATIONbit 27. radeonsi'ssi_emit_msaa_config(src/gallium/drivers/radeonsi/si_state.cat mesa-25.0.0, comment at lines 3436-3446) says that when there are fewer Z/S samples than coverage samples, missing samples come from Z planes if Z is compressed, or "from the closest defined sample if Z is uncompressed" (line 3444). radeonsi always setsSTATIC_ANCHOR_ASSOCIATIONSto 1 (line 3432) andMAX_ANCHOR_SAMPLESto log2 of the Z sample count (line 3525). GT7'sDB_EQAA0x00052202 hasSTATIC_ANCHOR_ASSOCIATIONS0 andMAX_ANCHOR_SAMPLES2 (four anchors) over a two-sample target. This PR assumes three things, none of them measured on a PS5. First,STATIC_ANCHOR_ASSOCIATIONS0 behaves as a static nearest-sample association, with the lower index winning a tie. Second, aMAX_ANCHOR_SAMPLESabove log2(Z) changes nothing (one below it is refused). Third, the comment, which speaks of Z, also holds for stencil: GT7's stencil plane is untiled, and the accepted draws only test stencil. The tie rule matters for GT7, because both of its extra samples are ties. It only changes edge pixels whose two stored stencil samples differ. This PR is looser than the one-fragment color rule (staticAnchorsinState.cpp), which requiresSTATIC_ANCHOR_ASSOCIATIONS1. That rule does not apply to GT7's 2-fragment target.INTERPOLATE_COMP_Z(set in GT7's value) does not matter here, since every depth test is refused. #25525's rule for draws that write no color, which drops coverage samples Z..N-1, is unchanged. For color it would leave half of each interior pixel's samples unwritten, so this PR does not use it there.Debt: a new entry, "Color-writing draws over a depth target with fewer samples" (fragment
docs/dev/debt/changes/fix-depth-anchored-color-samples.md), states the nearest-sample rule and tie-break, theSTATIC_ANCHOR_ASSOCIATIONSandMAX_ANCHOR_SAMPLESassumptions, and the refusals. #25525's fragment (fix-depth-fewer-samples-than-coverage.md) now says its rule applies to draws that write no color target, and no longer lists color writes among its refusals.Tested
tests/Graphics.cpp(agc_driver_graphics): Gran Turismo 7's color-pass state decodes as 4 samples over the 2-sample depth target with anchor map 0x76540010 in every pixel,leadingSamplesfalse, and the four coverage locations kept. That state is a 4-sample 2-fragment color target with FMASK, a 2-sample target with depth HTILE, stencil LEQUAL with KEEP,DB_EQAA0x00052202 and sample words 0x22eea66a. A location set with one pixel swapped (no ties) anchors each extra sample to its nearer stored sample in each pixel of the 2x2 grid. Each refusal above thatDecodeStatemakes is checked by its message, including REPLACE on either face, a stencil clear, Z_ENABLE, Z_ENABLE with Z_WRITE, depth bounds, a depth clear,MAX_ANCHOR_SAMPLES0 andDB_EQAAnot written. Accepted cases: a back-face REPLACE withoutBACKFACE_ENABLE, REPLACE under write mask 0, Z_WRITE without Z_ENABLE, andMAX_ANCHOR_SAMPLESequal to log2(Z). The same state withCB_TARGET_MASK0 still takes the leading-sample path.ValidateSampleLocationsaccepts the anchored state with a depth format that is location-compatible only at 4 samples and refuses the same state unanchored. A pipeline recipe round-tripsdepthAnchorSamplesand drops the map. The occlusion-query, device-expansion and sample-reordering refusals are not covered by a test.tests/execution/DepthFewerSamples.cpp(agc_driver_depth_fewer_samples, PM4 throughsceAgcDriverSubmitDcb): a 2-sample stencil plane is filled with 0x25. A stencil-only REPLACE 0x80 draw under a 4-sample rasterizer (#25525's path) then crosses it with a shallow edge, leaving texels with both, neither and one stored sample at 0x80. The test checks that layout through DB stencil copies of each sample. Then a color draw with stencil EQUAL 0x80 and KEEP covers the target, after a base fill. It runs into a 4-sample RGBA8 target and into a 4-sample 2-fragment target with FMASK and CMASK (CB_COLOR_INFO 0xe028, tiled as GT7's target), with a constant color and alpha-blended, once with each coverage sample alone in the sample mask and once with all four. A CB resolve after each draw must match, within 2 per channel, the average the CPU computes from the coverage samples whose anchor's stored sample holds 0x80. Both stored stencil samples must be unchanged afterwards. This runs at three location sets: standard 4x, a no-tie set (-6,6), (6,-6), (4,-4), (-4,4), and GT7's tie set. A second ctest (agc_driver_depth_fewer_samples_stencil_writing_color) checks that a color draw that REPLACEs the stencil is refused with "...for color-writing draws that write depth or stencil".ValidateSampleLocationsat Z samples (unit test only, since MoltenVK accepts both counts); removing the depth/stencil write refusal; writing the twin back into the stored surface with samples shifted by 2; disabling theMAX_ANCHOR_SAMPLEScheck. One mutation is not caught: using one location set and count for both the source copy and the twin. Every test still passes with 0 VUIDs on MoltenVK. The source's locations are the first Z of the N set, so the copied data is the same either way, and the validation layer does not check the sample count of the locations in a barrier. I have not run this mutation on the 4090. Mutations were not run on the 4090 at all.#25525 is now in main, so the control is main. Main was merged into this branch to clear a conflict, and the runs below are at the merge (head
4b5ccab82d) against main76d0a4a7dc. On the main side, this PR'sDepthFewerSamples.cppand its cmake fragment were built into main, andagc_driver_graphicsran main's own version oftests/Graphics.cpp, because this PR's version readsState::depthAnchorSamplesand does not build there.76d0a4a7dc4b5ccab82dagc_driver_depth_fewer_samples,agc_driver_depth_fewer_samples_stencil_writing_coloragc_driver_graphicsstencil_copy_draw,msaa_enable_single_sample,sample_mask_depth_stencil,sample_mask_multisample,eqaa_color_target,sample_order,multisample_readback,stencil_replayagc_driver_graphics,agc_driver_sample_order_planningagc_driver_depth_fewer_samples,agc_driver_depth_fewer_samples_stencil_writing_color,stencil_copy_draw,sample_order,sample_order_recipe_depth_locations,eqaa_color_target,sample_mask_depth_stencil,multisample_readbackand itsuint8,uint16,uint64,uint128,depth,retileanddepth_retilevariantsmultisample_readback_upload,sample_order_grid_reference,sample_order_render_pass_depth_locationsshaderStorageImageMultisample, and no graphics pipeline library on MoltenVKOn the 4090 there are 0
VUID-lines in every log: this PR's runs 1-3 and its layer run, and main's run and its layer run. The layer run on each side had 14 lines readingInsert instance layer "VK_LAYER_KHRONOS_validation"from the Vulkan SDK 1.4.363.0 install, and 0 lines reading "was not found but was requested by env var VK_INSTANCE_LAYERS".depth_fewer_samples,depth_fewer_samples_stencil_writing_color,msaa_enable_single_sampleandstencil_copy_draweach had 2, the other six Vulkan tests had 1 each, andagc_driver_graphicscreates no instance. The Windows machine's implicit layers (CheatHappens, OBS hook, NV optimus, NV present) were also inserted, 14 times each. The layer runs usedANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_LOADER_DEBUG=layerandctest -V. The plain runs also setANYPS5_REQUIRE_VULKANandANYPS5_NO_SHADER_CACHE. No test was skipped.On the Mac, the build used
ninja -j8. Main still does not build on macOS without two local fixes: libc'sRuntime.cppfails on the__contained_*members (what #27201 fixes), andGuestMemory.cpp:4412fails onstd::min. I applied both for the build and removed them afterwards. They are not part of this PR. The PM4 tests ran withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layer. MoltenVK also needsDYLD_LIBRARY_PATH,VK_DRIVER_FILESandVK_LAYER_PATHpointing into the SDK; without them every test skips because there is no libvulkan. There are 0VUID-lines, and the loader log shows the validation layer inserted (21 matches).Title: Gran Turismo 7 (PPSA01317), Windows, RTX 4090. After the stencil-only pass that #25525 draws, GT7 draws a color pass with the same pixel shader (PS 0x1258d78900). It renders into a 512x512 4-sample 2-fragment color target 0x1238ba0000 (CB_COLOR_INFO 0xe028 with FMASK and CMASK, blend on) over the same 2-sample D32S8 target 0x1238df0000. The pass runs with
MSAA_ENABLE,DB_EQAA0x00052202, the depth test off, stencil LEQUAL ref 0x80 with KEEP on both faces, and sample words 0x22eea66a. #25525 refuses it with "...unsupported for draws that write a color target". The depth target has a depth-only HTILE at 0x1238de8000 (DB_Z_INFO0xa2900987, TILE_SURFACE_ENABLE) and an untiled stencil (DB_STENCIL_INFO0x20000181, TILE_STENCIL_DISABLE). #25525's description was corrected to say so.The stack was main
3ddd8d5e05+ #22767 + #7256 + #9335 + #16935 + this PR (which includes #25525), withAPS5_SPLIT_TABLE_CALLS=1and CROSS sent throughAPS5_PAD_INPUT_FILE. The first run used a cold shader cache and the rest a warm one. In four runs nothing stopped on a depth-sample refusal. Three stopped at t+807 s to t+2351 s on "compute shader 0x120aed7f00 split into N table call parts: DescriptorBindingBuilder: a min or max reduction sampler that filters between texels or mip levels samples an image that needs point filtering (sint, converted or depth-bits format), which is not implemented" (264 to 367 parts). I stopped the fourth by hand at t+1777 s. Those logs cannot show whether the color pass was drawn.Three more runs added a local stderr print at the record sites; it is not part of this PR. In one of the three, the color pass was recorded once, through the lean
recordDrawpath: Z=2, N=4, map 0x76540010 in all four pixels, the 512x512 region. The stencil-only pass was recorded at 2 samples just before and just after it. The frame counter had already stopped at frame 9741, about 173 s before that draw, so no frame was presented after it, and there is no screenshot or FPS for it. That run stopped 190 s later on the same compute refusal. In the other two runs neither pass was recorded. One stopped at frame 16585 on "dithered or rounded alpha-to-coverage is unsupported (register 0x2dc = 0x00016c01)". The other stopped at frame 10215 on the compute refusal, after PS 0x1258d78900 had been prepared. So the runs show that GT7's draw is accepted and recorded, not that its image is right. The compute refusal and the dithered alpha-to-coverage refusal are outside this PR.Other testers:
1f2e25db2f(not merged intomain) on Windows 11 (build 22621) with an AMD Radeon RX 6700 XT, driver 26.11.2, GCC 15.2 UCRT r7, Release (https://github.com/boykopovar/AnyPS5/pull/27698#issuecomment-7211473353):agc_driver_depth_fewer_samples,agc_driver_depth_fewer_samples_stencil_writing_color,agc_driver_graphicsand the other 56 CTests of the two executables passed in 3 of 3 runs. No validation layer, no control onmain, no GT7 run.4e6341018fmerged into a local build that carries other changes and skips refused draws (https://github.com/boykopovar/AnyPS5/pull/27698#issuecomment-7289371370). The World Map scene that stopped on "...unsupported for draws that write a color target" without this PR got past that point and kept running for more than 10 minutes. The scene stayed black, and their build cannot tell whether that comes from this path or from something else.Checklist
main; no other open PR implements the same functions.main76d0a4a7dcis merged into the branch (merge4b5ccab82d) to clear a conflict. #25525, which this branch was first stacked on, is merged. I searched open PRs for EQAA depth, anchor samples, mixed samples, depth sample count and sample locations. #27437 adds a stencil import next toSampleOrders::Import, which this PR moves, and the two conflict inSampleOrder.cpp. #19943, which stops chaining sample locations into the render pass begin, is merged and is in this head, so the runs above include it. #23386 (merged) refuses depth targets with a sample count the device cannot hold, and #27672 handles single-sample scans. Neither touches this path.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)Summary by CodeRabbit
New Features
Bug Fixes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T03:12:19Z.
Review: COMMENTED
Reviewed — comments
The change is documented and tested on the listed host GPUs, but its sample association assumptions have not been measured on a PS5, so formal approval is not justified.
What I ran
Reviewed head
0e248bdff10549f2d1c38e4abec734bd904e03d5. No commands or tests were run; I inspected the prepared diff and targeted source context usingrepo_read.py.Results
Findings
Blocking
None.
Non-blocking
STATIC_ANCHOR_ASSOCIATIONSbehavior, and the effect ofMAX_ANCHOR_SAMPLESabove the stored sample count are explicitly assumptions, and the description says none were measured on a PS5. The test exercises those assumptions on an RTX 4090 and MoltenVK. Please add a PS5 measurement before treating the GT7 behavior as confirmed. Changed lines:core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:889,core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp:926.Sources
Reviewed prepared
description.md,commits.md,manifest.json, anddiff.patch; targeted source context inState.cpp,SampleOrder.cpp, andDepthSurface.cpp.Not verified
No tests were run. I did not read every changed file:
Graphics.cppwas excluded from the review folder for size, and several included changed files and portions ofDepthFewerSamples.cppwere not inspected. The review folder lists no other excluded files.To get this to a good state
Nothing is required. Optional: add a PS5 measurement for the documented sample mapping assumptions.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T03:17:14Z.
Review: COMMENTED
Actionable comments posted: 3
7ae14429-aed0-4a0a-ada7-96406f0aaaf0Reviewing files that changed from the base of the PR and between
5348d022f4and1be1d03b35.core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cppcore/libs/prx/libSceAgcDriver/Graphics/include/DepthSurface.hppcore/libs/prx/libSceAgcDriver/Graphics/include/Pipeline.hppcore/libs/prx/libSceAgcDriver/Graphics/include/SampleOrder.hppcore/libs/prx/libSceAgcDriver/Graphics/include/State.hppcore/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/Graphics/src/PipelineJournal.cppcore/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cppcore/libs/prx/libSceAgcDriver/Graphics/src/State.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppcore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_depth_fewer_samples_tests.cmakecore/libs/prx/libSceAgcDriver/tests/execution/DepthFewerSamples.cppdocs/dev/debt/changes/fix-depth-anchored-color-samples.mddocs/dev/debt/changes/fix-depth-fewer-samples-than-coverage.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-27T03:25:44Z.
Review: COMMENTED
Actionable comments posted: 1
7ae14429-aed0-4a0a-ada7-96406f0aaaf0Reviewing files that changed from the base of the PR and between
1be1d03b35and0e248bdff1.core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T03:51:40Z.
Review: COMMENTED
Reviewed — comments
The changed implementation and prepared test report support the intended expansion path, but the description identifies unmeasured hardware assumptions that leave the core anchoring behavior materially uncertain.
What I ran
Reviewed head
0c7a0e1ccec4cd65caefd24aeb96627c9f07ba42using the prepared diff and pinned repository reader (repo_read.py). No commands or tests were run; reported test results are author supplied.Results
Findings
Blocking
None.
Non-blocking
STATIC_ANCHOR_ASSOCIATIONSis 0, the lower-index tie break, andMAX_ANCHOR_SAMPLESvalues above the stored sample count having no effect. The description says none of these assumptions was measured on a PS5, and the tested tie case changes the result precisely where stored stencil samples differ. Please verify this behavior on console hardware before treating the emulation as confirmed. The change itself documents the assumptions indocs/dev/debt/changes/fix-depth-anchored-color-samples.md:5.Not verified
The 195 added lines in
core/libs/prx/libSceAgcDriver/tests/Graphics.cppwere excluded from the review folder and were not read. No tests were run in this review. No PS5 hardware behavior was verified. Other changed files listed as included in the manifest were represented in the prepared diff; targeted source ranges were read forSampleOrder.cpp. Author supplied Windows/MoltenVK test outcomes and GT7 observations were not independently reproduced.To get this to a good state
Nothing is required. The optional point is to verify the stated anchor semantics on PS5 hardware.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-27T03:55:05Z.
Review: COMMENTED
Actionable comments posted: 1
22ca719d-d2a0-4bfb-bb64-c83bef04fe71Reviewing files that changed from the base of the PR and between
0e248bdff1and0c7a0e1cce.core/libs/prx/libSceAgcDriver/Graphics/include/SampleOrder.hppcore/libs/prx/libSceAgcDriver/Graphics/src/Draw.cppcore/libs/prx/libSceAgcDriver/Graphics/src/SampleOrder.cppcore/libs/prx/libSceAgcDriver/tests/Graphics.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-27T04:31:44Z.
Review: COMMENTED
Reviewed — comments
The implementation and targeted source context were reviewed at head
1f2e25db2f0c3ac669c61d433eff82dff644a869; review is incomplete because one changed test file was excluded and the PR’s key hardware semantics are not measured on a PS5.What I ran
No commands or tests were run. I read the prepared description, commits, diff, manifest, and changed source/test files through
repo_read.py.Results
Findings
Blocking
None verified.
Non-blocking
STATIC_ANCHOR_ASSOCIATIONSbehavior, andMAX_ANCHOR_SAMPLESassumptions remain unmeasured on PS5 hardware, as the description and debt entry state. The test coverage checks host-side behavior and Vulkan execution, but cannot confirm those console semantics.Not verified
core/libs/prx/libSceAgcDriver/tests/Graphics.cppwas excluded as too large for the review folder; its changed lines were not read.Files read:
review/description.md,review/commits.md,review/manifest.json,review/diff.patch,review/README.md; all changed files exceptcore/libs/prx/libSceAgcDriver/tests/Graphics.cpp, includingcore/libs/prx/libSceAgcDriver/tests/execution/DepthFewerSamples.cpp.To get this to a good state
Nothing is required. Optional: verify the documented sample association assumptions on PS5 and review the excluded test file.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-29T05:48:23Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing blocks this change; the review is incomplete because the oversized changed test file was not fully read, and the implementation depends on explicitly unmeasured PS5 sample association assumptions.
What I ran
Reviewed head
4e6341018fa1b0df63dace68d02761ef18aafd3dfrom the prepared review materials. No commands or tests were run in this review.Read
review/description.md,review/commits.md,review/manifest.json,review/diff.patch, and the included changed filesDrawRegisterKey.cpp,DepthSurface.hpp,Pipeline.hpp,SampleOrder.hpp,State.hpp,DepthSurface.cpp,Draw.cpp,Pipeline.cpp,PipelineJournal.cpp,SampleOrder.cpp,State.cpp,tests/cmake/agc_driver_depth_fewer_samples_tests.cmake, and both changed debt fragments. Read only portions oftests/execution/DepthFewerSamples.cpp;tests/Graphics.cppwas excluded from the review folder as too large, and its full text was not read.review/files.jsonwas not present in the review folder listing.Results
Findings
Blocking
None verified in the inspected code.
Non-blocking
None.
Not verified
tests/execution/DepthFewerSamples.cppand the excludedtests/Graphics.cpp.MAX_ANCHOR_SAMPLES, and stencil behavior; the description says these were not measured on a PS5.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T22:07:15Z.
Review: COMMENTED
Review incomplete — comments
The implementation review is based on head
4b5ccab82d9722707b356309f0ffb6c5f2ad5118; the addedGraphics.cpptest changes were unavailable for inspection, so a complete review decision is not justified.What I ran
Results
Findings
Blocking
No blocking defect was established in the inspected implementation. The changed
Graphics.cpptest file was not inspected.Non-blocking
Sources
Not verified
core/libs/prx/libSceAgcDriver/tests/Graphics.cppwas excluded from the review folder and could not be inspected with the pinned reader because it cannot write its audit log.To get this to a good state
Nothing is required. Optional: inspect the excluded
Graphics.cpptest changes to complete the review.Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T07:12:29Z.
Review: APPROVED
I read the diff at
4b5ccab82d. Windows 11, GCC 15.2, merged intomainatcde48b5800etogether with other open PRs (so not an isolated build), withANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1andVK_LAYER_KHRONOS_validationon an RTX 5080 (621.24) and a Radeon iGPU (26.11.2).agc_driver_depth_fewer_samples, its stencil variant and the 60 tests ofagc_driver_graphics_tests: pass on both GPUs. The loader log shows the layer inserted and no "was not found" line, and neither run has aVUID-orSYNC-HAZARDline.main's): the first two fail on both GPUs: "a depth target with fewer samples than the rasterizer is unsupported for draws that write a color target".agc_driver_graphics_testsdoes not compile without the new parameter.Not checked: a title.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T21:02:27Z.
Review: COMMENTED
DepthSurfaceAnchorTwinreuses a temporary image for matching draws.SampleOrders::Expandtransitions that image fromUNDEFINEDeach time with an empty source access mask. Could you verify two back-to-back draws that reuse the same twin with synchronization validation enabled, with distinct source depth/stencil values and no interveningWaitIdle? That check would exercise the dependency between prior attachment use and the next transition and population.Source review at
4b5ccab82d. The head trial-merges onto6ef4f2f73b. Focused Linux checks are queued.AI-assisted: yes.
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.