Recompiler: packed pixel ancillary word read whole after its VGPR is reused ("unsupported live use (used by BitFieldUExtract 16 11, SelectU32 ...)") #2548

Closed
opened 2026-10-10 04:29:11 +00:00 by fisherjoey · 63 comments
fisherjoey commented 2026-10-10 04:29:11 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fisherjoey on 2026-10-10T04:29:11Z.


Stray (PPSA02100 v1.05, Unreal Engine 4) has 26 pixel shaders that main refuses at shader info collection. At registration they are deferred (#1836).

Setup: Linux (Nobara 44, kernel 7.2), RTX 5070 Ti, NVIDIA 595.91.07. Run on main 1be6f9f1 plus the other fixes Stray needs to reach its first draws, with #1179 (b4e02e2d) as the only ancillary handling. That is the code #1179 merged.

Shaders (guest addresses from the registration log):
0x200e370000 0x200e400000 0x200e410000 0x200e460000 0x200e470000 0x200e4b0000 0x200e510000 0x200e580000 0x200e5f0000 0x200e610000 0x200e640000 0x200e650000 0x200e700000 0x200e760000 0x200e770000 0x200e7a0000 0x200e7b0000 0x200e7c0000 0x200e800000 0x200e830000 0x200e840000 0x200e8c0000 0x200e8d0000 0x200e8f0000 0x200e950000 0x200e970000

Error (21 shaders end in SelectU32 ? ?, 5 in SelectU32 0 ?):

ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by BitFieldUExtract 16 11, SelectU32 ? ?)

What the shaders do: the only read of the ancillary VGPR in the machine code is the first instruction, v_bfe_u32 vN, v4, 16, 11 (render target index). After that the shader uses v4 as an ordinary data register. 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 into BitCastF32U32, FPMad32 and PackFloat2x16Rtz, and from there to SetAttribute. Those readers use all 32 bits, so the word can't be rebuilt from the sample index and render target index alone.

#1179 rebuilds the word from SampleId << 8 | Layer << 16 only when every reader extracts a range inside one of those two fields, and its TechnicalDebt entry says the rebuild is exact only because of that rule. #1934 extends the same rule to phis. Neither covers these shaders, and both still throw here, which is correct under #182.

What modelling the other bits would need, per bit range of the RDNA 2 ancillary VGPR:

  • Bits 8-11 (sample index) and 16-28 (render target index) are modelled from the SampleId and Layer builtins. Per #1179's TechnicalDebt entry, their equality with those builtins is inferred, not measured.
  • Bits 0-7, 12-15 and 29-31 are unmodelled, and their RDNA 2 layout is unknown. #1179's TechnicalDebt entry notes that the RDNA 3.5 ISA is reported to give prim type at bits 0-1, VRS rates at bits 2-5 and eye id at bit 7. Nobody has checked that against RDNA 2.
  • If RDNA 2 matches, each field needs its own source on the host. Prim type would come from the draw's primitive type, which the driver knows per draw, not from a shader input. VRS rates would need the shading rate the console uses for the draw, and whether Vulkan's FragmentSizeEXT/ShadingRateKHR reports the same value is unknown. Eye id would need a multiview view index, and whether a non-multiview draw always gives 0 is unknown. Bits 6, 12-15 and 29-31 have no documented meaning at all.
  • So the first step is the actual RDNA 2 layout of these bits, measured on hardware or taken from an RDNA 2 source. Until then, any value for them would be a guess.

Until the layout is known, these shaders keep failing with the error above.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5788072756 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548). Originally posted by [fisherjoey](https://github.com/fisherjoey) on 2026-10-10T04:29:11Z. --- Stray (PPSA02100 v1.05, Unreal Engine 4) has 26 pixel shaders that main refuses at shader info collection. At registration they are deferred (#1836). Setup: Linux (Nobara 44, kernel 7.2), RTX 5070 Ti, NVIDIA 595.91.07. Run on main 1be6f9f1 plus the other fixes Stray needs to reach its first draws, with #1179 (b4e02e2d) as the only ancillary handling. That is the code #1179 merged. Shaders (guest addresses from the registration log): 0x200e370000 0x200e400000 0x200e410000 0x200e460000 0x200e470000 0x200e4b0000 0x200e510000 0x200e580000 0x200e5f0000 0x200e610000 0x200e640000 0x200e650000 0x200e700000 0x200e760000 0x200e770000 0x200e7a0000 0x200e7b0000 0x200e7c0000 0x200e800000 0x200e830000 0x200e840000 0x200e8c0000 0x200e8d0000 0x200e8f0000 0x200e950000 0x200e970000 Error (21 shaders end in `SelectU32 ? ?`, 5 in `SelectU32 0 ?`): ``` ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by BitFieldUExtract 16 11, SelectU32 ? ?) ``` What the shaders do: the only read of the ancillary VGPR in the machine code is the first instruction, `v_bfe_u32 vN, v4, 16, 11` (render target index). After that the shader uses v4 as an ordinary data register. 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` into `BitCastF32U32`, `FPMad32` and `PackFloat2x16Rtz`, and from there to `SetAttribute`. Those readers use all 32 bits, so the word can't be rebuilt from the sample index and render target index alone. #1179 rebuilds the word from `SampleId << 8 | Layer << 16` only when every reader extracts a range inside one of those two fields, and its TechnicalDebt entry says the rebuild is exact only because of that rule. #1934 extends the same rule to phis. Neither covers these shaders, and both still throw here, which is correct under #182. What modelling the other bits would need, per bit range of the RDNA 2 ancillary VGPR: - Bits 8-11 (sample index) and 16-28 (render target index) are modelled from the `SampleId` and `Layer` builtins. Per #1179's TechnicalDebt entry, their equality with those builtins is inferred, not measured. - Bits 0-7, 12-15 and 29-31 are unmodelled, and their RDNA 2 layout is unknown. #1179's TechnicalDebt entry notes that the RDNA 3.5 ISA is reported to give prim type at bits 0-1, VRS rates at bits 2-5 and eye id at bit 7. Nobody has checked that against RDNA 2. - If RDNA 2 matches, each field needs its own source on the host. Prim type would come from the draw's primitive type, which the driver knows per draw, not from a shader input. VRS rates would need the shading rate the console uses for the draw, and whether Vulkan's `FragmentSizeEXT`/`ShadingRateKHR` reports the same value is unknown. Eye id would need a multiview view index, and whether a non-multiview draw always gives 0 is unknown. Bits 6, 12-15 and 29-31 have no documented meaning at all. - So the first step is the actual RDNA 2 layout of these bits, measured on hardware or taken from an RDNA 2 source. Until then, any value for them would be a guess. Until the layout is known, these shaders keep failing with the error above. AI-assisted: yes
alfalfa-star commented 2026-10-10 08:53:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-10T08:53:36Z.


Another title: LEGO Horizon Adventures (PPSA14632, UE5) hits the same error on main 6cc33583, for pixel shader 0x1900e51600 a few seconds after boot:

ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)

Here it is fatal, not deferred. The game calls sceAgcCreateInterpolantMapping on its own thread, which reaches Driver::ResolveShaderAbi → PrepareRegistered(..., false) → PrepareShaderWithDiagnostics. That path has no deferral, so the exception goes up through libSceAgc into game code and terminate runs:

#6 AgcDriver::DriverDetail::PrepareShaderWithDiagnostics(...) [clone .cold]
#7 PrepareRegistered(RegisteredPreparation&)::{lambda()#1}
#9 PrepareRegistered(ShaderSnapshot const&, VulkanDevice const&, QueueState const&, bool, bool*)
#10 Driver::ResolveShaderAbi(...)
#11 CreateInterpolantMapping(...)
#12 sceAgcCreateInterpolantMapping_0100

As a local stand-in, I catch the failure in ResolveShaderAbi, mark the snapshot deferred and record the key. The shader is then prepared at its first draw, and the title continues past it. Linux (Arch), RX 9070 XT, RADV.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6095864395 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6095864395). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-10T08:53:36Z. --- Another title: LEGO Horizon Adventures (PPSA14632, UE5) hits the same error on `main` 6cc33583, for pixel shader 0x1900e51600 a few seconds after boot: ``` ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) ``` Here it is fatal, not deferred. The game calls `sceAgcCreateInterpolantMapping` on its own thread, which reaches `Driver::ResolveShaderAbi` → `PrepareRegistered(..., false)` → `PrepareShaderWithDiagnostics`. That path has no deferral, so the exception goes up through libSceAgc into game code and `terminate` runs: ``` #6 AgcDriver::DriverDetail::PrepareShaderWithDiagnostics(...) [clone .cold] #7 PrepareRegistered(RegisteredPreparation&)::{lambda()#1} #9 PrepareRegistered(ShaderSnapshot const&, VulkanDevice const&, QueueState const&, bool, bool*) #10 Driver::ResolveShaderAbi(...) #11 CreateInterpolantMapping(...) #12 sceAgcCreateInterpolantMapping_0100 ``` As a local stand-in, I catch the failure in `ResolveShaderAbi`, mark the snapshot `deferred` and record the key. The shader is then prepared at its first draw, and the title continues past it. Linux (Arch), RX 9070 XT, RADV.
xXPBSXx commented 2026-10-10 11:44:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T11:44:03Z.


Another title: Kena: Bridge of Spirits (PPSA01746 v02.008.000, Unreal Engine 4) hits the same error. Two pixel shaders are refused at registration, 0x2009620000 and 0x2009660000, both ending in the SelectU32 ? ? form:

ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)

Shortly after, the title faults with write of 0x0 at app.exe+0x1c7a46b (access violation on a guest thread; no symbols). I have not established whether the missing shaders cause the fault.

Before start-up the import audit (all 37 registries) shows 2215 unique imports, 972 implemented, 64 stubs and 0 absent, so the loader finds everything and this is the first stop at run time.

Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Libraries built on main at b5f5362d plus two unrelated stub exports (sceAudioOut2EnableChat, sceHttp2WebSocketSetPingInterval). Dump from my own digital copy; no game files shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6097142874 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6097142874). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T11:44:03Z. --- Another title: Kena: Bridge of Spirits (PPSA01746 v02.008.000, Unreal Engine 4) hits the same error. Two pixel shaders are refused at registration, `0x2009620000` and `0x2009660000`, both ending in the `SelectU32 ? ?` form: ``` ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) ``` Shortly after, the title faults with `write of 0x0` at `app.exe+0x1c7a46b` (access violation on a guest thread; no symbols). I have not established whether the missing shaders cause the fault. Before start-up the import audit (all 37 registries) shows 2215 unique imports, 972 implemented, 64 stubs and 0 absent, so the loader finds everything and this is the first stop at run time. Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Libraries built on `main` at `b5f5362d` plus two unrelated stub exports (`sceAudioOut2EnableChat`, `sceHttp2WebSocketSetPingInterval`). Dump from my own digital copy; no game files shared. AI-assisted.
xXPBSXx commented 2026-10-10 14:16:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T14:16:37Z.


Another title: Lies of P (PPSA10261 v01.005.001, Unreal Engine 4). One pixel shader is refused, 0x2015690000, with the same error:

ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by ...)

The title does not fault: it ran for 150 s while the shader cache filled (1773 shaders seen, 847 written), and the screen stayed black on the first frame. I have not shown that this one refused shader is the cause of the black screen; it was one of over 1700.

The import audit before start-up (executable and all 7 modules) shows 2103 unique imports, 896 implemented, 61 stubs and 0 absent.

I do not have a proposal for the missing ancillary bits: the hardware oracle cannot measure pixel-shader inputs, and I did not find the RDNA 2 layout in the sources I looked at (the LLVM AMDGPU usage page and a few searches of the Mesa and AMD material).

Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Libraries built on main at about ba2a0a31 plus some unrelated stub exports. The executable and modules were relinked from the ELF copies of the dump. Dump from my own digital copy; no game files shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6098409167 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6098409167). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T14:16:37Z. --- Another title: Lies of P (PPSA10261 v01.005.001, Unreal Engine 4). One pixel shader is refused, `0x2015690000`, with the same error: ``` ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by ...) ``` The title does not fault: it ran for 150 s while the shader cache filled (1773 shaders seen, 847 written), and the screen stayed black on the first frame. I have not shown that this one refused shader is the cause of the black screen; it was one of over 1700. The import audit before start-up (executable and all 7 modules) shows 2103 unique imports, 896 implemented, 61 stubs and 0 absent. I do not have a proposal for the missing ancillary bits: the hardware oracle cannot measure pixel-shader inputs, and I did not find the RDNA 2 layout in the sources I looked at (the LLVM AMDGPU usage page and a few searches of the Mesa and AMD material). Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Libraries built on `main` at about `ba2a0a31` plus some unrelated stub exports. The executable and modules were relinked from the ELF copies of the dump. Dump from my own digital copy; no game files shared. AI-assisted.
AlxcBTW commented 2026-10-10 14:38:51 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T14:38:51Z.


RDNA 2 sources for the ancillary bits (the "taken from an RDNA 2 source" step in the description)

Three AMD-side sources cover every field of the ancillary VGPR except the eye id. None of them needs a console.

Bits Field RDNA 2 (GFX10.3) source Other sources
1:0 Prim type: 0 point, 1 line, 2 triangle, 3 rectangle LLPC, AMD's Vulkan compiler (AMDVLK, which supports GFX10.3): getPrimType reads ancillary & 0x3 with no GFX-level condition. The encoding is in LowerGlCompatibility.cpp: "comes from HW PS Input : ANCILLARY_ENA - Prim Type[1:0]" RDNA 3 and 3.5 ISA
3:2, 5:4 VRS rate X, Y Mesa load_frag_shading_rate, used by RADV on GFX10.3 (VRS starts there). LLPC getShadingRate asserts GFX10.3+. On GFX10.3 a rate of 1 means 2 pixels; 0 means 1 pixel RDNA 3 and 3.5 ISA
7 Eye id none found; Mesa and LLPC take the view index from a separate shader argument, not from this VGPR RDNA 3 and 3.5 ISA
11:8 Sample number Mesa load_sample_id; LLPC gl_SampleID = Ancillary[11:8] RDNA 3 and 3.5 ISA
28:16 RT array index Mesa load_layer_id: 13 bits below GFX12 RDNA 3 and 3.5 ISA
6, 12-15, 29-31 none listed none none

The ISA table is section 3.5.4.1 "Pixel Shader VGPR Input Control" (pages 31-32) of the RDNA 3 and RDNA 3.5 guides. It gives the ancillary input as a 29-bit field: RTA_Index[28:16], Sample_Num[11:8], Eye_id[7], VRSrateY[5:4], VRSrateX[3:2], Prim Typ[1:0]. The RDNA 2 and RDNA 1 guides have no such table, which is likely why it wasn't found before.

What this changes:

  • Sample number and RT array index now have RDNA 2 sources. The #1179 TechnicalDebt entry calls them inferred.
  • Prim type and the VRS rates have RDNA 2 sources and an encoding. As the description says, both come from per-draw state: the draw's primitive type, and the shading rate the draw runs at.
  • What stays open: the eye id (RDNA 3/3.5 only) and bits 6, 12-15 and 29-31, which no source describes. A shader that carries the whole word into its output therefore still can't be rebuilt exactly. So I'm not proposing a reconstruction here; this only narrows the bits without an RDNA 2 source from 15 (0-7, 12-15, 29-31) to 9 (6, 7, 12-15, 29-31).

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6098630722 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6098630722). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T14:38:51Z. --- **RDNA 2 sources for the ancillary bits** (the "taken from an RDNA 2 source" step in the description) Three AMD-side sources cover every field of the ancillary VGPR except the eye id. None of them needs a console. | Bits | Field | RDNA 2 (GFX10.3) source | Other sources | |---|---|---|---| | 1:0 | Prim type: 0 point, 1 line, 2 triangle, 3 rectangle | LLPC, AMD's Vulkan compiler (AMDVLK, which supports GFX10.3): [`getPrimType`](https://github.com/GPUOpen-Drivers/llpc/blob/40cb8d95ad8d6f7f1652e3fd47d39667594cce08/lgc/lowering/LowerInOut.cpp#L5307-L5315) reads `ancillary & 0x3` with no GFX-level condition. The encoding is in [`LowerGlCompatibility.cpp`](https://github.com/GPUOpen-Drivers/llpc/blob/40cb8d95ad8d6f7f1652e3fd47d39667594cce08/llpc/lowering/LowerGlCompatibility.cpp#L829-L836): "comes from HW PS Input : ANCILLARY_ENA - Prim Type[1:0]" | RDNA 3 and 3.5 ISA | | 3:2, 5:4 | VRS rate X, Y | Mesa [`load_frag_shading_rate`](https://gitlab.freedesktop.org/mesa/mesa/-/blob/5c80eda3f1c0ac7cb80b0597473ae83da4b97c08/src/amd/common/nir/ac_nir_lower_intrinsics_to_args.c#L345-L358), used by RADV on GFX10.3 (VRS starts there). LLPC [`getShadingRate`](https://github.com/GPUOpen-Drivers/llpc/blob/40cb8d95ad8d6f7f1652e3fd47d39667594cce08/lgc/lowering/LowerInOut.cpp#L5333-L5343) asserts GFX10.3+. On GFX10.3 a rate of 1 means 2 pixels; 0 means 1 pixel | RDNA 3 and 3.5 ISA | | 7 | Eye id | none found; Mesa and LLPC take the view index from a separate shader argument, not from this VGPR | RDNA 3 and 3.5 ISA | | 11:8 | Sample number | Mesa [`load_sample_id`](https://gitlab.freedesktop.org/mesa/mesa/-/blob/5c80eda3f1c0ac7cb80b0597473ae83da4b97c08/src/amd/common/nir/ac_nir_lower_intrinsics_to_args.c#L342-L344); LLPC `gl_SampleID = Ancillary[11:8]` | RDNA 3 and 3.5 ISA | | 28:16 | RT array index | Mesa [`load_layer_id`](https://gitlab.freedesktop.org/mesa/mesa/-/blob/5c80eda3f1c0ac7cb80b0597473ae83da4b97c08/src/amd/common/nir/ac_nir_lower_intrinsics_to_args.c#L366-L368): 13 bits below GFX12 | RDNA 3 and 3.5 ISA | | 6, 12-15, 29-31 | none listed | none | none | The ISA table is section 3.5.4.1 "Pixel Shader VGPR Input Control" (pages 31-32) of the [RDNA 3](https://gpuopen.com/download/rdna3-shader-instruction-set-architecture-feb-2023.pdf) and [RDNA 3.5](https://gpuopen.com/download/rdna35_instruction_set_architecture.pdf) guides. It gives the ancillary input as a 29-bit field: `RTA_Index[28:16], Sample_Num[11:8], Eye_id[7], VRSrateY[5:4], VRSrateX[3:2], Prim Typ[1:0]`. The [RDNA 2](https://gpuopen.com/download/rdna2-shader-instruction-set-architecture.pdf) and RDNA 1 guides have no such table, which is likely why it wasn't found before. What this changes: - Sample number and RT array index now have RDNA 2 sources. The #1179 TechnicalDebt entry calls them inferred. - Prim type and the VRS rates have RDNA 2 sources and an encoding. As the description says, both come from per-draw state: the draw's primitive type, and the shading rate the draw runs at. - What stays open: the eye id (RDNA 3/3.5 only) and bits 6, 12-15 and 29-31, which no source describes. A shader that carries the whole word into its output therefore still can't be rebuilt exactly. So I'm not proposing a reconstruction here; this only narrows the bits without an RDNA 2 source from 15 (0-7, 12-15, 29-31) to 9 (6, 7, 12-15, 29-31). AI-assisted: yes
AlxcBTW commented 2026-10-10 15:34:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T15:34:25Z.


Correction to my comment above. Two points were wrong or overstated.

  1. The PS5 GPU is gfx1013 (HW_ORACLE.md), a GFX10.1-class part with ray tracing (Mesa: "GFX1013 is GFX10 plus ray tracing instructions"), not GFX10.3. Both VRS sources I cited apply only to GFX10.3 and later. LLPC's getShadingRate asserts GFX10.3+, and RADV exposes fragment shading rate only from GFX10.3. So for the PS5, bits 5:2 have no source.
  2. RT array index width. AMD's GCN register references give the field as 11 bits (SI_3D_registers.pdf pp. 179-180, CIK_3D_registers_v2.pdf pp. 193-194): "ANCILLARY_ENA ... Render target array index[26:16], Iterated sample number[11:8], Primitive type[1:0]". Mesa reads 13 bits on every level below GFX12, GFX6 included, so its width is not specific to RDNA. Bits 28:27 have no gfx1013 source.

The GCN references are also a second AMD-authored source for prim type [1:0] and sample number [11:8], next to LLPC, which reads prim type with no GFX-level condition. PAL's ABI metadata describes the enable bit in the same words.

Corrected status for gfx1013:

  • Sourced: prim type [1:0], sample number [11:8], RT array index [26:16].
  • Unsourced: bits 2-7, 12-15 and 27-31.
  • Eye id at bit 7: GFX10 has hardware stereo (GE_STEREO_CNTL and PA_STEREO_CNTL in the gc_10_3_0 headers, also present in gc_10_1_0), so an eye id there is plausible. But no source places it at bit 7 before RDNA3.

This supports the description's point that these bits need a hardware measurement or a gfx1013 source.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099149406 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6099149406). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T15:34:25Z. --- **Correction to my comment above.** Two points were wrong or overstated. 1. **The PS5 GPU is gfx1013** ([`HW_ORACLE.md`](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/HW_ORACLE.md)), a GFX10.1-class part with ray tracing ([Mesa: "GFX1013 is GFX10 plus ray tracing instructions"](https://gitlab.freedesktop.org/mesa/mesa/-/blob/5c80eda3f1c0ac7cb80b0597473ae83da4b97c08/src/amd/common/ac_gpu_info.c#L341)), not GFX10.3. Both VRS sources I cited apply only to GFX10.3 and later. LLPC's `getShadingRate` asserts GFX10.3+, and RADV exposes fragment shading rate only from GFX10.3. So for the PS5, **bits 5:2 have no source**. 2. **RT array index width.** AMD's GCN register references give the field as 11 bits ([SI_3D_registers.pdf](https://www.x.org/docs/AMD/old/SI_3D_registers.pdf) pp. 179-180, [CIK_3D_registers_v2.pdf](https://www.x.org/docs/AMD/old/CIK_3D_registers_v2.pdf) pp. 193-194): "ANCILLARY_ENA ... Render target array index[26:16], Iterated sample number[11:8], Primitive type[1:0]". Mesa reads 13 bits on every level below GFX12, GFX6 included, so its width is not specific to RDNA. **Bits 28:27 have no gfx1013 source.** The GCN references are also a second AMD-authored source for prim type [1:0] and sample number [11:8], next to LLPC, which reads prim type with no GFX-level condition. [PAL's ABI metadata](https://github.com/GPUOpen-Drivers/pal/blob/c5e800072a32f68b6ccc4422936d96167c6e0728/inc/core/g_palPipelineAbiMetadata.h#L1401-L1403) describes the enable bit in the same words. Corrected status for gfx1013: - **Sourced:** prim type [1:0], sample number [11:8], RT array index [26:16]. - **Unsourced:** bits 2-7, 12-15 and 27-31. - **Eye id at bit 7:** GFX10 has hardware stereo (`GE_STEREO_CNTL` and `PA_STEREO_CNTL` in the [gc_10_3_0 headers](https://github.com/torvalds/linux/blob/3857c2fe5449541e24afc5efdb0f81a8a8f9a3a0/drivers/gpu/drm/amd/include/asic_reg/gc/gc_10_3_0_sh_mask.h#L22849-L22859), also present in gc_10_1_0), so an eye id there is plausible. But no source places it at bit 7 before RDNA3. This supports the description's point that these bits need a hardware measurement or a gfx1013 source. AI-assisted: yes
AlxcBTW commented 2026-10-10 16:35:28 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T16:35:28Z.


A fix for part of this, needing no ancillary bit: AlxcBTW/AnyPS5#25 (40a8a5a7), full fork CI green.

In Taxi Chaos 2 (PPSA30279, Unreal) the refused pixel shader has the form from the description:

  • The only whole-word reader is SelectU32(IEqual32(HelperInvocation, 0), rcp, ancillary). The write to the ancillary VGPR happens before any kill, so the condition is exactly "not a helper lane", with no data test.
  • The raw word therefore lives only in helper lanes.
  • The shader has no s_wqm, DPP, readlane or store, and only _lz image ops. Every value derived from the word ends in a later exec select, a compare ANDed with exec before its ballot, or an export whose exec excludes helper lanes.

MaskedSelectEliminator is meant to drop exactly such a select, but it couldn't follow the exec phis the kill paths leave at block merges, or AND chains deeper than eight. With those added (phis outside loops, exec words paired per predecessor, depth 64), the select goes away. The word then has no reader left, so no bit of it is produced, and the gfx1013 layout question doesn't arise for these shaders.

Covered: selects whose false lanes are never observed. That means helper-only conditions, plus data tests whose failing lanes are killed and never become active again.

Still refused: a false lane that becomes active again, s_wqm helper lanes feeding derivatives, uses inside loops, and walks that hit the visit limit. Those still need the layout.

Tests: new MaskedSelect and pixel_ancillary cases fail without the change. Non-GPU 446/446, agc_driver 253/253 on an RTX 5070. All 54 dumped Taxi Chaos 2 requests now prepare. Compile cost: one 2008-word shader's front-end pass goes from 202 to 400 ms; the others change by a few ms.

@fisherjoey @alfalfa-star @xXPBSXx, since the error text only prints the select's operands, could you check whether your shaders (Stray, LEGO Horizon Adventures, Kena, Lies of P) prepare with #25? The ones with data tests that you describe for Stray may stay refused, which would be correct.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6099758845 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6099758845). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T16:35:28Z. --- A fix for part of this, needing no ancillary bit: AlxcBTW/AnyPS5#25 (`40a8a5a7`), full fork CI green. In Taxi Chaos 2 (PPSA30279, Unreal) the refused pixel shader has the form from the description: - The only whole-word reader is `SelectU32(IEqual32(HelperInvocation, 0), rcp, ancillary)`. The write to the ancillary VGPR happens before any kill, so the condition is exactly "not a helper lane", with no data test. - The raw word therefore lives only in helper lanes. - The shader has no `s_wqm`, DPP, readlane or store, and only `_lz` image ops. Every value derived from the word ends in a later exec select, a compare ANDed with exec before its ballot, or an export whose exec excludes helper lanes. `MaskedSelectEliminator` is meant to drop exactly such a select, but it couldn't follow the exec phis the kill paths leave at block merges, or AND chains deeper than eight. With those added (phis outside loops, exec words paired per predecessor, depth 64), the select goes away. The word then has no reader left, so no bit of it is produced, and the gfx1013 layout question doesn't arise for these shaders. **Covered:** selects whose false lanes are never observed. That means helper-only conditions, plus data tests whose failing lanes are killed and never become active again. **Still refused:** a false lane that becomes active again, `s_wqm` helper lanes feeding derivatives, uses inside loops, and walks that hit the visit limit. Those still need the layout. Tests: new `MaskedSelect` and `pixel_ancillary` cases fail without the change. Non-GPU 446/446, `agc_driver` 253/253 on an RTX 5070. All 54 dumped Taxi Chaos 2 requests now prepare. Compile cost: one 2008-word shader's front-end pass goes from 202 to 400 ms; the others change by a few ms. @fisherjoey @alfalfa-star @xXPBSXx, since the error text only prints the select's operands, could you check whether your shaders (Stray, LEGO Horizon Adventures, Kena, Lies of P) prepare with #25? The ones with data tests that you describe for Stray may stay refused, which would be correct. AI-assisted: yes
alfalfa-star commented 2026-10-10 17:03:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-10T17:03:34Z.


@AlxcBTW I tested #25 (40a8a5a7) on LEGO Horizon Adventures (PPSA14632) and Kena: Bridge of Spirits (PPSA01802).

Setup: Linux, RX 9070 XT (RADV). main 57f96fd2 + #25, plus two local stand-ins: a shader that fails at registration or ResolveShaderAbi is deferred, and a draw that throws is skipped. With them a refusal is logged instead of ending the title. Each refused shader was then replayed with agc_shader_replay.

LEGO: still refused, because the walk hits VisitLimit. It is the same single shader as without #25, reached through sceAgcCreateInterpolantMapping → ResolveShaderAbi, with (used by SelectU32 ? ?).

  • The shader has 1284 code words and runs in wave64. It matches your form: SelectU32(IEqual32(HelperInvocation, 0), BitFieldUExtract(x, 0, 11), ancillary). Its exec words are Ballot(not helper) & Ballot(true).
  • It has no image ops, no stores and no loop phis, and only one export. About 10,250 IR values derive from the word.
  • With VisitLimit raised from 4096 to 8192 it prepares (112,570 SPIR-V words). At 16384 one more select goes (112,488). 65536 gives the same result as 16384.
  • Replay time for the whole process, 3 runs each: 0.37 s at 4096 (refused), 0.53 s at 8192, 0.59 s at 16384.

Kena: some prepare with a higher limit, and the rest are the loop case.

  • In the game log there are 24 refusals with #25 and 28 without. Both runs end at a segfault in game code that is not related to this, so these counts depend on how far each run gets.
  • Of the 48 shaders dumped in a run, 16 are refused at 4096. 10 are still refused at 16384, and the same 10 at 262144.
  • All 10 of those have phis on a back edge (30 to 33 each), so these are the "uses inside loops" case you list as still refused. 6 of them sample images (1 to 5 ImageSampleRaw); the other 4 have no image ops.

So a higher visit limit, or one that scales with the program's size, would cover LEGO and 6 more Kena shaders. The rest of Kena needs the loop case. I can share the LEGO .req if it helps.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100012434 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6100012434). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-10T17:03:34Z. --- @AlxcBTW I tested #25 (`40a8a5a7`) on LEGO Horizon Adventures (PPSA14632) and Kena: Bridge of Spirits (PPSA01802). **Setup:** Linux, RX 9070 XT (RADV). `main` 57f96fd2 + #25, plus two local stand-ins: a shader that fails at registration or `ResolveShaderAbi` is deferred, and a draw that throws is skipped. With them a refusal is logged instead of ending the title. Each refused shader was then replayed with `agc_shader_replay`. **LEGO: still refused, because the walk hits `VisitLimit`.** It is the same single shader as without #25, reached through `sceAgcCreateInterpolantMapping` → `ResolveShaderAbi`, with `(used by SelectU32 ? ?)`. - The shader has 1284 code words and runs in wave64. It matches your form: `SelectU32(IEqual32(HelperInvocation, 0), BitFieldUExtract(x, 0, 11), ancillary)`. Its exec words are `Ballot(not helper) & Ballot(true)`. - It has no image ops, no stores and no loop phis, and only one export. About 10,250 IR values derive from the word. - With `VisitLimit` raised from 4096 to 8192 it prepares (112,570 SPIR-V words). At 16384 one more select goes (112,488). 65536 gives the same result as 16384. - Replay time for the whole process, 3 runs each: 0.37 s at 4096 (refused), 0.53 s at 8192, 0.59 s at 16384. **Kena: some prepare with a higher limit, and the rest are the loop case.** - In the game log there are 24 refusals with #25 and 28 without. Both runs end at a segfault in game code that is not related to this, so these counts depend on how far each run gets. - Of the 48 shaders dumped in a run, 16 are refused at 4096. 10 are still refused at 16384, and the same 10 at 262144. - All 10 of those have phis on a back edge (30 to 33 each), so these are the "uses inside loops" case you list as still refused. 6 of them sample images (1 to 5 `ImageSampleRaw`); the other 4 have no image ops. So a higher visit limit, or one that scales with the program's size, would cover LEGO and 6 more Kena shaders. The rest of Kena needs the loop case. I can share the LEGO `.req` if it helps. AI-assisted: yes (Claude Code)
AlxcBTW commented 2026-10-10 17:05:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T17:05:52Z.


@alfalfa-star thank you, that's exactly the data I was missing. I'll make the visit limit scale with the program instead of a fixed 4096, measure the compile cost, and check whether exec phis on back edges (Kena's remaining 10) can be proven with a loop-invariant rule or have to stay refused. I'll post here when the branch is updated.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100034881 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6100034881). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T17:05:52Z. --- @alfalfa-star thank you, that's exactly the data I was missing. I'll make the visit limit scale with the program instead of a fixed 4096, measure the compile cost, and check whether exec phis on back edges (Kena's remaining 10) can be proven with a loop-invariant rule or have to stay refused. I'll post here when the branch is updated. AI-assisted: yes
xXPBSXx commented 2026-10-10 17:53:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T17:53:44Z.


A third title: Returnal (PPSA01285 v03.000.005, Unreal Engine 4). With the missing exports of #2872 and pthread_attr_setsolosched_np (#2658) applied locally, it reaches shader compilation on Windows and then aborts, not only refuses one shader:

terminate called after throwing an instance of 'std::runtime_error'
  what():  ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)

Over about 8 minutes, 6 shaders were refused with the ancillary error (5 with used by SelectU32 ? ?, 1 with used by SelectU32 0 ?) before the abort above. 0 frames were presented. The abort comes from an uncaught std::runtime_error, so in this title a refused shader that is later needed ends the process, where Lies of P only stayed on a black first frame.

I have no new information about the missing bits; the comments by AlxcBTW above are the status I know of.

Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Dump from my own digital copy; no game files shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100476497 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6100476497). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T17:53:44Z. --- A third title: Returnal (PPSA01285 v03.000.005, Unreal Engine 4). With the missing exports of #2872 and `pthread_attr_setsolosched_np` (#2658) applied locally, it reaches shader compilation on Windows and then aborts, not only refuses one shader: ``` terminate called after throwing an instance of 'std::runtime_error' what(): ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) ``` Over about 8 minutes, 6 shaders were refused with the ancillary error (5 with `used by SelectU32 ? ?`, 1 with `used by SelectU32 0 ?`) before the abort above. 0 frames were presented. The abort comes from an uncaught `std::runtime_error`, so in this title a refused shader that is later needed ends the process, where Lies of P only stayed on a black first frame. I have no new information about the missing bits; the comments by AlxcBTW above are the status I know of. Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Dump from my own digital copy; no game files shared. AI-assisted.
AlxcBTW commented 2026-10-10 18:24:00 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T18:24:00Z.


@alfalfa-star #25 has two new commits, head 8577b640.

Visit limit (49b43efc). A walk now stops after max(4096, 2 × instructions) steps instead of 4096 visited values. A step is a value visited or an implication evaluated for the first time. The walk only visits values derived from the select, so it can't stop before it has seen all of them, and LEGO's ~10,250 derived values fit with room to spare. A walk stays linear in the program. I also made the walk cheaper, mostly by replacing two hash sets with tables indexed by id, so the larger limit doesn't cost compile time.

Loops (8577b640). In your Kena data the walk gave up at the first use inside a loop before any exec phi was checked. So it now follows uses into loops. A loop phi implies the write's exec if every incoming value does, with the phi assumed to imply it while its back-edge values are checked. Two conditions keep this sound: the write's exec must be computed outside any loop, and results that relied on an assumption that failed are thrown away. A lane that becomes active again inside the loop and reads the value still keeps the select. Loops that never change exec only need the first part.

Time in the pass per prepare on our 54 Taxi Chaos 2 requests (median of 3, one run):

main 5edae353 40a8a5a7 49b43efc 8577b640
2008-word shader 424 ms 846 ms 334 ms 349 ms
all 54 977 ms 1471 ms 547 ms 805 ms

The loop commit costs more on shaders with loops because walks go further. It also removes many more masked writes in Taxi's compute shaders with loops, e.g. 207 instead of 36 in one.

Could you retest LEGO and Kena on 8577b640? Some Kena shaders may stay refused, and that would be correct: helper lanes feed derivatives, so a select stays wherever the word reaches an implicit-LOD sample.

@xXPBSXx Returnal's six refusals look like the same form. If you have time, could you try #25 at 8577b640 (https://github.com/AlxcBTW/AnyPS5/pull/25)? Full fork CI is green.

AI-assisted: yes

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6100754314 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6100754314). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T18:24:00Z. --- @alfalfa-star #25 has two new commits, head `8577b640`. **Visit limit (`49b43efc`).** A walk now stops after max(4096, 2 × instructions) steps instead of 4096 visited values. A step is a value visited or an implication evaluated for the first time. The walk only visits values derived from the select, so it can't stop before it has seen all of them, and LEGO's ~10,250 derived values fit with room to spare. A walk stays linear in the program. I also made the walk cheaper, mostly by replacing two hash sets with tables indexed by id, so the larger limit doesn't cost compile time. **Loops (`8577b640`).** In your Kena data the walk gave up at the first use inside a loop before any exec phi was checked. So it now follows uses into loops. A loop phi implies the write's exec if every incoming value does, with the phi assumed to imply it while its back-edge values are checked. Two conditions keep this sound: the write's exec must be computed outside any loop, and results that relied on an assumption that failed are thrown away. A lane that becomes active again inside the loop and reads the value still keeps the select. Loops that never change exec only need the first part. Time in the pass per prepare on our 54 Taxi Chaos 2 requests (median of 3, one run): | | main `5edae353` | `40a8a5a7` | `49b43efc` | `8577b640` | |---|---|---|---|---| | 2008-word shader | 424 ms | 846 ms | 334 ms | 349 ms | | all 54 | 977 ms | 1471 ms | 547 ms | 805 ms | The loop commit costs more on shaders with loops because walks go further. It also removes many more masked writes in Taxi's compute shaders with loops, e.g. 207 instead of 36 in one. Could you retest LEGO and Kena on `8577b640`? Some Kena shaders may stay refused, and that would be correct: helper lanes feed derivatives, so a select stays wherever the word reaches an implicit-LOD sample. @xXPBSXx Returnal's six refusals look like the same form. If you have time, could you try #25 at `8577b640` (https://github.com/AlxcBTW/AnyPS5/pull/25)? Full fork CI is green. AI-assisted: yes
xXPBSXx commented 2026-10-10 20:02:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T20:02:19Z.


@AlxcBTW Returnal (PPSA01285 v03.000.005, Unreal Engine 4) on #25 at 8577b640: it helps, and the title now presents frames and shows its first logo, but it still aborts at a refused shader.

Registered pixel shaders refused with packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?), same dump, same machine, run on main plus #2872 and #2658 and then with #25 on top:

without #25 with #25
refused at registration 0x2024380000, 0x20243c0000, 0x20243e0000, 0x2024370000, 0x20244a0000, 0x2026c60000 0x2024370000, 0x20244a0000, 0x2026c60000
CFG shared merge splitting exceeded budget: originalBlocks=19 currentBlocks=95 splitBudget=76 0x2023c30000 0x2023c30000

So 3 of the 6 now prepare (0x2024380000, 0x20243c0000, 0x20243e0000; the last one was SelectU32 0 ? before). The other 3 keep the same message.

What I saw on screen: in my first run without #25 the window stayed black and showed no frames. With #25 the window title shows Returnal | FPS: 22.21 (310), so frames are presented. After about 1 to 2 minutes the title's first logo appeared on screen, and then the window went black again. Then the title aborts with std::runtime_error: ... packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) from a shader whose address the log does not show: after about 3 minutes on a cold shader cache, and after about 2 minutes on the second run with the cache filled (13152 hits, 3 misses).

The error text only prints ? for the operands, so I cannot say from my side which of your three still-refused cases these are (a false lane that becomes active again, s_wqm helper lanes feeding derivatives, a use inside a loop, or the visit limit). If you want, tell me a debug switch or log line that prints why the walk gave up and I will run it. I will not post the shader binaries from the log, since they are game data.

Correction to my earlier comment here and on #2872: I wrote that Returnal ran for about 8 minutes with 0 frames presented. I took that from the log, which has no frame counter, and I had not looked at the window title, so I do not know the frame count for that run.

Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, Release. Dump from my own digital copy. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101632487 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6101632487). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T20:02:19Z. --- @AlxcBTW Returnal (PPSA01285 v03.000.005, Unreal Engine 4) on #25 at `8577b640`: it helps, and the title now presents frames and shows its first logo, but it still aborts at a refused shader. Registered pixel shaders refused with `packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)`, same dump, same machine, run on `main` plus #2872 and #2658 and then with #25 on top: | | without #25 | with #25 | |---|---|---| | refused at registration | `0x2024380000`, `0x20243c0000`, `0x20243e0000`, `0x2024370000`, `0x20244a0000`, `0x2026c60000` | `0x2024370000`, `0x20244a0000`, `0x2026c60000` | | `CFG shared merge splitting exceeded budget: originalBlocks=19 currentBlocks=95 splitBudget=76` | `0x2023c30000` | `0x2023c30000` | So 3 of the 6 now prepare (`0x2024380000`, `0x20243c0000`, `0x20243e0000`; the last one was `SelectU32 0 ?` before). The other 3 keep the same message. What I saw on screen: in my first run without #25 the window stayed black and showed no frames. With #25 the window title shows `Returnal | FPS: 22.21 (310)`, so frames are presented. After about 1 to 2 minutes the title's first logo appeared on screen, and then the window went black again. Then the title aborts with `std::runtime_error: ... packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)` from a shader whose address the log does not show: after about 3 minutes on a cold shader cache, and after about 2 minutes on the second run with the cache filled (13152 hits, 3 misses). The error text only prints `?` for the operands, so I cannot say from my side which of your three still-refused cases these are (a false lane that becomes active again, `s_wqm` helper lanes feeding derivatives, a use inside a loop, or the visit limit). If you want, tell me a debug switch or log line that prints why the walk gave up and I will run it. I will not post the shader binaries from the log, since they are game data. Correction to my earlier comment here and on #2872: I wrote that Returnal ran for about 8 minutes with 0 frames presented. I took that from the log, which has no frame counter, and I had not looked at the window title, so I do not know the frame count for that run. Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, Release. Dump from my own digital copy. AI-assisted.
xXPBSXx commented 2026-10-10 20:19:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T20:19:49Z.


@AlxcBTW I replayed the Returnal shaders that #25 (8577b640) still refuses, with agc_shader_replay on the dumped requests, and printed why the walk keeps the select. Each of the 3 refused pixel shaders has exactly one select that reads the ancillary word (GetBuiltin kind 7):

shader select mask user that stops the walk
0x2026c60000 IEqual32(HelperInvocation, 0) ImageRead ("user is not lane-local")
0x2024370000 INotEqual32(BitwiseAnd32(ShiftRightLogical32(...), 1), 0) SetAttribute
0x20244a0000 the same form SetAttribute

The first one is the helper-only form from your description, and it is refused only because of the user. ImageRead has a trailing exec argument like the buffer loads in readsOnlyWhereActive, but it is in neither that list nor isLaneLocal. With one line in readsOnlyWhereActive (case IrOpcode::ImageRead:) the walk follows it like the buffer loads: the select is dropped only when the read's exec implies the select's mask. 0x2026c60000 then recompiles (43086 SPIR-V words in agc_shader_replay).

In the game, with that line on top of #25 the refused list goes from 3 ancillary shaders to 2 (plus the unchanged CFG-budget one), and the title still aborts with the same SelectU32 ? ? error after about 3 minutes, so it does not get the title through by itself. One observation from the window, from a single run each: with the line, the platform logos appeared before the title's own logo, which they did not in the runs on #25 alone. I cannot say that this comes from that one shader.

A test for it in MaskedSelect.cpp (the guarded helper with ImageRead, same exec drops the select, wider exec keeps it) fails without the line and passes with it; agc_masked_select and pixel_ancillary pass. I have not run the full ctest.

The other two have a data test as mask and an export (SetAttribute) as user, and the walk cannot prove that the export's exec implies the mask. That is the case you describe as still needing the layout (a false lane that becomes active again), unless those lanes are killed before the export; I did not check that in the IR. The refusal with CFG shared merge splitting exceeded budget (0x2023c30000) is a different problem and unchanged.

I have not opened a PR; the line is on top of #25 and touches the same function, so I leave it to you whether to take it. If you want the patch, say so and I will post it as a diff here.

Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, Release. Dump from my own digital copy; no shader data posted. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101783194 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6101783194). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T20:19:49Z. --- @AlxcBTW I replayed the Returnal shaders that #25 (`8577b640`) still refuses, with `agc_shader_replay` on the dumped requests, and printed why the walk keeps the select. Each of the 3 refused pixel shaders has exactly one select that reads the ancillary word (`GetBuiltin` kind 7): | shader | select mask | user that stops the walk | |---|---|---| | `0x2026c60000` | `IEqual32(HelperInvocation, 0)` | `ImageRead` ("user is not lane-local") | | `0x2024370000` | `INotEqual32(BitwiseAnd32(ShiftRightLogical32(...), 1), 0)` | `SetAttribute` | | `0x20244a0000` | the same form | `SetAttribute` | The first one is the helper-only form from your description, and it is refused only because of the user. `ImageRead` has a trailing exec argument like the buffer loads in `readsOnlyWhereActive`, but it is in neither that list nor `isLaneLocal`. With one line in `readsOnlyWhereActive` (`case IrOpcode::ImageRead:`) the walk follows it like the buffer loads: the select is dropped only when the read's exec implies the select's mask. `0x2026c60000` then recompiles (43086 SPIR-V words in `agc_shader_replay`). In the game, with that line on top of #25 the refused list goes from 3 ancillary shaders to 2 (plus the unchanged CFG-budget one), and the title still aborts with the same `SelectU32 ? ?` error after about 3 minutes, so it does not get the title through by itself. One observation from the window, from a single run each: with the line, the platform logos appeared before the title's own logo, which they did not in the runs on #25 alone. I cannot say that this comes from that one shader. A test for it in `MaskedSelect.cpp` (the `guarded` helper with `ImageRead`, same exec drops the select, wider exec keeps it) fails without the line and passes with it; `agc_masked_select` and `pixel_ancillary` pass. I have not run the full `ctest`. The other two have a data test as mask and an export (`SetAttribute`) as user, and the walk cannot prove that the export's exec implies the mask. That is the case you describe as still needing the layout (a false lane that becomes active again), unless those lanes are killed before the export; I did not check that in the IR. The refusal with `CFG shared merge splitting exceeded budget` (`0x2023c30000`) is a different problem and unchanged. I have not opened a PR; the line is on top of #25 and touches the same function, so I leave it to you whether to take it. If you want the patch, say so and I will post it as a diff here. Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, Release. Dump from my own digital copy; no shader data posted. AI-assisted.
AlxcBTW commented 2026-10-10 21:34:34 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T21:34:34Z.


