[GAME STATUS]: Astro Bot (PPSA21564) — Intel Arc B580: GPU DEVICE_LOST on the BVH/RT compute dispatches (after the boot-crash fix) #1511

Open
opened 2026-11-26 09:58:24 +00:00 by github-bot · 23 comments
Owner

@⁠hlava0 on GitHub · 2026-10-14 15:39 UTC · original

[GAME STATUS]: Astro Bot (PPSA21564) — Intel Arc B580: GPU DEVICE_LOST on the BVH/RT compute dispatches (after the boot-crash fix)

Game: ASTRO BOT — PPSA21564 (USA, v01.007.000)
Builds tested: official KytyPS5-2026-10-12-df5b9b9; source tip 9e41d83 built locally (Release+IPO) with the two local fixes below.
GPU / OS: Intel Arc B580 (BMG G21, 8086:e20b), Mesa 26.0.8 (ANV), Linux 7.0.0-38, xe driver (stock). Subgroup size 32.
Status: Doesn't boot on official; with local fixes it boots and plays the intro, then the GPU hangs (DEVICE_LOST).

This is the Intel counterpart of #1498 (same title, RTX 5070). Two distinct blockers:

1. Boot crash — null SRT read (same root cause as #1498 item 1)

Unhandled host exception: type=1 code=11 ... access=1 address=0x0000000000000018
 in src/loader/runtimeLinker.cpp (generic host exception reporter)

The faulting memcpy is called from SrtReadCapture::ReadOrdinary (SrtWalker.cpp); pipelineCache.cpp sets only read_specialization_memory, so ordinary SRT reads fall back to a raw host memcpy of the guest address. Several compute shaders have a null resource-table pointer, so it reads 0x18 (also 0x30/0x34). Local fix (matches the patch in #1498): read via Memory::TryReadBufferBacking(...), and evaluate reads of the first page as zero.

2. GPU hang / DEVICE_LOST on the BVH (ray-tracing) compute dispatches

After the boot fix, the game compiles shaders, plays the intro video, then:

MasterSemaphore: wait for tick N failed: ErrorDeviceLost (gpu tick N-1)
  in src/graphics/host_gpu/renderer/masterSemaphore.cpp:53
--- Device loss: submission/wait tick=17..21 ---

Kernel side (real GPU hang, not a host bug):

xe 0000:03:00.0: [drm] Tile0: GT0: Engine reset: engine_class=rcs, ...
xe ...: [drm] Tile0: GT0: Timedout job: seqno=0xFFFFFFFx ... in kyty_emulator

The hang coincides with the compute shaders that carry BVH intersection instructions (Astro Bot's tiled deferred lighting / GI). The emulator logs them, e.g.:

SRT: compute shader 0x503d7f066a496c3c reads unmapped address 0x30 before its dispatch; the read returns 0 ... and the dispatch runs.

It reproduces on the current mainline tip (9e41d83) with the boot fix applied. Skipping those dispatches (unlit) avoids the hang but there is no correct rendering.

Reproduce: build the repo _Build/linux, then
./kyty_emulator --game "/path/PPSA21564/eboot.bin".

Related: #1498 (same title, NVIDIA, same two symptoms — boot crash + post-intro device loss). The Jetsku fork (github.com/Jetsku/KytyPS5) gets much further on this same Intel machine (plays the intro and renders) but its software-RT kernels still hang the Arc — filing that separately.

**@⁠hlava0** on GitHub · 2026-10-14 15:39 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511) [GAME STATUS]: Astro Bot (PPSA21564) — Intel Arc B580: GPU DEVICE_LOST on the BVH/RT compute dispatches (after the boot-crash fix) **Game:** ASTRO BOT — `PPSA21564` (USA, v01.007.000) **Builds tested:** official `KytyPS5-2026-10-12-df5b9b9`; source tip `9e41d83` built locally (Release+IPO) with the two local fixes below. **GPU / OS:** Intel Arc B580 (BMG G21, `8086:e20b`), Mesa 26.0.8 (ANV), Linux 7.0.0-38, `xe` driver (stock). Subgroup size 32. **Status:** Doesn't boot on official; with local fixes it boots and plays the intro, then the GPU hangs (DEVICE_LOST). This is the Intel counterpart of #1498 (same title, RTX 5070). Two distinct blockers: ### 1. Boot crash — null SRT read (same root cause as #1498 item 1) ``` Unhandled host exception: type=1 code=11 ... access=1 address=0x0000000000000018 in src/loader/runtimeLinker.cpp (generic host exception reporter) ``` The faulting `memcpy` is called from `SrtReadCapture::ReadOrdinary` (`SrtWalker.cpp`); `pipelineCache.cpp` sets only `read_specialization_memory`, so ordinary SRT reads fall back to a raw host `memcpy` of the guest address. Several compute shaders have a null resource-table pointer, so it reads `0x18` (also `0x30/0x34`). Local fix (matches the patch in #1498): read via `Memory::TryReadBufferBacking(...)`, and evaluate reads of the first page as zero. ### 2. GPU hang / DEVICE_LOST on the BVH (ray-tracing) compute dispatches After the boot fix, the game compiles shaders, plays the intro video, then: ``` MasterSemaphore: wait for tick N failed: ErrorDeviceLost (gpu tick N-1) in src/graphics/host_gpu/renderer/masterSemaphore.cpp:53 --- Device loss: submission/wait tick=17..21 --- ``` Kernel side (real GPU hang, not a host bug): ``` xe 0000:03:00.0: [drm] Tile0: GT0: Engine reset: engine_class=rcs, ... xe ...: [drm] Tile0: GT0: Timedout job: seqno=0xFFFFFFFx ... in kyty_emulator ``` The hang coincides with the compute shaders that carry BVH intersection instructions (Astro Bot's tiled deferred lighting / GI). The emulator logs them, e.g.: ``` SRT: compute shader 0x503d7f066a496c3c reads unmapped address 0x30 before its dispatch; the read returns 0 ... and the dispatch runs. ``` It reproduces on the current mainline tip (`9e41d83`) with the boot fix applied. Skipping those dispatches (unlit) avoids the hang but there is no correct rendering. **Reproduce:** build the repo `_Build/linux`, then `./kyty_emulator --game "/path/PPSA21564/eboot.bin"`. **Related:** #1498 (same title, NVIDIA, same two symptoms — boot crash + post-intro device loss). The Jetsku fork (`github.com/Jetsku/KytyPS5`) gets much further on this same Intel machine (plays the intro and renders) but its software-RT kernels still hang the Arc — filing that separately.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:58:24 +00:00
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-15 22:00 UTC · original

One thing worth trying on the B580, no rebuild needed: start Astro Bot with INTEL_SIMD_DEBUG=cs32 in the environment and play past the intro as before.

Why: on GPUs whose subgroups can't be 64 wide, Kyty runs each guest wave as 32 host invocations (a wave64 compute program puts two guest lanes in each invocation) and assumes those 32 invocations are one subgroup (host_subgroup_size = 32, pipelineCache.cpp:753). It only requests a fixed subgroup size when the GPU can do 64 (vulkanWindow.cpp:540-544), so on Intel it requests none.

Mesa 26.0.8's ANV then gives the shader a SubgroupSize of 32, but brw may dispatch a compute shader 16 wide on Xe2. It skips the SIMD32 variant when a narrower one spilled or when SIMD32 is estimated to be over the register-pressure threshold (brw_simd_selection.cpp), and Kyty's split shaders hold two lanes per invocation. A guest wave would then span two hardware subgroups, ballots and shuffles would see only half of it, and that can keep a loop from ever ending. That's allowed by the spec (without full subgroups it only encourages filling them); ANV carries a driconf workaround for the same assumption in other games (anv_assume_full_subgroups).

INTEL_SIMD_DEBUG=cs32 disables the SIMD16 variant, so compute shaders are dispatched 32 wide even when that spills (slower, fine for a test; it only affects compute shaders).

If the hang after the intro goes away with it, the subgroup width is the cause. Kyty could then require 32-wide compute subgroups on GPUs that allow it, with no change for GPUs that can do 64. If it still hangs, this probably isn't it, at least for compute shaders. Either way the result would help; please attach the log of that run.

Written with Claude Code (AI). Kyty lines are from 9e41d832, Mesa references from the 26.0.8 source; I checked both.

**@⁠Nawid3333** on GitHub · 2026-10-15 22:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6203173234) One thing worth trying on the B580, no rebuild needed: start Astro Bot with `INTEL_SIMD_DEBUG=cs32` in the environment and play past the intro as before. Why: on GPUs whose subgroups can't be 64 wide, Kyty runs each guest wave as 32 host invocations (a wave64 compute program puts two guest lanes in each invocation) and assumes those 32 invocations are one subgroup (`host_subgroup_size = 32`, `pipelineCache.cpp:753`). It only requests a fixed subgroup size when the GPU can do 64 (`vulkanWindow.cpp:540-544`), so on Intel it requests none. Mesa 26.0.8's ANV then gives the shader a `SubgroupSize` of 32, but brw may dispatch a compute shader 16 wide on Xe2. It skips the SIMD32 variant when a narrower one spilled or when SIMD32 is estimated to be over the register-pressure threshold (`brw_simd_selection.cpp`), and Kyty's split shaders hold two lanes per invocation. A guest wave would then span two hardware subgroups, ballots and shuffles would see only half of it, and that can keep a loop from ever ending. That's allowed by the spec (without full subgroups it only encourages filling them); ANV carries a driconf workaround for the same assumption in other games (`anv_assume_full_subgroups`). `INTEL_SIMD_DEBUG=cs32` disables the SIMD16 variant, so compute shaders are dispatched 32 wide even when that spills (slower, fine for a test; it only affects compute shaders). If the hang after the intro goes away with it, the subgroup width is the cause. Kyty could then require 32-wide compute subgroups on GPUs that allow it, with no change for GPUs that can do 64. If it still hangs, this probably isn't it, at least for compute shaders. Either way the result would help; please attach the log of that run. Written with Claude Code (AI). Kyty lines are from 9e41d832, Mesa references from the 26.0.8 source; I checked both.
Author
Owner

@⁠hlava0 on GitHub · 2026-10-16 09:59 UTC · original

Update from the same Intel Arc B580 machine — a strong lead on the post-intro ErrorDeviceLost.

The hang is the compute subgroup width. On a host whose subgroups can't be 64 wide, Kyty runs each guest wave as 32 host invocations (a wave64 program puts two guest lanes per invocation) and assumes those 32 invocations are one subgroup (pipelineCache.cpp, host_subgroup_size = 32); it only requests a fixed subgroup size when the GPU can do 64 (vulkanWindow.cpp:540-544), so on Intel it requests none. Anvil/Mesa may then dispatch a compute shader 16-wide on Xe2, so a guest wave spans two hardware subgroups and ballots/shuffles see half of it — a loop never ends -> GPU timeout.

Test: run with INTEL_SIMD_DEBUG=cs32 (disables the SIMD16 compute variant).

Result: the device loss at the RT/BVH compute dispatches disappears — the shaders build, the game renders, and the intro video plays (previously it always died at submission tick ~17-21). It then hits a different later failure (create mesh-indirect pipeline failed: ErrorUnknown), i.e. mesh shaders need the same treatment.

