Skip to content

fix(agc): leave blending off for a color target with CB_COLOR_INFO.BLEND_BYPASS - #4862

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
Tamalero:fix/agc-blend-bypass-leaves-blending-off
Oct 14, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
Tamalero:fix/agc-blend-bypass-leaves-blending-off

Conversation

@Tamalero

Copy link
Copy Markdown
Contributor

What

DecodeState throws blend bypass conflicts with enabled blending when CB_BLENDn_CONTROL enables blending for a target whose CB_COLORn_INFO has BLEND_BYPASS set. That is bit 16 in Mesa's src/amd/registers/gfx10.json.

The bit makes the color block skip the blender for that target. Mesa sets it "according to docs" for UINT/SINT and 8_24/24_8/X24_8_32_FLOAT targets, which the blender cannot process (src/amd/common/ac_descriptors.c, shared by radeonsi and RADV). So a set bit with blending enabled is a valid state, not a conflict: the target is written unblended.

Blending is now enabled only when it is requested and not bypassed.

Tested

Linux (CachyOS), GCC 16, RTX 4090, Release, on main 1c5e628:

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: PPSA01748 (no bring-up discussion yet)
  • AI-assisted: yes

Tested and written by Claude (AI assistant) on a contributor's machine.

🤖 Generated with Claude Code

…END_BYPASS

DecodeState threw "blend bypass conflicts with enabled blending" when
CB_BLENDn_CONTROL enabled blending for a target whose CB_COLORn_INFO has
BLEND_BYPASS (bit 16, Mesa src/amd/registers/gfx10.json) set. The bit makes
the color block skip the blender for that target: Mesa sets it "according
to docs" for UINT/SINT and 8_24/24_8/X24_8_32_FLOAT targets, which the
blender cannot process (src/amd/common/ac_descriptors.c, shared by radeonsi
and RADV). Marvel's Guardians of the Galaxy (PPSA01748) issues such draws
right after its loading screen. Blending is now enabled only when it is
requested and not bypassed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kr4y4

kr4y4 commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

A Windows and Intel run, since the description covers Linux on an RTX 4090.

Setup: Windows 11 (26200), WinLibs GCC 15.2.0 r7, Release, CI configure flags, an RTX 4070 Laptop GPU and an Intel Raptor Lake-S iGPU. The head baaad78 merged into main 495bf91, which passes 1023 of 1023 on both GPUs.

  • agc_driver_graphics passes on both GPUs with --repeat until-fail:3. The full suite (ctest --timeout 120 --parallel 4) passes 1023 of 1023 on both.
  • With State.cpp as on main, agc_driver_graphics fails on both GPUs with blend bypass conflicts with enabled blending, as in the description.

Written with AI assistance.

@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#5200 core/libs/prx/libSceAgcDriver/Graphics/src/State.cpp L896-897, L900-917

@oneandonlydean
oneandonlydean merged commit a87019d into boykopovar:main Oct 14, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agc libSceAgc*

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants