Ghost of Yōtei: compute shader 0x80003aa700 loads its T# from a buffer at an index read from another buffer in a loop (GetImageResource dword 0 is not a valid runtime value) #2715

Open
opened 2026-10-10 12:00:59 +00:00 by EdouardSence · 6 comments
EdouardSence commented 2026-10-10 12:00:59 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-10T12:00:59Z.


Title: Ghost of Yōtei (PPSA26344)
Where it stops: about 26 s in, on main b5f5362d3 plus the two changes it needs to get this far: #1940 (operand 235, #1920) and Pipodi's 44a80d4f (relocated header copies, see #1837). On plain main it stops earlier, on #1920.

terminate called after throwing an instance of 'std::runtime_error'
what():  compute shader 0x80003aa700: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x00000590(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), IMul32(ReadConstBuffer@pc=0x00000258(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(Phi(ReadConstBuffer@pc=0x000001e8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), BitwiseAnd32(GetBuiltin(Immediate, Immediate), Immediate)), IAdd32(Phi(ReadConstBuffer@pc=0x000001e8(GetBufferResource, BitwiseAnd32), IAdd32(Phi, Immediate)), Immediate)), Immediate)), Immed

(the message is cut at that length in the log.)

What the chain says

The image descriptor's dword 0 is a ReadConstBuffer at pc 0x590 whose offset is IMul32(ReadConstBuffer@pc=0x258(...), ...). That inner read's offset comes from ShiftLeftLogical32(Phi(...)), where the Phi is a loop counter: it starts at a ReadConstBuffer@pc=0x1e8 value masked with a builtin (BitwiseAnd32(GetBuiltin, Immediate)) and steps by IAdd32(Phi, Immediate). So the T# is loaded from a buffer, at an index read from another buffer, per loop iteration. That is not a statically resolvable descriptor or one of the bindless table forms the recompiler matches.

I have not looked for the semantics of what the title stores in those buffers, so this is only the report of the stop. 172 shaders were deferred to first use before it, without a problem.

Setup

CachyOS (kernel 7.2.9), RX 9070 XT (RADV), Release, headless gamescope with scripted input.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5791016613 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2715). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-10T12:00:59Z. --- **Title:** Ghost of Yōtei (PPSA26344) **Where it stops:** about 26 s in, on main `b5f5362d3` plus the two changes it needs to get this far: #1940 (operand 235, #1920) and Pipodi's `44a80d4f` (relocated header copies, see #1837). On plain main it stops earlier, on #1920. ``` terminate called after throwing an instance of 'std::runtime_error' what(): compute shader 0x80003aa700: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x00000590(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), IMul32(ReadConstBuffer@pc=0x00000258(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(Phi(ReadConstBuffer@pc=0x000001e8(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), BitwiseAnd32(GetBuiltin(Immediate, Immediate), Immediate)), IAdd32(Phi(ReadConstBuffer@pc=0x000001e8(GetBufferResource, BitwiseAnd32), IAdd32(Phi, Immediate)), Immediate)), Immediate)), Immed ``` (the message is cut at that length in the log.) ### What the chain says The image descriptor's dword 0 is a `ReadConstBuffer` at pc `0x590` whose offset is `IMul32(ReadConstBuffer@pc=0x258(...), ...)`. That inner read's offset comes from `ShiftLeftLogical32(Phi(...))`, where the Phi is a loop counter: it starts at a `ReadConstBuffer@pc=0x1e8` value masked with a builtin (`BitwiseAnd32(GetBuiltin, Immediate)`) and steps by `IAdd32(Phi, Immediate)`. So the T# is loaded from a buffer, at an index read from another buffer, per loop iteration. That is not a statically resolvable descriptor or one of the bindless table forms the recompiler matches. I have not looked for the semantics of what the title stores in those buffers, so this is only the report of the stop. 172 shaders were deferred to first use before it, without a problem. ### Setup CachyOS (kernel 7.2.9), RX 9070 XT (RADV), Release, headless gamescope with scripted input. *Tested and written by Claude (AI assistant) on a contributor's machine.*
EdouardSence commented 2026-10-10 13:01:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-10T13:01:21Z.


The full chain and the disassembly of 0x80003aa700 are in https://github.com/boykopovar/AnyPS5/discussions/675#discussioncomment-18850796. It is a record table: [start, end) per workgroup → index list → 0x330-byte record with the S# at +0x88 and a 128-bit T# at +0x98, inline and with no pointer.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6097768507 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2715#issuecomment-6097768507). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-10T13:01:21Z. --- The full chain and the disassembly of `0x80003aa700` are in https://github.com/boykopovar/AnyPS5/discussions/675#discussioncomment-18850796. It is a record table: `[start, end)` per workgroup → index list → 0x330-byte record with the S# at +0x88 and a 128-bit T# at +0x98, inline and with no pointer. *Tested and written by Claude (AI assistant) on a contributor's machine.*
EdouardSence commented 2026-10-10 20:00:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by EdouardSence on 2026-10-10T20:00:06Z.


