Repository navigation
fix(agc): run draws whose pixel stage cannot run without its program - #1139
Merged
adriadam10 merged 1 commit intoOct 8, 2026
Merged
Conversation
A depth-only pass can leave a stale pixel program address in SPI_SHADER_PGM_LO/HI_PS while never setting the pixel registers it does not need. The draw then failed with "missing register at DWORD 0x1b3" (SPI_PS_INPUT_ENA), although the hardware never launches that program: with no color written (CB_TARGET_MASK & CB_SHADER_MASK == 0), no depth, stencil or mask export (SPI_SHADER_Z_FORMAT 0 and those enables of DB_SHADER_CONTROL clear), and neither KILL_ENABLE, EXEC_ON_HIER_FAIL, EXEC_ON_NOOP nor EXEC_IF_OVERLAPPED set, the pixel shader has no effect and is not executed. PixelProgramUnset becomes PixelProgramSkipped: true for a zero program address as before, and for such an inert pixel stage. Both use the driver's null pixel program; the precheck and the decode agree. PPSA14632 (LEGO Horizon Adventures) issues an HTILE expand this way (DB_RENDER_CONTROL DEPTH/STENCIL_COMPRESS_DISABLE, CB disabled, depth test and writes off) once per run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 7, 2026
9 tasks
|
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.
|
This was referenced Oct 7, 2026
Collaborator
|
Checked build + ctest (424/424, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A draw whose pixel stage the hardware would not run no longer fails with
missing register at DWORD 0x1b3. Before, a draw went without a pixel program only when SPI_SHADER_PGM_LO/HI_PS were zero. A depth-only pass can instead leave a stale pixel program address from earlier state and never set the pixel registers it doesn't need (SPI_PS_INPUT_ENA/ADDR, SPI_SHADER_COL_FORMAT).The pixel shader has no effect and is not launched when all of these hold:
CB_TARGET_MASK & CB_SHADER_MASK == 0);Changes:
PixelProgramUnsetbecomesPixelProgramSkipped. It is true for a zero program address, as before, and also for such an inert pixel stage. A register the rule needs that is absent means "not skipped", which keeps today's behavior.DrawRejectionand the draw decode both use it, so a skipped stage takes the driver's null pixel program, as a zero address already did, and the precheck and the decode agree.Tested
Linux 7.2.9 (Arch), Mesa 26.2.4 RADV, RX 9070 XT.
agc_driver_graphics: a stale address with nothing written and nothing exported is skipped and passes the precheck. EXEC_ON_NOOP, KILL_ENABLE, a Z export, a Z format or a color write each keep the program, and the first two still need SPI_PS_INPUT_ENA. The existing zero-address and missing-register cases are unchanged.ctest: 396 of 396 pass.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