Recompiler: packed pixel ancillary rejected when the shader reuses its VGPR ("unsupported live use") #1933

Closed
opened 2026-10-09 00:46:53 +00:00 by fisherjoey · 1 comment
fisherjoey commented 2026-10-09 00:46:53 +00:00 (Migrated from github.com)
Contributor

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:

ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use

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 main 1be6f9f1 + #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 into SelectU32(cond, new, old), where old is still the raw ancillary word. In all 26 shaders cond starts with IEqual32(HelperInvocation, 0), and some add data tests. In lanes where cond is false, the raw word goes on through Phi, BitCastF32U32 and FPMad32 into an output. lowerPackedAncillary only 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 on main and passes with the fix. PR: #____

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5771012737 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1933). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-09T00:46:53Z. --- Stray (PPSA02100 v1.05, Unreal Engine 4) has 26 pixel shaders that fail with: ``` ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use ``` 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 `main` 1be6f9f1 + #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 into `SelectU32(cond, new, old)`, where `old` is still the raw ancillary word. In all 26 shaders `cond` starts with `IEqual32(HelperInvocation, 0)`, and some add data tests. In lanes where `cond` is false, the raw word goes on through `Phi`, `BitCastF32U32` and `FPMad32` into an output. `lowerPackedAncillary` only 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 on `main` and passes with the fix. PR: #____ AI-assisted: yes
oneandonlydean commented 2026-10-10 06:25:17 +00:00 (Migrated from github.com)
Author
Contributor

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6094631508 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1933#issuecomment-6094631508). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-10T06:25:17Z. --- Closing as a duplicate of #2548, which covers the same 26 shaders with the current analysis.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#1933
No description provided.