Suggested fix (upstream): when the GPU supports it, require a fixed 32-wide compute subgroup (e.g. a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo of 32, and/or the anv_assume_full_subgroups driconf), leaving it unset on GPUs that can do 64. Full logs are in Jetsku/KytyPS5#47.

**@⁠hlava0** on GitHub · 2026-10-16 09:59 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6213000331) Update from the same Intel Arc B580 machine — a strong lead on the post-intro `ErrorDeviceLost`. The hang is the **compute subgroup width**. On a host whose subgroups can't be 64 wide, Kyty runs each guest wave as 32 host invocations (a wave64 program puts two guest lanes per invocation) and assumes those 32 invocations are one subgroup (`pipelineCache.cpp`, `host_subgroup_size = 32`); it only requests a fixed subgroup size when the GPU can do 64 (`vulkanWindow.cpp:540-544`), so on Intel it requests none. Anvil/Mesa may then dispatch a compute shader **16-wide** on Xe2, so a guest wave spans two hardware subgroups and ballots/shuffles see half of it — a loop never ends -> GPU timeout. **Test:** run with `INTEL_SIMD_DEBUG=cs32` (disables the SIMD16 compute variant). **Result:** the device loss at the RT/BVH compute dispatches disappears — the shaders build, the game renders, and the intro video plays (previously it always died at submission tick ~17-21). It then hits a *different* later failure (`create mesh-indirect pipeline failed: ErrorUnknown`), i.e. mesh shaders need the same treatment. **Suggested fix (upstream):** when the GPU supports it, require a fixed 32-wide compute subgroup (e.g. a `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` of 32, and/or the `anv_assume_full_subgroups` driconf), leaving it unset on GPUs that can do 64. Full logs are in Jetsku/KytyPS5#47.
Author
Owner

@⁠hlava0 on GitHub · 2026-10-16 11:27 UTC · original

Follow-up after reading the fork/upstream sources:

Kyty already requests a fixed 32-wide compute subgroup on this device — deviceCompat.h requires min(wave, host_subgroup), shaders.cpp chains VkPipelineShaderStageRequiredSubgroupSizeCreateInfo on every compute pipeline (the software-RT kernels go through the same CreatePipelineInternal), and this Arc reports min 16 / max 32, requiredSubgroupSizeStages=COMPUTE|TASK|MESH, subgroupSizeControl=yes, so requiredSubgroupSize=32 is set. Runtime confirms it (no "cannot require its subgroup size" warning).

Yet the GPU still hangs on the RT kernels, and forcing the driver with INTEL_SIMD_DEBUG=cs32 is still required to avoid it. So the 32-wide requirement is not being honoured by Mesa/ANV on Battlemage — that's where the remaining fix is, not in Kyty. Filed upstream as a Mesa bug with the repro.

**@⁠hlava0** on GitHub · 2026-10-16 11:27 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6214492394) Follow-up after reading the fork/upstream sources: Kyty **already requests a fixed 32-wide compute subgroup** on this device — `deviceCompat.h` requires `min(wave, host_subgroup)`, `shaders.cpp` chains `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` on every compute pipeline (the software-RT kernels go through the same `CreatePipelineInternal`), and this Arc reports `min 16 / max 32, requiredSubgroupSizeStages=COMPUTE|TASK|MESH, subgroupSizeControl=yes`, so `requiredSubgroupSize=32` is set. Runtime confirms it (no "cannot require its subgroup size" warning). Yet the GPU still hangs on the RT kernels, and forcing the driver with `INTEL_SIMD_DEBUG=cs32` is still required to avoid it. So the 32-wide requirement is **not being honoured by Mesa/ANV on Battlemage** — that's where the remaining fix is, not in Kyty. Filed upstream as a Mesa bug with the repro.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-16 12:00 UTC · original

Thanks for checking. Right: the fork has required 32-wide compute subgroups since 97fe0ef8 (2026-10-04), so your 28bc20f build already had what I suggested, and it still hung without INTEL_SIMD_DEBUG=cs32. Requiring 32 isn't enough. (Upstream Kyty requests no subgroup size on Intel.)

One thing doesn't fit "not honoured", though. In Mesa 26.0.8, a VkPipelineShaderStageRequiredSubgroupSizeCreateInfo of 32 sets the shader's minimum and maximum subgroup size to 32 (vk_set_subgroup_size in vk_pipeline.c), and brw then compiles only SIMD32, without its spill and register-pressure checks (brw_required_dispatch_width, brw_simd_should_compile). That's the width cs32 forces. So for pipelines that request 32, cs32 doesn't change the compiled width; it still changes compute shaders that request no size. And your cs32,ms32 run in Jetsku/KytyPS5#47 also hung (tick 78), so the hang may vary between runs.

Two checks would narrow it down:

  • a few runs each with and without cs32: does cs32 reliably avoid the hang?
  • one run without cs32 and with INTEL_DEBUG=cs (large; redirect stderr to a file). Mesa prints every compiled compute shader as "Native code for ... SIMD32 shader: ..." (brw_generator.cpp). If the RT kernels show SIMD16, the request isn't reaching Mesa. If they show SIMD32, it is, and cs32 helps through other shaders or the hang is intermittent.

On your questions in Jetsku/KytyPS5#47: cs32,ms32 is valid (comma-separated). INTEL_DEBUG=do32 doesn't force compute width: for compute it only matters on GPUs older than Xe2, and on the B580 it only keeps SIMD32 fragment shaders that the compiler would otherwise drop as slower.

Written with Claude Code (AI). It read the fork's and Mesa 26.0.8's source; I reviewed this comment before posting it.

**@⁠Nawid3333** on GitHub · 2026-10-16 12:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6215027370) Thanks for checking. Right: the fork has required 32-wide compute subgroups since 97fe0ef8 (2026-10-04), so your 28bc20f build already had what I suggested, and it still hung without `INTEL_SIMD_DEBUG=cs32`. Requiring 32 isn't enough. (Upstream Kyty requests no subgroup size on Intel.) One thing doesn't fit "not honoured", though. In Mesa 26.0.8, a `VkPipelineShaderStageRequiredSubgroupSizeCreateInfo` of 32 sets the shader's minimum and maximum subgroup size to 32 (`vk_set_subgroup_size` in `vk_pipeline.c`), and brw then compiles only SIMD32, without its spill and register-pressure checks (`brw_required_dispatch_width`, `brw_simd_should_compile`). That's the width `cs32` forces. So for pipelines that request 32, `cs32` doesn't change the compiled width; it still changes compute shaders that request no size. And your `cs32,ms32` run in Jetsku/KytyPS5#47 also hung (tick 78), so the hang may vary between runs. Two checks would narrow it down: - a few runs each with and without `cs32`: does `cs32` reliably avoid the hang? - one run without `cs32` and with `INTEL_DEBUG=cs` (large; redirect stderr to a file). Mesa prints every compiled compute shader as "Native code for ... SIMD32 shader: ..." (`brw_generator.cpp`). If the RT kernels show SIMD16, the request isn't reaching Mesa. If they show SIMD32, it is, and `cs32` helps through other shaders or the hang is intermittent. On your questions in Jetsku/KytyPS5#47: `cs32,ms32` is valid (comma-separated). `INTEL_DEBUG=do32` doesn't force compute width: for compute it only matters on GPUs older than Xe2, and on the B580 it only keeps SIMD32 fragment shaders that the compiler would otherwise drop as slower. Written with Claude Code (AI). It read the fork's and Mesa 26.0.8's source; I reviewed this comment before posting it.
Author
Owner

@⁠fabled-aesop on GitHub · 2026-10-20 07:25 UTC · original

ASTRO BOT (PPSA21564, 01.007.000) on RTX 5080: PR #1528 fixes the boot crash, then DEVICE_LOST
Hardware / software

GPU: NVIDIA GeForce RTX 5080, driver 610.88 (Vulkan 1.4.341)
CPU: Intel Core i7-14700K
RAM: 64 GB
OS: Windows 11 Home, build 26200
Game: ASTRO BOT, PPSA21564, content version 01.007.000 (no patch applied; the bundled non-RT patch targets PPSA21567 01.018.000)

  1. Official build KytyPS5-2026-10-20-1a053f9: boot crash

Crashes after the first few shaders (VS 3 / PS 2 / CS 15) with the same error as #1675:

Unhandled host exception: type=1 code=3221225477 pc=0x00007ffa6207cc5a access=1 address=0x0000000000000058
in D:\a\KytyPS5\KytyPS5\src\loader\runtimeLinker.cpp:715
From the guest fault context: the faulting instruction is mov ecx,[rdx] with rdx=0x58 and r8=4, i.e. a 4-byte memcpy from a null pointer + 0x58, on a host thread. The return address on the stack (0x140a930be) is inside kyty_emulator.exe. Full log attached.

  1. Source build of 1a053f9 + PR #1528 merged (local 78bade8): boot crash fixed, then GPU hang

PR #1528 merged cleanly on top of 1a053f9. Built with clang-cl 19.1.5 / Qt 6.10.3 / Release, same configuration as CI (without IPO/sccache).

With it, the 0x58 crash is gone. The game plays the intro video (AvPlayer video started playing / stopped) and compiles up to VS 18 / PS 26 / CS 47 / GS 2, then:

vkQueueSubmit failed: ErrorDeviceLost (-4), tick=807263 debug_op=2 debug_submit=20753 args=1792,64,0,1,0x0000000000000000
--- Build ---
Source build 78bade8
--- Fatal Error ---
Not implemented (result != vk::Result::eSuccess) in E:\ROM\KytyPS5-src\src\graphics\host_gpu\renderer\commandScheduler.cpp:385
The process stayed open after the fatal error. Other notable log lines:

GPU: using buffer device address (BDA) shader memory access.
Warning: game uses occlusion queries, which are currently treated as always visible

Full log-

log_official-build-1a053f9.txt

**@⁠fabled-aesop** on GitHub · 2026-10-20 07:25 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6285697375) ASTRO BOT (PPSA21564, 01.007.000) on RTX 5080: PR #1528 fixes the boot crash, then DEVICE_LOST Hardware / software GPU: NVIDIA GeForce RTX 5080, driver 610.88 (Vulkan 1.4.341) CPU: Intel Core i7-14700K RAM: 64 GB OS: Windows 11 Home, build 26200 Game: ASTRO BOT, PPSA21564, content version 01.007.000 (no patch applied; the bundled non-RT patch targets PPSA21567 01.018.000) 1. Official build KytyPS5-2026-10-20-1a053f9: boot crash Crashes after the first few shaders (VS 3 / PS 2 / CS 15) with the same error as #1675: Unhandled host exception: type=1 code=3221225477 pc=0x00007ffa6207cc5a access=1 address=0x0000000000000058 in D:\a\KytyPS5\KytyPS5\src\loader\runtimeLinker.cpp:715 From the guest fault context: the faulting instruction is mov ecx,[rdx] with rdx=0x58 and r8=4, i.e. a 4-byte memcpy from a null pointer + 0x58, on a host thread. The return address on the stack (0x140a930be) is inside kyty_emulator.exe. Full log attached. 2. Source build of 1a053f9 + PR #1528 merged (local 78bade8): boot crash fixed, then GPU hang PR #1528 merged cleanly on top of 1a053f9. Built with clang-cl 19.1.5 / Qt 6.10.3 / Release, same configuration as CI (without IPO/sccache). With it, the 0x58 crash is gone. The game plays the intro video (AvPlayer video started playing / stopped) and compiles up to VS 18 / PS 26 / CS 47 / GS 2, then: vkQueueSubmit failed: ErrorDeviceLost (-4), tick=807263 debug_op=2 debug_submit=20753 args=1792,64,0,1,0x0000000000000000 --- Build --- Source build 78bade8 --- Fatal Error --- Not implemented (result != vk::Result::eSuccess) in E:\ROM\KytyPS5-src\src\graphics\host_gpu\renderer\commandScheduler.cpp:385 The process stayed open after the fatal error. Other notable log lines: GPU: using buffer device address (BDA) shader memory access. Warning: game uses occlusion queries, which are currently treated as always visible Full log- [log_official-build-1a053f9.txt](https://github.com/user-attachments/files/33704692/log_official-build-1a053f9.txt)
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-20 18:18 UTC · original

Hi @⁠fabled-aesop, thanks for the detailed report.

I have a test build for you: main 7b7f9a70 + PR #1528 (3 commits) + PR #1733. Fork CI run: https://github.com/Nawid3333/KytyPS5/actions/runs/39469997254 (Windows artifact "KytyPS5-Windows-x64"; the window title shows "Fork build Nawid3333/KytyPS5 22c7f34").
#1733 gives depth-compare samplers their own sampler variant. It fixes the invalid sampler/image pairing that Vulkan validation reports on NVIDIA (VUID-vkCmdDrawIndexed-None-06479 / VUID-vkCmdDispatch-None-06479, an R32_SFLOAT image sampled with depth comparison) in the #1476 logs from Astro's Playroom and ASTRO BOT.
I do not claim it fixes your device loss. I have no NVIDIA card (AMD RX 9070 XT here); on it, ASTRO BOT with #1528 + #1733 (on main 0cad4672) ran 5 minutes into the intro scenes without errors.

Two asks:

  1. Please run this build like before and tell me whether ErrorDeviceLost still happens, and at which shader counters (you had VS 18 / PS 26 / CS 47 / GS 2). Please attach the log.
  2. If you have the Vulkan SDK installed: enable "Vulkan validation" in the launcher and run once more. The first validation error is printed before Kyty stops — please paste it. It tells whether the 06479 pairing is still there or something else.

Thanks!

**@⁠Nawid3333** on GitHub · 2026-10-20 18:18 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6297963437) Hi @⁠fabled-aesop, thanks for the detailed report. I have a test build for you: main 7b7f9a70 + PR #1528 (3 commits) + PR #1733. Fork CI run: https://github.com/Nawid3333/KytyPS5/actions/runs/39469997254 (Windows artifact "KytyPS5-Windows-x64"; the window title shows "Fork build Nawid3333/KytyPS5 22c7f34"). #1733 gives depth-compare samplers their own sampler variant. It fixes the invalid sampler/image pairing that Vulkan validation reports on NVIDIA (VUID-vkCmdDrawIndexed-None-06479 / VUID-vkCmdDispatch-None-06479, an R32_SFLOAT image sampled with depth comparison) in the #1476 logs from Astro's Playroom and ASTRO BOT. I do not claim it fixes your device loss. I have no NVIDIA card (AMD RX 9070 XT here); on it, ASTRO BOT with #1528 + #1733 (on main 0cad4672) ran 5 minutes into the intro scenes without errors. Two asks: 1. Please run this build like before and tell me whether ErrorDeviceLost still happens, and at which shader counters (you had VS 18 / PS 26 / CS 47 / GS 2). Please attach the log. 2. If you have the Vulkan SDK installed: enable "Vulkan validation" in the launcher and run once more. The first validation error is printed before Kyty stops — please paste it. It tells whether the 06479 pairing is still there or something else. Thanks!
Author
Owner

@⁠fabled-aesop on GitHub · 2026-10-20 19:21 UTC · original

Hey @⁠Nawid3333

Thanks for the test build. I built it from source rather than using the CI artifact: 7b7f9a7 + #1528 + #1733, git diff against your 22c7f34 is empty (identical tree), so the log says Source build d474916. Same PC as before (RTX 5080, driver 610.88, i7-14700K, Win 11 26200), PPSA21564 01.007.000.

  1. Plain run: device loss still happens, slightly later

Same point as before: intro video plays, then the GPU dies after ~97 s.
Shader counters at the end: VS 18 / PS 28 / CS 47 / GS 2 (before: VS 18 / PS 26 / CS 47 / GS 2, so two more pixel shaders).
It now surfaces in the semaphore wait instead of vkQueueSubmit:
Not implemented (result != vk::Result::eSuccess) in ...\renderer\masterSemaphore.cpp:56
That's waitSemaphores(..., UINT64_MAX), so with no timeout possible it should be ErrorDeviceLost (the result code isn't printed).
2. Validation run (Vulkan SDK 1.4.363.0): no validation errors

VK_LAYER_KHRONOS_validation loaded and VK_EXT_validation_features was enabled (confirmed in the log, run with --vulkan-validation true --printf-direction File).
0 validation errors, no 06479. #1733 removes the sampler/image pairing error on NVIDIA.
It still dies at the same point (VS 18 / PS 28 / CS 47 / GS 2, masterSemaphore.cpp:56) with nothing reported first.
Only warnings:
repeated vkCmdDrawMeshTasksEXT(): Inside [VK_SHADER_STAGE_FRAGMENT_BIT] it writes to [Output variable, Location 1, "out_mrt_1"] but there is no VkRenderingInfo::pColorAttachments[1] and this write is unused.
loader warnings about implicit overlay layers on this PC (GOG Galaxy overlay, Overwolf overlay / OBS hook).
So the device loss doesn't come from anything the validation layer can see. That fits it being in a shader itself, e.g. the BVH/RT compute dispatches from #1511.

I should've mentioned sooner, but a fork by Jetsku runs on my PC

Jetsku/KytyPS5, tag u59-windows-20261017-int19.4 (5c3b39f7), is an experimental fork with the "U59" renderer and a lot of ASTRO BOT-specific work. The relevant parts here:

a software RT path for the BVH/RT compute shaders (KYTY_RT_SOFTWARE; the RT pipelines build in the background and their dispatches are skipped until ready)
per-invocation function-storage/LDS arrays shrunk to what the shader can reach (KYTY_FUNCTION_ARRAY_SHRINK; in my log: lds_dwords 8192 -> 160 elements), the same idea devklex mentioned in #1498
I built it from source via TsilaAllaoui/KytyPS5, which is that tag plus one commit adding an optional "companion" draw-call tool. That commit is inactive unless the companion app is running. On the same PC and game version, it got past the intro into gameplay with no device loss over a 3-minute run (intro ~59 fps, ~33 fps after, built-in defaults without u59-preset.json, so the software RT path came from the code defaults).

Hope this helps!

log_test-22c7f34_validation_full.txt
log_jetsku-int19.4-fork_working.txt
log_test-22c7f34_pr1528-pr1733.txt

**@⁠fabled-aesop** on GitHub · 2026-10-20 19:21 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6299306709) Hey @⁠Nawid3333 Thanks for the test build. I built it from source rather than using the CI artifact: 7b7f9a7 + #1528 + #1733, git diff against your 22c7f34 is empty (identical tree), so the log says Source build d474916. Same PC as before (RTX 5080, driver 610.88, i7-14700K, Win 11 26200), PPSA21564 01.007.000. 1. Plain run: device loss still happens, slightly later Same point as before: intro video plays, then the GPU dies after ~97 s. Shader counters at the end: VS 18 / PS 28 / CS 47 / GS 2 (before: VS 18 / PS 26 / CS 47 / GS 2, so two more pixel shaders). It now surfaces in the semaphore wait instead of vkQueueSubmit: Not implemented (result != vk::Result::eSuccess) in ...\renderer\masterSemaphore.cpp:56 That's waitSemaphores(..., UINT64_MAX), so with no timeout possible it should be ErrorDeviceLost (the result code isn't printed). 2. Validation run (Vulkan SDK 1.4.363.0): no validation errors VK_LAYER_KHRONOS_validation loaded and VK_EXT_validation_features was enabled (confirmed in the log, run with --vulkan-validation true --printf-direction File). 0 validation errors, no 06479. #1733 removes the sampler/image pairing error on NVIDIA. It still dies at the same point (VS 18 / PS 28 / CS 47 / GS 2, masterSemaphore.cpp:56) with nothing reported first. Only warnings: repeated vkCmdDrawMeshTasksEXT(): Inside [VK_SHADER_STAGE_FRAGMENT_BIT] it writes to [Output variable, Location 1, "out_mrt_1"] but there is no VkRenderingInfo::pColorAttachments[1] and this write is unused. loader warnings about implicit overlay layers on this PC (GOG Galaxy overlay, Overwolf overlay / OBS hook). So the device loss doesn't come from anything the validation layer can see. That fits it being in a shader itself, e.g. the BVH/RT compute dispatches from #1511. I should've mentioned sooner, but a fork by Jetsku runs on my PC [Jetsku/KytyPS5](https://github.com/Jetsku/KytyPS5), tag [u59-windows-20261017-int19.4](https://github.com/Jetsku/KytyPS5/tree/u59-windows-20261017-int19.4) (5c3b39f7), is an experimental fork with the "U59" renderer and a lot of ASTRO BOT-specific work. The relevant parts here: a software RT path for the BVH/RT compute shaders (KYTY_RT_SOFTWARE; the RT pipelines build in the background and their dispatches are skipped until ready) per-invocation function-storage/LDS arrays shrunk to what the shader can reach (KYTY_FUNCTION_ARRAY_SHRINK; in my log: lds_dwords 8192 -> 160 elements), the same idea devklex mentioned in #1498 I built it from source via [TsilaAllaoui/KytyPS5](https://github.com/TsilaAllaoui/KytyPS5), which is that tag plus one commit adding an optional "companion" draw-call tool. That commit is inactive unless the companion app is running. On the same PC and game version, it got past the intro into gameplay with no device loss over a 3-minute run (intro ~59 fps, ~33 fps after, built-in defaults without u59-preset.json, so the software RT path came from the code defaults). Hope this helps! [log_test-22c7f34_validation_full.txt](https://github.com/user-attachments/files/33735538/log_test-22c7f34_validation_full.txt) [log_jetsku-int19.4-fork_working.txt](https://github.com/user-attachments/files/33735539/log_jetsku-int19.4-fork_working.txt) [log_test-22c7f34_pr1528-pr1733.txt](https://github.com/user-attachments/files/33735537/log_test-22c7f34_pr1528-pr1733.txt)
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-22 03:16 UTC · original

ASTRO BOT (PPSA21564, 01.007.000, no patch) on RTX 5090, current main: PR #1365 fixes the boot crash, then DEVICE_LOST at the same place as the RTX 5080 report above.

  • Windows 11 Pro (build 26300), Ryzen 9 5900X, 32 GB, RTX 5090 (driver 617.42, Vulkan 1.4.351)
  • Source builds, clang-cl 19.1.5, Release
  1. main @ 8502d8a (also 7b7f9a7): boot crash after VS 3 | PS 2 | CS 15, Unhandled host exception ... access=1 address=0x0000000000000058 in runtimeLinker.cpp:715. Guest fault context: mov ecx,[rdx] with rdx=0x58, r8=4 (4-byte memcpy from null+0x58) on a host thread, same as the RTX 5080 report above.
  2. main @ 8502d8a + PR #1365 (cherry-picked cleanly, 1 commit): boot crash gone. The intro video plays (AvPlayer video started playing / stopped), then:
Not implemented (result != vk::Result::eSuccess) in .../renderer/masterSemaphore.cpp:56

No other error before it. Run 1 stopped at VS 22 | PS 36 | CS 48 | GS 4, run 2 (empty pipeline cache) at VS 18 | PS 28 | CS 47 | GS 2.

  1. main @ 8502d8a + PR #1365 + PR #1733 (both cherry-picked cleanly): same DEVICE_LOST at masterSemaphore.cpp:56, at VS 18 | PS 28 | CS 47 | GS 2 in both runs (run 2 with an empty pipeline cache).

So 3 of the 4 runs with the boot fix died at exactly VS 18 | PS 28 | CS 47 | GS 2, with or without #1733: the same counters as the RTX 5080 run with #1528 + #1733 above. The one exception (first #1365-only run) got a little further. #1733 doesn't change the device loss on this GPU.

No Vulkan SDK on this PC, so no validation run yet.

AI use: Claude Code helped me build the test branches and read the logs; I ran the game and checked the results myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-22 03:16 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6331803240) ASTRO BOT (PPSA21564, 01.007.000, no patch) on RTX 5090, current main: PR #1365 fixes the boot crash, then DEVICE_LOST at the same place as the RTX 5080 report above. - Windows 11 Pro (build 26300), Ryzen 9 5900X, 32 GB, RTX 5090 (driver 617.42, Vulkan 1.4.351) - Source builds, clang-cl 19.1.5, Release 1. `main` @ 8502d8a (also 7b7f9a7): boot crash after `VS 3 | PS 2 | CS 15`, `Unhandled host exception ... access=1 address=0x0000000000000058` in runtimeLinker.cpp:715. Guest fault context: `mov ecx,[rdx]` with `rdx=0x58`, `r8=4` (4-byte memcpy from null+0x58) on a host thread, same as the RTX 5080 report above. 2. `main` @ 8502d8a + PR #1365 (cherry-picked cleanly, 1 commit): boot crash gone. The intro video plays (`AvPlayer video started playing` / `stopped`), then: ``` Not implemented (result != vk::Result::eSuccess) in .../renderer/masterSemaphore.cpp:56 ``` No other error before it. Run 1 stopped at `VS 22 | PS 36 | CS 48 | GS 4`, run 2 (empty pipeline cache) at `VS 18 | PS 28 | CS 47 | GS 2`. 3. `main` @ 8502d8a + PR #1365 + PR #1733 (both cherry-picked cleanly): same DEVICE_LOST at `masterSemaphore.cpp:56`, at `VS 18 | PS 28 | CS 47 | GS 2` in both runs (run 2 with an empty pipeline cache). So 3 of the 4 runs with the boot fix died at exactly `VS 18 | PS 28 | CS 47 | GS 2`, with or without #1733: the same counters as the RTX 5080 run with #1528 + #1733 above. The one exception (first #1365-only run) got a little further. #1733 doesn't change the device loss on this GPU. No Vulkan SDK on this PC, so no validation run yet. AI use: Claude Code helped me build the test branches and read the logs; I ran the game and checked the results myself.
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-22 03:58 UTC · original

Follow-up on the ASTRO BOT DEVICE_LOST (PPSA21564 01.007.000, RTX 5090, driver 617.42, main @ 8502d8a + #1365): I added device-loss diagnostics locally (VK_EXT_device_fault + opt-in VK_NV_device_diagnostic_checkpoints) and it points at one compute dispatch.

It's a hang inside one compute shader, not a memory fault.

  • VK_EXT_device_fault, 6 runs: 30–104 records, all InstructionPointerUnknown, always within the same ~2 KB of host shader code (0x2003011a0..0x200301a20), no invalid read/write address records. That holds whichever stop point the run reaches (VS 18 | PS 28 or VS 22 | PS 36).
  • Checkpoints (2 runs): top-of-pipe and bottom-of-pipe both stop at the checkpoint just before the same dispatch:
DispatchDirect groups=4096x1x1 mode=0x00000041 cs=0x0000000500525200 hash=0x657ad04626bf9d55

The shader (0x657ad04626bf9d55) — 8.5 KB original, 344 KB SPIR-V, LocalSize 32 1 1 with every value in lane pairs, i.e. the wave64-on-32-wide-subgroup path (RTX 50 and Intel Arc both top out at 32; the RX 9070 XT run that worked would be native wave64).

  • 4 loops, each exiting only when OpGroupNonUniformAny sees no lane left.
  • Loop 1 (OpLine 1041..1105) walks a linked list: node = buffers[1][node*8 + base].next until node == 0, with no iteration cap. A cycle in that list, or a list built with duplicate node indices, would never end.
  • Loops 2–4 count up to bounds loaded from buffers[3] (bounds-checked, 0 out of range).
  • 2 OpAtomicIAdd on a storage image (imageAtomicAdd(img, coord, 1), device scope), no volatile loads.

What I can't tell from here: whether the list in buffers[1] is corrupted (e.g. built by an earlier wave64-emulated dispatch with colliding indices) or just long. If someone knows which earlier dispatch fills it, I can rerun with checkpoints and the debug dump and report.

AI use: Claude Code wrote the diagnostics patch, disassembled the shader with SPIRV-Tools and analysed the loops with me; I ran the game and checked the outputs myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-22 03:58 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6332324653) Follow-up on the ASTRO BOT DEVICE_LOST (PPSA21564 01.007.000, RTX 5090, driver 617.42, `main` @ 8502d8a + #1365): I added device-loss diagnostics locally (VK_EXT_device_fault + opt-in VK_NV_device_diagnostic_checkpoints) and it points at one compute dispatch. **It's a hang inside one compute shader, not a memory fault.** - `VK_EXT_device_fault`, 6 runs: 30–104 records, all `InstructionPointerUnknown`, always within the same ~2 KB of host shader code (`0x2003011a0..0x200301a20`), no invalid read/write address records. That holds whichever stop point the run reaches (`VS 18 | PS 28` or `VS 22 | PS 36`). - Checkpoints (2 runs): top-of-pipe and bottom-of-pipe both stop at the checkpoint just before the same dispatch: ``` DispatchDirect groups=4096x1x1 mode=0x00000041 cs=0x0000000500525200 hash=0x657ad04626bf9d55 ``` **The shader (`0x657ad04626bf9d55`)** — 8.5 KB original, 344 KB SPIR-V, `LocalSize 32 1 1` with every value in lane pairs, i.e. the wave64-on-32-wide-subgroup path (RTX 50 and Intel Arc both top out at 32; the RX 9070 XT run that worked would be native wave64). - 4 loops, each exiting only when `OpGroupNonUniformAny` sees no lane left. - Loop 1 (`OpLine 1041..1105`) walks a linked list: `node = buffers[1][node*8 + base].next` until `node == 0`, with no iteration cap. A cycle in that list, or a list built with duplicate node indices, would never end. - Loops 2–4 count up to bounds loaded from `buffers[3]` (bounds-checked, 0 out of range). - 2 `OpAtomicIAdd` on a storage image (`imageAtomicAdd(img, coord, 1)`, device scope), no volatile loads. What I can't tell from here: whether the list in `buffers[1]` is corrupted (e.g. built by an earlier wave64-emulated dispatch with colliding indices) or just long. If someone knows which earlier dispatch fills it, I can rerun with checkpoints and the debug dump and report. AI use: Claude Code wrote the diagnostics patch, disassembled the shader with SPIRV-Tools and analysed the loops with me; I ran the game and checked the outputs myself.
Author
Owner

@⁠devklex on GitHub · 2026-10-22 08:27 UTC · original

Data point from an RTX 4090 (Windows 11, driver 617.42): the DEVICE_LOST does not reproduce here.

  • Builds (Release, clang-cl 20.1.8):
    1. Current main at c5016d94, plus only a null-page fix for the SRT walker's raw reads (the same idea as #1528 and #1365).
    2. The same, with my local Astro Bot patches rebased on top.
  • Runs: New Game to the crash-site tilt prompt, about 470 s each, ASTRO BOT PPSA21564 01.007.000.
    • 3 runs of build 1 and 6 runs of build 2. No device loss in any of them.
    • Every run but one went through exactly VS 18 | PS 28 | CS 47 | GS 2 and kept going.
    • The exception stopped earlier, at VS 16 | PS 23 | CS 47, in the warp-tunnel loading hang that #1631 addresses.
  • The 4090 runs the same shader on the same path. I dumped 0x657ad04626bf9d55 from build 2:
    • 4 permutations.
    • LocalSize 32 1 1, so wave64 emulated on 32-wide subgroups.
    • 25 OpGroupNonUniformAny.
    • So the 32-wide path alone isn't enough to hang it. It looks specific to RTX 50 and Arc.

One idea, untested because I have no RTX 50 or Arc:

  • The emitted SPIR-V requests no maximal reconvergence. There is no SPV_KHR_maximal_reconvergence or MaximallyReconvergesKHR, and Kyty doesn't enable VK_KHR_shader_maximal_reconvergence. So after divergent control flow, which invocations take part in a subgroup operation is up to the driver.
  • That could matter in two places:
    • The vote-terminated loops of this shader.
    • Wherever the dispatch that builds the list in buffers[1] allocates node indices with ballots or readfirstlane.
  • If a subgroup operation there sees only part of the emulated wave on Blackwell or Arc, it could hand out duplicate indices. That would fit the duplicate-index explanation suggested above.
  • Someone with one of those GPUs could test it by requesting maximal reconvergence for wave64-emulated compute shaders where the device supports it.

AI use: Claude Code ran the builds and runs and drafted this comment.

**@⁠devklex** on GitHub · 2026-10-22 08:27 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6336309264) Data point from an RTX 4090 (Windows 11, driver 617.42): the DEVICE_LOST does not reproduce here. - **Builds** (Release, clang-cl 20.1.8): 1. Current `main` at c5016d94, plus only a null-page fix for the SRT walker's raw reads (the same idea as #1528 and #1365). 2. The same, with my local Astro Bot patches rebased on top. - **Runs:** New Game to the crash-site tilt prompt, about 470 s each, ASTRO BOT PPSA21564 01.007.000. - 3 runs of build 1 and 6 runs of build 2. No device loss in any of them. - Every run but one went through exactly `VS 18 | PS 28 | CS 47 | GS 2` and kept going. - The exception stopped earlier, at `VS 16 | PS 23 | CS 47`, in the warp-tunnel loading hang that #1631 addresses. - **The 4090 runs the same shader on the same path.** I dumped `0x657ad04626bf9d55` from build 2: - 4 permutations. - `LocalSize 32 1 1`, so wave64 emulated on 32-wide subgroups. - 25 `OpGroupNonUniformAny`. - So the 32-wide path alone isn't enough to hang it. It looks specific to RTX 50 and Arc. **One idea, untested because I have no RTX 50 or Arc:** - The emitted SPIR-V requests no maximal reconvergence. There is no `SPV_KHR_maximal_reconvergence` or `MaximallyReconvergesKHR`, and Kyty doesn't enable `VK_KHR_shader_maximal_reconvergence`. So after divergent control flow, which invocations take part in a subgroup operation is up to the driver. - That could matter in two places: - The vote-terminated loops of this shader. - Wherever the dispatch that builds the list in `buffers[1]` allocates node indices with ballots or `readfirstlane`. - If a subgroup operation there sees only part of the emulated wave on Blackwell or Arc, it could hand out duplicate indices. That would fit the duplicate-index explanation suggested above. - Someone with one of those GPUs could test it by requesting maximal reconvergence for wave64-emulated compute shaders where the device supports it. AI use: Claude Code ran the builds and runs and drafted this comment.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-23 18:11 UTC · original

@⁠ZrDaniel07 @⁠fabled-aesop @⁠hlava0 a quick test that could explain this DEVICE_LOST, if you have a few minutes.

On my RX 9070 XT (Windows 11, driver 26.8.1, main 79837b42 + #1365) ASTRO BOT lost the device 3 times out of 3, each time at the same point (VS 23 | PS 37 | CS 48). In a lab build that stops every pixel-shader loop after 65536 iterations, it runs to the end of my 4-minute test and renders the intro. Capping only compute-shader loops did not help. So on my GPU the hang is a pixel-shader loop that does not end.

The candidate is a pixel shader (0x5457609506174517) that walks linked lists until it reads 0xffffffff. Another pixel shader (0x4a55033774c8f01e) builds such lists and writes their heads through an image (IMAGE_ATOMIC_SWAP), while the walker reads its heads through a buffer (S_BUFFER_LOAD). For the lists to connect, that has to be the same memory (I haven't checked the addresses yet). In KytyPS5, image writes reach a later buffer read of the same memory only with the "Accurate texture synchronization" setting (--sync-raw-image-buffers), which is off by default. Without it, the walker can read stale heads, and a stale head can lead into a list that never reaches 0xffffffff.

What I measured so far is only indirect: with the loop limit still on, the same intro scenes run 37-70% faster with the setting on, which fits walks that end normally. I have not run it without the limit yet.

The test: with the same build you used before, open the settings, check "Accurate texture synchronization", Save, and start ASTRO BOT the same way. Does the DEVICE_LOST still happen? Please post the result with the last Shaders: line and your GPU.

**@⁠Nawid3333** on GitHub · 2026-10-23 18:11 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6371611678) @⁠ZrDaniel07 @⁠fabled-aesop @⁠hlava0 a quick test that could explain this DEVICE_LOST, if you have a few minutes. On my RX 9070 XT (Windows 11, driver 26.8.1, main 79837b42 + #1365) ASTRO BOT lost the device 3 times out of 3, each time at the same point (`VS 23 | PS 37 | CS 48`). In a lab build that stops every pixel-shader loop after 65536 iterations, it runs to the end of my 4-minute test and renders the intro. Capping only compute-shader loops did not help. So on my GPU the hang is a pixel-shader loop that does not end. The candidate is a pixel shader (`0x5457609506174517`) that walks linked lists until it reads `0xffffffff`. Another pixel shader (`0x4a55033774c8f01e`) builds such lists and writes their heads through an image (`IMAGE_ATOMIC_SWAP`), while the walker reads its heads through a buffer (`S_BUFFER_LOAD`). For the lists to connect, that has to be the same memory (I haven't checked the addresses yet). In KytyPS5, image writes reach a later buffer read of the same memory only with the "Accurate texture synchronization" setting (`--sync-raw-image-buffers`), which is off by default. Without it, the walker can read stale heads, and a stale head can lead into a list that never reaches `0xffffffff`. What I measured so far is only indirect: with the loop limit still on, the same intro scenes run 37-70% faster with the setting on, which fits walks that end normally. I have not run it without the limit yet. The test: with the same build you used before, open the settings, check "Accurate texture synchronization", Save, and start ASTRO BOT the same way. Does the DEVICE_LOST still happen? Please post the result with the last `Shaders:` line and your GPU.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-23 18:20 UTC · original

Update to my comment above: I ran it on my RX 9070 XT without the loop limit and with "Accurate texture synchronization" (--sync-raw-image-buffers) on, and the device was lost at the same point (VS 23 | PS 37 | CS 48, after 46 seconds). So that setting does not fix it on my GPU, and there's no need to test it.

The device-loss markers in the same run point at the walker, though: the GPU command that started and never finished is a draw with pixel shader 0x5457609506174517 (vertex shader 0xd8564aff95cfcecf). The draws with the same two shaders just before it finished. I'm now looking at why its list walk does not end.

**@⁠Nawid3333** on GitHub · 2026-10-23 18:20 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6371781271) Update to my comment above: I ran it on my RX 9070 XT without the loop limit and with "Accurate texture synchronization" (`--sync-raw-image-buffers`) on, and the device was lost at the same point (`VS 23 | PS 37 | CS 48`, after 46 seconds). So that setting does not fix it on my GPU, and there's no need to test it. The device-loss markers in the same run point at the walker, though: the GPU command that started and never finished is a draw with pixel shader `0x5457609506174517` (vertex shader `0xd8564aff95cfcecf`). The draws with the same two shaders just before it finished. I'm now looking at why its list walk does not end.
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-23 18:44 UTC · original · edited 2026-10-23 19:02 UTC

@⁠devklex I tested the maximal reconvergence idea on the RTX 5090 (driver 617.42, Windows 11), ASTRO BOT PPSA21564 01.007.000, main @ 8502d8a + #1365 + #1816. It doesn't avoid the DEVICE_LOST here.

Local patch (not for upstream), similar to @⁠Nawid3333's test/mrc-1511: enable VK_KHR_shader_maximal_reconvergence and VK_KHR_shader_subgroup_uniform_control_flow (both features report true), and add SPV_KHR_maximal_reconvergence / MaximallyReconvergesKHR:

Mode Shaders with MaximallyReconvergesKHR Result
1 wave64-on-32 shaders (lane_count == 2) DEVICE_LOST, submit 22641
2 every shader DEVICE_LOST, submit 8152
off (4 earlier runs) none DEVICE_LOST, submit ~8100–8300
  • In both modes the checkpoints name the same dispatch as before: DispatchDirect groups=4096x1x1 cs=0x0000000500525200 hash=0x657ad04626bf9d55.
  • The driver did compile the new SPIR-V: the VK_EXT_device_fault instruction pointers moved from 0x2003011a0..0x200301a20 to 0x2003006a0..0x200300f20 in both modes.
    Edit: that isn't evidence. A later run without the reconvergence patch (main @ 9dcff95) reports the same 0x2003006a0..0x200300f20 range, so the range only shows where the driver placed the code. What shows the mode was on is the console line Maximal reconvergence: mode N, printed after both features were enabled on the device.
  • Mode 1 lasting longer looks like run-to-run variation, since mode 2 includes the same change for that shader and failed at the usual point.

On this GPU, all 4 checkpoint runs (2 before, 2 here) name that compute dispatch as the only command that started and didn't finish. None named the draw with PS 0x5457609506174517 that the RX 9070 XT run points at. Maybe both walkers read lists from the same builder?

AI use: Claude Code wrote the local patch and compared the runs with me; I ran the game and checked the outputs myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-23 18:44 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6372236458) · edited 2026-10-23 19:02 UTC @⁠devklex I tested the maximal reconvergence idea on the RTX 5090 (driver 617.42, Windows 11), ASTRO BOT PPSA21564 01.007.000, `main` @ 8502d8a + #1365 + #1816. It doesn't avoid the DEVICE_LOST here. Local patch (not for upstream), similar to @⁠Nawid3333's `test/mrc-1511`: enable `VK_KHR_shader_maximal_reconvergence` and `VK_KHR_shader_subgroup_uniform_control_flow` (both features report true), and add `SPV_KHR_maximal_reconvergence` / `MaximallyReconvergesKHR`: | Mode | Shaders with `MaximallyReconvergesKHR` | Result | |---|---|---| | 1 | wave64-on-32 shaders (`lane_count == 2`) | DEVICE_LOST, submit 22641 | | 2 | every shader | DEVICE_LOST, submit 8152 | | off (4 earlier runs) | none | DEVICE_LOST, submit ~8100–8300 | - In both modes the checkpoints name the same dispatch as before: `DispatchDirect groups=4096x1x1 cs=0x0000000500525200 hash=0x657ad04626bf9d55`. - ~~The driver did compile the new SPIR-V: the `VK_EXT_device_fault` instruction pointers moved from `0x2003011a0..0x200301a20` to `0x2003006a0..0x200300f20` in both modes.~~ **Edit:** that isn't evidence. A later run without the reconvergence patch (`main` @ 9dcff95) reports the same `0x2003006a0..0x200300f20` range, so the range only shows where the driver placed the code. What shows the mode was on is the console line `Maximal reconvergence: mode N`, printed after both features were enabled on the device. - Mode 1 lasting longer looks like run-to-run variation, since mode 2 includes the same change for that shader and failed at the usual point. On this GPU, all 4 checkpoint runs (2 before, 2 here) name that compute dispatch as the only command that started and didn't finish. None named the draw with PS `0x5457609506174517` that the RX 9070 XT run points at. Maybe both walkers read lists from the same builder? AI use: Claude Code wrote the local patch and compared the runs with me; I ran the game and checked the outputs myself.
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-23 19:02 UTC · original

A/B of the two boot fixes on the RTX 5090 (driver 617.42), latest main @ 9dcff95 + #1816, one run each with checkpoints, same settings and empty pipeline cache:

Boot fix Result Submit Last Shaders: line
#1528 DEVICE_LOST 8017 VS 22 | PS 36 | CS 48 | GS 4
#1365 DEVICE_LOST 8049 VS 18 | PS 28 | CS 47 | GS 2

Both name the same dispatch as before (DispatchDirect groups=4096x1x1 cs=0x0000000500525200 hash=0x657ad04626bf9d55). So on this GPU the choice between #1528 and #1365 doesn't affect this hang. I tried it because #1365 zeroes any scalar read whose probe fails, while #1528 only zeroes reads below 0x40000, and the runs that got past this point (the RTX 4090 above, and the earlier RX 9070 XT run on 0cad4672 + #1528 + #1733) didn't use #1365.

@⁠Nawid3333 since your RX 9070 XT went from running on 0cad4672 + #1528 + #1733 to losing the device on 79837b42 + #1365, and the boot fix makes no difference here, the change on your GPU might come from a commit between those two bases.

Correction to my previous comment: the VK_EXT_device_fault instruction-pointer range isn't evidence that the reconvergence SPIR-V was used. These runs, without that patch, report the same 0x2003006a0..0x200300f20 range. I've edited that comment.

