Skip to content

Recompiler: SPIR-V validation fails on a continue construct its back-edge block does not post-dominate #1921

Closed

Description

@Dextroid17

What

A shader a title registers cannot be prepared: SPIR-V validation before optimization rejects the loop construct the structurizer emitted.

[Shaders/ShaderRegistry.cpp:332 operator()] Shader 0x55a82bc4b700 could not be prepared at registration
  (ShaderRecompiler::Recompile: SPIR-V validation before optimization failed:
   level=2 word=5010: The continue construct with the continue target '44[%44]' is not
   structurally post dominated by the back-edge block '2492[%2492]')

The back-edge block does not post-dominate the continue target — i.e. the structurizer produced a continue construct whose shape SPIR-V validation rejects.

Impact

In the run below this was deferred (by #1836), so it costs the title one unprepared shader rather than a crash — but it is a real capability gap, not just a log line: the shader stays unprepared and will be re-attempted when the title first needs it.

Where it was measured

Written with AI assistance.

Activity

  1. snoozedDev commented on Oct 9, 2026

    @snoozedDev
    Contributor

    Another instance, and one #1964 does not cover: Astro Bot (PPSA21564 v01.007.000, Linux) stops on the same message on a graphics-stage program prepared at ABI resolution (so #1836 does not defer it), with #1964 applied on top of main f145139:

    level=2 word=11079: The continue construct with the continue target '95[%95]' is not structurally post dominated by the back-edge block '8296[%8296]'
    

    Same program, same words with and without #1964, so this one has a cause other than the image-mode switch. Seen on a RADV wave64 device; it is device-independent. Full context and the other stops are in #2340. The serialized RecompileRequest is available on request. AI-assisted: yes; reviewed by me.

  2. SleglJan commented on Oct 9, 2026

    @SleglJan
    Contributor

    Another title with this instance: 007 First Light (PPSA11386 v01.018.000), after Ghost of Yōtei in the issue, GTA V on #1964 and Astro Bot in #2340. Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, RTX 3080, NVIDIA 615.71.09), Release build with ANYPS5_ENABLE_SPIRV_TOOLS=ON of main 8b393b6 plus three commits on my fork that take it past its loader and sceSharePlayInitialize stops (SleglJan#15, SleglJan#16, SleglJan#17). It stops at start-up with the same message, word and IDs as in the issue:

    level=2 word=5010: The continue construct with the continue target '44[%44]' is not structurally post dominated by the back-edge block '2492[%2492]'
    

    The program is a wave64 compute shader, 8×8×1 threads, 38 instructions: a loop writes a user-data value (s[8:11]) to a 2D MSAA array image (image_store, dim 2D_MSAA_ARRAY) with the loop counter as the sample index.

    Each PR head merged onto that build, with the captured request replayed through agc_shader_replay:

    PR Head SPIR-V validation Next error on this request
    #1964 33603bf passes DescriptorBindingBuilder::Populate multisampled image resources have no descriptor image shape
    #2124 8d3f034 passes same
    #2311 fc56e7b passes same

    #2311 does not reference this issue but clears it on this request. #2124 conflicts with main only in the test registration in core/libs/prx/libSceAgcDriver/CMakeLists.txt; I kept both blocks. #1964 at its own head (on f145139) gives the same result. The next error comes from descriptor population for a draw or dispatch; registration (PrepareShader) stops after validation.

    In the title with #1964, alone or with #1836, start-up gets further: 84 disk-cache misses (82 written; 61 without #1964), then VideoOut: unsupported display pixel format 0xc001000622000000 (RGBA16 float, 3840×2160, tiled). The multisampled-image error does not come up before that stop.

    AI-assisted: yes (Claude Code).

  3. added a commit that references this issue on Oct 10, 2026
    33603bf
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