@xXPBSXx thank you, the replay table is exactly what was missing.

I took your ImageRead line and your test, with you as co-author: AlxcBTW/AnyPS5#30, branch fix/ancillary-image-read, commit 93fa6f8b (the test fails without the line). The branch sits on #25 (8577b640) and has two more commits:

  • f06a28f4 checks the other image ops the same way. ImageWrite joins the exec-guarded list (the emitter stores only under its exec), and gathers with their own LOD and ImageQueryDimensions count as lane-local. Implicit-LOD samples and gathers, ImageQueryLod, ImageBvhIntersectRay (it ignores its exec operand) and the atomics stay refused.
  • 90269d7b adds the reason switch you asked for, APS5_TRACE_ANCILLARY=1. For every select that keeps the ancillary word it prints [ancillary] shader 0x... select #N kept, <reason>: ..., and for the refusal itself [ancillary] shader 0x... live-use: ... with the shader address, so the abort after 3 minutes names its shader too. The error text now lists the operands instead of ? ?. The switch works in-game and in agc_shader_replay.

About 0x2024370000 and 0x20244a0000: INotEqual32(BitwiseAnd32(ShiftRightLogical32(X, A), 1), 0) is also what the translator emits for one lane's bit of an exec mask, with A = BitwiseAnd32(LaneId, 31) and X an exec word (in wave64, SelectU32(ULessThan32(LaneId, 32), low, high)). If that's what yours are, each select is a masked write inside a branch, not a data test, and there are three cases:

  1. The export runs under the branch's exec, or after a kill of the other lanes, in a form the proof can't follow yet. Such a select can be dropped, and the line shows where the proof stopped.
  2. An if/else writes the register in both arms, so every exported lane gets a written value. This one can be dropped soundly too, but there's no rule for it yet: the proof checks the export's exec against one write's mask, not against both arms together.
  3. Only one arm writes it (or A is a constant and it's a real data test on the word), and the export after the merge writes the word in the other lanes on hardware as well. This one can't be dropped and needs the layout.

Could you run those two in the replay with APS5_TRACE_ANCILLARY=1 and paste their [ancillary] lines? They contain only value ids and opcodes, no shader data. They show the mask down to its shift amount and word, the export's exec and where the proof stopped on it, and the select the value passed through and in which arm, which decides between 1, 2 and 3. If 2, I'll add the rule.

For 0x2023c30000 (CFG shared merge splitting exceeded budget): AlxcBTW/AnyPS5#24 (fix/structurizer-loop-exit-merge) fixes shapes of that kind from #2642 and merges cleanly with #25 and this branch. It may be worth stacking it; I can't say whether it covers this shader.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102415587 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6102415587). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T21:34:34Z. --- @xXPBSXx thank you, the replay table is exactly what was missing. I took your `ImageRead` line and your test, with you as co-author: AlxcBTW/AnyPS5#30, branch `fix/ancillary-image-read`, commit `93fa6f8b` (the test fails without the line). The branch sits on #25 (`8577b640`) and has two more commits: - `f06a28f4` checks the other image ops the same way. `ImageWrite` joins the exec-guarded list (the emitter stores only under its exec), and gathers with their own LOD and `ImageQueryDimensions` count as lane-local. Implicit-LOD samples and gathers, `ImageQueryLod`, `ImageBvhIntersectRay` (it ignores its exec operand) and the atomics stay refused. - `90269d7b` adds the reason switch you asked for, `APS5_TRACE_ANCILLARY=1`. For every select that keeps the ancillary word it prints `[ancillary] shader 0x... select #N kept, <reason>: ...`, and for the refusal itself `[ancillary] shader 0x... live-use: ...` with the shader address, so the abort after 3 minutes names its shader too. The error text now lists the operands instead of `? ?`. The switch works in-game and in `agc_shader_replay`. About `0x2024370000` and `0x20244a0000`: `INotEqual32(BitwiseAnd32(ShiftRightLogical32(X, A), 1), 0)` is also what the translator emits for one lane's bit of an exec mask, with `A` = `BitwiseAnd32(LaneId, 31)` and `X` an exec word (in wave64, `SelectU32(ULessThan32(LaneId, 32), low, high)`). If that's what yours are, each select is a masked write inside a branch, not a data test, and there are three cases: 1. The export runs under the branch's exec, or after a kill of the other lanes, in a form the proof can't follow yet. Such a select can be dropped, and the line shows where the proof stopped. 2. An if/else writes the register in both arms, so every exported lane gets a written value. This one can be dropped soundly too, but there's no rule for it yet: the proof checks the export's exec against one write's mask, not against both arms together. 3. Only one arm writes it (or `A` is a constant and it's a real data test on the word), and the export after the merge writes the word in the other lanes on hardware as well. This one can't be dropped and needs the layout. Could you run those two in the replay with `APS5_TRACE_ANCILLARY=1` and paste their `[ancillary]` lines? They contain only value ids and opcodes, no shader data. They show the mask down to its shift amount and word, the export's exec and where the proof stopped on it, and the select the value passed through and in which arm, which decides between 1, 2 and 3. If 2, I'll add the rule. For `0x2023c30000` (`CFG shared merge splitting exceeded budget`): AlxcBTW/AnyPS5#24 (`fix/structurizer-loop-exit-merge`) fixes shapes of that kind from #2642 and merges cleanly with #25 and this branch. It may be worth stacking it; I can't say whether it covers this shader. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-10 21:36:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T21:36:53Z.


A fourth title with the same stop: Demon Slayer -Kimetsu no Yaiba- The Hinokami Chronicles (PPSA03490 v01.000.000, Unreal Engine 4). Once its seven missing sceRudp* imports are handled (local branch, not in main), it starts, opens its /app0/apk/... files, creates its threads and registers shaders, and then aborts after about 34 seconds:

terminate called after throwing an instance of 'std::runtime_error'
  what():  ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)

Before that, 5 pixel shaders were refused at registration with the same error, all of the SelectU32 form (one of them SelectU32 0 ?). The log also has 6 lines has unsupported registered shader type 8; it is not prepared at registration, which I have not looked into.

I have not tried #25 on this title yet. Returnal, Lies of P, Ad Infinitum and now this one all stop at this error, so they could be used as test cases for any change to it.

Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, Release. Dump from my own digital copy; no game files or shader data shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102434529 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6102434529). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T21:36:53Z. --- A fourth title with the same stop: Demon Slayer -Kimetsu no Yaiba- The Hinokami Chronicles (PPSA03490 v01.000.000, Unreal Engine 4). Once its seven missing `sceRudp*` imports are handled (local branch, not in `main`), it starts, opens its `/app0/apk/...` files, creates its threads and registers shaders, and then aborts after about 34 seconds: ``` terminate called after throwing an instance of 'std::runtime_error' what(): ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) ``` Before that, 5 pixel shaders were refused at registration with the same error, all of the `SelectU32` form (one of them `SelectU32 0 ?`). The log also has 6 lines `has unsupported registered shader type 8; it is not prepared at registration`, which I have not looked into. I have not tried #25 on this title yet. Returnal, Lies of P, Ad Infinitum and now this one all stop at this error, so they could be used as test cases for any change to it. Windows 10 (19045), NVIDIA GeForce RTX 4080 SUPER, Release. Dump from my own digital copy; no game files or shader data shared. AI-assisted.
xXPBSXx commented 2026-10-10 21:40:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T21:40:49Z.


Replay result for the five Demon Slayer shaders (PPSA03490) that were refused with the ancillary error (see my comment above), run with agc_shader_replay on the requests from the log, on main plus #2872 and #2658, with #25 at 8577b640 and one more line, case IrOpcode::ImageRead: in readsOnlyWhereActive (the change from my earlier comment, with a test):

  • 4 of the 5 no longer stop at the ancillary check. They fail one stage later, in SrtWalker::EvaluateRuntimeSources (ReadConst(GetSrtResource, ...) where the slot is LoadAddressU32(GetAddressResource(GetUserData, GetUserData))). That error comes from the replay tool: the saved requests have all 30 user data dwords at 0, so the runtime sources cannot be evaluated offline. It says nothing about the game, where those values exist.
  • 1 of the 5 (0x200ced0000) still fails with packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?). I have not looked at why; for the two Returnal shaders that stay refused, the select mask was a data test and the user an export (SetAttribute).

I have not run this in the game yet (the title needs its start-up imports first), so I do not know whether it gets past the abort. I will post the in-game result here.

Windows 10 (19045). No shader data shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102466403 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6102466403). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T21:40:49Z. --- Replay result for the five Demon Slayer shaders (PPSA03490) that were refused with the ancillary error (see my comment above), run with `agc_shader_replay` on the requests from the log, on `main` plus #2872 and #2658, with #25 at `8577b640` and one more line, `case IrOpcode::ImageRead:` in `readsOnlyWhereActive` (the change from my earlier comment, with a test): - 4 of the 5 no longer stop at the ancillary check. They fail one stage later, in `SrtWalker::EvaluateRuntimeSources` (`ReadConst(GetSrtResource, ...)` where the slot is `LoadAddressU32(GetAddressResource(GetUserData, GetUserData))`). That error comes from the replay tool: the saved requests have all 30 user data dwords at 0, so the runtime sources cannot be evaluated offline. It says nothing about the game, where those values exist. - 1 of the 5 (`0x200ced0000`) still fails with `packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)`. I have not looked at why; for the two Returnal shaders that stay refused, the select mask was a data test and the user an export (`SetAttribute`). I have not run this in the game yet (the title needs its start-up imports first), so I do not know whether it gets past the abort. I will post the in-game result here. Windows 10 (19045). No shader data shared. AI-assisted.
AlxcBTW commented 2026-10-10 21:42:15 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T21:42:15Z.


@xXPBSXx thanks, 4 of 5 is a good sign, and you're right that the EvaluateRuntimeSources stop is the replay's zeroed user data, not the game.

For 0x200ced0000 and the two Returnal shaders: AlxcBTW/AnyPS5#30 is #25 plus your ImageRead line (with you as co-author) and the APS5_TRACE_ANCILLARY=1 switch from my comment above. With the switch on, the replay prints one [ancillary] line per kept select with the reason and the mask's form, which tells us whether these are the export-after-branch case a new rule can drop, or a real data test. Only the [ancillary] lines are needed.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102478064 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6102478064). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T21:42:15Z. --- @xXPBSXx thanks, 4 of 5 is a good sign, and you're right that the `EvaluateRuntimeSources` stop is the replay's zeroed user data, not the game. For `0x200ced0000` and the two Returnal shaders: AlxcBTW/AnyPS5#30 is #25 plus your `ImageRead` line (with you as co-author) and the `APS5_TRACE_ANCILLARY=1` switch from my comment above. With the switch on, the replay prints one `[ancillary]` line per kept select with the reason and the mask's form, which tells us whether these are the export-after-branch case a new rule can drop, or a real data test. Only the `[ancillary]` lines are needed. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-10 21:45:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T21:45:53Z.


Correction to my replay comment above, with the in-game result for Demon Slayer (PPSA03490).

The replay result was misleading: for 0x200ce10000, 0x200ceb0000, 0x200cf70000 and 0x200cfd0000 the replay stops in SrtWalker::EvaluateRuntimeSources because the saved requests carry zero user data. That error comes before the ancillary check there, so it hid the ancillary error rather than showing that it was gone. I should not have written that 4 of 5 pass the check.

In the game, with #25 at 8577b640 plus case IrOpcode::ImageRead: in readsOnlyWhereActive, plus the sceRudp* imports the title needs, on main plus #2872 and #2658:

  • Refused at registration with the ancillary error: 2 instead of 5. 0x200ce10000, 0x200cf70000 and 0x200cfd0000 are now prepared; 0x200ceb0000 and 0x200ced0000 are still refused with used by SelectU32 ? ?.
  • The title still aborts with the same error from a shader that is prepared later (about 34 seconds in the run without the changes, the log of the run with them shows the same abort).

So the changes help three shaders of this title and do not get it through. For the Returnal shaders that stay refused the select mask was a data test and the user an export; I have not checked these two yet and will look at them in the game next.

Windows 10 (19045). No shader data shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102508228 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6102508228). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T21:45:53Z. --- Correction to my replay comment above, with the in-game result for Demon Slayer (PPSA03490). The replay result was misleading: for `0x200ce10000`, `0x200ceb0000`, `0x200cf70000` and `0x200cfd0000` the replay stops in `SrtWalker::EvaluateRuntimeSources` because the saved requests carry zero user data. That error comes before the ancillary check there, so it hid the ancillary error rather than showing that it was gone. I should not have written that 4 of 5 pass the check. In the game, with #25 at `8577b640` plus `case IrOpcode::ImageRead:` in `readsOnlyWhereActive`, plus the `sceRudp*` imports the title needs, on `main` plus #2872 and #2658: - Refused at registration with the ancillary error: 2 instead of 5. `0x200ce10000`, `0x200cf70000` and `0x200cfd0000` are now prepared; `0x200ceb0000` and `0x200ced0000` are still refused with `used by SelectU32 ? ?`. - The title still aborts with the same error from a shader that is prepared later (about 34 seconds in the run without the changes, the log of the run with them shows the same abort). So the changes help three shaders of this title and do not get it through. For the Returnal shaders that stay refused the select mask was a data test and the user an export; I have not checked these two yet and will look at them in the game next. Windows 10 (19045). No shader data shared. AI-assisted.
xXPBSXx commented 2026-10-10 22:00:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T22:00:19Z.


In-game diagnosis for the Demon Slayer shaders that stay refused (PPSA03490), on #25 plus the ImageRead line. I added temporary prints to MaskedSelectEliminator (local only, per thread) that say why the walk keeps a select whose operand is the ancillary builtin (GetBuiltin kind 7), and ran the title:

  • 14 ancillary selects are looked at (the same select is seen again on each pass of the elimination loop). Every case where the walk gives up is blocked by a SetAttribute (export); there is no other blocking user in this run.
  • The export is target 0, with a four-component vector: components 0 and 1 are SelectU32(INotEqual32(...), PackFloat2x16Rtz(...), Phi(...)) and components 2 and 3 are the constant 0. The Phi is where the ancillary-derived word comes from, so the raw word reaches render target 0 for the lanes where the INotEqual32 is false.

That is the same shape as the two Returnal shaders that stay refused (export 0, two channels, a data test as condition). So with #25 and ImageRead this title ends at the same point as Returnal: what is left needs the gfx1013 layout, or a reason why the output of those lanes is never used, which I cannot show from the shader.

A correction to my own process: a first version of these prints used a global flag, and with several shaders compiling at once it attributed ImageWrite and Ballot blockers to the wrong shaders. I discarded that result, and I am not proposing anything for ImageWrite.

Windows 10 (19045). No shader data shared. AI-assisted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6102628135 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6102628135). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T22:00:19Z. --- In-game diagnosis for the Demon Slayer shaders that stay refused (PPSA03490), on #25 plus the `ImageRead` line. I added temporary prints to `MaskedSelectEliminator` (local only, per thread) that say why the walk keeps a select whose operand is the ancillary builtin (`GetBuiltin` kind 7), and ran the title: - 14 ancillary selects are looked at (the same select is seen again on each pass of the elimination loop). Every case where the walk gives up is blocked by a `SetAttribute` (export); there is no other blocking user in this run. - The export is target 0, with a four-component vector: components 0 and 1 are `SelectU32(INotEqual32(...), PackFloat2x16Rtz(...), Phi(...))` and components 2 and 3 are the constant 0. The `Phi` is where the ancillary-derived word comes from, so the raw word reaches render target 0 for the lanes where the `INotEqual32` is false. That is the same shape as the two Returnal shaders that stay refused (export 0, two channels, a data test as condition). So with #25 and `ImageRead` this title ends at the same point as Returnal: what is left needs the gfx1013 layout, or a reason why the output of those lanes is never used, which I cannot show from the shader. A correction to my own process: a first version of these prints used a global flag, and with several shaders compiling at once it attributed `ImageWrite` and `Ballot` blockers to the wrong shaders. I discarded that result, and I am not proposing anything for `ImageWrite`. Windows 10 (19045). No shader data shared. AI-assisted.
AlxcBTW commented 2026-10-10 23:04:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-10T23:04:38Z.


@xXPBSXx thanks for the in-game diagnosis, it settled the question. Export 0 has two channels that select between a packed value and a phi carrying the word, with a data test as the condition. That's the case where only one arm writes the register: on the console those lanes really do export the ancillary VGPR, so no masked-select rule can drop it. I've set aside the both-arms rule I was writing, because it can't help with this shape.

Instead, AlxcBTW/AnyPS5#30 (branch fix/ancillary-image-read, commit 15b3e08b) no longer refuses these shaders. Any use the masked-select pass keeps now gets the whole word:

prim type (bits 0-1) | sample (bits 8-11) | render target index (bits 16-28)

Every other bit is zero.

Why the word is determined for these draws:

  • Prim type: 0 point, 1 line, 2 triangle, 3 rectangle. It comes from the draw's primitive type: rect lists give 3, line lists give 1, and everything else the driver accepts gives 2, because its geometry and tessellation paths only output triangles. It reaches the shader as a pipeline specialization constant, so the translated shader is still shared.
  • Sample: SampleId, which is always 0 here because the driver rejects MSAA and per-sample shading.
  • Render target index: the Layer builtin, the same one the field extraction already uses. It reads 0 while the driver ignores vertex layer exports.
  • VRS rates (bits 2-5) and eye id (bit 7): 0, because the driver supports neither VRS nor multiview.
  • Layout: the RDNA 3/3.5 ISA guides give prim type 1:0, VRS 3:2 and 5:4, eye id 7, sample 11:8 and render target index 28:16. The GCN register guides give the same prim type and sample fields and put the render target index at 26:16, so the two agree for layers below 2048. Nobody has checked it on gfx1013; TechnicalDebt.md says so.

A device test exports the word from a draw and reads back 2, 3 and 1 for triangle, rectangle and line (RTX 5070).

Could you try Returnal and Demon Slayer on this commit? If they get past the abort, the next run will show whether anything visible depends on those lanes. With APS5_TRACE_ANCILLARY=1, each shader that gets the word prints [ancillary] shader 0x... whole word for <uses>, so you can see which ones they are. The CFG shared merge splitting exceeded budget refusal in Returnal (0x2023c30000) is a separate problem and isn't covered by this; #2471 (head a396b019, which now carries #24 plus the guarded shared-exit repair) is the one to stack for it.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103136731 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103136731). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-10T23:04:38Z. --- @xXPBSXx thanks for the in-game diagnosis, it settled the question. Export 0 has two channels that select between a packed value and a phi carrying the word, with a data test as the condition. That's the case where only one arm writes the register: on the console those lanes really do export the ancillary VGPR, so no masked-select rule can drop it. I've set aside the both-arms rule I was writing, because it can't help with this shape. Instead, AlxcBTW/AnyPS5#30 (branch `fix/ancillary-image-read`, commit `15b3e08b`) no longer refuses these shaders. Any use the masked-select pass keeps now gets the whole word: ``` prim type (bits 0-1) | sample (bits 8-11) | render target index (bits 16-28) ``` Every other bit is zero. Why the word is determined for these draws: - **Prim type**: 0 point, 1 line, 2 triangle, 3 rectangle. It comes from the draw's primitive type: rect lists give 3, line lists give 1, and everything else the driver accepts gives 2, because its geometry and tessellation paths only output triangles. It reaches the shader as a pipeline specialization constant, so the translated shader is still shared. - **Sample**: SampleId, which is always 0 here because the driver rejects MSAA and per-sample shading. - **Render target index**: the Layer builtin, the same one the field extraction already uses. It reads 0 while the driver ignores vertex layer exports. - **VRS rates (bits 2-5) and eye id (bit 7)**: 0, because the driver supports neither VRS nor multiview. - **Layout**: the RDNA 3/3.5 ISA guides give prim type 1:0, VRS 3:2 and 5:4, eye id 7, sample 11:8 and render target index 28:16. The GCN register guides give the same prim type and sample fields and put the render target index at 26:16, so the two agree for layers below 2048. Nobody has checked it on gfx1013; TechnicalDebt.md says so. A device test exports the word from a draw and reads back 2, 3 and 1 for triangle, rectangle and line (RTX 5070). Could you try Returnal and Demon Slayer on this commit? If they get past the abort, the next run will show whether anything visible depends on those lanes. With `APS5_TRACE_ANCILLARY=1`, each shader that gets the word prints `[ancillary] shader 0x... whole word for <uses>`, so you can see which ones they are. The `CFG shared merge splitting exceeded budget` refusal in Returnal (`0x2023c30000`) is a separate problem and isn't covered by this; #2471 (head `a396b019`, which now carries #24 plus the guarded shared-exit repair) is the one to stack for it. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-10 23:58:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-10T23:58:20Z.


For reproducibility: the MaskedSelectEliminator change I mentioned for Record of Lodoss War (an ImageRead counts as a use that only reads where its exec is active, with a test in MaskedSelect.cpp) is on its own branch on current main: https://github.com/xXPBSXx/AnyPS5/tree/fix/agc-masked-select-image-read (the masked ctest targets pass; conventions check passes).

With it, the register 0x205 bit-16 change (#3163) and the library-skip branch from #2591, Lodoss reaches the main menu with music on Windows. I have not shown that each of the three is required on its own, and I only looked at the menu.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103530574 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103530574). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-10T23:58:20Z. --- For reproducibility: the `MaskedSelectEliminator` change I mentioned for Record of Lodoss War (an `ImageRead` counts as a use that only reads where its exec is active, with a test in `MaskedSelect.cpp`) is on its own branch on current `main`: https://github.com/xXPBSXx/AnyPS5/tree/fix/agc-masked-select-image-read (the `masked` ctest targets pass; conventions check passes). With it, the `register 0x205` bit-16 change (#3163) and the library-skip branch from #2591, Lodoss reaches the main menu with music on Windows. I have not shown that each of the three is required on its own, and I only looked at the menu. AI-assisted (Claude Code).
AlxcBTW commented 2026-10-11 00:00:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T00:00:44Z.


@xXPBSXx congratulations on getting Lodoss to the menu with music.

Your branch makes the same one-line change as 93fa6f8b in AlxcBTW/AnyPS5#30, where you're credited as co-author for the Returnal finding. Yours stands alone on current main and the finding is yours, so please open it as the PR. I'll then drop 93fa6f8b from #30 and list your PR as a dependency, so there's only one copy of the rule.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103546904 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103546904). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T00:00:44Z. --- @xXPBSXx congratulations on getting Lodoss to the menu with music. Your branch makes the same one-line change as `93fa6f8b` in AlxcBTW/AnyPS5#30, where you're credited as co-author for the Returnal finding. Yours stands alone on current `main` and the finding is yours, so please open it as the PR. I'll then drop `93fa6f8b` from #30 and list your PR as a dependency, so there's only one copy of the rule. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-11 00:15:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T00:15:25Z.


@AlxcBTW thank you. I can't open it as a PR right now: the intake workflow closes PRs from authors with fewer than 10 merged PRs, and I have one. So the branch https://github.com/xXPBSXx/AnyPS5/tree/fix/agc-masked-select-image-read (commit 6f9f48d7, one rule line plus a test) stays a branch for the time being.

If it's easier for you to keep the line in #30 until a PR is possible, that's fine with me; or a maintainer can cherry-pick 6f9f48d7 and keep me as its author. I'll raise a PR for it once that's allowed, and tell you here so you can drop your copy.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103657657 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103657657). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T00:15:25Z. --- @AlxcBTW thank you. I can't open it as a PR right now: the intake workflow closes PRs from authors with fewer than 10 merged PRs, and I have one. So the branch https://github.com/xXPBSXx/AnyPS5/tree/fix/agc-masked-select-image-read (commit `6f9f48d7`, one rule line plus a test) stays a branch for the time being. If it's easier for you to keep the line in #30 until a PR is possible, that's fine with me; or a maintainer can cherry-pick `6f9f48d7` and keep me as its author. I'll raise a PR for it once that's allowed, and tell you here so you can drop your copy. AI-assisted (Claude Code).
AlxcBTW commented 2026-10-11 00:17:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T00:17:37Z.


@xXPBSXx understood. I've kept the line in #30 and added a note to its description: your 6f9f48d7 is the original, and whoever carries #30 should take your commit, with you as author, instead of mine. Once you can open your PR, I'll drop my copy.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103674848 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103674848). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T00:17:37Z. --- @xXPBSXx understood. I've kept the line in #30 and added a note to its description: your `6f9f48d7` is the original, and whoever carries #30 should take your commit, with you as author, instead of mine. Once you can open your PR, I'll drop my copy. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-11 00:43:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T00:43:54Z.


Another title with this error: Lies of P (PPSA10261) on Windows. With a stack of my own branches (no audit gaps) it plays its splash movies for the 120 s I ran it, and 16 pixel shaders fail at registration with packed pixel ancillary input has an unsupported live use: 12 times (used by SelectU32 ? ?) and 4 times (used by SelectU32 0 ?). No other error in the log.

I did not check which of these are covered by the open ancillary work here, and did not look at the window beyond the log, so I can not say what the failed shaders do to the picture.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103873040 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103873040). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T00:43:54Z. --- Another title with this error: Lies of P (PPSA10261) on Windows. With a stack of my own branches (no audit gaps) it plays its splash movies for the 120 s I ran it, and 16 pixel shaders fail at registration with `packed pixel ancillary input has an unsupported live use`: 12 times `(used by SelectU32 ? ?)` and 4 times `(used by SelectU32 0 ?)`. No other error in the log. I did not check which of these are covered by the open ancillary work here, and did not look at the window beyond the log, so I can not say what the failed shaders do to the picture. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 00:47:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T00:47:32Z.


One more data point: Ad Infinitum (PPSA10600) on Windows, same local stack, no audit gaps. It runs for the full 100 s I allowed and writes its settings files; 27 pixel shaders fail at registration with packed pixel ancillary input has an unsupported live use (22 times used by SelectU32 ? ?, 5 times used by SelectU32 0 ?, the same two shapes as in Lies of P above). No other error line in the log. I did not look at the window.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103900377 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103900377). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T00:47:32Z. --- One more data point: Ad Infinitum (PPSA10600) on Windows, same local stack, no audit gaps. It runs for the full 100 s I allowed and writes its settings files; 27 pixel shaders fail at registration with `packed pixel ancillary input has an unsupported live use` (22 times `used by SelectU32 ? ?`, 5 times `used by SelectU32 0 ?`, the same two shapes as in Lies of P above). No other error line in the log. I did not look at the window. AI-assisted (Claude Code).
AlxcBTW commented 2026-10-11 00:48:10 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T00:48:10Z.


@xXPBSXx all 16 should be covered by AlxcBTW/AnyPS5#30. Both messages, SelectU32 ? ? and SelectU32 0 ?, are selects the masked-select pass keeps, and #30 gives any such use the whole word instead of refusing the shader.

I've merged current main into the branch, so it applies without conflicts: fix/ancillary-image-read at d7fc51c8. With APS5_TRACE_ANCILLARY=1, each of those shaders prints [ancillary] shader 0x... whole word for <uses>. If any still fails, the same switch prints the reason in a second line.

Lies of P is UE4 like Returnal and Demon Slayer. If its splash movies or the menu look wrong once those shaders compile, that tells us whether something visible depends on the word's unmodelled bits.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6103905012 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6103905012). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T00:48:10Z. --- @xXPBSXx all 16 should be covered by AlxcBTW/AnyPS5#30. Both messages, `SelectU32 ? ?` and `SelectU32 0 ?`, are selects the masked-select pass keeps, and #30 gives any such use the whole word instead of refusing the shader. I've merged current `main` into the branch, so it applies without conflicts: `fix/ancillary-image-read` at `d7fc51c8`. With `APS5_TRACE_ANCILLARY=1`, each of those shaders prints `[ancillary] shader 0x... whole word for <uses>`. If any still fails, the same switch prints the reason in a second line. Lies of P is UE4 like Returnal and Demon Slayer. If its splash movies or the menu look wrong once those shaders compile, that tells us whether something visible depends on the word's unmodelled bits. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-11 01:10:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T01:10:01Z.


@AlxcBTW I ran Lies of P (PPSA10261) on Windows with fix/ancillary-image-read at d7fc51c8 merged into current main (06da1176) plus my window-offset bit change (#3163), APS5_TRACE_ANCILLARY=1, same 120 s run as before.

Result: 0 shaders fail at registration with the ancillary error (was 16). Everything else in the log looks like the earlier run: about 2170 shaders compiled, then the splash movies open (the Bink: Mismatched number of tracks opened. lines appear in both runs). The title is still in the splash movies at 120 s, and I did not look at the window, so I can not say whether the picture is right.

One thing I did not see: no [ancillary] trace line in either the out or the err log, so I can not confirm from the log that each of the 16 went through your whole-word path rather than being avoided another way. I only know the failures are gone.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104065026 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6104065026). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T01:10:01Z. --- @AlxcBTW I ran Lies of P (PPSA10261) on Windows with `fix/ancillary-image-read` at `d7fc51c8` merged into current `main` (06da1176) plus my window-offset bit change (#3163), `APS5_TRACE_ANCILLARY=1`, same 120 s run as before. Result: 0 shaders fail at registration with the ancillary error (was 16). Everything else in the log looks like the earlier run: about 2170 shaders compiled, then the splash movies open (the `Bink: Mismatched number of tracks opened.` lines appear in both runs). The title is still in the splash movies at 120 s, and I did not look at the window, so I can not say whether the picture is right. One thing I did not see: no `[ancillary]` trace line in either the out or the err log, so I can not confirm from the log that each of the 16 went through your whole-word path rather than being avoided another way. I only know the failures are gone. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 01:11:35 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T01:11:35Z.


Same setup (d7fc51c8 merged into main 06da1176, plus #3163) with Ad Infinitum (PPSA10600): 0 ancillary failures (was 27). The title now goes further and stops on the other known error, compute shader 0x200ac30000: AGC graphics: storage image access to depth/stencil surface 0x20c41f0000 is not implemented (the one tracked in #1409). Nothing else in the log.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104076052 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6104076052). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T01:11:35Z. --- Same setup (`d7fc51c8` merged into `main` 06da1176, plus #3163) with Ad Infinitum (PPSA10600): 0 ancillary failures (was 27). The title now goes further and stops on the other known error, `compute shader 0x200ac30000: AGC graphics: storage image access to depth/stencil surface 0x20c41f0000 is not implemented` (the one tracked in #1409). Nothing else in the log. AI-assisted (Claude Code).
AlxcBTW commented 2026-10-11 01:12:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T01:12:50Z.


@xXPBSXx thanks, that's a clear result for both titles. No trace lines at all is expected in your case. It means the masked-select walk dropped every one of those selects, so the whole-word path never ran:

  • The trace prints whole word for ... only when a use reaches the whole-word composition, and select #N kept, <reason> only for a select the walk keeps.
  • A select the walk proves dead prints nothing, and its remaining reads are extracts that main already lowers.
  • In #30 that walk includes the former #25 commits (exec phis and kill chains, loops, the larger walk limit) plus the ImageRead and image-op rules. So for Lies of P and Ad Infinitum, those rules fixed it, not the whole word, and the unmodelled bits of the word aren't involved.

Silence is ambiguous, though, so I'll add a trace line for dropped selects as well.

For Ad Infinitum's next stop: storage image access to a depth/stencil surface is what #425 (depth surfaces read as textures and storage images) and #2076 (storage images over a depth surface's stencil plane, on top of #425) implement. My Sword of the Sea stack runs both, and that error doesn't come up there any more.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104084747 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6104084747). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T01:12:50Z. --- @xXPBSXx thanks, that's a clear result for both titles. No trace lines at all is expected in your case. It means the masked-select walk dropped every one of those selects, so the whole-word path never ran: - The trace prints `whole word for ...` only when a use reaches the whole-word composition, and `select #N kept, <reason>` only for a select the walk keeps. - A select the walk proves dead prints nothing, and its remaining reads are extracts that `main` already lowers. - In #30 that walk includes the former #25 commits (exec phis and kill chains, loops, the larger walk limit) plus the `ImageRead` and image-op rules. So for Lies of P and Ad Infinitum, those rules fixed it, not the whole word, and the unmodelled bits of the word aren't involved. Silence is ambiguous, though, so I'll add a trace line for dropped selects as well. For Ad Infinitum's next stop: storage image access to a depth/stencil surface is what #425 (depth surfaces read as textures and storage images) and #2076 (storage images over a depth surface's stencil plane, on top of #425) implement. My Sword of the Sea stack runs both, and that error doesn't come up there any more. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-11 01:53:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T01:53:16Z.


Two more titles with the same setup as above (d7fc51c8 merged into main 06da1176, plus #3163), both Unreal Engine, both no audit gaps:

  • PPSA02100: 15 pixel shaders failed at registration with the ancillary error (12 × used by SelectU32 ? ?, 3 × SelectU32 0 ?); with the branch 0 fail, and the title ran the 90 s I allowed with no error line.
  • Kena (PPSA01746): 4 shaders failed (all the same ancillary error); with the branch 0 fail. The title still faults in a different place that does not depend on this (write of 0x0 at app.exe+0x1c7a46b, same address before and after); I will look at that separately.

So with d7fc51c8 I have now run four titles (Lies of P, Ad Infinitum, PPSA02100, Kena), and none leaves an ancillary failure behind. The earlier Returnal, Demon Slayer and Lodoss results were with earlier states of the branch, not with this one. I did not compare the picture.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104370395 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6104370395). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T01:53:16Z. --- Two more titles with the same setup as above (`d7fc51c8` merged into `main` 06da1176, plus #3163), both Unreal Engine, both no audit gaps: - PPSA02100: 15 pixel shaders failed at registration with the ancillary error (12 × `used by SelectU32 ? ?`, 3 × `SelectU32 0 ?`); with the branch 0 fail, and the title ran the 90 s I allowed with no error line. - Kena (PPSA01746): 4 shaders failed (all the same ancillary error); with the branch 0 fail. The title still faults in a different place that does not depend on this (`write of 0x0` at `app.exe+0x1c7a46b`, same address before and after); I will look at that separately. So with `d7fc51c8` I have now run four titles (Lies of P, Ad Infinitum, PPSA02100, Kena), and none leaves an ancillary failure behind. The earlier Returnal, Demon Slayer and Lodoss results were with earlier states of the branch, not with this one. I did not compare the picture. AI-assisted (Claude Code).
fma-rc commented 2026-10-11 03:09:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-11T03:09:11Z.


Linux and NVIDIA runs of fix/ancillary-image-read at 01a766d4 merged onto main 961b25fe (RTX 5080, driver 615.78, GCC 16.2.1), one 90 s run each with and without the branch, including LEGO Horizon Adventures, which I don't see reported here yet. Counts are log lines with the ancillary error.

Title main with the branch
LEGO Horizon Adventures (PPSA14632) 1, aborts on it at 34 s 0, still running at 90 s
Stray (PPSA02100) 31 (26 SelectU32 ? ?, 5 SelectU32 0 ?), aborts on it at 60 s 0, still running at 90 s
Kena (PPSA01746) 30 (25 and 5 of the same two), SIGSEGV at 35 s 0, SIGSEGV at 43 s

No other error line appears in the three branch logs. I have not looked at what the titles show on screen.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6104893353 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6104893353). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-11T03:09:11Z. --- Linux and NVIDIA runs of `fix/ancillary-image-read` at 01a766d4 merged onto `main` 961b25fe (RTX 5080, driver 615.78, GCC 16.2.1), one 90 s run each with and without the branch, including LEGO Horizon Adventures, which I don't see reported here yet. Counts are log lines with the ancillary error. | Title | `main` | with the branch | |---|---|---| | LEGO Horizon Adventures (PPSA14632) | 1, aborts on it at 34 s | 0, still running at 90 s | | Stray (PPSA02100) | 31 (26 `SelectU32 ? ?`, 5 `SelectU32 0 ?`), aborts on it at 60 s | 0, still running at 90 s | | Kena (PPSA01746) | 30 (25 and 5 of the same two), SIGSEGV at 35 s | 0, SIGSEGV at 43 s | No other error line appears in the three branch logs. I have not looked at what the titles show on screen.
AlxcBTW commented 2026-10-11 03:41:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T03:41:54Z.


@oneandonlydean thanks to the testing in this thread, the pixel ancillary work is ready to carry. I can't open it upstream myself because the intake rule closes PRs from authors with fewer than 10 merged, so: would you carry it?

Branch: carry/pixel-ancillary (AlxcBTW/AnyPS5#37), 8 commits on current main with no merges, PR text ready in the description:

  • the masked-lane walk follows exec phis, long kill chains and loops, with a walk limit that scales with the program (formerly AlxcBTW/AnyPS5#25);
  • xXPBSXx's 6f9f48d7, kept with them as author: an image read is a use that only reads where its exec is active;
  • image writes, explicit-LOD gathers and size queries pass the walk;
  • any use the walk keeps gets the whole word: prim type, plus sample and layer from SampleId/Layer, with the other bits zero, as in my earlier comment here;
  • APS5_TRACE_ANCILLARY=1 names each select dropped or kept, with its reason, and prints one summary per shader.

Titles, measured on AlxcBTW/AnyPS5#30, which is the same code:

Title Tester Ancillary failures, main → branch After
Lies of P (PPSA10261) xXPBSXx, Windows 16 → 0 splash movies
Ad Infinitum (PPSA10600) xXPBSXx, Windows 27 → 0 next stop #1409
Stray (PPSA02100) xXPBSXx, Windows; fma-rc, Linux RTX 5080 15 → 0; 31 → 0 runs 90 s without errors
Kena (PPSA01746) xXPBSXx; fma-rc 4 → 0; 30 → 0 unrelated SIGSEGV
LEGO Horizon Adventures (PPSA14632) fma-rc, Linux 1 → 0 (aborted at 34 s) runs 90 s
Minecraft Dungeons II (PPSA16064) MisterbALLIN, Windows RTX 4060 2 shaders → whole word next stop: D16 cube read (#425)

CI on the carry branch: run 38108161129. Windows passes 763/763. Linux fails only agc_unit_shadow, which main also fails (#1429, fixed by your #3226).

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105115279 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6105115279). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T03:41:54Z. --- @oneandonlydean thanks to the testing in this thread, the pixel ancillary work is ready to carry. I can't open it upstream myself because the intake rule closes PRs from authors with fewer than 10 merged, so: would you carry it? **Branch:** [`carry/pixel-ancillary`](https://github.com/AlxcBTW/AnyPS5/tree/carry/pixel-ancillary) (AlxcBTW/AnyPS5#37), 8 commits on current `main` with no merges, PR text ready in the description: - the masked-lane walk follows exec phis, long kill chains and loops, with a walk limit that scales with the program (formerly AlxcBTW/AnyPS5#25); - xXPBSXx's `6f9f48d7`, kept with them as author: an image read is a use that only reads where its exec is active; - image writes, explicit-LOD gathers and size queries pass the walk; - any use the walk keeps gets the whole word: prim type, plus sample and layer from SampleId/Layer, with the other bits zero, as in my earlier comment here; - `APS5_TRACE_ANCILLARY=1` names each select dropped or kept, with its reason, and prints one summary per shader. **Titles**, measured on AlxcBTW/AnyPS5#30, which is the same code: | Title | Tester | Ancillary failures, `main` → branch | After | |---|---|---|---| | Lies of P (PPSA10261) | xXPBSXx, Windows | 16 → 0 | splash movies | | Ad Infinitum (PPSA10600) | xXPBSXx, Windows | 27 → 0 | next stop #1409 | | Stray (PPSA02100) | xXPBSXx, Windows; fma-rc, Linux RTX 5080 | 15 → 0; 31 → 0 | runs 90 s without errors | | Kena (PPSA01746) | xXPBSXx; fma-rc | 4 → 0; 30 → 0 | unrelated SIGSEGV | | LEGO Horizon Adventures (PPSA14632) | fma-rc, Linux | 1 → 0 (aborted at 34 s) | runs 90 s | | Minecraft Dungeons II (PPSA16064) | MisterbALLIN, Windows RTX 4060 | 2 shaders → whole word | next stop: D16 cube read (#425) | **CI on the carry branch:** [run 38108161129](https://github.com/AlxcBTW/AnyPS5/actions/runs/38108161129). Windows passes 763/763. Linux fails only `agc_unit_shadow`, which `main` also fails (#1429, fixed by your #3226). AI-assisted: yes (Claude Code)
oneandonlydean commented 2026-10-11 05:06:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T05:06:30Z.


Carried the first five commits (the masked-lane proofs, xXPBSXx's commit kept as theirs) as #3279.

The other three stay out for now: APS5_TRACE_ANCILLARY is an environment switch, which isn't accepted here, and the whole-word commit adds a draw-state constant to the shader keys, which needs the owner's OK. The word's bit layout comes from the RDNA 3 guides; a measurement on gfx1013 would help that part.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105687918 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6105687918). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-11T05:06:30Z. --- Carried the first five commits (the masked-lane proofs, xXPBSXx's commit kept as theirs) as #3279. The other three stay out for now: `APS5_TRACE_ANCILLARY` is an environment switch, which isn't accepted here, and the whole-word commit adds a draw-state constant to the shader keys, which needs the owner's OK. The word's bit layout comes from the RDNA 3 guides; a measurement on gfx1013 would help that part.
Rohan03x commented 2026-10-11 05:26:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Rohan03x on 2026-10-11T05:26:31Z.


Another title, and a data point for the whole-word commit: Palworld (PPSA23126 v01.102.999, Unreal Engine 5), Windows 11 22621, RTX 3070, GCC 15.2.0 UCRT Release.

On main 06da1176 (plus local changes outside the recompiler that the title needs to reach rendering) it presents about 430 frames and then aborts on one pixel shader, 0x1b40e5c000 (3,708 words): packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?).

Offline replay of the dumped request with agc_shader_replay:

Tree Result
main 06da1176 same error
+ LeandroSSB 0467f908 (#2881 NaN select) same error
+ #3279's five commits (cherry-picked) same error
+ AlxcBTW fix/ancillary-image-read at 01a766d4 OK, 293,269 SPIR-V words

It is the VGPR-reuse shape (v_bfe_u32 v4, v2, 16, 11 first, v2 overwritten at 0x20). The masked-lane proofs cannot drop its select; the trace on AlxcBTW's branch says:

[ancillary] shader 0x1b40e5c000 select #149 kept, cross-lane: #86018 ReadFirstLane reads other lanes; reached through #85730 SelectU32 (inactive arm, mask #85225 LogicalAnd(#85194 LogicalAnd, #85223 FPOrdGreaterThanEqual32)); mask #61 IEqual32 = not a helper lane
[ancillary] shader 0x1b40e5c000 summary: 0 selects dropped, 1 kept, whole word composed

So for this title the whole-word commit is what compiles the shader. The 12 compute requests dumped in the same run compile on all four trees; three of them come out smaller on AlxcBTW's branch.

In game with AlxcBTW's branch: the abort is gone, the title issues about 457 draws in ten seconds, and then stops at AGC graphics: color views of several array slices are unsupported (#2102). I have no evidence either way on whether the composed word renders correctly.

ctest on that branch here: 764 tests, one failure (guest_filesystem, which also fails on unmodified main on this machine). AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105822001 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6105822001). Originally posted by [Rohan03x](https://github.com/Rohan03x) on 2026-10-11T05:26:31Z. --- Another title, and a data point for the whole-word commit: Palworld (PPSA23126 v01.102.999, Unreal Engine 5), Windows 11 22621, RTX 3070, GCC 15.2.0 UCRT Release. On main 06da1176 (plus local changes outside the recompiler that the title needs to reach rendering) it presents about 430 frames and then aborts on one pixel shader, `0x1b40e5c000` (3,708 words): `packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)`. Offline replay of the dumped request with `agc_shader_replay`: | Tree | Result | |---|---| | main 06da1176 | same error | | + LeandroSSB `0467f908` (#2881 NaN select) | same error | | + #3279's five commits (cherry-picked) | same error | | + AlxcBTW `fix/ancillary-image-read` at `01a766d4` | OK, 293,269 SPIR-V words | It is the VGPR-reuse shape (`v_bfe_u32 v4, v2, 16, 11` first, v2 overwritten at 0x20). The masked-lane proofs cannot drop its select; the trace on AlxcBTW's branch says: ``` [ancillary] shader 0x1b40e5c000 select #149 kept, cross-lane: #86018 ReadFirstLane reads other lanes; reached through #85730 SelectU32 (inactive arm, mask #85225 LogicalAnd(#85194 LogicalAnd, #85223 FPOrdGreaterThanEqual32)); mask #61 IEqual32 = not a helper lane [ancillary] shader 0x1b40e5c000 summary: 0 selects dropped, 1 kept, whole word composed ``` So for this title the whole-word commit is what compiles the shader. The 12 compute requests dumped in the same run compile on all four trees; three of them come out smaller on AlxcBTW's branch. In game with AlxcBTW's branch: the abort is gone, the title issues about 457 draws in ten seconds, and then stops at `AGC graphics: color views of several array slices are unsupported` (#2102). I have no evidence either way on whether the composed word renders correctly. ctest on that branch here: 764 tests, one failure (`guest_filesystem`, which also fails on unmodified main on this machine). AI-assisted: yes.
AlxcBTW commented 2026-10-11 05:29:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T05:29:32Z.


@Rohan03x thanks, that's exactly the data point that was missing. You checked offline that main, #2881 and #3279 all still refuse it, and that only the whole-word commit compiles it.

Following Dean's notes above, I'm reworking the whole-word part as a follow-up on top of #3279. It will have no environment switch. The primitive class will be read at run time from per-draw data, so the shader keys and the request format stay as they are. Palworld's 0x1b40e5c000 goes into its tests if the request can be shared; a replayable request file attached here would be enough. The open question is still the bit layout on gfx1013, and a hardware measurement is what would settle it.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105841840 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6105841840). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T05:29:32Z. --- @Rohan03x thanks, that's exactly the data point that was missing. You checked offline that main, #2881 and #3279 all still refuse it, and that only the whole-word commit compiles it. Following Dean's notes above, I'm reworking the whole-word part as a follow-up on top of #3279. It will have no environment switch. The primitive class will be read at run time from per-draw data, so the shader keys and the request format stay as they are. Palworld's `0x1b40e5c000` goes into its tests if the request can be shared; a replayable request file attached here would be enough. The open question is still the bit layout on gfx1013, and a hardware measurement is what would settle it. AI-assisted: yes (Claude Code)
AlxcBTW commented 2026-10-11 06:06:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T06:06:38Z.


A correction to what I wrote above about the whole-word follow-up. I said the primitive class would be read at run time, with the shader keys and the request format unchanged. That doesn't work cleanly. Nothing the fragment shader receives carries the class today, and rect lists are drawn as tessellated triangles, so no builtin can tell a rectangle from a triangle. A run-time value would mean an extra dword in the pixel shader's push-data block, patched per draw. That changes the push-data layout and adds a load per pixel wave, and I didn't want to trade that for the key change.

So the follow-up, AlxcBTW/AnyPS5#39 (one commit on #3279's head), keeps a specialization constant, the way #1492 does for dual-source blend:

  • The module key includes the class only for shaders that read it. A shader that reads only the sample or layer field keeps one module for every class.
  • The request format goes from 15 to 16, and the disk cache format from 24 to 25.
  • No environment switch.
  • The description has a design note for the owner, including a third option: pass the constant when the pipeline is created, whose key already holds topology and rect state.

CI on it: Windows 766/766. Linux 761/762, failing only agc_unit_shadow, which #3226 fixes.

@oneandonlydean, for the gfx1013 measurement: tools/hw-oracle only runs compute kernels, and the ancillary VGPR exists only in pixel waves. One route that works with existing software is AMDVLK's pipeline ISA replacement on an RDNA 1 or 2 card. The pixel shader's extract of the sample bits gets patched into a plain move of the raw word, which is then read back per topology and layer. I'll post the exact steps as a help-wanted comment if that would be useful. A rect list can't be drawn through Vulkan, so rectangle = 3 can only be confirmed on a PS5 itself.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6106093689 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6106093689). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T06:06:38Z. --- A correction to what I wrote above about the whole-word follow-up. I said the primitive class would be read at run time, with the shader keys and the request format unchanged. That doesn't work cleanly. Nothing the fragment shader receives carries the class today, and rect lists are drawn as tessellated triangles, so no builtin can tell a rectangle from a triangle. A run-time value would mean an extra dword in the pixel shader's push-data block, patched per draw. That changes the push-data layout and adds a load per pixel wave, and I didn't want to trade that for the key change. So the follow-up, AlxcBTW/AnyPS5#39 (one commit on #3279's head), keeps a specialization constant, the way #1492 does for dual-source blend: - The module key includes the class only for shaders that read it. A shader that reads only the sample or layer field keeps one module for every class. - The request format goes from 15 to 16, and the disk cache format from 24 to 25. - No environment switch. - The description has a design note for the owner, including a third option: pass the constant when the pipeline is created, whose key already holds topology and rect state. CI on it: Windows 766/766. Linux 761/762, failing only `agc_unit_shadow`, which #3226 fixes. @oneandonlydean, for the gfx1013 measurement: `tools/hw-oracle` only runs compute kernels, and the ancillary VGPR exists only in pixel waves. One route that works with existing software is AMDVLK's pipeline ISA replacement on an RDNA 1 or 2 card. The pixel shader's extract of the sample bits gets patched into a plain move of the raw word, which is then read back per topology and layer. I'll post the exact steps as a help-wanted comment if that would be useful. A rect list can't be drawn through Vulkan, so rectangle = 3 can only be confirmed on a PS5 itself. AI-assisted: yes (Claude Code)
Tamalero commented 2026-10-11 10:09:57 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-11T10:09:57Z.


High on Life (PPSA15388 v01.120.000, Unreal Engine 4) is another title with this error. 30 pixel shaders fail at registration with packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?), and the first one drawn, right after a level finishes loading, aborts the run.

#3279's five commits plus @AlxcBTW's AlxcBTW/AnyPS5#39 fix that: all 30 now compile, with no ancillary errors in 8 runs. But the run then stops at the same moment in a new way. In 6 of 8 runs the GPU hangs (NVIDIA Xid 109 CTX SWITCH TIMEOUT, then VK_ERROR_DEVICE_LOST). The other 2 abort with runtime image descriptor is invalid (details below). I couldn't pin the hang to a shader, but it doesn't look like it's in the 30 shaders themselves:

  • With every draw that uses one of the 30 skipped, it still hangs, and none of them was drawn before the hang.
  • With APS5_LOOP_GUARD=4096, no loop guard trips. I also gave every shader a fault buffer locally, so a trip would be reported.
  • Without the six commits, with the same skip, the run gets past that moment without a hang and aborts on the first ancillary draw as before (1 run).

So my guess is that the new masked-lane proofs change some other shader in this title. I haven't bisected between #3279 and #39. That needs more runs than I could do today.

Details and logs

Setup: CachyOS (Linux 7.2), RTX 4090 (NVIDIA 615.78, 32-lane subgroups), GCC, Release. main f5c0fe00 plus my local integration patches and ports of #423/#1077, #425, #454, #2904, #3202 and AlxcBTW/AnyPS5#33. #3279's five commits and #39 cherry-pick onto that. The only conflict is #39's request serializer version, because my #1077 port already uses version 16.

The hang:

[gpu] recorded batch still running on the GPU after 5 s
[videoout] presentation failed: AGC graphics: vkWaitForFences recorder: Vulkan result -4
NVRM: Xid (PCI:0000:01:00): 109, ... name=app.elf, channel 0x00000034, errorString CTX SWITCH TIMEOUT
Build Runs reaching the level Result
without #3279/#39 1 abort on the first ancillary draw (SelectU32 ? ?)
with #3279 + #39 8 6 GPU hangs, 2 runtime image descriptor is invalid
with, all 30 skipped 1 GPU hang, 0 skipped draws before it
with, APS5_LOOP_GUARD=4096 2 1 hang (no guard trip), 1 descriptor abort
without, all 30 skipped 1 no hang; abort on the first ancillary draw (it is prepared before my skip runs)

The 30 shaders all start with the VGPR-reuse shape (v_bfe_u32 v1, v4, 16, 11, layer index from the ancillary word), and 15 of them contain a backward branch.

The descriptor abort, from a local diagnostic that prints the words:

runtime image descriptor is invalid (image 1 of 3, r128=0, type=0, T#=00000092 00fff000 0a500000 00000000 6b5baebc 00100020 00000001 0004dfac)

The first four words decode as a sampler (clamp 2/2/2, max LOD 0xfff, filter bits), not an image, so the shader read an S# where it expected a T#. It is thrown from processFlip, so I don't know which shader read it.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107926743 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6107926743). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-11T10:09:57Z. --- High on Life (PPSA15388 v01.120.000, Unreal Engine 4) is another title with this error. 30 pixel shaders fail at registration with `packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)`, and the first one drawn, right after a level finishes loading, aborts the run. #3279's five commits plus @AlxcBTW's AlxcBTW/AnyPS5#39 fix that: all 30 now compile, with no ancillary errors in 8 runs. But the run then stops at the same moment in a new way. In 6 of 8 runs the GPU hangs (NVIDIA `Xid 109 CTX SWITCH TIMEOUT`, then `VK_ERROR_DEVICE_LOST`). The other 2 abort with `runtime image descriptor is invalid` (details below). I couldn't pin the hang to a shader, but it doesn't look like it's in the 30 shaders themselves: - With every draw that uses one of the 30 skipped, it still hangs, and none of them was drawn before the hang. - With `APS5_LOOP_GUARD=4096`, no loop guard trips. I also gave every shader a fault buffer locally, so a trip would be reported. - Without the six commits, with the same skip, the run gets past that moment without a hang and aborts on the first ancillary draw as before (1 run). So my guess is that the new masked-lane proofs change some other shader in this title. I haven't bisected between #3279 and #39. That needs more runs than I could do today. <details><summary>Details and logs</summary> **Setup:** CachyOS (Linux 7.2), RTX 4090 (NVIDIA 615.78, 32-lane subgroups), GCC, Release. `main` `f5c0fe00` plus my local integration patches and ports of #423/#1077, #425, #454, #2904, #3202 and AlxcBTW/AnyPS5#33. #3279's five commits and #39 cherry-pick onto that. The only conflict is #39's request serializer version, because my #1077 port already uses version 16. **The hang:** ``` [gpu] recorded batch still running on the GPU after 5 s [videoout] presentation failed: AGC graphics: vkWaitForFences recorder: Vulkan result -4 NVRM: Xid (PCI:0000:01:00): 109, ... name=app.elf, channel 0x00000034, errorString CTX SWITCH TIMEOUT ``` | Build | Runs reaching the level | Result | |---|---|---| | without #3279/#39 | 1 | abort on the first ancillary draw (`SelectU32 ? ?`) | | with #3279 + #39 | 8 | 6 GPU hangs, 2 `runtime image descriptor is invalid` | | with, all 30 skipped | 1 | GPU hang, 0 skipped draws before it | | with, `APS5_LOOP_GUARD=4096` | 2 | 1 hang (no guard trip), 1 descriptor abort | | without, all 30 skipped | 1 | no hang; abort on the first ancillary draw (it is prepared before my skip runs) | The 30 shaders all start with the VGPR-reuse shape (`v_bfe_u32 v1, v4, 16, 11`, layer index from the ancillary word), and 15 of them contain a backward branch. **The descriptor abort**, from a local diagnostic that prints the words: ``` runtime image descriptor is invalid (image 1 of 3, r128=0, type=0, T#=00000092 00fff000 0a500000 00000000 6b5baebc 00100020 00000001 0004dfac) ``` The first four words decode as a sampler (clamp 2/2/2, max LOD 0xfff, filter bits), not an image, so the shader read an S# where it expected a T#. It is thrown from `processFlip`, so I don't know which shader read it. </details> *Tested and written by Claude (AI assistant) on a contributor's machine.*
AlxcBTW commented 2026-10-11 10:12:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T10:12:58Z.


@Tamalero thanks, that's a careful report. The masked-lane proofs in #3279 come from my branch, so I'm treating the hang as mine until it's ruled out.

I'm reviewing the loop and exec-phi proofs (98f99d388, c2a48416b) for a case where a lane is masked inside a loop but reads the value after exec is restored. That would leave a stale value in the lanes that come back. Your descriptor abort fits that: an S# read where a T# was expected. A stale loop count in a later loop could also hang the GPU without tripping the guard on the shader you skipped.

One run would split it: current main (it has #3279) without #39, with the 30 ancillary shaders skipped. If that hangs, it's #3279; if it doesn't, it's #39. I'll post what I find.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6107949482 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6107949482). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T10:12:58Z. --- @Tamalero thanks, that's a careful report. The masked-lane proofs in #3279 come from my branch, so I'm treating the hang as mine until it's ruled out. I'm reviewing the loop and exec-phi proofs (98f99d388, c2a48416b) for a case where a lane is masked inside a loop but reads the value after exec is restored. That would leave a stale value in the lanes that come back. Your descriptor abort fits that: an S# read where a T# was expected. A stale loop count in a later loop could also hang the GPU without tripping the guard on the shader you skipped. One run would split it: current `main` (it has #3279) without #39, with the 30 ancillary shaders skipped. If that hangs, it's #3279; if it doesn't, it's #39. I'll post what I find. AI-assisted: yes (Claude Code)
AlxcBTW commented 2026-10-11 11:10:04 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T11:10:04Z.


@Tamalero one correction to what I suggested above. In your "without, all 30 skipped" run, the abort comes while the first ancillary draw is prepared, before your skip runs. So that run never got past the moment where the others hang, and it can't tell us whether the six commits cause the hang. The run I asked for (main without #39) would stop the same way.

A split that works: skip the 30 before they are prepared (for example by program hash at registration), then compare main from before #3279 with main + #39. If both hang, the hang is in something that only runs after that moment, not in the proofs. If only the second hangs, it's ours. I'm auditing the proofs in the meantime either way.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6108397324 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6108397324). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T11:10:04Z. --- @Tamalero one correction to what I suggested above. In your "without, all 30 skipped" run, the abort comes while the first ancillary draw is prepared, before your skip runs. So that run never got past the moment where the others hang, and it can't tell us whether the six commits cause the hang. The run I asked for (`main` without #39) would stop the same way. A split that works: skip the 30 before they are prepared (for example by program hash at registration), then compare `main` from before #3279 with `main` + #39. If both hang, the hang is in something that only runs after that moment, not in the proofs. If only the second hangs, it's ours. I'm auditing the proofs in the meantime either way. AI-assisted: yes (Claude Code)
AlxcBTW commented 2026-10-11 12:29:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T12:29:33Z.


@Tamalero I checked the masked-lane proofs from #3279 (with AlxcBTW/AnyPS5#39) for a case where a lane that is masked at a write later reads the value, and found none.

  • Unit tests: 15 new MaskedSelect cases give the expected result. They cover exec restored after a loop, nested latches, kill chains past the depth limit, readlane/writelane, wave64 halves and walk-limit exhaustion.
  • Fuzzer: a differential fuzzer ran 600,000 random wave32/64 programs before and after the pass and found no change in any store, cross-lane read, ballot or branch. It catches each of 8 deliberately broken versions of the pass.
  • Corpus: on 482 Sword of the Sea requests the merge changes the SPIR-V of 166 of 450 programs. The removals I read by hand are correct: loop bounds gated by the loop's exec, and image-write data under the write's own exec.

To check High on Life directly, the branch AlxcBTW/AnyPS5 diag/masked-lanes-ab (on main 2ac9f1b31, diagnostic only) adds two switches. Both need ANYPS5_NO_SHADER_CACHE=1:

  • APS5_MASKED_LANES_TRACE=1 lists the programs where the new proofs remove selects that the old rules kept.
  • APS5_MASKED_LANES_LEGACY=<addresses>|all[,!address] runs the old rules for those programs. On that corpus, all matches c757e8eaa bit for bit.

If the trace shows only your 30 ancillary shaders, the proofs don't touch anything else in this title, and the hang is elsewhere. If other programs show up, LEGACY=all,!<the 30> tells whether they are the cause.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109030019 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6109030019). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T12:29:33Z. --- @Tamalero I checked the masked-lane proofs from #3279 (with AlxcBTW/AnyPS5#39) for a case where a lane that is masked at a write later reads the value, and found none. - **Unit tests:** 15 new `MaskedSelect` cases give the expected result. They cover exec restored after a loop, nested latches, kill chains past the depth limit, readlane/writelane, wave64 halves and walk-limit exhaustion. - **Fuzzer:** a differential fuzzer ran 600,000 random wave32/64 programs before and after the pass and found no change in any store, cross-lane read, ballot or branch. It catches each of 8 deliberately broken versions of the pass. - **Corpus:** on 482 Sword of the Sea requests the merge changes the SPIR-V of 166 of 450 programs. The removals I read by hand are correct: loop bounds gated by the loop's exec, and image-write data under the write's own exec. To check High on Life directly, the branch [AlxcBTW/AnyPS5 `diag/masked-lanes-ab`](https://github.com/AlxcBTW/AnyPS5/tree/diag/masked-lanes-ab) (on `main` 2ac9f1b31, diagnostic only) adds two switches. Both need `ANYPS5_NO_SHADER_CACHE=1`: - `APS5_MASKED_LANES_TRACE=1` lists the programs where the new proofs remove selects that the old rules kept. - `APS5_MASKED_LANES_LEGACY=<addresses>|all[,!address]` runs the old rules for those programs. On that corpus, `all` matches c757e8eaa bit for bit. If the trace shows only your 30 ancillary shaders, the proofs don't touch anything else in this title, and the hang is elsewhere. If other programs show up, `LEGACY=all,!<the 30>` tells whether they are the cause. AI-assisted: yes (Claude Code)
queeeef commented 2026-10-11 17:21:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by queeeef on 2026-10-11T17:21:48Z.


Palworld (PPSA23126, 01.102.999, Unreal Engine) hits this on current main a11c8f7f7 (which has #3279), fatally:

terminate called after throwing an instance of 'std::runtime_error'
  what():  ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)

One pixel shader, 0x1b40e70000: 3708 code words, 8 user data, 2 memory regions, wave64. It is the only refusal among the requests dumped with APS5_DUMP_SHADERS=1 up to that point.

agc_shader_replay of that request:

  • main a11c8f7f7: the error above;
  • main + #3739 (which contains #3391's commit): recompiled: 236192 SPIR-V words.

In the title, #3739 gets past it and the next stop is the color-view refusal of #2102. I did not try #3391 alone. Full list of Palworld stops in #2648.

Windows 11 Pro 26300, RTX 2080 Ti (subgroup 32), MinGW-w64 GCC 15.2.0 (WinLibs r7), RelWithDebInfo. AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6111647433 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6111647433). Originally posted by [queeeef](https://github.com/queeeef) on 2026-10-11T17:21:48Z. --- Palworld (PPSA23126, 01.102.999, Unreal Engine) hits this on current `main` `a11c8f7f7` (which has #3279), fatally: ``` terminate called after throwing an instance of 'std::runtime_error' what(): ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) ``` One pixel shader, `0x1b40e70000`: 3708 code words, 8 user data, 2 memory regions, wave64. It is the only refusal among the requests dumped with `APS5_DUMP_SHADERS=1` up to that point. `agc_shader_replay` of that request: - `main` `a11c8f7f7`: the error above; - `main` + #3739 (which contains #3391's commit): `recompiled: 236192 SPIR-V words`. In the title, #3739 gets past it and the next stop is the color-view refusal of #2102. I did not try #3391 alone. Full list of Palworld stops in #2648. Windows 11 Pro 26300, RTX 2080 Ti (subgroup 32), MinGW-w64 GCC 15.2.0 (WinLibs r7), RelWithDebInfo. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-11 18:37:01 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-11T18:37:01Z.


Lies of P (PPSA10261) on current main a11c8f7f7, Windows 10, RTX 4080 SUPER, relinked from the decrypted eboot.bin.esbak (7 modules, 0 absent imports), one 150 s run: no abort and no packed pixel ancillary failure. The log has 3 could not be prepared at registration (its program address is not in the shader registers); preparing it when it is used lines and then only disk-cache lines; at the end the shader disk cache reports 1810 hits, 271 misses and 270 writes, so shaders are being prepared while it runs. I only read the log: I did not check the picture, the frame rate or whether it goes past its first screen.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112335238 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6112335238). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-11T18:37:01Z. --- Lies of P (PPSA10261) on current `main` a11c8f7f7, Windows 10, RTX 4080 SUPER, relinked from the decrypted `eboot.bin.esbak` (7 modules, 0 absent imports), one 150 s run: no abort and no `packed pixel ancillary` failure. The log has 3 `could not be prepared at registration (its program address is not in the shader registers); preparing it when it is used` lines and then only disk-cache lines; at the end the shader disk cache reports 1810 hits, 271 misses and 270 writes, so shaders are being prepared while it runs. I only read the log: I did not check the picture, the frame rate or whether it goes past its first screen. AI-assisted (Claude Code).
ThatsLeo commented 2026-10-11 18:42:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by ThatsLeo on 2026-10-11T18:42:56Z.


One more shape behind this error, still failing on main 8ec0e131 after #3279. It is Stray's pixel shader 0x2012f90000 (PPSA02101 v01.002), and the error is:

shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?)

It fails with any masked-lane budget, and also with #3550's budget lifted. The title reaches it a while after its first screen, intermittently, and the render thread stops there. My replay in #2881 covered the 41 requests I had then, and this shader was not among them.

The shape

The shader starts with s_wqm and overwrites the ancillary VGPR under the resulting EXEC:

%41 = CompositeConstructU64 (Ballot(HelperInvocation == 0) & Ballot(true)).x, .y   ; starting lanes, entry blocks
%42 = WqmU64 %41
%51 = lane's own bit of %42                                                        ; INotEqual(And(Shr(Select(lane < 32, lo, hi), lane & 31), 1), 0)
%64 = SelectU32 %51, %63, %25                                                      ; %25 = GetBuiltin PackedAncillary

%51 gates 357 selects. The word survives only where a lane's bit of s_wqm(starting lanes) is clear: lanes whose whole quad has no non-helper lane. Vulkan never starts such a quad, since helper invocations exist only beside a covered one. So %51 is true in every invocation the host runs, and the masked-lane walk can't prove it, because it reasons about lanes that do run.

Fix: ThatsLeo/AnyPS5:fix/shader-live-quad-lane-bit (one commit, 2068089b, on main 8ec0e131).

  • ConstantFolder folds a pixel shader lane's own bit of WqmU64 to true when its operand holds every starting lane. The operand counts as holding them when it is built from ballots of true or HelperInvocation == 0, combined with & or |. Each ballot must be taken in a block that every starting lane runs: the entry, then blocks with one successor, each reached only from the one before.
  • The 357 selects then fold away, and the ancillary lowering sees no reader.
  • Not folded:
    • a ballot after a branch;
    • a ballot of any other condition;
    • stages other than pixel.

Tested

  • pixel_ancillary: the folded case, plus the three cases above that must stay unfolded.
    • Without the fold, the folded case fails.
    • Without the block condition, the after-branch case fails.
  • Full suite on Intel Arc (Meteor Lake, Mesa 26.2.3 ANV) and lavapipe: the same failures as main (agc_driver_emulated_color_compare and agc_driver_vop1_float_unary on Arc; agc_driver_emulated_color_compare and agc_driver_image_plane_address_on_line_implicit_lod on lavapipe).
  • Stray's dumped requests: 0x2012f90000 compiles, and its SPIR-V passes spirv-val.
    • 35 of the 41 others give the same SPIR-V as main.
    • The 6 that change use s_wqm, and they pass spirv-val.
    • The two slow shaders of #3504 are unchanged.
  • Stray, with the set in #2749 on main plus #3550 at 128x, no longer hits this error. It got past the brightness calibration, until memory ran out at about 275 s.
    • Accepting the calibration loads the next screen: the music starts, and the calibration is saved.
    • It then runs out of memory on this 14 GB machine, whose GPU shares system memory. That is a separate problem.

@queeeef your Palworld shader 0x1b40e70000 may be the same shape: does it start with s_wqm? If you can, a run with this branch would tell.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6112389821 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6112389821). Originally posted by [ThatsLeo](https://github.com/ThatsLeo) on 2026-10-11T18:42:56Z. --- One more shape behind this error, still failing on `main` `8ec0e131` after #3279. It is Stray's pixel shader `0x2012f90000` (PPSA02101 v01.002), and the error is: ``` shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 ? ?) ``` It fails with any masked-lane budget, and also with #3550's budget lifted. The title reaches it a while after its first screen, intermittently, and the render thread stops there. My replay in #2881 covered the 41 requests I had then, and this shader was not among them. ### The shape The shader starts with `s_wqm` and overwrites the ancillary VGPR under the resulting EXEC: ``` %41 = CompositeConstructU64 (Ballot(HelperInvocation == 0) & Ballot(true)).x, .y ; starting lanes, entry blocks %42 = WqmU64 %41 %51 = lane's own bit of %42 ; INotEqual(And(Shr(Select(lane < 32, lo, hi), lane & 31), 1), 0) %64 = SelectU32 %51, %63, %25 ; %25 = GetBuiltin PackedAncillary ``` `%51` gates 357 selects. The word survives only where a lane's bit of `s_wqm(starting lanes)` is clear: lanes whose whole quad has no non-helper lane. Vulkan never starts such a quad, since helper invocations exist only beside a covered one. So `%51` is true in every invocation the host runs, and the masked-lane walk can't prove it, because it reasons about lanes that do run. **Fix:** [`ThatsLeo/AnyPS5:fix/shader-live-quad-lane-bit`](https://github.com/ThatsLeo/AnyPS5/tree/fix/shader-live-quad-lane-bit) (one commit, `2068089b`, on `main` `8ec0e131`). - `ConstantFolder` folds a pixel shader lane's own bit of `WqmU64` to true when its operand holds every starting lane. The operand counts as holding them when it is built from ballots of `true` or `HelperInvocation == 0`, combined with `&` or `|`. Each ballot must be taken in a block that every starting lane runs: the entry, then blocks with one successor, each reached only from the one before. - The 357 selects then fold away, and the ancillary lowering sees no reader. - Not folded: - a ballot after a branch; - a ballot of any other condition; - stages other than pixel. ### Tested - `pixel_ancillary`: the folded case, plus the three cases above that must stay unfolded. - Without the fold, the folded case fails. - Without the block condition, the after-branch case fails. - Full suite on Intel Arc (Meteor Lake, Mesa 26.2.3 ANV) and lavapipe: the same failures as `main` (`agc_driver_emulated_color_compare` and `agc_driver_vop1_float_unary` on Arc; `agc_driver_emulated_color_compare` and `agc_driver_image_plane_address_on_line_implicit_lod` on lavapipe). - Stray's dumped requests: `0x2012f90000` compiles, and its SPIR-V passes `spirv-val`. - 35 of the 41 others give the same SPIR-V as `main`. - The 6 that change use `s_wqm`, and they pass `spirv-val`. - The two slow shaders of #3504 are unchanged. - Stray, with the set in #2749 on `main` plus #3550 at 128x, no longer hits this error. It got past the brightness calibration, until memory ran out at about 275 s. - Accepting the calibration loads the next screen: the music starts, and the calibration is saved. - It then runs out of memory on this 14 GB machine, whose GPU shares system memory. That is a separate problem. @queeeef your Palworld shader `0x1b40e70000` may be the same shape: does it start with `s_wqm`? If you can, a run with this branch would tell. AI-assisted: yes.
Tamalero commented 2026-10-11 22:13:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-11T22:13:49Z.


@AlxcBTW follow-up and a correction: the High on Life hang is not caused by #3279 or #39. Sorry for the false lead.

What I had wrong is that the build without them never reached the moment where the others hang. This title also streams in ancillary pixel shaders with the level (e.g. 0x2118990000), on top of the 30 it registers at boot. Those are prepared synchronously inside sceAgcCreateInterpolantMapping (ResolveShaderAbi → PrepareRegistered). Without #39 the refusal is thrown into the title's loading thread and aborts there. My skip ranges never covered those shaders, so that build always ended earlier.

With that refusal tolerated locally (the shader is left unprepared and its draws are dropped), the build without #3279/#39 hangs the GPU at the same moment as the others: right after the level's music starts, Xid 109 CTX SWITCH TIMEOUT, then VK_ERROR_DEVICE_LOST (1 run).

Your diag/masked-lanes-ab commit cherry-picks cleanly onto my tree:

  • APS5_MASKED_LANES_TRACE=1: many programs outside the ancillary shaders have selects removed beyond the legacy proofs (hundreds of lines in the first minutes, e.g. 2030c00000: 39 selects removed, 25 of them beyond the legacy proofs).
  • APS5_MASKED_LANES_LEGACY=all with the ancillary address range excluded (I added lo-hi ranges locally): it still hangs (1 run).

All three runs point the same way: the hang is somewhere else in that level, and I'll chase it separately. For this issue, #3279 + #39 compile every ancillary shader High on Life has given me so far, the 30 at boot and the level's.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114448170 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6114448170). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-11T22:13:49Z. --- @AlxcBTW follow-up and a correction: the High on Life hang is **not** caused by #3279 or #39. Sorry for the false lead. What I had wrong is that the build without them never reached the moment where the others hang. This title also streams in ancillary pixel shaders with the level (e.g. `0x2118990000`), on top of the 30 it registers at boot. Those are prepared synchronously inside `sceAgcCreateInterpolantMapping` (`ResolveShaderAbi` → `PrepareRegistered`). Without #39 the refusal is thrown into the title's loading thread and aborts there. My skip ranges never covered those shaders, so that build always ended earlier. With that refusal tolerated locally (the shader is left unprepared and its draws are dropped), the build **without** #3279/#39 hangs the GPU at the same moment as the others: right after the level's music starts, `Xid 109 CTX SWITCH TIMEOUT`, then `VK_ERROR_DEVICE_LOST` (1 run). Your `diag/masked-lanes-ab` commit cherry-picks cleanly onto my tree: - `APS5_MASKED_LANES_TRACE=1`: many programs outside the ancillary shaders have selects removed beyond the legacy proofs (hundreds of lines in the first minutes, e.g. `2030c00000: 39 selects removed, 25 of them beyond the legacy proofs`). - `APS5_MASKED_LANES_LEGACY=all` with the ancillary address range excluded (I added `lo-hi` ranges locally): it still hangs (1 run). All three runs point the same way: the hang is somewhere else in that level, and I'll chase it separately. For this issue, #3279 + #39 compile every ancillary shader High on Life has given me so far, the 30 at boot and the level's. *Tested and written by Claude (AI assistant) on a contributor's machine.*
AlxcBTW commented 2026-10-11 22:14:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-11T22:14:47Z.


@Tamalero thanks for running it down to the end, and for saying so clearly. That clears #3279 and #39 for the High on Life hang, and it's good to know they compile all of its ancillary shaders, the level's streamed ones included. #39 is upstream now as #4031 (rebased onto main); your result belongs in its title list, and I'll add it. Good luck with the Xid 109 hunt. If it points back at shader preparation, ping me.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6114459313 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6114459313). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-11T22:14:47Z. --- @Tamalero thanks for running it down to the end, and for saying so clearly. That clears #3279 and #39 for the High on Life hang, and it's good to know they compile all of its ancillary shaders, the level's streamed ones included. #39 is upstream now as #4031 (rebased onto `main`); your result belongs in its title list, and I'll add it. Good luck with the Xid 109 hunt. If it points back at shader preparation, ping me. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-12 00:13:44 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T00:13:44Z.


Lies of P (PPSA10261), Windows, main a672688e9 + #4021 + #3799 + #425 (f470ffaa2), relinked from the .esbak, 150 s: no stop. No FATAL, no what() and no presentation failed line in the log; it prints three could not be prepared at registration (its program address is not in the shader registers); preparing it when it is used lines and nothing else besides shader-disk-cache progress. The unsupported registered shader type 8 lines seen on other titles do not appear in this run.

Where the message comes from: core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp:603, in PlanRegistered. When a shader is registered ahead of use, the driver looks for the entry-point address of the shader's program register pair (programRegister, programRegister + 1) in the registered state; if either is missing it calls the local defer(...) (which logs the line through APS5_LOG_ERR, sets *deferred = true, and returns no plan) so the shader is prepared at the draw or dispatch that uses it instead. So by the code it is a deferral and not a failure. I have not checked that these three particular shaders were later used and compiled in this run, so I only call it harmless as far as this log shows.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6115475495 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6115475495). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T00:13:44Z. --- Lies of P (PPSA10261), Windows, `main` a672688e9 + #4021 + #3799 + #425 (f470ffaa2), relinked from the `.esbak`, 150 s: no stop. No `FATAL`, no `what()` and no `presentation failed` line in the log; it prints three `could not be prepared at registration (its program address is not in the shader registers); preparing it when it is used` lines and nothing else besides shader-disk-cache progress. The `unsupported registered shader type 8` lines seen on other titles do not appear in this run. Where the message comes from: `core/libs/prx/libSceAgcDriver/Execution/src/Driver/Shaders/ShaderRegistry.cpp:603`, in `PlanRegistered`. When a shader is registered ahead of use, the driver looks for the entry-point address of the shader's program register pair (`programRegister`, `programRegister + 1`) in the registered state; if either is missing it calls the local `defer(...)` (which logs the line through `APS5_LOG_ERR`, sets `*deferred = true`, and returns no plan) so the shader is prepared at the draw or dispatch that uses it instead. So by the code it is a deferral and not a failure. I have not checked that these three particular shaders were later used and compiled in this run, so I only call it harmless as far as this log shows. AI-assisted (Claude Code).
xXPBSXx commented 2026-10-12 06:10:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T06:10:59Z.


Long run for Lies of P (PPSA10261) on main d0ca839cc, 240 s under the game lock, relinked from the .esbak: no stop at all. No FATAL, what() or presentation failed line; the log (738 lines) is shader-disk-cache progress (about 1,975 shaders written by the end, the rate falling to a few per 10 s) plus the three deferral lines already discussed above. So the late-stop pattern seen on other titles does not show up for this one within 240 s.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6118788811 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6118788811). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T06:10:59Z. --- Long run for Lies of P (PPSA10261) on `main` d0ca839cc, 240 s under the game lock, relinked from the `.esbak`: no stop at all. No `FATAL`, `what()` or `presentation failed` line; the log (738 lines) is shader-disk-cache progress (about 1,975 shaders written by the end, the rate falling to a few per 10 s) plus the three deferral lines already discussed above. So the late-stop pattern seen on other titles does not show up for this one within 240 s. AI-assisted (Claude Code).
oneandonlydean commented 2026-10-12 09:05:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T09:05:06Z.


Where this stands on main (8c4a295f or later): the masked-copy class this issue describes compiles without composing the word. #3279, #3391, #4033 and #3739 remove the selects whose masked lanes nobody reads, and the word then has no reader. The runs above confirm that for Stray, Lies of P, Palworld, The Exit 9, GTA V and Taxi Chaos 2. One class is known to fail: the word stored into the relative VGPR window (used by StoreVectorWindow ?, Lost Soul Aside), which #4150 covers.

The rest is unknown because the last runs had the whole-word commit on top. Could you replay your saved requests with agc_shader_replay built from plain main, without an ancillary branch, and post the result line per shader?

  • @xXPBSXx: Returnal 0x2024370000, 0x20244a0000; Demon Slayer 0x200ceb0000, 0x200ced0000
  • @alfalfa-star: Kena 0x20b8770000, LEGO Horizon 0x1900e51600
  • @Tamalero: High on Life
  • @MisterbALLIN: Minecraft Dungeons II 0x190095e900, 0x190095fc00

If they all compile, #4031 has no known shader left. If some don't, the shape of the select that was kept says which rule is missing.

@AlxcBTW yes, please post the measurement steps as help wanted.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6121124352 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6121124352). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T09:05:06Z. --- Where this stands on `main` (8c4a295f or later): the masked-copy class this issue describes compiles without composing the word. #3279, #3391, #4033 and #3739 remove the selects whose masked lanes nobody reads, and the word then has no reader. The runs above confirm that for Stray, Lies of P, Palworld, The Exit 9, GTA V and Taxi Chaos 2. One class is known to fail: the word stored into the relative VGPR window (`used by StoreVectorWindow ?`, Lost Soul Aside), which #4150 covers. The rest is unknown because the last runs had the whole-word commit on top. Could you replay your saved requests with `agc_shader_replay` built from plain `main`, without an ancillary branch, and post the result line per shader? - @xXPBSXx: Returnal `0x2024370000`, `0x20244a0000`; Demon Slayer `0x200ceb0000`, `0x200ced0000` - @alfalfa-star: Kena `0x20b8770000`, LEGO Horizon `0x1900e51600` - @Tamalero: High on Life - @MisterbALLIN: Minecraft Dungeons II `0x190095e900`, `0x190095fc00` If they all compile, #4031 has no known shader left. If some don't, the shape of the select that was kept says which rule is missing. @AlxcBTW yes, please post the measurement steps as help wanted.
AlxcBTW commented 2026-10-12 09:20:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T09:20:21Z.


Help wanted: replay your saved ancillary-word shaders on plain main

@xXPBSXx @alfalfa-star @Tamalero @MisterbALLIN, this decides whether #4031 still has a shader it's needed for. It takes about five minutes if you kept your .req files.

  1. Check out plain main at 8c4a295f or later, without #4031, #39 or any ancillary branch on top.
  2. Build the replay tool. It isn't part of the default build:
    cmake --build build --target agc_shader_replay
    
  3. Replay the requests you saved earlier:
    agc_shader_replay shader_2024370000.req shader_20244a0000.req
    
    No .req files? Run the title once on that main build with APS5_DUMP_SHADERS=1. The driver writes shader_<address>.req into the working directory the first time each shader is prepared.
  4. Post the result line for each shader. It is one of:
    • recompiled: N SPIR-V words (compiles on main)
    • recompile failed: <message> (paste the message; the select that was kept tells which rule is missing)
    • structurization failed: ... or could not load request: ... (paste it as well)

Shaders per title (from Dean's list above):

  • Returnal 0x2024370000, 0x20244a0000; Demon Slayer 0x200ceb0000, 0x200ced0000
  • Kena 0x20b8770000; LEGO Horizon 0x1900e51600
  • High on Life: every ancillary shader you saved
  • Minecraft Dungeons II 0x190095e900, 0x190095fc00

Please also give the main commit you built. If all of them compile, #4031 has no known shader left and I'll close it. If some fail, the failing lines are what's needed to finish the missing rule.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6121359531 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6121359531). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-12T09:20:21Z. --- **Help wanted: replay your saved ancillary-word shaders on plain `main`** @xXPBSXx @alfalfa-star @Tamalero @MisterbALLIN, this decides whether #4031 still has a shader it's needed for. It takes about five minutes if you kept your `.req` files. 1. Check out plain `main` at `8c4a295f` or later, **without** #4031, #39 or any ancillary branch on top. 2. Build the replay tool. It isn't part of the default build: ``` cmake --build build --target agc_shader_replay ``` 3. Replay the requests you saved earlier: ``` agc_shader_replay shader_2024370000.req shader_20244a0000.req ``` No `.req` files? Run the title once on that `main` build with `APS5_DUMP_SHADERS=1`. The driver writes `shader_<address>.req` into the working directory the first time each shader is prepared. 4. Post the result line for each shader. It is one of: - ` recompiled: N SPIR-V words` (compiles on `main`) - ` recompile failed: <message>` (paste the message; the select that was kept tells which rule is missing) - ` structurization failed: ...` or `could not load request: ...` (paste it as well) Shaders per title (from Dean's list above): - Returnal `0x2024370000`, `0x20244a0000`; Demon Slayer `0x200ceb0000`, `0x200ced0000` - Kena `0x20b8770000`; LEGO Horizon `0x1900e51600` - High on Life: every ancillary shader you saved - Minecraft Dungeons II `0x190095e900`, `0x190095fc00` Please also give the `main` commit you built. If all of them compile, #4031 has no known shader left and I'll close it. If some fail, the failing lines are what's needed to finish the missing rule. AI-assisted: yes (Claude Code)
xXPBSXx commented 2026-10-12 11:45:56 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T11:45:56Z.


Replay result on plain main 3d8ffeb27 (Merge #4395; contains 8c4a295f; no #4031, #39 or ancillary branch on top; Windows 10, GCC 15.2 Release; agc_shader_replay built from that tree, run once per request, from a folder holding the matching libs). The requests are the ones I saved on 2026-10-10 (file dates 2026-10-10), same shader addresses as in your list:

  • Returnal 0x2024370000: 1120 code words, 30 user data, 2 memory regions, wave64 -> recompiled: 83440 SPIR-V words
  • Returnal 0x20244a0000: 896 code words, 28 user data, 2 memory regions, wave64 -> recompiled: 68720 SPIR-V words
  • Demon Slayer 0x200ceb0000: 1120 code words, 30 user data, 2 memory regions, wave64 -> recompiled: 83440 SPIR-V words
  • Demon Slayer 0x200ced0000: 896 code words, 28 user data, 2 memory regions, wave64 -> recompiled: 68720 SPIR-V words

All four compile; no recompile failed, structurization failed or could not load request line. Not covered: Kena, LEGO Horizon, High on Life and Minecraft Dungeons II (I have no requests or dumps of them), and I did not re-dump the requests on this main: the replay uses the older saved .req files, so it shows these four compile now, not that the title would request the same words today.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6123615718 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6123615718). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T11:45:56Z. --- Replay result on plain `main` `3d8ffeb27` (Merge #4395; contains `8c4a295f`; no #4031, #39 or ancillary branch on top; Windows 10, GCC 15.2 Release; `agc_shader_replay` built from that tree, run once per request, from a folder holding the matching `libs`). The requests are the ones I saved on 2026-10-10 (file dates 2026-10-10), same shader addresses as in your list: - Returnal `0x2024370000`: 1120 code words, 30 user data, 2 memory regions, wave64 -> `recompiled: 83440 SPIR-V words` - Returnal `0x20244a0000`: 896 code words, 28 user data, 2 memory regions, wave64 -> `recompiled: 68720 SPIR-V words` - Demon Slayer `0x200ceb0000`: 1120 code words, 30 user data, 2 memory regions, wave64 -> `recompiled: 83440 SPIR-V words` - Demon Slayer `0x200ced0000`: 896 code words, 28 user data, 2 memory regions, wave64 -> `recompiled: 68720 SPIR-V words` All four compile; no `recompile failed`, `structurization failed` or `could not load request` line. Not covered: Kena, LEGO Horizon, High on Life and Minecraft Dungeons II (I have no requests or dumps of them), and I did not re-dump the requests on this `main`: the replay uses the older saved `.req` files, so it shows these four compile now, not that the title would request the same words today. AI-assisted (Claude Code).
fma-rc commented 2026-10-12 12:41:50 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-12T12:41:50Z.


Kena still has one shader that fails on plain main 0ef9dc928 (Linux, GCC 16.2.1, RTX 5080). LEGO Horizon has none among the requests I could dump. I had no saved requests, so each title ran once on that build with APS5_DUMP_SHADERS=1, and I replayed every dumped request with agc_shader_replay built from the same tree.

Title requests recompiled failed
Kena (PPSA01746) 17 16 1
LEGO Horizon Adventures (PPSA14632) 131 131 0

Kena's failing shader is 0x20b6440000 in this run (936 code words, 30 user data, 2 memory regions, wave64), and the title aborts on it at 72 s:

recompile failed: ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 1065353216 ?)

Shader addresses change between runs here, so I can't tell which of LEGO Horizon's 131 is the 0x1900e51600 from the list. That run ended at 57 s on color views of several array slices are unsupported, so shaders prepared later are not covered.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6124470156 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6124470156). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-12T12:41:50Z. --- Kena still has one shader that fails on plain `main` 0ef9dc928 (Linux, GCC 16.2.1, RTX 5080). LEGO Horizon has none among the requests I could dump. I had no saved requests, so each title ran once on that build with `APS5_DUMP_SHADERS=1`, and I replayed every dumped request with `agc_shader_replay` built from the same tree. | Title | requests | recompiled | failed | |---|---|---|---| | Kena (PPSA01746) | 17 | 16 | 1 | | LEGO Horizon Adventures (PPSA14632) | 131 | 131 | 0 | Kena's failing shader is `0x20b6440000` in this run (936 code words, 30 user data, 2 memory regions, wave64), and the title aborts on it at 72 s: `recompile failed: ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by SelectU32 1065353216 ?)` Shader addresses change between runs here, so I can't tell which of LEGO Horizon's 131 is the `0x1900e51600` from the list. That run ended at 57 s on `color views of several array slices are unsupported`, so shaders prepared later are not covered.
xXPBSXx commented 2026-10-12 12:48:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T12:48:12Z.


@fma-rc thanks for the Kena and LEGO Horizon numbers. Comparison with my replay above (Windows, 3d8ffeb27): those are different titles and different requests, so the two results do not contradict each other. Returnal (2) and Demon Slayer (2) compile on plain main; your Kena failure (0x20b6440000, packed pixel ancillary input has an unsupported live use (used by SelectU32 1065353216 ?)) is a case my four requests do not cover. I have not dumped or replayed Kena on Windows, so I cannot say whether it fails there too; I do not have a reconstructed Kena ELF set up, so I am not promising a run. The 131 of 131 for LEGO Horizon Adventures and 16 of 17 for Kena together with my 4 of 4 give, for this issue, one known failing shader (Kena) among 152 replayed on plain main, from two platforms and two different main commits (0ef9dc928, 3d8ffeb27).

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6124572305 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6124572305). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T12:48:12Z. --- @fma-rc thanks for the Kena and LEGO Horizon numbers. Comparison with my replay above (Windows, `3d8ffeb27`): those are different titles and different requests, so the two results do not contradict each other. Returnal (2) and Demon Slayer (2) compile on plain `main`; your Kena failure (`0x20b6440000`, `packed pixel ancillary input has an unsupported live use (used by SelectU32 1065353216 ?)`) is a case my four requests do not cover. I have not dumped or replayed Kena on Windows, so I cannot say whether it fails there too; I do not have a reconstructed Kena ELF set up, so I am not promising a run. The 131 of 131 for LEGO Horizon Adventures and 16 of 17 for Kena together with my 4 of 4 give, for this issue, one known failing shader (Kena) among 152 replayed on plain `main`, from two platforms and two different `main` commits (`0ef9dc928`, `3d8ffeb27`). AI-assisted (Claude Code).
xXPBSXx commented 2026-10-12 14:53:23 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-12T14:53:23Z.


Context for @vojenfr's Commandos: Origins shader 0x1a000f0000 (read from the thread, not re-run by me):

  • #4031 is the open PR that gives every read the masked-select walk keeps the whole ancillary word instead of refusing the shader. By that description it is meant for exactly this class, and your offline replay (recompiled: 117053 SPIR-V words) agrees.
  • #4150 only covers the word stored into the relative VGPR window (used by StoreVectorWindow ?), which fits your result that it does not change this shader.
  • #4031 (db92ece3c) is currently CONFLICTING: a test merge onto main d592d54e1 conflicts in tests/ShaderMemory.cpp, core/libs/tests/PixelAncillary.cpp, RequestSerializer.cpp and Recompiler.hpp (textual merge only, nothing built). So it needs a rebase before anyone can run it on current main.
  • Shape: Phi ?, SelectU32 0 ? here versus SelectU32 1065353216 ? for Kena's 0x20b6440000. Both are kept selects whose operand is the raw word; I can't tell from the logs whether the same rule in the walk covers both.

Not tested by me: no Commandos run, no replay of these requests on Windows.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6126725522 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6126725522). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-12T14:53:23Z. --- Context for @vojenfr's Commandos: Origins shader `0x1a000f0000` (read from the thread, not re-run by me): - #4031 is the open PR that gives every read the masked-select walk keeps the whole ancillary word instead of refusing the shader. By that description it is meant for exactly this class, and your offline replay (`recompiled: 117053 SPIR-V words`) agrees. - #4150 only covers the word stored into the relative VGPR window (`used by StoreVectorWindow ?`), which fits your result that it does not change this shader. - #4031 (`db92ece3c`) is currently CONFLICTING: a test merge onto main `d592d54e1` conflicts in `tests/ShaderMemory.cpp`, `core/libs/tests/PixelAncillary.cpp`, `RequestSerializer.cpp` and `Recompiler.hpp` (textual merge only, nothing built). So it needs a rebase before anyone can run it on current main. - Shape: `Phi ?, SelectU32 0 ?` here versus `SelectU32 1065353216 ?` for Kena's `0x20b6440000`. Both are kept selects whose operand is the raw word; I can't tell from the logs whether the same rule in the walk covers both. Not tested by me: no Commandos run, no replay of these requests on Windows. AI-assisted (Claude Code).
vojenfr commented 2026-10-12 15:41:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by vojenfr on 2026-10-12T15:41:17Z.


Claude Code Report : Commandos: Origins (PPSA14708) on Linux

Summary

With three open PRs on top of main 8fa5cc486, Commandos: Origins (PPSA14708 v01.004.000, Unreal Engine) runs on Linux with an NVIDIA GPU. It plays its intro videos, reaches the menu and starts loading a mission (its loading screen), at about 3 to 4 FPS. No gameplay was reached: the mission load ends with Unreal's render-thread watchdog (GameThread timed out waiting for RenderThread after 120.00 secs).

Each PR got the title past one hard stop. This is a first run of the title on AnyPS5; it is not in the compatibility list.

Order Stop on main PR that got past it
1 packed pixel ancillary input has an unsupported live use (used by Phi ?, SelectU32 0 ?) after the intro video #4031
2 color views of several array slices are unsupported at the first presentation #3763 (carries #423 and #1077)
3 sampling the depth plane of depth surface ... dimension 3 ... is not implemented (a D16 shadow cube) #425