AI use: Claude Code built the A/B branches and compared the runs with me; I ran the game and checked the outputs myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-23 19:02 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6372569971) A/B of the two boot fixes on the RTX 5090 (driver 617.42), latest `main` @ 9dcff95 + #1816, one run each with checkpoints, same settings and empty pipeline cache: | Boot fix | Result | Submit | Last `Shaders:` line | |---|---|---|---| | #1528 | DEVICE_LOST | 8017 | `VS 22 \| PS 36 \| CS 48 \| GS 4` | | #1365 | DEVICE_LOST | 8049 | `VS 18 \| PS 28 \| CS 47 \| GS 2` | Both name the same dispatch as before (`DispatchDirect groups=4096x1x1 cs=0x0000000500525200 hash=0x657ad04626bf9d55`). So on this GPU the choice between #1528 and #1365 doesn't affect this hang. I tried it because #1365 zeroes any scalar read whose probe fails, while #1528 only zeroes reads below `0x40000`, and the runs that got past this point (the RTX 4090 above, and the earlier RX 9070 XT run on 0cad4672 + #1528 + #1733) didn't use #1365. @⁠Nawid3333 since your RX 9070 XT went from running on 0cad4672 + #1528 + #1733 to losing the device on 79837b42 + #1365, and the boot fix makes no difference here, the change on your GPU might come from a commit between those two bases. Correction to my previous comment: the `VK_EXT_device_fault` instruction-pointer range isn't evidence that the reconvergence SPIR-V was used. These runs, without that patch, report the same `0x2003006a0..0x200300f20` range. I've edited that comment. AI use: Claude Code built the A/B branches and compared the runs with me; I ran the game and checked the outputs myself.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-23 19:19 UTC · original

@⁠ZrDaniel07 thanks for both, that rules out maximal reconvergence and the choice of boot fix on NVIDIA.

On your point about my RX 9070 XT: the last runs there that got past this point were two on 4644c529 + #1528, without #1733 (2026-10-21, 4 and 5 minutes, up to VS 113 | PS 95). Every run on 79837b42 + #1365 without my pixel-shader loop limit lost the device at VS 23 | PS 37 | CS 48 (4 runs, one of them with only compute loops capped). Same input and settings, except the window size (2560x1440 then, 1280x720 now). So on my GPU it's one of three things: the 59 upstream commits between those two bases, the boot fix, or the window size. One commit in that range only changes AMD GPUs: #1761 (float min/max as host instructions), and the walker's loop uses V_MAX_F32, one of the instructions it changes. That makes it a candidate, nothing more yet; I haven't narrowed it down further.

About your question: CS 0x657ad04626bf9d55 is in my shader dump as well. Its four loops are all bounded by a count or by the active lanes (for example S_CMP_LT_U32 s24, s19), not walks to 0xffffffff like the PS. It loads its tables from the same offsets of its resource table (224 and 240) where the PS walker finds its head and node buffers, which fits the same data, but I haven't confirmed they are the same buffers, and I haven't traced where its loop counts come from yet.

A safe way to check on the RTX 5090 whether a loop that does not end is behind your DEVICE_LOST too is my lab build that caps shader loops: https://github.com/Nawid3333/KytyPS5/actions/runs/40006204827 (artifact KytyPS5-Windows-x64, needs a GitHub login). It's main 79837b42 plus #1365 plus lab switches that are off by default; the window title shows Fork build Nawid3333/KytyPS5 ab2618b. Open a command prompt, run set KYTY_LAB_LOOP_CAP=65536, and start KytyPS5 from that same prompt. Every compute- and pixel-shader loop then stops after 65536 iterations; the log shows Lab compute+pixel loop cap (KYTY_LAB_LOOP_CAP): 65536 back edges per invocation when the switch is active. On my RX 9070 XT the game then runs past the point where it always lost the device.

**@⁠Nawid3333** on GitHub · 2026-10-23 19:19 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6372867948) @⁠ZrDaniel07 thanks for both, that rules out maximal reconvergence and the choice of boot fix on NVIDIA. On your point about my RX 9070 XT: the last runs there that got past this point were two on 4644c529 + #1528, without #1733 (2026-10-21, 4 and 5 minutes, up to `VS 113 | PS 95`). Every run on 79837b42 + #1365 without my pixel-shader loop limit lost the device at `VS 23 | PS 37 | CS 48` (4 runs, one of them with only compute loops capped). Same input and settings, except the window size (2560x1440 then, 1280x720 now). So on my GPU it's one of three things: the 59 upstream commits between those two bases, the boot fix, or the window size. One commit in that range only changes AMD GPUs: #1761 (float min/max as host instructions), and the walker's loop uses `V_MAX_F32`, one of the instructions it changes. That makes it a candidate, nothing more yet; I haven't narrowed it down further. About your question: `CS 0x657ad04626bf9d55` is in my shader dump as well. Its four loops are all bounded by a count or by the active lanes (for example `S_CMP_LT_U32 s24, s19`), not walks to `0xffffffff` like the PS. It loads its tables from the same offsets of its resource table (224 and 240) where the PS walker finds its head and node buffers, which fits the same data, but I haven't confirmed they are the same buffers, and I haven't traced where its loop counts come from yet. A safe way to check on the RTX 5090 whether a loop that does not end is behind your DEVICE_LOST too is my lab build that caps shader loops: https://github.com/Nawid3333/KytyPS5/actions/runs/40006204827 (artifact `KytyPS5-Windows-x64`, needs a GitHub login). It's main 79837b42 plus #1365 plus lab switches that are off by default; the window title shows `Fork build Nawid3333/KytyPS5 ab2618b`. Open a command prompt, run `set KYTY_LAB_LOOP_CAP=65536`, and start KytyPS5 from that same prompt. Every compute- and pixel-shader loop then stops after 65536 iterations; the log shows `Lab compute+pixel loop cap (KYTY_LAB_LOOP_CAP): 65536 back edges per invocation` when the switch is active. On my RX 9070 XT the game then runs past the point where it always lost the device.
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-23 20:05 UTC · original

@⁠Nawid3333 I ran your loop-cap build on the RTX 5090 (driver 617.42, Windows 11), ASTRO BOT PPSA21564 01.007.000. I built ab2618b locally from your test/loopcap-1511 branch instead of using the CI artifact, so the window title doesn't show the fork label. Same settings as my A/B runs (2560x1440), empty pipeline cache, KYTY_LAB_LOOP_CAP=65536; the log shows Lab compute+pixel loop cap (KYTY_LAB_LOOP_CAP): 65536 back edges per invocation.

No DEVICE_LOST. It went past the usual point, started a new save and played the opening cutscenes. I closed it myself at VS 144 | PS 114 | CS 89 | GS 8, because my controller couldn't get me further (clean exit, pipeline cache saved). Without the cap, the A/B runs on this GPU lost the device at VS 22 | PS 36 | CS 48 and VS 18 | PS 28 | CS 47.

So here too the device loss comes from a shader loop that doesn't end. Both CS 0x657ad04626bf9d55 and PS 0x5457609506174517 were compiled in this run, so it doesn't tell which one; I can repeat it with the compute-only cap (babec5b) if that helps. FPS was low (24 at most, dropping to 0 while new shaders compiled), and during the cutscenes nvidia-smi showed P0 at 2707 MHz, 38–56% busy, ~124 W.

On your three candidates: all my runs on this GPU were at 2560x1440, the ones that lost the device and this one, so here the window size isn't it.

About CS 0x657ad04626bf9d55: I agree that loops 2–4 count up to a bound, but loop 1 doesn't. In the SPIR-V it reads the head from an image (OpImageFetch on image_10), then follows 8-byte nodes (a float value, then the next index) in buffers[1], and a lane only leaves when the next index is 0. Along the way it keeps the node with the smallest value above a threshold. So it's a list walk like your PS walker, but it ends at 0 rather than 0xffffffff, and it reads the head through an image rather than a buffer.

AI use: Claude Code built your branch, ran the shader tests with and without the cap and read the SPIR-V with me; I ran the game and checked the outputs myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-23 20:05 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6373690375) @⁠Nawid3333 I ran your loop-cap build on the RTX 5090 (driver 617.42, Windows 11), ASTRO BOT PPSA21564 01.007.000. I built `ab2618b` locally from your `test/loopcap-1511` branch instead of using the CI artifact, so the window title doesn't show the fork label. Same settings as my A/B runs (2560x1440), empty pipeline cache, `KYTY_LAB_LOOP_CAP=65536`; the log shows `Lab compute+pixel loop cap (KYTY_LAB_LOOP_CAP): 65536 back edges per invocation`. No DEVICE_LOST. It went past the usual point, started a new save and played the opening cutscenes. I closed it myself at `VS 144 | PS 114 | CS 89 | GS 8`, because my controller couldn't get me further (clean exit, pipeline cache saved). Without the cap, the A/B runs on this GPU lost the device at `VS 22 | PS 36 | CS 48` and `VS 18 | PS 28 | CS 47`. So here too the device loss comes from a shader loop that doesn't end. Both `CS 0x657ad04626bf9d55` and `PS 0x5457609506174517` were compiled in this run, so it doesn't tell which one; I can repeat it with the compute-only cap (`babec5b`) if that helps. FPS was low (24 at most, dropping to 0 while new shaders compiled), and during the cutscenes `nvidia-smi` showed P0 at 2707 MHz, 38–56% busy, ~124 W. On your three candidates: all my runs on this GPU were at 2560x1440, the ones that lost the device and this one, so here the window size isn't it. About `CS 0x657ad04626bf9d55`: I agree that loops 2–4 count up to a bound, but loop 1 doesn't. In the SPIR-V it reads the head from an image (`OpImageFetch` on `image_10`), then follows 8-byte nodes (a float value, then the next index) in `buffers[1]`, and a lane only leaves when the next index is 0. Along the way it keeps the node with the smallest value above a threshold. So it's a list walk like your PS walker, but it ends at 0 rather than `0xffffffff`, and it reads the head through an image rather than a buffer. AI use: Claude Code built your branch, ran the shader tests with and without the cap and read the SPIR-V with me; I ran the game and checked the outputs myself.
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-23 20:22 UTC · original

Follow-up on the RTX 5090 with your compute-only cap (babec5b), built locally the same way, same settings and empty pipeline cache, plus a control run of the same binary with the cap off:

