feat(agc): accept the LINE_STIPPLE_TEX and POS_FIXED_PT pixel inputs #1819
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1819"
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-08T20:21:47Z.
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 #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, #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
Imported from boykopovar/AnyPS5. Originally posted by johnmaia on 2026-10-09T01:01:40Z.
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
bda16f01, merged ontomainf1451396. Full ctest: 495/495 pass, with the GPU tests running on the RX 7600 (none skipped). That includes the newagc_driver_pixel_fixed_point_positionandagc_driver_graphicswith this PR's cases.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T08:27:36Z.
Checked on current
main: the PR rebased cleanly except for the TechnicalDebt line, which I moved off the end of the section to avoid the append conflict. Build and ctest of libSceAgc/libSceAgcDriver are green;agc_driver_graphicsandagc_driver_pixel_fixed_point_positionfail without the change. Also confirmed by @johnmaia on an RX 7600 (RADV). Merging once CI is green.