Skip to content

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

Closed as not planned

Description

@fisherjoey

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 1be6f9f + #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

Activity

  1. oneandonlydean commented on Oct 10, 2026

    @oneandonlydean
    Collaborator

    Closing as a duplicate of #2548, which covers the same 26 shaders with the current analysis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions