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

Closed
opened 2026-10-08 23:59:57 +00:00 by Dextroid17 · 2 comments
Dextroid17 commented 2026-10-08 23:59:57 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-08T23:59:57Z.


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

  • PPSA26344 (Ghost of Yōtei 01.008): decrypted eboot.bin relinked, staged runtime layout, RTX 3080 Ti, Linux
  • stack: main + #757 + #1836; 841 shaders compiled in the run, this was 1 of 105 deferrals
  • no issue or PR matches the message (searched not structurally post dominated, post dominated by the back-edge, continue construct)

Written with AI assistance.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5770631694 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1921). Originally posted by [Dextroid17](https://github.com/Dextroid17) on 2026-10-08T23:59:57Z. --- ### 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 - PPSA26344 (Ghost of Yōtei 01.008): decrypted `eboot.bin` relinked, staged runtime layout, RTX 3080 Ti, Linux - stack: `main` + #757 + #1836; 841 shaders compiled in the run, this was 1 of 105 deferrals - no issue or PR matches the message (searched `not structurally post dominated`, `post dominated by the back-edge`, `continue construct`) Written with AI assistance.
snoozedDev commented 2026-10-09 17:20:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by snoozedDev on 2026-10-09T17:20:16Z.


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 f1451396:

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.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6085783030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1921#issuecomment-6085783030). Originally posted by [snoozedDev](https://github.com/snoozedDev) on 2026-10-09T17:20:16Z. --- 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` f1451396: ``` 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.
SleglJan commented 2026-10-09 21:13:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by SleglJan on 2026-10-09T21:13:26Z.


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 8b393b6e plus three commits on my fork that take it past its loader and sceSharePlayInitialize stops (SleglJan/AnyPS5#15, SleglJan/AnyPS5#16, SleglJan/AnyPS5#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 33603bf8 passes DescriptorBindingBuilder::Populate multisampled image resources have no descriptor image shape
#2124 8d3f0343 passes same
#2311 fc56e7b3 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 f1451396) 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).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6089358070 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/1921#issuecomment-6089358070). Originally posted by [SleglJan](https://github.com/SleglJan) on 2026-10-09T21:13:26Z. --- 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` 8b393b6e plus three commits on my fork that take it past its loader and `sceSharePlayInitialize` stops (SleglJan/AnyPS5#15, SleglJan/AnyPS5#16, SleglJan/AnyPS5#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 | 33603bf8 | passes | `DescriptorBindingBuilder::Populate multisampled image resources have no descriptor image shape` | | #2124 | 8d3f0343 | passes | same | | #2311 | fc56e7b3 | 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 f1451396) 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).
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#1921
No description provided.