fix(agc): accept RB and primitive-group tuning fields #1419
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1419"
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 TheAggie on 2026-10-08T03:39:30Z.
What
Three register fields that Mesa sets on every GFX10 draw were rejected, so the draw was skipped. None of them changes what is rendered. They only tune how the hardware spreads work across render backends and waves, and the Vulkan path has nothing equivalent to them. Field names and bit positions are from Mesa's
src/amd/registers/gfx10.json.PA_SC_MODE_CNTL_0(0x28a48) bit 5ALTERNATE_RBS_PER_TILEsi_state.csetsS_028A48_ALTERNATE_RBS_PER_TILE(gfx_level >= GFX9)next toVPORT_SCISSOR_ENABLE(1); RADVradv_cmd_buffer.cdoes the sameCB_COLOR_CONTROL(0x28808) bit 0DISABLE_DUAL_QUADVGT_SHADER_STAGES_EN(0x28b54) bits 18:15MAX_PRIMGRP_IN_WAVEsi_state_shaders.cpp/si_state_draw.cppand RADVradv_cmd_buffer.cset it to 2 on GFX9+ScanModeMaskaccepts bit 5 next toVPORT_SCISSOR_ENABLE.colorControlSupportedignores bit 0.agc_driver_graphics(TuningFieldTests): each field decodes and passesDrawRejectionwith the same state as without it. The neighbouringLINE_STIPPLE_ENABLEbit and a nonzeroCB_COLOR_CONTROLbit 1 are still rejected.ShaderStageTestsno longer lists bit 15 as unsupported. The new test fails onmain(scan conversion mode is unsupported (register 0x292 = 0x00000022)).colorControlSupportedis also changed by #1414, one line apart. Whichever PR merges second needs a trivial rebase. #1189 extendsScanModeMaskforMSAA_ENABLEand works with this change as is.Tested
Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, NVIDIA GeForce RTX 5070 Ti.
agc_*andshader_*tests pass. They were run from the generatedCTestTestfile.cmakecommands, because antivirus blocksctest.exeon this machine.PA_SC_MODE_CNTL_00x22/0x23 ("preserve the canonical viewport-scissor and alternate-RB baseline") andCB_COLOR_CONTROL0x00cc0011 by default, so every draw from Homebrew UI Lab (PPSA99050) and the PS5 OpenGL Showcase (PPSA99005) hit these checks. The Showcase's vertex-path draws also useVGT_SHADER_STAGES_EN0x02012010 (MAX_PRIMGRP_IN_WAVE= 2), from its shader package metadata. With this change, #1412, #1414, #1415 and other pending fixes on a local branch, both render. This change alone does not make them render.Not tested on AMD, Intel or Linux.
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T04:36:02Z.
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.
main)core/libs/prx/libSceAgcDriver/tests/Graphics.cppL611Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T13:12:30Z.
Checked on Linux (RADV): build and ctest green on current main (
agc_driver_graphicsincluded). Reverting theState.cppchange makesTuningFieldTestsfail, so the test pins the fix. Masks match the Mesa fields cited (0x0247a010= old mask + bits 18:15,ScanModeMask~0x22, bit 0 ignored incolorControlSupported), and neighbouring bits stay rejected. Merges cleanly with main; whoever lands second between this and #1414 needs the trivial rebase you mention. Merging.Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-08T13:18:06Z.
Tested on AMD under Linux, since this PR wasn't: RX 9070 XT (RDNA4, GFX1201), RADV / Mesa 26.2.4, Linux 7.2.9 (CachyOS), GCC Release build.
ctest: this PR merged ontomain07c2405c, all 452 tests pass withctest -j8(main alone: 452/452 on the same machine).AI-assisted: the runs and this write-up were done by Claude (Claude Code) on my machine.