Update: with #757/#758 stacked (main 4a747c487 + #1940 + #758 + 44a80d4f), 0x80003aa700 gets past this analysis stop on RADV. It then hits a RADV descriptor allocation failure for a variable descriptor count of 0, with a workaround tested on #757: https://github.com/boykopovar/AnyPS5/pull/757. With that workaround the next stop is 0x8000265d00 (unnormalized sampler with a texel offset, #822).

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6101612811 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2715#issuecomment-6101612811). Originally posted by [EdouardSence](https://github.com/EdouardSence) on 2026-10-10T20:00:06Z. --- Update: with #757/#758 stacked (main `4a747c487` + #1940 + #758 + `44a80d4f`), `0x80003aa700` gets past this analysis stop on RADV. It then hits a RADV descriptor allocation failure for a variable descriptor count of 0, with a workaround tested on #757: https://github.com/boykopovar/AnyPS5/pull/757. With that workaround the next stop is `0x8000265d00` (unnormalized sampler with a texel offset, #822). *Tested and written by Claude (AI assistant) on a contributor's machine.*
Tamalero commented 2026-10-11 05:25:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Tamalero on 2026-10-11T05:25:53Z.


Another title hits this: Marvel's Guardians of the Galaxy (PPSA01748). It runs its loading screen (the shield spinner) at a steady 30 FPS for about 74 s / 1,350 frames, then aborts with GetImageResource dword 0 is not a valid runtime value on the first dispatch of one of these shaders. Nothing else stops it before that point, so this is its next blocker, and a second title #757 could unblock. Happy to test #757/#758 on it if that's useful.

Details

Title: Marvel's Guardians of the Galaxy (PPSA01748, content 01.006.000). Linux (CachyOS), RTX 4090, AnyPS5 f1ae427b plus local fixes. The ones Guardians needs to get past startup: PlayGo chunk ids without playgo-chunkdefs.xml (#3238), a null base in sceAgcDcbSetBaseIndirectArgs (#3239), sysmodule ids 0x10B/0x10F (#3240) and 0x110 (#2541), and an offline sceNpGetUserIdByAccountId (#2852). 2 of 2 runs.

Six shaders fail with this reason: five are deferred at registration, and the one the title dispatches fails at that point. They come in two shapes:

1. Loop-counter index (same as this issue). The dispatched one (pc=0x588) and the deferred 0x5d4 and 0x974 have the same chain:

LoadAddressU32@pc=0x00000588(GetAddressResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(Phi(Immediate, IAdd32(Phi(Immediate, IAdd32(Phi(Immediate, IAdd32(Phi, Immediate)), Immediate)), Immediate)), Immediate), Immediate, Immediate)

2. Data-dependent index, waterfall over lanes (pc=0x4378, 0x4380 ×2, not dispatched yet). The index is ReadFirstLane of a value picked through FindILsb32 of a lane mask, and part of it comes from an ImageRead:

