Astro Bot black screen: SRT walker address handles fail to evaluate — root-cause findings (probes 9-33) #1039

Closed
opened 2026-11-26 09:41:22 +00:00 by github-bot · 1 comment
Owner

@⁠theantipopau on GitHub · 2026-10-04 03:21 UTC · original

Related to #980 (same game/window; findings from a long instrumented-bisect run, posting here rather than in that thread).

Symptom

Astro Bot (PPSA21564-app0) boots to the title screen (renders, ~50 fps) and through tunnel FX (~30 fps), but gameplay is reached only via shader-recompile fallbacks and the screen stays black. Instrumented builds survive a full 240 s run (RC=124), so this is a soft failure chain, not a hard crash.

Root cause chain (verified in probe logs 9-33)

1. Zero address handles reach SrtWalker::EvaluateRawRead. The walker falls through to a raw memcpy of a tiny address whenever the address handle's low/high lanes evaluate to 0. Probe 21 counted ~194,820 reads below 0x10000. The backing table at 0x50cc3cd00 (GpuGarlicMemory) stays zero at words 0-27 forever — the game writes those words starting at word 28 — and the TryWriteBacking overlap hook never fires, so nothing ever populates the region the walker is reading.

2. ResolveInvariantPhi cannot match structurally different phi arms. Probe 30's phi dump shows arms such as

  • arm A: extract32x2(add64(extract32x2(...), extract64(shl64(...)))) — a register-materialized chain
  • arm B: extract32x2(add64(LoadAddressU32(GetAddressResource ...), 0x80))

EquivalentValue compares shape, so these never match and the phi collapses to return {}, leaving the handle unevaluated.

3. Genuine phi(0, select) disagreements need block-condition awareness. Probe 30 also logged phiarg0 ok=1 val=0x0 op=-1 vs phiarg1 ok=1 val=0x3ba24174/0x3f800000/0x3f7fffff op=291 (SelectU32) — the arms legitimately differ because their PhiBlock conditions differ, but the value-level fallback in ResolveInvariantPhi ignores block conditions, so a correct resolution is thrown away.

4. Missing evaluator cases cascade into true-leaf failures. Probes 31-33 added a true-leaf finder in EvaluateWide's failure path (all operands evaluate, node still fails). Progress so far:

  • probe 32: GetBufferResource/GetAddressResource handle evaluation (low | high<<32) — default-op failures 6 -> 1
  • probe 33: FPAdd/Sub/Min/Max/Equal/NotEqual/Abs/Neg/Sqrt/Saturate — "fp fail" tags 66 -> 33

Still failing: ReadConstBuffer (raw read through m_clean_flat_slots fails at the read_memory step), GetImageResource (8x ReadConst operands all evaluate), CompositeExtractU32x4, flat slots 241/242, LoadSharedU32x4.

5. Descriptor chain needs flat slots that are zero-filled first. The desc-fail chain is extract64(shl64(construct64(ReadConst slot 0xf1, ReadConst slot 0xf2 & 0x3fffff), 3), 0) — RefreshFlatBuffer zero-fills failing slots before ReadConst reads them, so the chain evaluates to garbage instead of failing loudly.

Budget-capped counters on the latest run (probe 33): materialize-fail 64, zero-fill 64, refresh 64, desc-fail 16 (each capped at 64); mf_total 43,708; phi total 8.47 M re-evaluations.

Proposed direction

This matches the architecture upstream PR #558 already takes: route flat-slot reads whose address tree reaches a phi to dynamic_reads instead of evaluating them eagerly, and make the value-level phi fallback condition-aware (ResourceBlock::condition in ShaderIR.h). The missing evaluator cases (probe 32/33 list above) are the other half.

Evidence

Instrumented worktree builds (probe9..probe33), full 240 s game runs each, logs in the local _tmp_runs/ (astro_probeNN.log). Success gate for any fix PR: clean-fix build renders Astro Bot gameplay non-black, plus green ctest / shader_recompiler_compute_tests.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff [email protected]

**@⁠theantipopau** on GitHub · 2026-10-04 03:21 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1039) Related to #980 (same game/window; findings from a long instrumented-bisect run, posting here rather than in that thread). ## Symptom Astro Bot (PPSA21564-app0) boots to the title screen (renders, ~50 fps) and through tunnel FX (~30 fps), but gameplay is reached only via shader-recompile fallbacks and the screen stays black. Instrumented builds survive a full 240 s run (RC=124), so this is a soft failure chain, not a hard crash. ## Root cause chain (verified in probe logs 9-33) **1. Zero address handles reach `SrtWalker::EvaluateRawRead`.** The walker falls through to a raw `memcpy` of a tiny `address` whenever the address handle's low/high lanes evaluate to 0. Probe 21 counted ~194,820 reads below 0x10000. The backing table at `0x50cc3cd00` (GpuGarlicMemory) stays zero at words 0-27 forever — the game writes those words starting at word 28 — and the `TryWriteBacking` overlap hook never fires, so nothing ever populates the region the walker is reading. **2. `ResolveInvariantPhi` cannot match structurally different phi arms.** Probe 30's phi dump shows arms such as - arm A: `extract32x2(add64(extract32x2(...), extract64(shl64(...))))` — a register-materialized chain - arm B: `extract32x2(add64(LoadAddressU32(GetAddressResource ...), 0x80))` `EquivalentValue` compares shape, so these never match and the phi collapses to `return {}`, leaving the handle unevaluated. **3. Genuine phi(0, select) disagreements need block-condition awareness.** Probe 30 also logged `phiarg0 ok=1 val=0x0 op=-1` vs `phiarg1 ok=1 val=0x3ba24174/0x3f800000/0x3f7fffff op=291 (SelectU32)` — the arms legitimately differ because their `PhiBlock` conditions differ, but the value-level fallback in `ResolveInvariantPhi` ignores block conditions, so a correct resolution is thrown away. **4. Missing evaluator cases cascade into true-leaf failures.** Probes 31-33 added a true-leaf finder in `EvaluateWide`'s failure path (all operands evaluate, node still fails). Progress so far: - probe 32: `GetBufferResource`/`GetAddressResource` handle evaluation (low | high<<32) — default-op failures 6 -> 1 - probe 33: FPAdd/Sub/Min/Max/Equal/NotEqual/Abs/Neg/Sqrt/Saturate — "fp fail" tags 66 -> 33 Still failing: `ReadConstBuffer` (raw read through `m_clean_flat_slots` fails at the read_memory step), `GetImageResource` (8x ReadConst operands all evaluate), `CompositeExtractU32x4`, flat slots 241/242, `LoadSharedU32x4`. **5. Descriptor chain needs flat slots that are zero-filled first.** The desc-fail chain is `extract64(shl64(construct64(ReadConst slot 0xf1, ReadConst slot 0xf2 & 0x3fffff), 3), 0)` — `RefreshFlatBuffer` zero-fills failing slots before `ReadConst` reads them, so the chain evaluates to garbage instead of failing loudly. Budget-capped counters on the latest run (probe 33): materialize-fail 64, zero-fill 64, refresh 64, desc-fail 16 (each capped at 64); `mf_total` 43,708; phi total 8.47 M re-evaluations. ## Proposed direction This matches the architecture upstream PR #558 already takes: route flat-slot reads whose address tree reaches a phi to `dynamic_reads` instead of evaluating them eagerly, and make the value-level phi fallback condition-aware (`ResourceBlock::condition` in `ShaderIR.h`). The missing evaluator cases (probe 32/33 list above) are the other half. ## Evidence Instrumented worktree builds (probe9..probe33), full 240 s game runs each, logs in the local `_tmp_runs/` (astro_probeNN.log). Success gate for any fix PR: clean-fix build renders Astro Bot gameplay non-black, plus green ctest / shader_recompiler_compute_tests. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:41:22 +00:00
Author
Owner

@⁠Nmzik on GitHub · 2026-10-18 16:45 UTC · original

Duplicate of #1511.

Consolidating compatibility evidence for PPSA21564 in the newer report #1511. This older report has no posted screenshots or video in its body or comments. Its logs and discussion remain available here; this closure consolidates reports and does not mark the reported behavior as fixed.

**@⁠Nmzik** on GitHub · 2026-10-18 16:45 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1039#issuecomment-6252470865) Duplicate of #1511. Consolidating compatibility evidence for PPSA21564 in the newer report #1511. This older report has no posted screenshots or video in its body or comments. Its logs and discussion remain available here; this closure consolidates reports and does not mark the reported behavior as fixed.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#1039
No description provided.