Build (RTX 5090) Loops capped Result Last Shaders: line
ab2618b compute + pixel no device loss, closed by me VS 144 | PS 114 | CS 89 | GS 8
babec5b compute only no device loss, closed by me VS 144 | PS 114 | CS 89 | GS 8
babec5b, cap off none lost the device VS 22 | PS 36 | CS 48 | GS 4
  • The log shows Lab compute loop cap (KYTY_LAB_LOOP_CAP): 65536 back edges per invocation in the capped run and 0 back edges per invocation (0 = off) in the control. Both capped runs got to the same point, where my controller stopped me again (clean exit).
  • The control ended with the same fatal error as the original report, Not implemented (result != vk::Result::eSuccess) at masterSemaphore.cpp:56 (the vkWaitSemaphores check; this build doesn't print the result code), with the same Shaders: line as my #1528 A/B run.
  • PS 0x5457609506174517 ran without a cap in the compute-only run. In the control, the log has no compile of it before the crash: it was the 34th pixel shader compiled in both capped runs, and the control lost the device after 33. CS 0x657ad04626bf9d55 was the 37th compute shader in all three.

So on the RTX 5090 capping compute loops is enough, the opposite of your RX 9070 XT, where the compute-only cap didn't help. Together with the checkpoints, which always name the 0x657ad04626bf9d55 dispatch, the loop that doesn't end here is most likely that shader's loop 1: same point in the game, a different walker on each GPU. One run per build.

AI use: Claude Code built the branch, ran the shader tests with and without the cap and compared the logs with me; I ran the game and checked the outputs myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-23 20:22 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6373985712) Follow-up on the RTX 5090 with your compute-only cap (`babec5b`), built locally the same way, same settings and empty pipeline cache, plus a control run of the same binary with the cap off: | Build (RTX 5090) | Loops capped | Result | Last `Shaders:` line | |---|---|---|---| | `ab2618b` | compute + pixel | no device loss, closed by me | `VS 144 \| PS 114 \| CS 89 \| GS 8` | | `babec5b` | compute only | no device loss, closed by me | `VS 144 \| PS 114 \| CS 89 \| GS 8` | | `babec5b`, cap off | none | lost the device | `VS 22 \| PS 36 \| CS 48 \| GS 4` | - The log shows `Lab compute loop cap (KYTY_LAB_LOOP_CAP): 65536 back edges per invocation` in the capped run and `0 back edges per invocation (0 = off)` in the control. Both capped runs got to the same point, where my controller stopped me again (clean exit). - The control ended with the same fatal error as the original report, `Not implemented (result != vk::Result::eSuccess)` at `masterSemaphore.cpp:56` (the `vkWaitSemaphores` check; this build doesn't print the result code), with the same `Shaders:` line as my #1528 A/B run. - `PS 0x5457609506174517` ran without a cap in the compute-only run. In the control, the log has no compile of it before the crash: it was the 34th pixel shader compiled in both capped runs, and the control lost the device after 33. `CS 0x657ad04626bf9d55` was the 37th compute shader in all three. So on the RTX 5090 capping compute loops is enough, the opposite of your RX 9070 XT, where the compute-only cap didn't help. Together with the checkpoints, which always name the `0x657ad04626bf9d55` dispatch, the loop that doesn't end here is most likely that shader's loop 1: same point in the game, a different walker on each GPU. One run per build. AI use: Claude Code built the branch, ran the shader tests with and without the cap and compared the logs with me; I ran the game and checked the outputs myself.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-23 21:46 UTC · original

@⁠ZrDaniel07 thanks, the control run makes that clear. You're right about loop 1, and I was wrong to call it bounded. In my dump, the loop at 0x410–0x44c takes its head from IMAGE_LOAD (0x408), loads 8-byte nodes with BUFFER_LOAD_DWORDX2, and a lane leaves only when the next index it just loaded is 0 (V_CMPX_LT_U32 exec_lo, 0, v7). I took that exec-mask exit for a bound on the active lanes. Only loops 2–4 count up to a bound.

Those nodes have the same layout as the lists pixel shader 0x4a55033774c8f01e builds. It takes a node index from DS_APPEND, swaps it into a 2D image with IMAGE_ATOMIC_SWAP, and stores the pair (float, previous head) at that index with BUFFER_STORE_DWORDX2. So the compute walker on your GPU most likely reads that shader's lists, but I haven't compared the addresses. The pixel-shader walker on my GPU reads lists with a different layout: heads through a buffer, nodes with a type field, ending at 0xffffffff.

Two different lists, one walk that doesn't end on each GPU, at the same point in the game: that points more at the list data than at a bug in one walker. A list built this way has no cycle as long as three things hold: the heads and the DS_APPEND counter are reset before each build, every node gets its own index, and the walker sees the nodes from the current build. Next I'm checking how the game does that reset and what KytyPS5 does with it, so no more runs are needed for now.

**@⁠Nawid3333** on GitHub · 2026-10-23 21:46 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6375383429) @⁠ZrDaniel07 thanks, the control run makes that clear. You're right about loop 1, and I was wrong to call it bounded. In my dump, the loop at `0x410`–`0x44c` takes its head from `IMAGE_LOAD` (`0x408`), loads 8-byte nodes with `BUFFER_LOAD_DWORDX2`, and a lane leaves only when the next index it just loaded is 0 (`V_CMPX_LT_U32 exec_lo, 0, v7`). I took that exec-mask exit for a bound on the active lanes. Only loops 2–4 count up to a bound. Those nodes have the same layout as the lists pixel shader `0x4a55033774c8f01e` builds. It takes a node index from `DS_APPEND`, swaps it into a 2D image with `IMAGE_ATOMIC_SWAP`, and stores the pair (float, previous head) at that index with `BUFFER_STORE_DWORDX2`. So the compute walker on your GPU most likely reads that shader's lists, but I haven't compared the addresses. The pixel-shader walker on my GPU reads lists with a different layout: heads through a buffer, nodes with a type field, ending at `0xffffffff`. Two different lists, one walk that doesn't end on each GPU, at the same point in the game: that points more at the list data than at a bug in one walker. A list built this way has no cycle as long as three things hold: the heads and the `DS_APPEND` counter are reset before each build, every node gets its own index, and the walker sees the nodes from the current build. Next I'm checking how the game does that reset and what KytyPS5 does with it, so no more runs are needed for now.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-10-23 23:18 UTC · original

@⁠ZrDaniel07 I have a candidate fix for the hang on your RTX 5090, if you can test one more build.

First, a lab trace on my RX 9070 XT (loop cap on, 1075 frames) ruled out a lost reset. The compute walker binds the same image the builder PS 0x4a55033774c8f01e writes its heads into. After the walker, every frame, the game clears that image to 0 and zeroes GDS dword 0x14, which is the builder's DS_APPEND counter (its M0 is 0x20 and the instruction's offset 0x14). KytyPS5 carries out both, in order.

The candidate is how KytyPS5 emulates DS_APPEND in a pixel shader. One lane does the atomic add for the whole wave, and the other lanes get its result. That lane is the first one in the guest EXEC, and in a pixel shader the guest EXEC also contains the host's helper invocations. The Vulkan spec says atomics in helper invocations have no effect on memory and return undefined values, and that without maximal reconvergence a driver may or may not count helpers as active in group operations like the ballot used here. When the chosen lane is a helper, the counter doesn't advance and the whole wave gets an undefined base. Two fragments of the same pixel can then get the same node index, the second IMAGE_ATOMIC_SWAP returns that index itself, and the node points to itself. That would fit your maximal-reconvergence runs still failing, since that mode keeps helpers active.

The fix lets a non-helper lane do the add. Test build: https://github.com/Nawid3333/KytyPS5/actions/runs/40036089916 (branch test/helper-1511: main @ 6aaa533 + #1365 + the fix, no lab switches; artifact KytyPS5-Windows-x64, needs a GitHub login; the window title shows Fork build Nawid3333/KytyPS5 de0e387). Same settings as your control run, without any loop cap. Does it get past VS 22 | PS 36 | CS 48? If it still loses the device, a local build of the branch with your #1816 checkpoints would show whether it's still CS 0x657ad04626bf9d55 or something later, like the pixel-shader walker 0x5457609506174517 that hangs on my GPU. That one reads a different list, built by a shader I haven't found yet.

**@⁠Nawid3333** on GitHub · 2026-10-23 23:18 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6376663446) @⁠ZrDaniel07 I have a candidate fix for the hang on your RTX 5090, if you can test one more build. First, a lab trace on my RX 9070 XT (loop cap on, 1075 frames) ruled out a lost reset. The compute walker binds the same image the builder `PS 0x4a55033774c8f01e` writes its heads into. After the walker, every frame, the game clears that image to 0 and zeroes GDS dword `0x14`, which is the builder's `DS_APPEND` counter (its `M0` is `0x20` and the instruction's offset `0x14`). KytyPS5 carries out both, in order. The candidate is how KytyPS5 emulates `DS_APPEND` in a pixel shader. One lane does the atomic add for the whole wave, and the other lanes get its result. That lane is the first one in the guest EXEC, and in a pixel shader the guest EXEC also contains the host's helper invocations. The Vulkan spec says atomics in helper invocations have no effect on memory and return undefined values, and that without maximal reconvergence a driver may or may not count helpers as active in group operations like the ballot used here. When the chosen lane is a helper, the counter doesn't advance and the whole wave gets an undefined base. Two fragments of the same pixel can then get the same node index, the second `IMAGE_ATOMIC_SWAP` returns that index itself, and the node points to itself. That would fit your maximal-reconvergence runs still failing, since that mode keeps helpers active. The fix lets a non-helper lane do the add. Test build: https://github.com/Nawid3333/KytyPS5/actions/runs/40036089916 (branch `test/helper-1511`: `main` @ 6aaa533 + #1365 + the fix, no lab switches; artifact `KytyPS5-Windows-x64`, needs a GitHub login; the window title shows `Fork build Nawid3333/KytyPS5 de0e387`). Same settings as your control run, without any loop cap. Does it get past `VS 22 | PS 36 | CS 48`? If it still loses the device, a local build of the branch with your #1816 checkpoints would show whether it's still `CS 0x657ad04626bf9d55` or something later, like the pixel-shader walker `0x5457609506174517` that hangs on my GPU. That one reads a different list, built by a shader I haven't found yet.
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-24 00:47 UTC · original

@⁠Nawid3333 with your fix the RTX 5090 gets past the hang. I built de0e387 locally from test/helper-1511 (same commit as your artifact) and ran it with the same settings as the control run, no loop cap (the branch has no lab switches). I also repeated the earlier runs, each a second time with the pipeline cache and save left by the first run:

Build (RTX 5090) Loops capped Runs DEVICE_LOST
babec5b, cap off (control) none 2 2 of 2, at VS 22 | PS 36 | CS 48 and VS 18 | PS 28 | CS 47
ab2618b compute + pixel 2 0 of 2
babec5b compute only 2 0 of 2
de0e387 none 2 0 of 2

In both de0e387 runs the builder PS 0x4a55033774c8f01e, the walker CS 0x657ad04626bf9d55 and PS 0x5457609506174517 were compiled, and the second run got as far as loading a level (underwater_aerial_garden in the log).

Separately, past the hang every build eventually closes on a CPU-side guest fault in a loading thread, with or without your fix: OdxAsyncLoader or LevelTask_ATQT, reading address 0 or a garbage address, at four different pcs so far (0x9074d8153 and 0x90706b5be with de0e387; 0x900388230 and 0x900388244 in the babec5b/ab2618b repeats, the last two in the same function looking up the same key 0x9ca52db2). So it isn't caused by your fix. The first one is below; I can open a separate issue for it with all four logs.

First fault: de0e387, empty pipeline cache, while the world map loaded after the intro
--- Guest fault context ---
thread: OdxAsyncLoader
rax=0000000000000000 rbx=0000000100000002 rcx=0000000000000001 rdx=0000000311eb71a1
rsi=0000000000000000 rdi=0000000000000000 rbp=00000003210990e0 rsp=0000000321099060
r8 =0000000100000002 r9 =0000000000000000 r10=0000000000000000 r11=0000000000000000
r12=0000000311d43790 r13=0000000311fd5100 r14=0000000000000000 r15=0000000311eb5945
code (pc-48 .. pc+48, fault at byte 48):
 00 00 45 31 d2 c7 45 a8 00 00 00 00 45 31 f6 48
 01 c2 31 c0 eb 1a 0f 1f 80 00 00 00 00 41 83 c6
 02 4d 63 c6 49 01 d8 49 39 d0 0f 83 a7 03 00 00
 45 0f b6 00 85 c9 74 25 45 84 c0 79 34 41 f7 d0
 41 f6 c0 f0 0f 85 c5 00 00 00 41 83 c6 04 eb d1
 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 45 8d 60