LoadAddressU32@pc=0x00004380(GetAddressResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32(Phi(INotEqual32(BitwiseAnd32(ShiftRightLogical32(SelectU32, BitwiseAnd32), Immediate), Immediate), …), FindILsb32(Phi(SelectU32(Phi(INotEqual32, INotEqual32), CompositeExtractU32x4(ImageRead, Immediate), …

(The log truncates the chain there.)

I haven't attached the RecompileRequest dumps, since they are the game's shader code.

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

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105817727 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2715#issuecomment-6105817727). Originally posted by [Tamalero](https://github.com/Tamalero) on 2026-10-11T05:25:53Z. --- Another title hits this: **Marvel's Guardians of the Galaxy** (PPSA01748). It runs its loading screen (the shield spinner) at a steady 30 FPS for about 74 s / 1,350 frames, then aborts with `GetImageResource dword 0 is not a valid runtime value` on the first dispatch of one of these shaders. Nothing else stops it before that point, so this is its next blocker, and a second title #757 could unblock. Happy to test #757/#758 on it if that's useful. <details><summary>Details</summary> **Title:** Marvel's Guardians of the Galaxy (PPSA01748, content 01.006.000). Linux (CachyOS), RTX 4090, AnyPS5 `f1ae427b` plus local fixes. The ones Guardians needs to get past startup: PlayGo chunk ids without `playgo-chunkdefs.xml` (#3238), a null base in `sceAgcDcbSetBaseIndirectArgs` (#3239), sysmodule ids 0x10B/0x10F (#3240) and 0x110 (#2541), and an offline `sceNpGetUserIdByAccountId` (#2852). 2 of 2 runs. Six shaders fail with this reason: five are deferred at registration, and the one the title dispatches fails at that point. They come in two shapes: **1. Loop-counter index (same as this issue).** The dispatched one (`pc=0x588`) and the deferred `0x5d4` and `0x974` have the same chain: ``` LoadAddressU32@pc=0x00000588(GetAddressResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(Phi(Immediate, IAdd32(Phi(Immediate, IAdd32(Phi(Immediate, IAdd32(Phi, Immediate)), Immediate)), Immediate)), Immediate), Immediate, Immediate) ``` **2. Data-dependent index, waterfall over lanes** (`pc=0x4378`, `0x4380` ×2, not dispatched yet). The index is `ReadFirstLane` of a value picked through `FindILsb32` of a lane mask, and part of it comes from an `ImageRead`: ``` LoadAddressU32@pc=0x00004380(GetAddressResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), ShiftLeftLogical32(ReadFirstLane(SelectU32(Phi(INotEqual32(BitwiseAnd32(ShiftRightLogical32(SelectU32, BitwiseAnd32), Immediate), Immediate), …), FindILsb32(Phi(SelectU32(Phi(INotEqual32, INotEqual32), CompositeExtractU32x4(ImageRead, Immediate), … ``` (The log truncates the chain there.) I haven't attached the `RecompileRequest` dumps, since they are the game's shader code. </details> *Tested and written by Claude (AI assistant) on a contributor's machine.*
oneandonlydean commented 2026-10-14 20:29:36 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T20:29:36Z.


#757, #758 and #4475 are merged now (tables indexed at runtime offsets, and records that hold a pointer to the T#). Does PPSA26344 still stop at compute shader 0x80003aa700 on current main? If it gets further, please post the new stop.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177772865 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2715#issuecomment-6177772865). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T20:29:36Z. --- #757, #758 and #4475 are merged now (tables indexed at runtime offsets, and records that hold a pointer to the T#). Does PPSA26344 still stop at compute shader 0x80003aa700 on current main? If it gets further, please post the new stop.
xcentriq-afk commented 2026-10-17 11:36:22 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xcentriq-afk on 2026-10-17T11:36:22Z.


Hit the same recompiler stop on the v0.1.2 release binary (Windows), another shader site: compute 0x80003b2200 (this issue's is 0x80003aa700). Same loop-indexed T# chain shape (ReadConstBuffer@pc=0x5bc / 0x260 / 0x1f8 with the ShiftLeftLogical32(Phi(...)) loop counter).

Setup

  • Windows 11 (10.0.26200), relinker v0.1.2 official release exe, --windows --to-intel (i5-14600K)
  • GPU: NVIDIA GeForce RTX 5070 Ti (selected by name; swapchain 1536x864 created fine)
  • Title: Ghost of Yotei PPSA26344 (US, Digital Deluxe), game patch v1.512, decrypted dump
  • Crash ~25 s in, at first [videoout] presentation

Stop

[videoout] presentation failed: compute shader 0x80003b2200: shader 0x80003b2200 stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x000005bc(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), IMul32(ReadConstBuffer@pc=0x00000260(...), ShiftLeftLogical32(Phi(ReadConstBuffer@pc=0x000001f8(...), IMul32(ShiftRightLogical32(GetBuiltin, Immediate), Immediate)), IAdd32(Phi(...), Immediate)), Immediate)), Immediate))
terminate called after throwing an instance of 'std::runtime_error'
FATAL: abort() (SIGABRT) on thread 18888

Also worth noting: several shaders were deferred to first use with unsupported MIMG opcode 0xe5, and one log line shader library prebuild skipped: DescriptorBindingBuilder::Populate multisampled image resources have no descriptor image shape appeared shortly before the stop. Happy to provide the full logs or test a main-branch build on this setup.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6233421138 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2715#issuecomment-6233421138). Originally posted by [xcentriq-afk](https://github.com/xcentriq-afk) on 2026-10-17T11:36:22Z. --- Hit the same recompiler stop on the **v0.1.2 release binary** (Windows), another shader site: compute `0x80003b2200` (this issue's is `0x80003aa700`). Same loop-indexed T# chain shape (`ReadConstBuffer@pc=0x5bc` / `0x260` / `0x1f8` with the `ShiftLeftLogical32(Phi(...))` loop counter). **Setup** - Windows 11 (10.0.26200), relinker v0.1.2 official release exe, `--windows --to-intel` (i5-14600K) - GPU: NVIDIA GeForce RTX 5070 Ti (selected by name; swapchain 1536x864 created fine) - Title: Ghost of Yotei PPSA26344 (US, Digital Deluxe), game patch v1.512, decrypted dump - Crash ~25 s in, at first `[videoout]` presentation **Stop** ``` [videoout] presentation failed: compute shader 0x80003b2200: shader 0x80003b2200 stage 0: ShaderRecompiler::Recompile: GetImageResource dword 0 is not a valid runtime value; chain: ReadConstBuffer@pc=0x000005bc(GetBufferResource(ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate), ReadConst(GetSrtResource, Immediate)), IMul32(ReadConstBuffer@pc=0x00000260(...), ShiftLeftLogical32(Phi(ReadConstBuffer@pc=0x000001f8(...), IMul32(ShiftRightLogical32(GetBuiltin, Immediate), Immediate)), IAdd32(Phi(...), Immediate)), Immediate)), Immediate)) terminate called after throwing an instance of 'std::runtime_error' FATAL: abort() (SIGABRT) on thread 18888 ``` Also worth noting: several shaders were deferred to first use with `unsupported MIMG opcode 0xe5`, and one log line `shader library prebuild skipped: DescriptorBindingBuilder::Populate multisampled image resources have no descriptor image shape` appeared shortly before the stop. Happy to provide the full logs or test a main-branch build on this setup.
paulgenes13 commented 2026-10-18 12:54:45 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by paulgenes13 on 2026-10-18T12:54:45Z.


Windows follow-up: three additional Ghost of Yōtei compute shader failures on current main

I reproduced three additional GetImageResource dword 0 is not a valid runtime value failures from Ghost of Yōtei (PPSA26344), using previously captured shader requests and a fresh official build.

Environment

  • Windows 11; Intel Core i7-12700KF; NVIDIA GeForce RTX 5060 8 GB; 32 GB RAM.
  • MinGW-w64 / WinLibs GCC 15.2.0, CMake + Ninja, Release configuration.
  • AnyPS5 official main at commit 6efb7261b, cloned and built independently on 2026-10-18.
  • Target: agc_shader_replay.exe.
  • The original modified installation and the game were not used for these offline comparisons.

Offline reproduction

Run the newly built replay tool against the three previously captured request files:

agc_shader_replay.exe shader_8000361f00.req shader_80001ddd00.req shader_8000133e00.req
Compute shader Code words Workgroup Failure
0x8000361f00 1,364 8x8x1, wave64 GetImageResource dword 0; chain starts with ReadFirstLane(Phi(...))
0x80001ddd00 8,276 16x16x1, wave64 GetImageResource dword 0; ReadConstBuffer@pc=0x2320(...) with nested ReadFirstLane(...)
0x8000133e00 13,988 16x16x1, wave64 GetImageResource dword 0; ReadConstBuffer@pc=0x2ae8(...) with nested ReadFirstLane(...)

All three fail at resource analysis, before SPIR-V emission. The clean build produces the same failure class as the earlier modified build.

Testing the clean build with APS5_SINGLE_LANE=8000361f00,80001ddd00,8000133e00 produced the same offline replay output; the setting did not resolve any of these cases.

Closer look at 0x8000361f00

I temporarily instrumented ResolveInvariantPhi() in IrProgram.cpp and replayed the captured shader. The original source was restored afterward, and the diagnostic was performed separately from the fresh official build.

The first rejected Phi was ID 22163, with two incoming arguments:

  • Input 0: SelectU32 ID 4749.
  • Input 1: Phi ID 22164.

Traversing the nested Phis identified this first structurally non-equivalent leaf pair:

Branch A Branch B
SelectU32 ID 8423 SelectU32 ID 8189
LogicalAnd ID 8403 LogicalAnd ID 7554
INotEqual32 ID 8395 LogicalAnd ID 7301

The first structural mismatch occurs inside the conditions supplied to the two SelectU32 expressions. Both branch trees refer to the same ReadConst value (ID 24655, GetSrtResource slot 0x17), but their predicates and fallback expressions differ.

This establishes that the current invariant-Phi equivalence check cannot prove the incoming values equal. It does not prove whether the expressions are semantically equivalent, and it would not justify selecting one branch or simply bypassing validation.

IR observation

With the built-in APS5_DUMP_IR=8000361f00, the srt IR shows eight ReadFirstLane operations feeding the eight dwords of a GetImageResource handle. The shader compares the selected descriptor with per-lane values, samples with ImageSampleRaw, and updates a lane mask. This is consistent with a waterfall-style loop for per-lane image descriptor selection.

Scope / offer

The captured cases appear related to runtime image descriptor selection, ReadFirstLane, and Phi-dependent control flow, but I have not established whether the right fix is in Phi simplification, SRT runtime validation, or image-table planning. The observations above are from actual local offline runs, not a proposed patch.

I am not uploading .req captures because they include guest shader code and captured memory. I can run additional offline checks or share more targeted diagnostic output if useful.

Investigated and documented with AI assistance; test results were produced locally.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6250162588 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/2715#issuecomment-6250162588). Originally posted by [paulgenes13](https://github.com/paulgenes13) on 2026-10-18T12:54:45Z. --- ### Windows follow-up: three additional Ghost of Yōtei compute shader failures on current main I reproduced three additional `GetImageResource dword 0 is not a valid runtime value` failures from Ghost of Yōtei (PPSA26344), using previously captured shader requests and a fresh official build. **Environment** - Windows 11; Intel Core i7-12700KF; NVIDIA GeForce RTX 5060 8 GB; 32 GB RAM. - MinGW-w64 / WinLibs GCC 15.2.0, CMake + Ninja, Release configuration. - AnyPS5 official `main` at commit **`6efb7261b`**, cloned and built independently on 2026-10-18. - Target: `agc_shader_replay.exe`. - The original modified installation and the game were not used for these offline comparisons. **Offline reproduction** Run the newly built replay tool against the three previously captured request files: ```cmd agc_shader_replay.exe shader_8000361f00.req shader_80001ddd00.req shader_8000133e00.req ``` | Compute shader | Code words | Workgroup | Failure | | --- | ---: | --- | --- | | `0x8000361f00` | 1,364 | 8x8x1, wave64 | `GetImageResource dword 0`; chain starts with `ReadFirstLane(Phi(...))` | | `0x80001ddd00` | 8,276 | 16x16x1, wave64 | `GetImageResource dword 0`; `ReadConstBuffer@pc=0x2320(...)` with nested `ReadFirstLane(...)` | | `0x8000133e00` | 13,988 | 16x16x1, wave64 | `GetImageResource dword 0`; `ReadConstBuffer@pc=0x2ae8(...)` with nested `ReadFirstLane(...)` | All three fail at resource analysis, before SPIR-V emission. The clean build produces the same failure class as the earlier modified build. Testing the clean build with `APS5_SINGLE_LANE=8000361f00,80001ddd00,8000133e00` produced the same offline replay output; the setting did not resolve any of these cases. **Closer look at `0x8000361f00`** I temporarily instrumented `ResolveInvariantPhi()` in `IrProgram.cpp` and replayed the captured shader. The original source was restored afterward, and the diagnostic was performed separately from the fresh official build. The first rejected Phi was ID `22163`, with two incoming arguments: - Input 0: `SelectU32` ID `4749`. - Input 1: `Phi` ID `22164`. Traversing the nested Phis identified this first structurally non-equivalent leaf pair: | Branch A | Branch B | | --- | --- | | `SelectU32` ID `8423` | `SelectU32` ID `8189` | | `LogicalAnd` ID `8403` | `LogicalAnd` ID `7554` | | `INotEqual32` ID `8395` | `LogicalAnd` ID `7301` | The first structural mismatch occurs inside the conditions supplied to the two `SelectU32` expressions. Both branch trees refer to the same `ReadConst` value (ID `24655`, `GetSrtResource` slot `0x17`), but their predicates and fallback expressions differ. This establishes that the current invariant-Phi equivalence check cannot prove the incoming values equal. It does **not** prove whether the expressions are semantically equivalent, and it would not justify selecting one branch or simply bypassing validation. **IR observation** With the built-in `APS5_DUMP_IR=8000361f00`, the `srt` IR shows eight `ReadFirstLane` operations feeding the eight dwords of a `GetImageResource` handle. The shader compares the selected descriptor with per-lane values, samples with `ImageSampleRaw`, and updates a lane mask. This is consistent with a waterfall-style loop for per-lane image descriptor selection. **Scope / offer** The captured cases appear related to runtime image descriptor selection, `ReadFirstLane`, and Phi-dependent control flow, but I have not established whether the right fix is in Phi simplification, SRT runtime validation, or image-table planning. The observations above are from actual local offline runs, not a proposed patch. I am not uploading `.req` captures because they include guest shader code and captured memory. I can run additional offline checks or share more targeted diagnostic output if useful. *Investigated and documented with AI assistance; test results were produced locally.*
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#2715
No description provided.