feat(agc): implement measured single-sample dithered alpha coverage #14561
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/14561"
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-01T15:46:12Z.
What
Single-sample
DB_ALPHA_TO_MASK=0xe701and0x18701stop at main's two-/eight-sample guards. Support both measured patterns with one matched raster/depth sample, one pixel iteration,MSAA_ENABLE=0, FP16/FP32 MRT0 exports and the existing export restrictions. Unknown configurations still throw; the two-/eight-sample masks remain unchanged. Carry the typed mode through decoded state, draw identity, shader keys and lowering; canonical pipeline recipes omit the shader-only metadata.The mask rule comes from RX 6650 XT raw-register readbacks: full-rate 2×2 thresholds, 75 alpha patterns, all origin parities and 1,843,200 boundary-sweep pixels without a mismatch. This is gfx1032 evidence; PS5/gfx1013 equivalence remains unverified and is recorded in debt.
Rebased as one feature commit, without merge commits, on main
c8f72e905cce039a05970ed39d2373f770217901. Main already supplies request writer version 63; this change extends the existing dither byte without changing the surrounding layout. Preserve version 62’sspannedAnySubgrouptail and older accepted layouts. Versions 50 and 58–61 stay rejected, 64 remains unsupported, and version 62 and earlier reject the new single-sample codes. The conflict resolution explicitly tags the legacy-62 test buffer before replay; the original renderer delta is preserved.Tested
Current refresh, Linux RX 6650 XT / RADV: main
c8f72e905cce039a05970ed39d2373f770217901, changea98f6fe182294cd5feed38782fc0ab52b2a829ab. Both full SDK/relinker and focused fixture builds pass, andrequest_serializerpasses on both. Actual patched/raw SDK commit labels, complete frozen-bank hashes, loader relocation resolution and exact raw AGC paths are recorded. Source/build configuration is restored after each build.All physical cases select the RX 6650 XT. Both arms use
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=layer. The logs show 4/8 validation-layer insertions, no missing-layer warning and no VUIDs, using layer 1.4.363 (headers require 1.4.335). Conventions against the pinned current main pass. The original version-63 updates now supplied by main are accounted for separately from the preserved renderer delta.Current build, CPU/GPU commands and full logs, source patch, bank/loader proofs and review receipts, SHA-256
47c20503439f77bd89e3bc7c098137473c3ac78146a2d7f5e8a56ae01ccb1e08; downloaded archive and all 57 payloads verified. The bundle preserves an excluded fixture-loader setup failure and a controller log-name collision; neither is GPU/renderer evidence. The passing matrix above comes from the fresh, correctedgpu-r3-*results.The official overlap scan covered 2,219 open PRs. It reported shared serializer/test-registration contexts and 92 comparisons it could not complete because those branches conflict with the base. The shared-path patches for 98 other branches are indexed locally; this is not blanket composition clearance. No new dependency is introduced. Other schema changes still require deliberate version/layout integration when composed.
Historical evidence remains available: previous main-e4caa refresh, state/refusal and unchanged-fixture negative control, SHA-256
59bf8e0e8f5fb97245490c889f75fba54ca860b59787fa17cb48f1bbbb7d92f1. Those older controls and raw-register hardware measurements were not rerun for this rebase.Independent NVIDIA Linux validation by domx4q tested older public head
e9b474e342on main40206fe50d, Arch Linux / RTX 4090 / proprietary 620.70.06 / Khronos layer 1.4.363.1: 7/7 baseline and 11/11 change alpha-coverage cases pass, no skips or VUIDs. This is contributor-reported evidence at those pins, not a new run of the current head.The external Windows/RTX 3080 GTA V report compares main
87b25605c8, which aborts during Story-save loading, with older headdb771547a6on main496d57b47a, which loads the same PPSA04263 01.011.001 save and reaches played/driven free roam. The Unblocks line records that contributor’s result at those pins. This refresh adds no native-title, FPS, Windows, PS5-console or PPSA04264 claim; hosted full CI remains unverified.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-02T07:21:14Z.
Review: COMMENTED
Reviewed — no blocking findings in the code read; the new single-sample dithered cases are skipped on Windows
This PR adds measured single-sample dithered alpha-to-coverage: detection from three registers, a new
SingleSampleDithermode in the request, the masks for the two modes, and a request-serializer version bump from 51 to 52. The four new single-sample dithered CTest cases report Skipped on the Windows runner, so this path has no hosted pass. I read most of the production change. TheShaderInputInfoBuilderchange and the test bodies were not read.What I ran
7713151489a40270f62b9e9030ba3abbc8f245de; basef2d874c1fdccf781c0fa5d86619bb5dd8894b958. 17 files, +302/-40: the draw decode, lookup and register key (Driver/Draw/*),Graphics/src/State.cpp(+25/-),Graphics/include/State.hpp,RecompilerCacheKey,RequestSerializer.cpp(+20/-),Recompiler.hpp(theSingleSampleDitherenum),SpirvModuleEmitter.cpp,ShaderInputInfoBuilder.cpp(+4), the test sources (Graphics.cpp,ShaderMemory.cpp,AlphaToCoverage.cpp+145,RequestSerializerTests.cpp), the CMake fragment (+10), and a debt line.ShaderInputInfoBuilderchange and the test bodies were not read.agc_driver_undithered_alpha_to_coverage_state(Test #1507),agc_driver_alpha_to_coverage_state(Test #1512) andagc_write_watch_coverage(Test #1972) passed. The four new cases,agc_driver_single_sample_dithered_alpha_to_coverage_{e701,rounded}_{f16,f32}(Test #1422 to #1425), are Skipped. The AlphaToCoverage execution source is not in the WindowsANYPS5_AGC_EXECUTION_TESTSlist (F16ToF32Unpack;F64FmaSubnormals;RegistrationPrepareShutdown), so the Windows build uses the skip stub.Results
ShaderInputInfoBuilderchangeRead-only check output
Precheck was not run: no PR-head code is run here. Diff check: passed. Conventions: passed. ABI audit: not applicable. Stack check: passed, no declared dependencies, no errors. Hosted:
gh api repos/boykopovar/AnyPS5/commits/7713151489a40270f62b9e9030ba3abbc8f245de/check-runs, and the Windows job log (2595 of 2595, with the single-sample cases skipped).Negative control
Not run here. A negative control needs a local build and run of the alpha-to-coverage tests, and code from this head is not run here.
Findings
Blocking
None from the code read.
Non-blocking
version == 50uis still rejected. The serializer tests were not read.Sources
github.com/boykopovar/AnyPS5@7713151489/core/libs/prx/libSceAgcDriver/Graphics/src/State.cppgithub.com/boykopovar/AnyPS5@7713151489/core/shader/recompiler/ControlFlow/src/RequestSerializer.cppgithub.com/boykopovar/AnyPS5@7713151489/.github/workflows/windows-msys2.yml(line 86)windowson 7713151489a40270f62b9e9030ba3abbc8f245deNot verified
ShaderInputInfoBuilderchange and the test bodies (AlphaToCoverage.cpp,Graphics.cpp,ShaderMemory.cpp,RequestSerializerTests.cpp).To get this to a good state
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-03T01:49:27Z.
Review: COMMENTED
Reviewed — no blocking findings
I reviewed all 17 changed files at head
1f5fc8b89b3df17f765c5b91b4e7190c78141bd6; I found no substantiated code blocker, but I am withholding approval while exact-head hosted checks are pending.What I ran
GitHub reports PR base
5cb015caaaaf83f8ee431414ee6a457b5b307d49; currentmainis7feb37ee3e30e10139b483fb4df689d5b5b69ab8. The stack helper previewed the exact PR head cleanly against currentmain. Environment: Debian Linux x86_64, Python 3.11.2, Git 2.39.5, GCC 12.2.0. I did not configure or build AnyPS5.The author reports Linux RX 6650 XT/RADV Release tests on this exact head: 16/16 focused tests for each of three runs, with no VUID lines. This is author-reported, not a run I performed. The Windows pair linked from the review request is for head
8a3e1686c132df1835bf6b613b69eca376932e9d, not this head.Results
main.Precheck table and unedited outputs
The precheck report’s table:
The precheck deliberately does not configure, build, or compile AnyPS5.git diff --check 5cb015caaaaf83f8ee431414ee6a457b5b307d49...1f5fc8b89b3df17f765c5b91b4e7190c78141bd6/usr/bin/python3 tools/check_conventions.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 1f5fc8b89b3df17f765c5b91b4e7190c78141bd6 --title feat(agc): implement measured single-sample dithered alpha coverage --body /tmp/anyps5-pr-precheck/14561-latest/pr-body.md/usr/bin/python3 tools/pr_abi_audit.py --base 5cb015caaaaf83f8ee431414ee6a457b5b307d49 --head 1f5fc8b89b3df17f765c5b91b4e7190c78141bd6 --jsonNo changed Python implementation files.No changed tools/ module has an existing sibling tools/tests/test_<module>.py suite.No changed test_*.py files./usr/bin/python3 /marc/AnyPS5/tools/pr_stack_check.py 14561 --repo boykopovar/AnyPS5 --output-dir /tmp/anyps5-pr-precheck/14561-latest/stackNot run: C++ tests need exact-head binaries, which require a build; the precheck does not build./usr/bin/python3 /tmp/anyps5-pr-precheck/14561-latest/head-1f5fc8b89b3d-7bd179ba/tools/pr_test_quality.py --root /tmp/anyps5-pr-precheck/14561-latest/head-1f5fc8b89b3d-7bd179ba --json core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawDecode.cpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawLookup.cpp core/libs/prx/libSceAgcDriver/Execution/src/Driver/Draw/DrawRegisterKey.cpp core/libs/prx/libSceAgcDriver/Graphics/include/State.hpp core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp core/libs/prx/libSceAgcDriver/tests/Graphics.cpp core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_alpha_to_coverage_tests.cmake core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp core/shader/recompiler/CacheKey.hpp core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp core/shader/recompiler/Optimization/include/Optimization/ShaderStageInputInfo.hpp core/shader/recompiler/Recompiler.hpp core/shader/recompiler/SpirvBackend/src/SpirvModuleEmitter.cpp core/shader/recompiler/Translation/src/ShaderInputInfoBuilder.cpp core/shader/recompiler/tests/RequestSerializerTests.cpp docs/dev/debt/libSceAgcDriver.mdNo changed Python test module in tools/ can be run as a no-build base-source control.Unedited command outputs:
Negative control
Negative-control reports in the PR description refer to earlier revisions and are not treated as evidence for
1f5fc8b89b3df17f765c5b91b4e7190c78141bd6.Findings
Blocking
None found in the complete source review of this head.
Non-blocking
The Windows qualification linked in the review request records head
8a3e1686c132df1835bf6b613b69eca376932e9d. The current head changes serialization from version 53 to 54 and updates compatibility fixtures. The author reports a current-head Linux qualification, but I did not independently run it. I do not count the linked Windows run as exact-head evidence.Sources
Not verified
To get this to a good state
No code change is requested from this source review. Let the exact-head hosted checks complete; a repository admin can run the requested full workflow if its additional build/test evidence is needed. I will recheck this head and relevant no-build checks before changing the review outcome, and will repeat them on any new head.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-14T04:21:31Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change based on the source reviewed; the reported Linux qualification is author supplied, and hosted full CI remains unverified.
What I ran
Reviewed head
db771547a68e9a439d32c287c2584ca6c5d4a9afagainst the prepared diff. Read the PR description, commit list, manifest, full diff, and every added-line range in the changed files. Usedrepo_read.pyto inspect source and test context. No build or tests were run in this review.Results
Findings
Blocking
None found in the code reviewed.
Non-blocking
None.
Not verified
core/libs/prx/libSceAgcDriver/tests/Graphics.cppandcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwere excluded from the review folder as too large. I read the relevant changed-line ranges throughrepo_read.py, but not the full files. No hosted CI, Windows, title, PS5 console, or gfx1013 behavior was verified. The author’s stated Linux test results were not rerun.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-16T12:22:04Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected code supports the stated single-sample shader path, and remaining uncertainty is limited to unreviewed test-file changes and unverified platform behavior.
What I ran
Reviewed head
e9b474e3428b9b4d3967ef6b3d2276029a540084using the prepared diff andrepo_read.pyfor targeted source reads. No build or tests were run. The hardware and test results in the PR description are author-reported.Results
Findings
Blocking
None in the code inspected.
Non-blocking
None.
Not verified
Full text was read for 15 of 17 changed files. The changed files
core/libs/prx/libSceAgcDriver/tests/Graphics.cppandcore/libs/prx/libSceAgcDriver/tests/ShaderMemory.cppwere read only at the changed ranges because their full text was excluded from the review folder; other unchanged caller context was not exhaustively read. I did not run the build, tests, hosted CI, physical GPU checks, PS5/gfx1013 checks, or Windows checks. These platform and runtime claims remain unverified by this review.To get this to a good state
Nothing is required. The reported RX 6650 XT checks and the stated PS5/gfx1013 limitation remain as described in the PR.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T18:59:13Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the points below are optional.
What I ran
Reviewed head
a98f6fe182294cd5feed38782fc0ab52b2a829abfrom the prepared diff and pinned reader. No tests or builds were run in this session.Results
Findings
Blocking
None.
Non-blocking
Not verified
core/libs/prx/libSceAgcDriver/tests/Graphics.cpp,core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp,core/libs/prx/libSceAgcDriver/tests/execution/AlphaToCoverage.cpp, andcore/shader/recompiler/tests/RequestSerializerTests.cpp, whose full texts exceeded the review-folder limit. Relevant hunks were read fromreview/diff.patch; targeted ranges were read throughrepo_read.pyfor the oversized alpha-coverage execution test. No changed files were excluded by rule; the two oversized files were listed as too large for the review folder.To get this to a good state
Nothing is required. Optional: verify the measured masks against PS5/gfx1013 hardware when available.