--- Build ---
Source build de0e387
--- Error ---
Unhandled host exception: type=1 code=3221225477 pc=0x00000009074d8153 access=1 address=0x0000000100000002
 in G:/Kyty_PS5/src/loader/runtimeLinker.cpp:715
--- Build ---
Source build de0e387
--- Fatal Error ---
Error: condition (IsInvalid()) is true in G:/Kyty_PS5/src/common/file.cpp:212

AI use: Claude Code built the branches, ran the shader tests and compared the logs with me; I ran the game and checked the outputs myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-24 00:47 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6377732474) @⁠Nawid3333 with your fix the RTX 5090 gets past the hang. I built `de0e387` locally from `test/helper-1511` (same commit as your artifact) and ran it with the same settings as the control run, no loop cap (the branch has no lab switches). I also repeated the earlier runs, each a second time with the pipeline cache and save left by the first run: | Build (RTX 5090) | Loops capped | Runs | DEVICE_LOST | |---|---|---|---| | `babec5b`, cap off (control) | none | 2 | 2 of 2, at `VS 22 \| PS 36 \| CS 48` and `VS 18 \| PS 28 \| CS 47` | | `ab2618b` | compute + pixel | 2 | 0 of 2 | | `babec5b` | compute only | 2 | 0 of 2 | | `de0e387` | none | 2 | 0 of 2 | In both `de0e387` runs the builder `PS 0x4a55033774c8f01e`, the walker `CS 0x657ad04626bf9d55` and `PS 0x5457609506174517` were compiled, and the second run got as far as loading a level (`underwater_aerial_garden` in the log). Separately, past the hang every build eventually closes on a CPU-side guest fault in a loading thread, with or without your fix: `OdxAsyncLoader` or `LevelTask_ATQT`, reading address 0 or a garbage address, at four different `pc`s so far (`0x9074d8153` and `0x90706b5be` with `de0e387`; `0x900388230` and `0x900388244` in the `babec5b`/`ab2618b` repeats, the last two in the same function looking up the same key `0x9ca52db2`). So it isn't caused by your fix. The first one is below; I can open a separate issue for it with all four logs. <details> <summary>First fault: <code>de0e387</code>, empty pipeline cache, while the world map loaded after the intro</summary> ``` --- Guest fault context --- thread: OdxAsyncLoader rax=0000000000000000 rbx=0000000100000002 rcx=0000000000000001 rdx=0000000311eb71a1 rsi=0000000000000000 rdi=0000000000000000 rbp=00000003210990e0 rsp=0000000321099060 r8 =0000000100000002 r9 =0000000000000000 r10=0000000000000000 r11=0000000000000000 r12=0000000311d43790 r13=0000000311fd5100 r14=0000000000000000 r15=0000000311eb5945 code (pc-48 .. pc+48, fault at byte 48): 00 00 45 31 d2 c7 45 a8 00 00 00 00 45 31 f6 48 01 c2 31 c0 eb 1a 0f 1f 80 00 00 00 00 41 83 c6 02 4d 63 c6 49 01 d8 49 39 d0 0f 83 a7 03 00 00 45 0f b6 00 85 c9 74 25 45 84 c0 79 34 41 f7 d0 41 f6 c0 f0 0f 85 c5 00 00 00 41 83 c6 04 eb d1 66 66 66 66 2e 0f 1f 84 00 00 00 00 00 45 8d 60 --- Build --- Source build de0e387 --- Error --- Unhandled host exception: type=1 code=3221225477 pc=0x00000009074d8153 access=1 address=0x0000000100000002 in G:/Kyty_PS5/src/loader/runtimeLinker.cpp:715 --- Build --- Source build de0e387 --- Fatal Error --- Error: condition (IsInvalid()) is true in G:/Kyty_PS5/src/common/file.cpp:212 ``` </details> AI use: Claude Code built the branches, ran the shader tests and compared the logs with me; I ran the game and checked the outputs myself.
Author
Owner

@⁠ZrDaniel07 on GitHub · 2026-10-24 01:49 UTC · original

Update on the RTX 5090: with @⁠Nawid3333's de0e387, #838 and a local fix for the oversized mesh draw from #624, ASTRO BOT now gets into gameplay in the Garden level. No DEVICE_LOST and no loading-thread fault; I closed it myself.

What stopped it What got past it
DEVICE_LOST while loading (CS 0x657ad04626bf9d55) de0e387 (DS_APPEND elects a non-helper lane)
guest faults on loading threads (OdxAsyncLoader, LevelTask_ATQT) #838: they came from file reads into write-protected guest pages returning 0 bytes. With it, 0 such reads in 3 runs, so no separate issue is needed for them
mesh draw exceeds host workgroup limits: 1x76426 / 1x65674 in the level a local patch that draws the instances in slices (posted in #793)

It runs at under 1 FPS in the level with the guest log going to a file, and the GPU is mostly idle (7% busy at 2205 MHz), so the limit is on the CPU side.

AI use: Claude Code built the branches, wrote the local mesh patch and compared the logs with me; I ran the game and checked the outputs myself.

**@⁠ZrDaniel07** on GitHub · 2026-10-24 01:49 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6378384148) Update on the RTX 5090: with @⁠Nawid3333's `de0e387`, #838 and a local fix for the oversized mesh draw from #624, ASTRO BOT now gets into gameplay in the Garden level. No DEVICE_LOST and no loading-thread fault; I closed it myself. | What stopped it | What got past it | |---|---| | DEVICE_LOST while loading (`CS 0x657ad04626bf9d55`) | `de0e387` (`DS_APPEND` elects a non-helper lane) | | guest faults on loading threads (`OdxAsyncLoader`, `LevelTask_ATQT`) | #838: they came from file reads into write-protected guest pages returning 0 bytes. With it, 0 such reads in 3 runs, so no separate issue is needed for them | | `mesh draw exceeds host workgroup limits: 1x76426` / `1x65674` in the level | a local patch that draws the instances in slices (posted in #793) | It runs at under 1 FPS in the level with the guest log going to a file, and the GPU is mostly idle (7% busy at 2205 MHz), so the limit is on the CPU side. AI use: Claude Code built the branches, wrote the local mesh patch and compared the logs with me; I ran the game and checked the outputs myself.
Author
Owner

@⁠devklex on GitHub · 2026-10-25 01:38 UTC · original

@⁠ZrDaniel07 thanks for testing the maximal-reconvergence idea on the 5090; that rules it out, and I withdraw it. A correction to my comment above, too: the RTX 4090 loses the device as well, just later in the game. Entering Sky Garden, the first level after the opening, lost it in 4 of 4 runs, and the 3 runs with checkpoints all stopped in the dispatch you found (CS 0x657ad04626bf9d55, 4096x1x1, cs=0x0000000500525200). My earlier runs only went as far as the crash site, so strike "It looks specific to RTX 50 and Arc". The Sky Garden runs used local builds (763d3be and c5016d94 with my other Astro Bot patches); c5016d94 with only the null-page fix crashed on a loader thread while booting my save (2 of 2), like the faults #838 fixes.

It's the helper-lane cause @⁠Nawid3333 traced, which #1881 fixes. Independently, I had fixed it by starting pixel shaders with EXEC = !HelperInvocation, with S_WQM adding the helpers back (the entry-EXEC change discussed in #1574). With that and an instance-only split of the oversized mesh draw from #624 (1x71682 here, the same approach as your patch in #793), Sky Garden loaded and reached gameplay without a game patch in 3 of 3 runs. I haven't run #1881 itself on the 4090.

AI use: Claude Code traced the hang, wrote the local fixes, ran the builds and game runs, and drafted this comment.

**@⁠devklex** on GitHub · 2026-10-25 01:38 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6392037033) @⁠ZrDaniel07 thanks for testing the maximal-reconvergence idea on the 5090; that rules it out, and I withdraw it. A correction to my comment above, too: the RTX 4090 loses the device as well, just later in the game. Entering Sky Garden, the first level after the opening, lost it in 4 of 4 runs, and the 3 runs with checkpoints all stopped in the dispatch you found (`CS 0x657ad04626bf9d55`, `4096x1x1`, `cs=0x0000000500525200`). My earlier runs only went as far as the crash site, so strike "It looks specific to RTX 50 and Arc". The Sky Garden runs used local builds (763d3be and c5016d94 with my other Astro Bot patches); c5016d94 with only the null-page fix crashed on a loader thread while booting my save (2 of 2), like the faults #838 fixes. It's the helper-lane cause @⁠Nawid3333 traced, which #1881 fixes. Independently, I had fixed it by starting pixel shaders with EXEC = `!HelperInvocation`, with `S_WQM` adding the helpers back (the entry-EXEC change discussed in #1574). With that and an instance-only split of the oversized mesh draw from #624 (`1x71682` here, the same approach as your patch in #793), Sky Garden loaded and reached gameplay without a game patch in 3 of 3 runs. I haven't run #1881 itself on the 4090. AI use: Claude Code traced the hang, wrote the local fixes, ran the builds and game runs, and drafted this comment.
Author
Owner

@⁠Nawid3333 on GitHub · 2026-11-14 16:41 UTC · original

@⁠hlava0 @⁠fabled-aesop main has had 5429888d ("shader: keep pixel helper lanes out of the EXEC and VCC words") since 2026-10-26. That is the cause ZrDaniel07 (RTX 5090) and devklex (RTX 4090) traced above for the device loss in CS 0x657ad04626bf9d55. ZrDaniel07 reports no DEVICE_LOST on main f90a8b15 with it (that run also had #838, which is still an open PR, for faults on the game's loading threads).

Could you try the current official build (KytyPS5-2026-11-14-3e226bf) on your B580 and RTX 5080, without INTEL_SIMD_DEBUG, and tell me whether the device loss is gone? If it stops, please attach _kyty.txt (Printf output = File) and the shader counters it stops at.

**@⁠Nawid3333** on GitHub · 2026-11-14 16:41 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/1511#issuecomment-6880855424) @⁠hlava0 @⁠fabled-aesop main has had 5429888d ("shader: keep pixel helper lanes out of the EXEC and VCC words") since 2026-10-26. That is the cause ZrDaniel07 (RTX 5090) and devklex (RTX 4090) traced above for the device loss in `CS 0x657ad04626bf9d55`. ZrDaniel07 reports no DEVICE_LOST on main f90a8b15 with it (that run also had #838, which is still an open PR, for faults on the game's loading threads). Could you try the current official build (KytyPS5-2026-11-14-3e226bf) on your B580 and RTX 5080, without `INTEL_SIMD_DEBUG`, and tell me whether the device loss is gone? If it stops, please attach `_kyty.txt` (Printf output = File) and the shader counters it stops at.
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#1511
No description provided.