Repository navigation
fix(agc): accept RB and primitive-group tuning fields - #1419
Conversation
Accept PA_SC_MODE_CNTL_0.ALTERNATE_RBS_PER_TILE, CB_COLOR_CONTROL.DISABLE_DUAL_QUAD and VGT_SHADER_STAGES_EN.MAX_PRIMGRP_IN_WAVE on the vertex path. They tune how the hardware distributes work between render backends and waves and do not change the rendered result. Mesa sets all three on GFX10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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.
|
|
Checked on Linux (RADV): build and ctest green on current main ( |
|
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.
AI-assisted: the runs and this write-up were done by Claude (Claude Code) on my machine. |
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, fix(recompiler): give vertex-path shaders a full NGG merged wave info #1412, fix(agc): render CB_COLOR_CONTROL mode disable as a draw without color #1414, fix(agc): accept the sampler ANISO_OVERRIDE bit #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