Repository navigation
feat(agc): accept the LINE_STIPPLE_TEX and POS_FIXED_PT pixel inputs - #1819
Conversation
|
Linux run on AMD, since the description lists it as not tested: Ubuntu 24.04.5 (kernel 6.8), GCC 13.3, Release, AMD Radeon RX 7600 (RADV NAVI33, Mesa 25.2.8). This PR's head |
bda16f0 to
1ee43ea
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Checked on current |
1ee43ea to
c160d31
Compare
What
DecodePixelStageInforejected anySPI_PS_INPUT_ENA/ADDRwithLINE_STIPPLE_TEX_ENA(bit 7) orPOS_FIXED_PT_ENA(bit 15):unsupported SPI_PS_INPUT_ENA/ADDR bit combination. RADV on the PS5 (mihawk-99/PS5_Mesa) sets both. In Mesa'sradv_compute_spi_ps_input(src/amd/vulkan/radv_shader.c):LINE_STIPPLE_TEXis the required pixel input of a shader that reads no interpolants: "At least one of PERSP_* (0xF) or LINEAR_* (0x70) or LINE_STIPPLE_TEX must be enabled. LINE_STIPPLE_TEX uses the least number of initialized VGPRs". ccleste's (PPSA59322) present shader is one; with feat(agc): accept graphics programs without an AGC shader header #1732 on currentmain, every frame stopped there (presentation failed).POS_FIXED_PTis enabled when a shader reads integer pixel coordinates (reads_pixel_coord): X in bits 15:0, Y in bits 31:16.Changes:
DecodePixelStageInfo.PERSP_PULL_MODELandSAMPLE_COVERAGEare still rejected.ShaderInputInfoBuilderplaces both VGPRs wheneverSPI_PS_INPUT_ADDRhas the bit.inputAddris already part of every cache, draw and request key, so no key or serializer changes are needed.POS_FIXED_PTisuint(FragCoord.x) | uint(FragCoord.y) << 16.LINE_STIPPLE_TEXis 0, because line stipple is not emulated. The TechnicalDebt entry under Functional records this.agc_driver_graphics(PixelInputLayoutTests):LINE_STIPPLE_TEXin v0.LINE_STIPPLE_TEXtakes v2 andPOS_FIXED_PTv3, after the perspective-center pair.POS_FIXED_PTVGPR readsFragCoord, and one exportingLINE_STIPPLE_TEXdoes not.agc_driver_pixel_fixed_point_position:POS_FIXED_PTVGPR into X and Y and converts them to float. It exports them with theLINE_STIPPLE_TEXVGPR into a linear 64x1632_32_32_32float target.(x, y, 0, 1)for three ADDR layouts: the input alone, afterLINE_STIPPLE_TEX, and after the perspective-center pair andLINE_STIPPLE_TEX.pixel (1, 0) holds (0, 0, 0, 1)) without thePOS_FIXED_PTemission.Tested
Windows 11 Pro (26200), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release, NVIDIA GeForce RTX 5070 Ti; the new GPU test also on lavapipe (Mesa 25.2.8, Windows).
CTestTestfile.cmakecommands because antivirus blocksctest.exeon this machine.mainwith this, feat(agc): accept graphics programs without an AGC shader header #1732 and my other pending changes on a local branch (RADV_DEBUG=nonggcset).Not tested on AMD, Intel or Linux hardware.
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