feat(agc): support MC coordinate precision with min and max sampling #20944
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/20944"
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 JJenkx on 2026-11-15T18:38:43Z.
What
Builds on #20891 to allow MIN/MAX reduction with its measured unnormalized MC coordinate transform. Reduction includes only nonzero-weight taps; an exact texel center reduces one tap, rather than adjacent zero-weight taps. Linear mip filtering and shader-emulated converted filtering still throw.
The native model uses 252 configurations with two fixed repeats (504 RX 6650 XT gfx1032 dispatches, 16,128 RGBA vectors) over initialized 2D procedural RGBA8, both TRUNC values, point/linear MIN/MAX, and color-transition/texel-center probes. This is local RDNA2 evidence, not PS5 equivalence; 1D and other formats lack native reduction measurements and remain documented gaps. No new transform, descriptor allocation or specialization range is added.
Native kernels, predictions, repeats and hashes. Depends on the refreshed MC foundation; it retains current main's non-MC mirror-border behavior.
Tested
Refreshed without merge commits onto measured main
0694c4cbd6f2. Upstream advanced to1ac29cd4105bduring qualification; fresh local merge-tree checks are clean against that tip. The newer main was not rebuilt in this run; the measured pins below are unchanged. Main's non-MC mirror-once-border (clamp 7) support and minimum-0.5 mirrored coordinate fold are retained; MC clamp 7 remains explicitly unsupported in the descriptor proof. The refreshed production transform selects the existing non-MC fold independently from the measured MC fold.Linux, RX 6650 XT / RADV Mesa 26.2.7, kernel 7.2.14-arch1-1, GCC 16.2.1. Validation layer 1.4.363 (headers 1.4.335),
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation VK_LOADER_DEBUG=layer, CTest verbose, frozen independent binaries/libraries. No skips or VUIDs in any current arm; logs confirm layer insertion. Main's own five focused checks pass.Current source pins, exact patches, configure/build/full test logs, JUnit and binary hashes. Archive SHA-256
a210aa8dfade7211557d739429fb475803f0a17dd92292769345000011f689a9, downloaded archive and all 54 payload hashes verified. These are focused-target builds and regression runs, not a new full-SDK or native-game qualification. No new Windows/macOS, title-unblock or performance claim. The physical Windows worker remains user-paused. Changed-file convention checks report zero errors, with one debt-length warning. The global debt-fold command encounters an unchanged main NKWebKit fragment selector error, recorded separately in the bundle.Exact refreshed head
78ba7fe992b791d8e9c9c695b637b6148a67740c:edce8b2bc1The negative-control dynamic library path and raw AGC hash are checked; all failures match the expected unsupported cases. Candidate CPU shader fixtures remain candidate-compiled in that identical-executable comparison; the separate five-check main arm uses main's own build. The GPU matrix contains 40 weighted MC and 80 MIN/MAX configurations with 256 coordinate pairs each, scalar 1D and 2D, both filters and TRUNC values. Existing non-MC unnormalized sampling, including mirror-border, remains covered.
Both full CPU shader-memory tests pass with SPIRV-Tools ON (included above) and OFF (2/2). The identity-copy fix is retained; no assertion is relaxed to accept different arithmetic or a bypassed offset.
Historical broader matched full-SDK qualification remains available in 127-case original validation; those archived pins are historical, not the new heads above.
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 MarcZX10 on 2026-11-20T12:59:19Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
bc4a0f219ea7146c580be4639729e8a34c638bb4from the prepared diff and targeted source reads usingrepo_read.py. No build or tests were run during this review.Results
Findings
Blocking
None.
Non-blocking
Not verified
core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas read only around the changed hunks; its full text was excluded because it was too large for the review folder.core/libs/prx/libSceAgcDriver/Graphics/src/GuestSamplerResource.cpp,core/libs/prx/libSceAgcDriver/tests/GuestSamplerResource.cpp, targeted ranges ofcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp,core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_mc_coord_trunc_tests.cmake,core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_mc_reduction_tests.cmake,core/libs/prx/libSceAgcDriver/tests/execution/ImageSampleUnnormalized.cpp,core/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cpp,core/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cpp, anddocs/dev/debt/changes/agc-unnormalized-mc-coord-trunc.md. The full text ofcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwas excluded by size.To get this to a good state
Nothing is required. The optional coverage gaps are documented in the change notes.
Imported from boykopovar/AnyPS5. Originally posted by coderabbitai[bot] on 2026-11-28T12:24:21Z.
Review: COMMENTED
76ab3a53-6438-484b-a25a-11969e5be0c1Reviewing files that changed from the base of the PR and between
f51f7fec91and53b5a7abfc.core/libs/prx/libSceAgcDriver/Graphics/src/GuestSamplerResource.cppcore/libs/prx/libSceAgcDriver/tests/GuestSamplerResource.cppcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppcore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_mc_coord_trunc_tests.cmakecore/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_image_sample_mc_reduction_tests.cmakecore/libs/prx/libSceAgcDriver/tests/execution/ImageSampleUnnormalized.cppcore/shader/recompiler/Optimization/src/DescriptorBindingBuilder.cppcore/shader/recompiler/SpirvBackend/src/SpirvImageEmitter.cppdocs/dev/debt/changes/agc-unnormalized-mc-coord-trunc.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 ligmaSec on 2026-12-03T22:18:17Z.
Review: COMMENTED
The trial merge onto
a1b75b0947was clean. I also attempted a composition with exact #20891. It conflicts inImageSampleUnnormalized.cppand theMC_COORD_TRUNCdebt fragment, despite both PRs merging individually. Please reconcile which PR owns the shared coordinate transform and preserve this PR’s MIN/MAX checks at texel centers where zero-weight taps should have no effect. Paired shader-memory and sampling controls are pending.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.