fix(agc): blend RGBA4 targets during PPSA38500 loading on Windows #28197
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/28197"
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 lgqdaxia on 2026-11-29T04:14:19Z.
What
PPSA38500’s first scene on Windows requests blending on a packed RGBA4 target that #27966 can decode but cannot blend. The ordered pixel-interlock path now blends RGB and alpha independently and preserves unwritten channels. For MIN/MAX it multiplies the source and destination by their selected factors before comparing them. AMD PAL · zeezey’s review
This covers single-sample, DCC-disabled targets with BLEND_CLAMP and supported factors. Constant and dual-source factors on written channels are rejected. FP32 packs to nearest even. #23258 handles truncation. Console blend precision is unmeasured.
Tested
On Windows 11 with an RTX 3080 Laptop (621.14),
agc_driver_graphicsandagc_driver_packed_unorm4444_partial_writefailed oncf8530434eaaand passed on1ad6f125a114. With scaled RGB MAX and alpha MIN, the same starting pixel (0xc369) read back as0x6fc9before the fix and the expected0x2669after it. Both runs had zero skips, Vulkan validation errors and synchronization errors.Earlier PPSA38500, NVIDIA and AMD checks
Windows 11, NVIDIA GeForce RTX 3080 Laptop GPU, driver 621.14.
e2e97886eeand passes with the follow-up at4d135930e3.4d135930e3, including pixel readback for a full alternate-order blend and a partial reversed-order blend. No skips or Vulkan validation or synchronization errors.At
cf8530434eaa, all nine packed-RGBA4 and graphics tests passed on an RX 6650 XT (Arch Linux, RADV Mesa 26.3.1), with zero skips or Vulkan validation errors. On an RX 6700 XT (Windows 11, AMD 32.0.21045.29003), all 62 selected tests passed in each of three runs with zero skips. Linux results · Windows resultsChecklist
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-29T04:34:50Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the inspected code implements single-sample RGBA4 blending through the ordered pixel-interlock merge and adds state and execution coverage. The draft covers head
cf8530434eaab290f2c1aab93ba640f2ed49f0c3; no checks were run independently, and console blend precision remains unmeasured.What I ran
Read the prepared description, commits, manifest, diff, and all ten changed files at the pinned head through
repo_read.py. The full text ofcore/libs/prx/libSceAgcDriver/tests/Graphics.cppwas read through the reader because it was too large for the review folder. No build or tests were run independently.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
The PR reports Windows 11 execution on an NVIDIA GeForce RTX 3080 Laptop GPU with driver 621.14, including five Vulkan cases and an offline build. Those results were not independently verified. Console blend precision is unmeasured. No changed files were excluded from review;
Graphics.cppwas read throughrepo_read.py.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-30T10:22:02Z.
Review: APPROVED
Reviewed — looks good
The inspected implementation adds single-sample packed RGBA4 blending with separate color and alpha equations, and I found no concrete defect in the source reviewed.
What I ran
Reviewed head
1ad6f125a114a92c2a85e44317337054a464f34e. No merged-preview check or executable checks were run; the review interface provides repository reads only.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
Executable tests and runtime behavior were not independently verified.
core/libs/prx/libSceAgcDriver/tests/Graphics.cppwas excluded from the prepared bundle because of its size; I read the relevant added section through the pinned reader. All other changed files listed in the manifest were read, including the excluded large file's relevant section. No other files were excluded.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-03T06:05:09Z.
Review: APPROVED
I read the diff at
1ad6f125a1. Windows 11, GCC 15.2, merged intomainatcf556db18c3together 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_packed_unorm4444_color_target,agc_driver_packed_unorm4444_partial_writeand 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: "unsupported color format 19 number type 0 component swap 1".The tree also had #28311 and #28350, which build on this.
Not checked: PPSA38500 itself.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T20:21:01Z.
Review: COMMENTED
The new pixel test assigns the encoded equations directly to
color.mergeBlend, and the decoder checks use a separate fixture. Could one pixel case take the decoded PM4 color state through the existing draw path without overridingmergeBlend? The reversed-order partial blend with a separate alpha equation would exercise both register selection and the shader merge in one run.Source review at
1ad6f125a1. Paired Vulkan execution is pending.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T21:08:45Z.
Review: COMMENTED
The revised fixture now feeds the reversed RGBA4 PM4 registers through
DecodeStateand passes the decoded packed blend into the draw. Its readback checks the independently subtracted alpha and the untouched components. That closes my previous coverage request.Source review at
cd3c503075. The revision trial-merges onto6ef4f2f73b. Paired Linux Vulkan checks are queued.AI-assisted: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-12-03T23:33:48Z.
Review: APPROVED
Reviewed — looks good
The packed RGBA4 blend path and its component mapping handling are consistent with the code inspected; I found no verified blocking defects.
What I ran
Reviewed head
cd3c503075d82166ec9e9c202fb1ff1148af8addusingrepo_read.pyand the prepared diff. I did not run tests or builds.Results
Negative control
Not run; no tests were executed.
Findings
Blocking
None.
Non-blocking
None.
Sources
Not verified
No tests or builds were run, and behavior on physical consoles was not confirmed. The prepared diff and targeted source context covered all 11 changed paths listed as reviewed in
files.json; that file lists no excluded paths. The largeGraphics.cppsource was read at lines 12610–12710 and 12980–13010; its remaining contents were not read. Author-reported GPU results in the description concern earlier revisions and were not independently verified.To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-12-04T15:33:46Z.
Review: APPROVED
Re-checked
cd3c503075, the commit added since my approval at1ad6f125a1. It is test-only and draws a decoded reversed RGBA4 blend; it was applied to main484b0368d3. Windows 11, GCC 15.2,ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,VK_LOADER_DEBUG=layer(layer 1.4.363), run once with the RTX 5080 (621.24) and once with the AMD iGPU (26.11.2) loader selected. NoVUID-errors in any log, and nowas not found but was requested.agc_driver_graphicsandagc_driver_packed_unorm4444_{color_target,partial_write,multisample_partial_write}: 4 of 4 pass with each loader.AI-assisted: yes (Claude Code)
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.