Recompiler: packed pixel ancillary rejected when the shader reuses its VGPR ("unsupported live use") #1933
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 fisherjoey on 2026-10-09T00:46:53Z.
Stray (PPSA02100 v1.05, Unreal Engine 4) has 26 pixel shaders that fail with:
At registration they are deferred (#1836). A later one fails at draw and ends the run.
Setup: Linux (Nobara 44, kernel 7.2), RTX 5070 Ti, NVIDIA 595.91.07. Base is
main1be6f9f1+ #861 + #1836 + #1837 + #1893 + #1902 + #1904 + #1928.In the machine code, the only read of the ancillary register is the first instruction,
v_bfe_u32 vN, v4, 16, 11(render target index). After that, v4 holds ordinary data. The IR turns each later write to v4 intoSelectU32(cond, new, old), whereoldis still the raw ancillary word. In all 26 shaderscondstarts withIEqual32(HelperInvocation, 0), and some add data tests. In lanes wherecondis false, the raw word goes on throughPhi,BitCastF32U32andFPMad32into an output.lowerPackedAncillaryonly accepts bitfield extracts of the word, so shader info collection rejects the shader.This is a different shape from #1903, where the extract itself wasn't lowered.
Fix: when the raw word is a data operand of a select or phi, rebuild it from the two fields Vulkan provides,
SampleId << 8 | Layer << 16. Its other bits read as 0, which the PR records in TechnicalDebt. In Stray those bits only reach lanes that hold leftover values anyway. Any other use of the raw word still throws. The PR has a test that fails onmainand passes with the fix. PR: #____AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-10T06:25:17Z.
Closing as a duplicate of #2548, which covers the same 26 shaders with the current analysis.