The frame rate is CPU-bound in the driver. The profile points at GuestAllocations::replaceRange (#2688) and at refused host imports (see Performance).

Setup

The host is a KVM guest with the GPU passed through, so CPU timings include virtualization overhead.

Item Value
OS CachyOS, kernel 7.2.9-2-cachyos-eevdf-lto (virtio disk)
CPU Intel Core i3-12100, 4 cores / 8 threads, sha_ni present
RAM 31 GiB
GPU NVIDIA GeForce RTX 5070 Ti, NVIDIA open kernel module 615.78.08
Toolchain GCC 16.2.1, CMake 4.4.4, Ninja 1.13.2, Release, bundled submodules
AnyPS5 main 8fa5cc486 plus the PRs below, merged locally
Title Commandos: Origins, PPSA14708, content version 01.004.000

The dump holds decrypted ELFs: the executable, five Sony modules in sce_module/ (libc, libSceFontGsm, libSceJobManager, libSceNpCppWebApi, libScePfs) and five title modules in prx/ (eossdk-ps5-shipping and four kitt* modules).

Relink command:

relinker --to-intel --registry decrypted/eboot.bin ~/Jeux/commandos/app.elf

It reported 14608 NID references, 10 guest modules, and Intel conversion: 2 in place, 106 stubs, 0 kept (SHA1*, INSERTQ, MONITORX/MWAITX, VRCPPS).

Runtime layout: libs/ holds the built .prx files. app0/commandos and app0/engine are symbolic links into the dump (28 GB, path resolution follows them). app0/sce_sys and app0/uecommandline.txt are copies. The title runs from the output directory with ANYPS5_LANGUAGE=2.

Blockers, in the order they appeared

1. Pixel ancillary word through a phi (#4031)

After module start-up, pak mounting and the intro video, a pixel shader fails in background preparation:

shader 0x1a000a0000 stage 5: ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by Phi ?, SelectU32 0 ?)

The same code (identical words, compared with agc_shader_replay --code) sat at 0x1a000f0000 in an earlier run. The request has 1800 code words, 30 user data, 2 memory regions, wave64.

The title ran once with APS5_DUMP_SHADERS=1, and each dumped request was replayed with agc_shader_replay built from each tree:

Tree Requests Recompiled Failed
main c6efe068a 29 28 1 (0x1a000a0000)
main + #4150 (ae049e775) 1 0 1, same message
#4031 alone (db92ece3c) 29 29 0 (117053 SPIR-V words for the failing one)

The shape differs from the Kena case in #2548 (SelectU32 1065353216 ?): here the word reaches a phi as well as a select with a zero operand.

2. Layered draw into a 3D color target (#3763, carrying #1077)

With #4031 merged, the first presentation stops:

[gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000)
[videoout] presentation failed: AGC graphics: color views of several array slices are unsupported

The register value is the one in #2102 (Epic Mickey) and in the Stray and Palworld reports on #1077: Unreal rasterizes into a volume in one instanced draw. The run also creates 64x64 storage textures with 63 layers (dim=4, format 71). #3633 explicitly leaves 3D views refused, so it does not help here.

#1077 no longer merges into main (14 files, about 31 conflict blocks). #3763 carries #423 and #1077 rebased on main 5aaf26bd3, plus the dynamic rendering layerCount fix that RTX 50 cards need. It merged without textual conflicts; see Merge notes for the one semantic fix. All 75 requests dumped in the following run recompiled on the merged tree.

The Palworld follow-up stop (mipmapped or DCC 3D color targets are unsupported) did not appear: #1077's decoder already accepts DCC on 3D targets, so #4499 was not needed.

3. D16 shadow cube sampled as a texture (#425)

With #3763 merged, the title compiles 1183 shaders without a failure, then stops:

[videoout] presentation failed: AGC graphics: sampling the depth plane of depth surface 0x3013720000 (1024x1024, vk format 124) as a 1024x1024 texture of guest format 7 (vk 70), tile mode 4, dimension 3, levels 0-0, slice 0 is not implemented (T# 30137200 c0700000 00ffc0ff b1800204 00000005 00700000 00000000 00000000)

Format (R16_UNORM over D16), extent and levels all match the depth plane; only the dimension is refused. T# word 3 has type 0xb (cube) and word 4 has depth 5, so the title samples six 1024x1024 D16 faces as a cube: a point-light shadow map. #425's DepthPlaneCopy builds the cube from the consecutive per-face depth surfaces. With it, the title reaches the menu, and later runs reach a mission's loading screen.

Merge notes

The recompile request serialization version is the trap here: main, #4031 and #3763 (through #423) each claim version 17 for a different field. Whichever lands second needs a bump, or requests written by the others misparse in agc_shader_replay and in error reports.

Field Added by Version that reads it
stencilRefExportEnable, registrationModules, registrationWordLimit main 17
rasterPrimitive (pixel info) #4031 17 in the PR, 18 locally
paClVsOutCntl (vertex info) #423, via #3763 17 in the PR, 19 locally

The serializer only feeds diagnostics (ShaderDiagnostics, recompileReporting, the replay tool), so the title itself was not affected.

The resolutions, all local and unpushed:

  • #4031 onto main (f55458a5c). Four conflicts. Recompiler.hpp keeps both new pixel fields. RequestSerializer.cpp writes both, version 18. The two test files keep both sides and were not built: main's StartingQuadRefused cases expect a refusal where #4031 may now accept, which a reviewer should settle.
  • #3763 (0fcaef1e8, then dd19e49f6). No textual conflict. The follow-up commit writes version 19 and reads paClVsOutCntl from 19. The 8 files both PRs touch were checked by hand: #4031 adds pixel-side keys, #3763 vertex-side keys, with no overlap.
  • #425 (e3c160631). One conflict in cachedStorageTexture. main now sends views of another shape over a depth surface's memory down the ordinary storage path, through DepthSurfaceAt(context, words, viewed). #425 seeds storage from the depth plane by address. Kept both:
if (!DepthSurfaceAt(context, words, viewed)) return lookupStorageTexture(context, words, viewed, mip, guestBytes);
Require(!DepthStencilPlaneAt(viewed.baseAddress), "storage access to a depth surface's stencil plane is not implemented");
auto texture = lookupStorageTexture(context, words, viewed, mip, guestBytes);
SeedStorageFromDepth(context, texture);
return texture;

Performance

At 3 to 4 FPS neither side is saturated. The driver spends about half of the CPU time keeping the guest allocation registry and the host imports up to date.

Observed while the title ran (libraries of the #425 branch, APS5_THREAD_PRIORITY=high, about 6 minutes in):

  • top -H: 72 threads, the busiest at 62% of one core, the CPU 59% idle overall.
  • nvidia-smi dmon: GPU utilization between 0% and 40%.
  • perf record --call-graph dwarf over 4 s, inclusive time:
Inclusive Function Note
47.5% sceKernelBatchMap2 → RemapFixedIntoRegistered → GuestAllocationsProtect the title remaps memory continuously
25.6% GuestAllocations::replaceRange copies the whole registered-range map on every call, then scans it from the first entry (#2688)
18.2% refreshImports, under HostImportFor from InPlaceDrawInput per draw
10.5% GuestAllocationsAcquire copies every readable range into a lease on each call
9.4% ImportMappedRanges at GuestAllocationsEnd

A flat profile without call graphs puts 18% in glibc memcpy. That matches the second cause, which the run logs:

[gpu] host import budget: 6143 MiB live of 6144 MiB (APS5_HOST_IMPORT_MIB); 1134 imports (8489 MiB) refused so far, last 0x1842800000+0x800000

Per the comment at the budget check, every refused range is copied on each later use.

What was tried

  • ps54all's in-place registry edit (branch perf/libc-registry-inplace, commits 0a65c8c3e and 0062e8398, from #2688), cherry-picked. One conflict with #3440's per-range unmap: main's pieceEnd was kept, with the branch's RangeEdit and allocationRemainsAfter. The branch's own test expected one unmap callback per allocation, and main now reports one per registered range, so its expectations were adapted (31374d219). guest_memory passes. On 10 related tests (guest_mlock, guest_kernel_stack_protect, agc_host_import_unmap and others), 8 pass and 2 were not built, the same with and without the change.
  • APS5_HOST_IMPORT_MIB=12288. No budget message appeared in that run.

No frame rate was measured with these two changes: that run stopped early (Open problems, item 2).

Open problems

  1. Render-thread watchdog at the end of a mission load. With the #425 branch, the default budget and existing save data, loading a mission ends with this, then a segmentation fault:

    LowLevelFatalError [File:.\Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 1415]
    GameThread timed out waiting for RenderThread after 120.00 secs
    

    The log has no AnyPS5 error before it. The driver was still creating and uploading textures, all 2168 shaders came from the disk cache, and 4 imports (510 MiB) were refused late in the load. My guess is that the load is too slow for the 120 s fence wait rather than deadlocked, but I have not shown it. The same watchdog fired once before, after several minutes at 3 to 4 FPS.

  2. Unreadable guest memory with the registry fix and a 12 GiB budget. With ps54all's registry change, APS5_HOST_IMPORT_MIB=12288 and the same save data, the title showed a short video and stopped:

    [videoout] presentation failed: AGC driver: guest memory is not readable at 0xdfac0000000c (range 0xdfac0000000c+0x4)
    

    The address does not look like a guest address, rather like a pointer read from stale data. Dropping both changes (same save data) made the stop go away, so one of the two causes it. The next run should take the registry change alone, at the default budget, to tell which.

  3. APS5_THREAD_PRIORITY=high refused by rtkit. The first run got nice -10 on the queue worker and the presenter. A quick second run stopped with presenter nice -10 refused: MakeThreadHighPriorityWithPID: Device or resource busy, as the documentation says it does (no fallback). Probably rtkit's per-user rate limit; noted only because it can look like a crash.

Side findings

  • tools/import_audit.py false positive. The audit reports 270 imports as absent from EOSSDK-PS5-Shipping.debug_prx. All 270 are exported (as <nid>#guest) by app0/prx/eossdk-ps5-shipping.prx.guest.prx, and the loader resolves them at run time. The import names the module by its internal name; --modules matches file names, which differ in case and in the .debug_prx suffix. Matching the stem case-insensitively and accepting .debug_prx, as the relinker's ModuleSuffixes already does, would fix it.
  • --to-intel replaces SHA1 instructions on a CPU that has them. The i3-12100 reports sha_ni, yet all of the 106 stubs except 7 INSERTQ and the VRCPPS sites are SHA1MSG1, SHA1MSG2, SHA1NEXTE and SHA1RNDS4. This is harmless, only slower in that code. A CPUID check could keep them when the host supports them.
  • Real stubs the title imports. The audit's 25 throwing stubs are almost all online features: sceVoiceQoS*, NP, sceHttp2SendRequestAsync, sceWebBrowserDialog*, sceCoredump*, sceSystemServiceLoadExec. None was hit up to the mission load.

The investigation, merges and this report were done with AI assistance (Opus).

How to reproduce

The tree that reaches the mission load is main 8fa5cc486 plus #4031, #3763 and #425, with the two version changes from Merge notes. The conflict resolutions are the ones described above.

git fetch origin pull/4031/head:pr-4031 pull/3763/head:pr-3763 pull/425/head:pr-425
git checkout -B bringup 8fa5cc486
git merge pr-4031    # 4 conflicts, see Merge notes
git merge pr-3763    # no conflict; then write version 19, read paClVsOutCntl from 19
git merge pr-425     # 1 conflict in ShaderResources.cpp
cmake --build build --parallel && cmake --build build --target libs --parallel
cmake --build build --target agc_shader_replay

Run from the output directory:

cp build/core/libs/libs/*.prx ~/Jeux/commandos/libs/
cd ~/Jeux/commandos
APS5_DUMP_SHADERS=1 ANYPS5_LANGUAGE=2 ./app.elf 2>&1 | tee run.log

The failing .req from blocker 1 can be attached on request. The registry change (ps54all 0a65c8c3e, 0062e8398 and the test adaptation) is not part of this stack until Open problems item 2 is settled.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6127570813 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6127570813). Originally posted by [vojenfr](https://github.com/vojenfr) on 2026-10-12T15:41:17Z. --- # Claude Code Report : Commandos: Origins (PPSA14708) on Linux ## Summary With three open PRs on top of `main` `8fa5cc486`, Commandos: Origins (PPSA14708 v01.004.000, Unreal Engine) runs on Linux with an NVIDIA GPU. It plays its intro videos, reaches the menu and starts loading a mission (its loading screen), at about 3 to 4 FPS. No gameplay was reached: the mission load ends with Unreal's render-thread watchdog (`GameThread timed out waiting for RenderThread after 120.00 secs`). Each PR got the title past one hard stop. This is a first run of the title on AnyPS5; it is not in the compatibility list. | Order | Stop on `main` | PR that got past it | | --- | --- | --- | | 1 | `packed pixel ancillary input has an unsupported live use (used by Phi ?, SelectU32 0 ?)` after the intro video | #4031 | | 2 | `color views of several array slices are unsupported` at the first presentation | #3763 (carries #423 and #1077) | | 3 | `sampling the depth plane of depth surface ... dimension 3 ... is not implemented` (a D16 shadow cube) | #425 | The frame rate is CPU-bound in the driver. The profile points at `GuestAllocations::replaceRange` (#2688) and at refused host imports (see Performance). ## Setup The host is a KVM guest with the GPU passed through, so CPU timings include virtualization overhead. | Item | Value | | --- | --- | | OS | CachyOS, kernel 7.2.9-2-cachyos-eevdf-lto (virtio disk) | | CPU | Intel Core i3-12100, 4 cores / 8 threads, `sha_ni` present | | RAM | 31 GiB | | GPU | NVIDIA GeForce RTX 5070 Ti, NVIDIA open kernel module 615.78.08 | | Toolchain | GCC 16.2.1, CMake 4.4.4, Ninja 1.13.2, Release, bundled submodules | | AnyPS5 | `main` `8fa5cc486` plus the PRs below, merged locally | | Title | Commandos: Origins, PPSA14708, content version 01.004.000 | The dump holds decrypted ELFs: the executable, five Sony modules in `sce_module/` (`libc`, `libSceFontGsm`, `libSceJobManager`, `libSceNpCppWebApi`, `libScePfs`) and five title modules in `prx/` (`eossdk-ps5-shipping` and four `kitt*` modules). Relink command: ``` relinker --to-intel --registry decrypted/eboot.bin ~/Jeux/commandos/app.elf ``` It reported 14608 NID references, 10 guest modules, and `Intel conversion: 2 in place, 106 stubs, 0 kept` (SHA1\*, INSERTQ, MONITORX/MWAITX, VRCPPS). Runtime layout: `libs/` holds the built `.prx` files. `app0/commandos` and `app0/engine` are symbolic links into the dump (28 GB, path resolution follows them). `app0/sce_sys` and `app0/uecommandline.txt` are copies. The title runs from the output directory with `ANYPS5_LANGUAGE=2`. ## Blockers, in the order they appeared ### 1. Pixel ancillary word through a phi (#4031) After module start-up, pak mounting and the intro video, a pixel shader fails in background preparation: ``` shader 0x1a000a0000 stage 5: ShaderRecompiler::Recompile: shader info collection failed: packed pixel ancillary input has an unsupported live use (used by Phi ?, SelectU32 0 ?) ``` The same code (identical words, compared with `agc_shader_replay --code`) sat at `0x1a000f0000` in an earlier run. The request has 1800 code words, 30 user data, 2 memory regions, wave64. The title ran once with `APS5_DUMP_SHADERS=1`, and each dumped request was replayed with `agc_shader_replay` built from each tree: | Tree | Requests | Recompiled | Failed | | --- | --- | --- | --- | | `main` `c6efe068a` | 29 | 28 | 1 (`0x1a000a0000`) | | `main` + #4150 (`ae049e775`) | 1 | 0 | 1, same message | | #4031 alone (`db92ece3c`) | 29 | 29 | 0 (117053 SPIR-V words for the failing one) | The shape differs from the Kena case in #2548 (`SelectU32 1065353216 ?`): here the word reaches a phi as well as a select with a zero operand. ### 2. Layered draw into a 3D color target (#3763, carrying #1077) With #4031 merged, the first presentation stops: ``` [gpu] layer/viewport index vertex exports are ignored (PA_CL_VS_OUT_CNTL=0x01240000) [videoout] presentation failed: AGC graphics: color views of several array slices are unsupported ``` The register value is the one in #2102 (Epic Mickey) and in the Stray and Palworld reports on #1077: Unreal rasterizes into a volume in one instanced draw. The run also creates 64x64 storage textures with 63 layers (`dim=4`, format 71). #3633 explicitly leaves 3D views refused, so it does not help here. \#1077 no longer merges into `main` (14 files, about 31 conflict blocks). #3763 carries #423 and #1077 rebased on `main` `5aaf26bd3`, plus the dynamic rendering `layerCount` fix that RTX 50 cards need. It merged without textual conflicts; see Merge notes for the one semantic fix. All 75 requests dumped in the following run recompiled on the merged tree. The Palworld follow-up stop (`mipmapped or DCC 3D color targets are unsupported`) did not appear: #1077's decoder already accepts DCC on 3D targets, so #4499 was not needed. ### 3. D16 shadow cube sampled as a texture (#425) With #3763 merged, the title compiles 1183 shaders without a failure, then stops: ``` [videoout] presentation failed: AGC graphics: sampling the depth plane of depth surface 0x3013720000 (1024x1024, vk format 124) as a 1024x1024 texture of guest format 7 (vk 70), tile mode 4, dimension 3, levels 0-0, slice 0 is not implemented (T# 30137200 c0700000 00ffc0ff b1800204 00000005 00700000 00000000 00000000) ``` Format (R16\_UNORM over D16), extent and levels all match the depth plane; only the dimension is refused. T# word 3 has type `0xb` (cube) and word 4 has depth 5, so the title samples six 1024x1024 D16 faces as a cube: a point-light shadow map. #425's `DepthPlaneCopy` builds the cube from the consecutive per-face depth surfaces. With it, the title reaches the menu, and later runs reach a mission's loading screen. ## Merge notes The recompile request serialization version is the trap here: `main`, #4031 and #3763 (through #423) each claim version 17 for a different field. Whichever lands second needs a bump, or requests written by the others misparse in `agc_shader_replay` and in error reports. | Field | Added by | Version that reads it | | --- | --- | --- | | `stencilRefExportEnable`, `registrationModules`, `registrationWordLimit` | `main` | 17 | | `rasterPrimitive` (pixel info) | #4031 | 17 in the PR, 18 locally | | `paClVsOutCntl` (vertex info) | #423, via #3763 | 17 in the PR, 19 locally | The serializer only feeds diagnostics (`ShaderDiagnostics`, `recompileReporting`, the replay tool), so the title itself was not affected. The resolutions, all local and unpushed: - **#4031 onto `main` (`f55458a5c`).** Four conflicts. `Recompiler.hpp` keeps both new pixel fields. `RequestSerializer.cpp` writes both, version 18. The two test files keep both sides and were not built: `main`'s `StartingQuadRefused` cases expect a refusal where #4031 may now accept, which a reviewer should settle. - **#3763 (`0fcaef1e8`, then `dd19e49f6`).** No textual conflict. The follow-up commit writes version 19 and reads `paClVsOutCntl` from 19. The 8 files both PRs touch were checked by hand: #4031 adds pixel-side keys, #3763 vertex-side keys, with no overlap. - **#425 (`e3c160631`).** One conflict in `cachedStorageTexture`. `main` now sends views of another shape over a depth surface's memory down the ordinary storage path, through `DepthSurfaceAt(context, words, viewed)`. #425 seeds storage from the depth plane by address. Kept both: ```cpp if (!DepthSurfaceAt(context, words, viewed)) return lookupStorageTexture(context, words, viewed, mip, guestBytes); Require(!DepthStencilPlaneAt(viewed.baseAddress), "storage access to a depth surface's stencil plane is not implemented"); auto texture = lookupStorageTexture(context, words, viewed, mip, guestBytes); SeedStorageFromDepth(context, texture); return texture; ``` ## Performance At 3 to 4 FPS neither side is saturated. The driver spends about half of the CPU time keeping the guest allocation registry and the host imports up to date. Observed while the title ran (libraries of the #425 branch, `APS5_THREAD_PRIORITY=high`, about 6 minutes in): - `top -H`: 72 threads, the busiest at 62% of one core, the CPU 59% idle overall. - `nvidia-smi dmon`: GPU utilization between 0% and 40%. - `perf record --call-graph dwarf` over 4 s, inclusive time: | Inclusive | Function | Note | | --- | --- | --- | | 47.5% | `sceKernelBatchMap2` → `RemapFixedIntoRegistered` → `GuestAllocationsProtect` | the title remaps memory continuously | | 25.6% | `GuestAllocations::replaceRange` | copies the whole registered-range map on every call, then scans it from the first entry (#2688) | | 18.2% | `refreshImports`, under `HostImportFor` from `InPlaceDrawInput` | per draw | | 10.5% | `GuestAllocationsAcquire` | copies every readable range into a lease on each call | | 9.4% | `ImportMappedRanges` at `GuestAllocationsEnd` | | A flat profile without call graphs puts 18% in glibc `memcpy`. That matches the second cause, which the run logs: ``` [gpu] host import budget: 6143 MiB live of 6144 MiB (APS5_HOST_IMPORT_MIB); 1134 imports (8489 MiB) refused so far, last 0x1842800000+0x800000 ``` Per the comment at the budget check, every refused range is copied on each later use. ### What was tried - **ps54all's in-place registry edit** (branch `perf/libc-registry-inplace`, commits `0a65c8c3e` and `0062e8398`, from #2688), cherry-picked. One conflict with #3440's per-range unmap: `main`'s `pieceEnd` was kept, with the branch's `RangeEdit` and `allocationRemainsAfter`. The branch's own test expected one unmap callback per allocation, and `main` now reports one per registered range, so its expectations were adapted (`31374d219`). `guest_memory` passes. On 10 related tests (`guest_mlock`, `guest_kernel_stack_protect`, `agc_host_import_unmap` and others), 8 pass and 2 were not built, the same with and without the change. - **`APS5_HOST_IMPORT_MIB=12288`.** No budget message appeared in that run. No frame rate was measured with these two changes: that run stopped early (Open problems, item 2). ## Open problems 1. **Render-thread watchdog at the end of a mission load.** With the #425 branch, the default budget and existing save data, loading a mission ends with this, then a segmentation fault: ``` LowLevelFatalError [File:.\Runtime/RenderCore/Private/RenderingThread.cpp] [Line: 1415] GameThread timed out waiting for RenderThread after 120.00 secs ``` The log has no AnyPS5 error before it. The driver was still creating and uploading textures, all 2168 shaders came from the disk cache, and 4 imports (510 MiB) were refused late in the load. My guess is that the load is too slow for the 120 s fence wait rather than deadlocked, but I have not shown it. The same watchdog fired once before, after several minutes at 3 to 4 FPS. 2. **Unreadable guest memory with the registry fix and a 12 GiB budget.** With ps54all's registry change, `APS5_HOST_IMPORT_MIB=12288` and the same save data, the title showed a short video and stopped: ``` [videoout] presentation failed: AGC driver: guest memory is not readable at 0xdfac0000000c (range 0xdfac0000000c+0x4) ``` The address does not look like a guest address, rather like a pointer read from stale data. Dropping both changes (same save data) made the stop go away, so one of the two causes it. The next run should take the registry change alone, at the default budget, to tell which. 3. **`APS5_THREAD_PRIORITY=high` refused by rtkit.** The first run got `nice -10` on the queue worker and the presenter. A quick second run stopped with `presenter nice -10 refused: MakeThreadHighPriorityWithPID: Device or resource busy`, as the documentation says it does (no fallback). Probably rtkit's per-user rate limit; noted only because it can look like a crash. ## Side findings - **`tools/import_audit.py` false positive.** The audit reports 270 imports as `absent` from `EOSSDK-PS5-Shipping.debug_prx`. All 270 are exported (as `<nid>#guest`) by `app0/prx/eossdk-ps5-shipping.prx.guest.prx`, and the loader resolves them at run time. The import names the module by its internal name; `--modules` matches file names, which differ in case and in the `.debug_prx` suffix. Matching the stem case-insensitively and accepting `.debug_prx`, as the relinker's `ModuleSuffixes` already does, would fix it. - **`--to-intel` replaces SHA1 instructions on a CPU that has them.** The i3-12100 reports `sha_ni`, yet all of the 106 stubs except 7 INSERTQ and the VRCPPS sites are `SHA1MSG1`, `SHA1MSG2`, `SHA1NEXTE` and `SHA1RNDS4`. This is harmless, only slower in that code. A CPUID check could keep them when the host supports them. - **Real stubs the title imports.** The audit's 25 throwing stubs are almost all online features: `sceVoiceQoS*`, NP, `sceHttp2SendRequestAsync`, `sceWebBrowserDialog*`, `sceCoredump*`, `sceSystemServiceLoadExec`. None was hit up to the mission load. The investigation, merges and this report were done with AI assistance (Opus). ## How to reproduce The tree that reaches the mission load is `main` `8fa5cc486` plus #4031, #3763 and #425, with the two version changes from Merge notes. The conflict resolutions are the ones described above. ```bash git fetch origin pull/4031/head:pr-4031 pull/3763/head:pr-3763 pull/425/head:pr-425 git checkout -B bringup 8fa5cc486 git merge pr-4031 # 4 conflicts, see Merge notes git merge pr-3763 # no conflict; then write version 19, read paClVsOutCntl from 19 git merge pr-425 # 1 conflict in ShaderResources.cpp cmake --build build --parallel && cmake --build build --target libs --parallel cmake --build build --target agc_shader_replay ``` Run from the output directory: ```bash cp build/core/libs/libs/*.prx ~/Jeux/commandos/libs/ cd ~/Jeux/commandos APS5_DUMP_SHADERS=1 ANYPS5_LANGUAGE=2 ./app.elf 2>&1 | tee run.log ``` The failing `.req` from blocker 1 can be attached on request. The registry change (ps54all `0a65c8c3e`, `0062e8398` and the test adaptation) is not part of this stack until Open problems item 2 is settled.
alfalfa-star commented 2026-10-12 16:58:40 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by alfalfa-star on 2026-10-12T16:58:40Z.


@oneandonlydean @AlxcBTW replay on plain main 2a5eca11c (no #4031, #39 or ancillary branch), Arch Linux, GCC 16.2.1, Release, agc_shader_replay built from that tree:

  • LEGO Horizon Adventures (PPSA14632): the one pixel shader LEGO had refused is 0x1900ee6b00 in my saved requests (addresses move between runs; LEGO only ever refused one shader, so the 0x1900e51600 in the list is most likely this one from another run). It is 1284 code words, wave64, and now gives recompiled: 102505 SPIR-V words. The other 175 saved LEGO requests also recompile. 3 older requests from 2026-10-07 can't be loaded (RequestSerializer: truncated data, older format).
  • Kena (PPSA01802): all 48 requests from my 2026-10-10 plain-main survey recompile, including the larger pixel shaders (672 to 1768 words) that were refused then. My 0x20b8770000 (936 code words) was dumped on our local stack, whose request format has #1077's and #39's extra fields, so plain main can't load it. I haven't re-dumped it on main. @fma-rc's failing 0x20b6440000 has the same size and the same message (used by SelectU32 1065353216 ?), so it is most likely the same shader, and it still fails on main.

So for my titles, LEGO no longer needs #4031, and Kena still has this one shader.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6128804888 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6128804888). Originally posted by [alfalfa-star](https://github.com/alfalfa-star) on 2026-10-12T16:58:40Z. --- @oneandonlydean @AlxcBTW replay on plain `main` `2a5eca11c` (no #4031, #39 or ancillary branch), Arch Linux, GCC 16.2.1, Release, `agc_shader_replay` built from that tree: - **LEGO Horizon Adventures (PPSA14632):** the one pixel shader LEGO had refused is `0x1900ee6b00` in my saved requests (addresses move between runs; LEGO only ever refused one shader, so the `0x1900e51600` in the list is most likely this one from another run). It is 1284 code words, wave64, and now gives `recompiled: 102505 SPIR-V words`. The other 175 saved LEGO requests also recompile. 3 older requests from 2026-10-07 can't be loaded (`RequestSerializer: truncated data`, older format). - **Kena (PPSA01802):** all 48 requests from my 2026-10-10 plain-main survey recompile, including the larger pixel shaders (672 to 1768 words) that were refused then. My `0x20b8770000` (936 code words) was dumped on our local stack, whose request format has #1077's and #39's extra fields, so plain `main` can't load it. I haven't re-dumped it on `main`. @fma-rc's failing `0x20b6440000` has the same size and the same message (`used by SelectU32 1065353216 ?`), so it is most likely the same shader, and it still fails on `main`. So for my titles, LEGO no longer needs #4031, and Kena still has this one shader. AI-assisted: yes (Claude Code)
AlxcBTW commented 2026-10-12 18:14:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T18:14:06Z.


Thanks @alfalfa-star and @vojenfr. Two updates for #4031:

  • It's now merged with current main (head e24413c44, mergeable). The pixel request version goes to 18 because main already shipped 17 for stencilRefExportEnable, and the #4150 negative test now expects the composed word. Fork CI passes on both platforms (Linux 968/968 lavapipe, Windows 974/974); blawesom ran the full suite on RADV (958/958).
  • vojenfr's Commandos: Origins run is the first title evidence for it on main: #4031 gets PPSA14708 past packed pixel ancillary input has an unsupported live use (used by Phi ?, SelectU32 0 ?) after the intro video.

@alfalfa-star could you replay Kena's remaining shader (used by SelectU32 1065353216 ?, 0x20b6440000/0x20b8770000) on e24413c44? That's the case I'd most like to see covered or refused cleanly.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6129969355 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6129969355). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-12T18:14:06Z. --- Thanks @alfalfa-star and @vojenfr. Two updates for #4031: - It's now merged with current `main` (head `e24413c44`, mergeable). The pixel request version goes to 18 because `main` already shipped 17 for `stencilRefExportEnable`, and the #4150 negative test now expects the composed word. Fork CI passes on both platforms (Linux 968/968 lavapipe, Windows 974/974); blawesom ran the full suite on RADV (958/958). - vojenfr's Commandos: Origins run is the first title evidence for it on `main`: #4031 gets PPSA14708 past `packed pixel ancillary input has an unsupported live use (used by Phi ?, SelectU32 0 ?)` after the intro video. @alfalfa-star could you replay Kena's remaining shader (`used by SelectU32 1065353216 ?`, `0x20b6440000`/`0x20b8770000`) on `e24413c44`? That's the case I'd most like to see covered or refused cleanly. AI-assisted: yes (Claude Code)
Tamalero commented 2026-10-12 18:25:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-12T18:25:32Z.


@AlxcBTW High on Life (PPSA15388): no ancillary refusal without #4031, though not on plain current main. Details and caveats below.

  • Runs: two runs on main d06c0656 and 436e310d (neither has #4031, #39 or any ancillary branch). On top are only open PRs unrelated to shaders: #425, #2904, #3202 and #1077, which carries #423, for layered draws and depth surfaces. Both runs got through the level load, where the first ancillary draw used to abort. One continued through checkpoint reloads and quit cleanly after about 15 minutes. Neither log has a packed pixel ancillary input line. Before #3279 and #39, the 30 pixel shaders from my earlier comment were refused at registration.
  • Plain main gives no answer: HoL stops there before any level loads, at color views of several array slices are unsupported (#1077), so the level's ancillary shaders are never prepared.
  • Saved requests don't load on current main: all 998 of my saved .req files fail with RequestSerializer: truncated data on main 3377986a. They were written by a build carrying an earlier #1077 port, which used request version 17 for its own field, and main now uses 17 for stencilRefExportEnable. So same number, different layout, which is the clash you avoided by moving to 18.
  • Base caveat: both bases predate 8c4a295f, so this shows these shaders already compile without #4031 on a slightly older main. It does not cover a later regression.

If a replay on plain main is still needed, I can dump the requests again from a current base with APS5_DUMP_SHADERS=1 and replay them with main's agc_shader_replay.

Tested and written by Claude (AI assistant) on a contributor's machine.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6130147482 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6130147482). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-12T18:25:32Z. --- @AlxcBTW High on Life (PPSA15388): no ancillary refusal without #4031, though not on plain current `main`. Details and caveats below. - **Runs:** two runs on `main` `d06c0656` and `436e310d` (neither has #4031, #39 or any ancillary branch). On top are only open PRs unrelated to shaders: #425, #2904, #3202 and #1077, which carries #423, for layered draws and depth surfaces. Both runs got through the level load, where the first ancillary draw used to abort. One continued through checkpoint reloads and quit cleanly after about 15 minutes. Neither log has a `packed pixel ancillary input` line. Before #3279 and #39, the 30 pixel shaders from my earlier comment were refused at registration. - **Plain `main` gives no answer:** HoL stops there before any level loads, at `color views of several array slices are unsupported` (#1077), so the level's ancillary shaders are never prepared. - **Saved requests don't load on current `main`:** all 998 of my saved `.req` files fail with `RequestSerializer: truncated data` on `main` `3377986a`. They were written by a build carrying an earlier #1077 port, which used request version 17 for its own field, and `main` now uses 17 for `stencilRefExportEnable`. So same number, different layout, which is the clash you avoided by moving to 18. - **Base caveat:** both bases predate `8c4a295f`, so this shows these shaders already compile without #4031 on a slightly older `main`. It does not cover a later regression. If a replay on plain `main` is still needed, I can dump the requests again from a current base with `APS5_DUMP_SHADERS=1` and replay them with `main`'s `agc_shader_replay`. *Tested and written by Claude (AI assistant) on a contributor's machine.*
MisterbALLIN commented 2026-10-12 18:29:05 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MisterbALLIN on 2026-10-12T18:29:05Z.


Help wanted: replay your saved ancillary-word shaders on plain main

@xXPBSXx @alfalfa-star @Tamalero @MisterbALLIN, this decides whether #4031 still has a shader it's needed for. It takes about five minutes if you kept your .req files.

  1. Check out plain main at 8c4a295f or later, without feat(shader): give reads the masked-select pass keeps the whole pixel ancillary word #4031, fix(recompiler): widen constants of 64-bit operands instead of repeating them #39 or any ancillary branch on top.

  2. Build the replay tool. It isn't part of the default build:

    cmake --build build --target agc_shader_replay
    
  3. Replay the requests you saved earlier:

    agc_shader_replay shader_2024370000.req shader_20244a0000.req
    

    No .req files? Run the title once on that main build with APS5_DUMP_SHADERS=1. The driver writes shader_<address>.req into the working directory the first time each shader is prepared.

  4. Post the result line for each shader. It is one of:

    • recompiled: N SPIR-V words (compiles on main)
    • recompile failed: <message> (paste the message; the select that was kept tells which rule is missing)
    • structurization failed: ... or could not load request: ... (paste it as well)

Shaders per title (from Dean's list above):

  • Returnal 0x2024370000, 0x20244a0000; Demon Slayer 0x200ceb0000, 0x200ced0000
  • Kena 0x20b8770000; LEGO Horizon 0x1900e51600
  • High on Life: every ancillary shader you saved
  • Minecraft Dungeons II 0x190095e900, 0x190095fc00

Please also give the main commit you built. If all of them compile, #4031 has no known shader left and I'll close it. If some fail, the failing lines are what's needed to finish the missing rule.

AI-assisted: yes (Claude Code)

How do I use main without the fix recompiler if it has been merged two weeks ago ? And how do I run the APS5_DUMP_SHADERS=1 command on cmd ?

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6130203579 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6130203579). Originally posted by [MisterbALLIN](https://github.com/MisterbALLIN) on 2026-10-12T18:29:05Z. --- > **Help wanted: replay your saved ancillary-word shaders on plain `main`** > > [@xXPBSXx](https://github.com/xXPBSXx) [@alfalfa-star](https://github.com/alfalfa-star) [@Tamalero](https://github.com/Tamalero) [@MisterbALLIN](https://github.com/MisterbALLIN), this decides whether [#4031](https://github.com/boykopovar/AnyPS5/pull/4031) still has a shader it's needed for. It takes about five minutes if you kept your `.req` files. > > 1. Check out plain `main` at `8c4a295f` or later, **without** [feat(shader): give reads the masked-select pass keeps the whole pixel ancillary word #4031](https://github.com/boykopovar/AnyPS5/pull/4031), [fix(recompiler): widen constants of 64-bit operands instead of repeating them #39](https://github.com/boykopovar/AnyPS5/pull/39) or any ancillary branch on top. > 2. Build the replay tool. It isn't part of the default build: > ``` > cmake --build build --target agc_shader_replay > ``` > 3. Replay the requests you saved earlier: > ``` > agc_shader_replay shader_2024370000.req shader_20244a0000.req > ``` > > > > > > > > > > > > No `.req` files? Run the title once on that `main` build with `APS5_DUMP_SHADERS=1`. The driver writes `shader_<address>.req` into the working directory the first time each shader is prepared. > 4. Post the result line for each shader. It is one of: > > * ` recompiled: N SPIR-V words` (compiles on `main`) > * ` recompile failed: <message>` (paste the message; the select that was kept tells which rule is missing) > * ` structurization failed: ...` or `could not load request: ...` (paste it as well) > > Shaders per title (from Dean's list above): > > * Returnal `0x2024370000`, `0x20244a0000`; Demon Slayer `0x200ceb0000`, `0x200ced0000` > * Kena `0x20b8770000`; LEGO Horizon `0x1900e51600` > * High on Life: every ancillary shader you saved > * Minecraft Dungeons II `0x190095e900`, `0x190095fc00` > > Please also give the `main` commit you built. If all of them compile, [#4031](https://github.com/boykopovar/AnyPS5/pull/4031) has no known shader left and I'll close it. If some fail, the failing lines are what's needed to finish the missing rule. > > AI-assisted: yes (Claude Code) How do I use main without the fix recompiler if it has been merged two weeks ago ? And how do I run the APS5_DUMP_SHADERS=1 command on cmd ?
fma-rc commented 2026-10-12 19:16:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-12T19:16:32Z.


@AlxcBTW 0x20b6440000 is from my Kena (PPSA01746) run, so I replayed it. With #4031 head e24413c44 it compiles: recompiled: 95963 SPIR-V words. On main d53960612 the same request still fails with packed pixel ancillary input has an unsupported live use (used by SelectU32 1065353216 ?).

My other 16 saved Kena requests also compile on e24413c44, 17 of 17. I do not have 0x20b8770000 saved, only 0x20b6440000.

This is agc_shader_replay with ANYPS5_NO_SHADER_CACHE=1, built from the PR head as it is (its merge base with main is d592d54e1), Arch Linux, GCC 16.2.1, Release. I have not run Kena itself on that head, so I can say it compiles but not what it draws.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6130962169 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6130962169). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-12T19:16:32Z. --- @AlxcBTW `0x20b6440000` is from my Kena (PPSA01746) run, so I replayed it. With #4031 head `e24413c44` it compiles: `recompiled: 95963 SPIR-V words`. On `main` `d53960612` the same request still fails with `packed pixel ancillary input has an unsupported live use (used by SelectU32 1065353216 ?)`. My other 16 saved Kena requests also compile on `e24413c44`, 17 of 17. I do not have `0x20b8770000` saved, only `0x20b6440000`. This is `agc_shader_replay` with `ANYPS5_NO_SHADER_CACHE=1`, built from the PR head as it is (its merge base with `main` is `d592d54e1`), Arch Linux, GCC 16.2.1, Release. I have not run Kena itself on that head, so I can say it compiles but not what it draws.
AlxcBTW commented 2026-10-12 20:49:52 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by AlxcBTW on 2026-10-12T20:49:52Z.


@fma-rc thank you, that settles it: 0x20b6440000 still fails on main d53960612 and compiles on #4031's head, and 17 of 17 Kena requests compile there. So #4031 is still needed. I'm bringing it up to date with current main now.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6132372855 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6132372855). Originally posted by [AlxcBTW](https://github.com/AlxcBTW) on 2026-10-12T20:49:52Z. --- @fma-rc thank you, that settles it: `0x20b6440000` still fails on `main` `d53960612` and compiles on #4031's head, and 17 of 17 Kena requests compile there. So #4031 is still needed. I'm bringing it up to date with current `main` now. AI-assisted: yes (Claude Code)
oneandonlydean commented 2026-10-13 02:08:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T02:08:58Z.


#4031 and #4842 are on main (also #3739, #4150, #3816). Does any shader still stop at packed pixel ancillary input has an unsupported live use on current main? Please post the address and the use list; if none does, this can close.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6136639345 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6136639345). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-13T02:08:58Z. --- #4031 and #4842 are on main (also #3739, #4150, #3816). Does any shader still stop at `packed pixel ancillary input has an unsupported live use` on current main? Please post the address and the use list; if none does, this can close.
fma-rc commented 2026-10-13 03:54:42 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by fma-rc on 2026-10-13T03:54:42Z.


On main 6124bf063 Kena (PPSA01746) no longer stops at packed pixel ancillary input has an unsupported live use. One 90 s run here: it now ends at clip distances, layer, viewport or auxiliary vertex exports is unsupported (register 0x207 = 0x00400001), which is a different topic (PR 423 is open on it). Before #4031 the ancillary stop came in each of my runs between 40 and 90 s, so from Kena's side this can close.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6137868442 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6137868442). Originally posted by [fma-rc](https://github.com/fma-rc) on 2026-10-13T03:54:42Z. --- On `main` `6124bf063` Kena (PPSA01746) no longer stops at `packed pixel ancillary input has an unsupported live use`. One 90 s run here: it now ends at `clip distances, layer, viewport or auxiliary vertex exports is unsupported (register 0x207 = 0x00400001)`, which is a different topic (PR 423 is open on it). Before #4031 the ancillary stop came in each of my runs between 40 and 90 s, so from Kena's side this can close.
oneandonlydean commented 2026-10-13 07:05:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-13T07:05:20Z.


I will close for now, any issues please reopen or comment

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6140221608 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2548#issuecomment-6140221608). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-13T07:05:20Z. --- I will close for now, any issues please reopen or comment
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#2548
No description provided.