[GH-ISSUE #559] GPU test: NVIDIA GeForce RTX 3060 Ti (Vulkan 1.4, wave64-emulate) — 26497/26501 pass, 4 cs modules crash driver #15

Open
opened 2026-11-26 20:13:59 +01:00 by 4ld0 · 5 comments
Owner

Originally created by @Luwaree on GitHub (Nov 24, 2026).
Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/559

What happens

k_pipeline_check exits with code 1 after 4 wrapped compute shader modules crash the NVIDIA Vulkan driver (0xC0000409), while 26497/26501 pipelines compile cleanly.

Commit

5aedbc2

System

Windows 11 x64, NVIDIA GeForce RTX 3060 Ti (Driver 621.01, Vulkan 1.4, subgroup 32..32)

Where

pipelines

Command and steps

Ran the pipelines stage with 4 worker threads (reproduces consistently even when isolated with --jobs 1):
python -I make_game.py --game <GAME_DIR> --out <OUT_DIR> --work <WORK_DIR> --stages pipelines --jobs 4

Output

26,497 out of 26,501 pipelines compiled successfully (`pipeline_cache.bin`: 4,990,959,255 bytes):
- `vs`: 2,236 / 2,236 ok
- `ps`: 12,101 / 12,101 ok
- `ms`: 9,282 / 9,282 ok
- `gs`: 195 / 195 ok
- `cs`: 2,682 / 2,686 ok (4 failed)

Contents of `pipeline_crashes.txt`: text Cwater_shading_CS_TransmissionVolumetricsSubmerged_bbfb2953_Wrapped Hindirect_diffuse_lighting_CS_ScreenProbes_ActivateRays_d60186e6_Wrapped Jindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbes_9083c094_Wrapped Pindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbesTarget_534f271f_Wrapped
Originally created by @Luwaree on GitHub (Nov 24, 2026). Original GitHub issue: https://github.com/ubiquitarianism/leonida/issues/559 ### What happens k_pipeline_check exits with code 1 after 4 wrapped compute shader modules crash the NVIDIA Vulkan driver (0xC0000409), while 26497/26501 pipelines compile cleanly. ### Commit 5aedbc2 ### System Windows 11 x64, NVIDIA GeForce RTX 3060 Ti (Driver 621.01, Vulkan 1.4, subgroup 32..32) ### Where pipelines ### Command and steps Ran the pipelines stage with 4 worker threads (reproduces consistently even when isolated with `--jobs 1`): `python -I make_game.py --game <GAME_DIR> --out <OUT_DIR> --work <WORK_DIR> --stages pipelines --jobs 4` ### Output ```text 26,497 out of 26,501 pipelines compiled successfully (`pipeline_cache.bin`: 4,990,959,255 bytes): - `vs`: 2,236 / 2,236 ok - `ps`: 12,101 / 12,101 ok - `ms`: 9,282 / 9,282 ok - `gs`: 195 / 195 ok - `cs`: 2,682 / 2,686 ok (4 failed) Contents of `pipeline_crashes.txt`: text Cwater_shading_CS_TransmissionVolumetricsSubmerged_bbfb2953_Wrapped Hindirect_diffuse_lighting_CS_ScreenProbes_ActivateRays_d60186e6_Wrapped Jindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbes_9083c094_Wrapped Pindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbesTarget_534f271f_Wrapped ```
Author
Owner

@Luwaree commented on GitHub (Nov 24, 2026):

Added full run_gpu_tests.py baseline for RTX 3060 Ti (matching gpu-test-results/RTX3070Ti.txt format):

GPU:        NVIDIA GeForce RTX 3060 Ti (Ampere / GA104), subgroup 32..32
Driver:     NVIDIA 621.01 (proprietary), Vulkan 1.4
Subgroup:   32..32 (minSubgroupSize 32, maxSubgroupSize 32)
OS:         Windows 11 x64
Commit:     21625bca (main, 2026-11-24)
Tools:      llvm-mc, SPIRV-Tools, CMake + Ninja / MSVC, Python 3.14
run_gpu_tests.py: 257 shaders: 257 translated, 257 pass spirv-val
            native:                 197/248 passed, 49 skipped, 2 failed
            LEONIDA_W64_EMULATE=1:  229/248 passed, 17 skipped, 2 failed
Failed:     cs_imgload_tfe, cs_imgload_d16_tfe (native and emulated alike): exit 1, "r32 sint (sint view):
            64 bad, texel(5,3) = 2071"; the tfe status VGPR is read but never written (#31) - the same
            pair, and the same numbers, as the Radeon 780M, RTX 3070 Ti and RTX 4070 Ti records.
Skipped:    native: 31 "no 64-wide compute subgroup on this device" and 1 "cannot require a 64-wide
            fragment subgroup" (the wave64 fixtures, which the emulated run covers), plus the 16
            documented "run by d3d12_*_test / w64_graphics.py" cases.
            Emulated: the same 16, plus the 64-wide fragment one.
Notes:
- Built with make_game.py on Windows 11 x64.
- wave64 VS/PS/GS on this 32-wide-subgroup device: tier A: 1, tier C: 1 (tier C is not exact there;
  see wave64_graphics_reasons in the index).
- No game files involved: run_gpu_tests.py assembles its own RDNA2 fixtures with llvm-mc and runs the
  translated SPIR-V on the Vulkan device.
- Full game pipeline check (vk_pipeline_check, #559): 26,497/26,501 passed (vs 2236/2236, ps 12101/12101,
  ms 9282/9282, gs 195/195, cs 2682/2686; 4 wrapped cs modules crash driver).
<!-- gh-comment-id:7128912566 --> @Luwaree commented on GitHub (Nov 24, 2026): Added full `run_gpu_tests.py` baseline for RTX 3060 Ti (matching `gpu-test-results/RTX3070Ti.txt` format): ```text GPU: NVIDIA GeForce RTX 3060 Ti (Ampere / GA104), subgroup 32..32 Driver: NVIDIA 621.01 (proprietary), Vulkan 1.4 Subgroup: 32..32 (minSubgroupSize 32, maxSubgroupSize 32) OS: Windows 11 x64 Commit: 21625bca (main, 2026-11-24) Tools: llvm-mc, SPIRV-Tools, CMake + Ninja / MSVC, Python 3.14 run_gpu_tests.py: 257 shaders: 257 translated, 257 pass spirv-val native: 197/248 passed, 49 skipped, 2 failed LEONIDA_W64_EMULATE=1: 229/248 passed, 17 skipped, 2 failed Failed: cs_imgload_tfe, cs_imgload_d16_tfe (native and emulated alike): exit 1, "r32 sint (sint view): 64 bad, texel(5,3) = 2071"; the tfe status VGPR is read but never written (#31) - the same pair, and the same numbers, as the Radeon 780M, RTX 3070 Ti and RTX 4070 Ti records. Skipped: native: 31 "no 64-wide compute subgroup on this device" and 1 "cannot require a 64-wide fragment subgroup" (the wave64 fixtures, which the emulated run covers), plus the 16 documented "run by d3d12_*_test / w64_graphics.py" cases. Emulated: the same 16, plus the 64-wide fragment one. Notes: - Built with make_game.py on Windows 11 x64. - wave64 VS/PS/GS on this 32-wide-subgroup device: tier A: 1, tier C: 1 (tier C is not exact there; see wave64_graphics_reasons in the index). - No game files involved: run_gpu_tests.py assembles its own RDNA2 fixtures with llvm-mc and runs the translated SPIR-V on the Vulkan device. - Full game pipeline check (vk_pipeline_check, #559): 26,497/26,501 passed (vs 2236/2236, ps 12101/12101, ms 9282/9282, gs 195/195, cs 2682/2686; 4 wrapped cs modules crash driver). ```
Author
Owner

@augustoluiz1423-dot commented on GitHub (Nov 24, 2026):

Additional AMD reproduction: disabling VkPipelineCache allows both compute pipelines to compile

I have a related finding on an AMD Radeon RX 9060 XT (16 GB) running Windows 11.

Leonida revision: "a28927849" (November 24, 2026)
Vulkan subgroup support: 32–64
Tool: "vk_pipeline_check.exe", built with Visual Studio 2026
Shader count in original index: 26,503

I can consistently reproduce "VK_ERROR_DEVICE_LOST (-4)" when compiling these two compute shaders sequentially using the same Vulkan device:

  1. "Jindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbes_9083c094_Wrapped" — wave64
  2. "Jindirect_diffuse_lighting_CS_ScreenProbes_ResolveGBuffer_2972c805_Wrapped" — wave32

Observed behavior:

  • "ActivateProbes" compiles successfully, although compilation can take 20–27 minutes.
  • "ResolveGBuffer" then fails with "VK_ERROR_DEVICE_LOST (-4)".
  • "ResolveGBuffer" compiles successfully when tested alone.
  • The failure reproduces using the older translated SPIR-V and the newly translated SPIR-V from commit "a28927849".

The updated translator significantly changed the SPIR-V output:

Shader| Previous size| Updated size
ActivateProbes| 35,381,480 bytes| 24,415,476 bytes
ResolveGBuffer| 2,314,544 bytes| 2,419,504 bytes

Experiment: disabling the application pipeline cache

I made an isolated experimental modification to "runtime/test/vk_pipeline_check.cpp", adding a "--no-pipeline-cache" option that passes "VK_NULL_HANDLE" instead of an application "VkPipelineCache" to pipeline creation calls. The default behavior remains unchanged.

Using the same two newly translated shaders, in the same order:

  • With application pipeline cache: 1 pipeline passed, 1 failed ("-4").
  • Without application pipeline cache: 2 pipelines passed, 0 failed, exit code 0.
  • Successful run: November 24, 2026, 15:24:01–15:40:56 (approximately 16m55s).

This suggests that application pipeline-cache usage, or its interaction with the AMD Vulkan driver, may contribute to the failure.

It does not yet establish a definitive root cause. The successful no-cache configuration has been tested once, and driver-internal caching or other state may also matter.

Importantly, the successful experiment required no modifications to shader instructions, no disabling of rendering functionality, and no changes to the game runtime.

Would it be useful to investigate optional cache disabling or per-pipeline cache isolation in "vk_pipeline_check"? I can provide the verifier-only source diff and sanitized diagnostic output if helpful.

No game files or shader binaries are attached.

<!-- gh-comment-id:7141935067 --> @augustoluiz1423-dot commented on GitHub (Nov 24, 2026): Additional AMD reproduction: disabling VkPipelineCache allows both compute pipelines to compile I have a related finding on an AMD Radeon RX 9060 XT (16 GB) running Windows 11. Leonida revision: "a28927849" (November 24, 2026) Vulkan subgroup support: 32–64 Tool: "vk_pipeline_check.exe", built with Visual Studio 2026 Shader count in original index: 26,503 I can consistently reproduce "VK_ERROR_DEVICE_LOST (-4)" when compiling these two compute shaders sequentially using the same Vulkan device: 1. "Jindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbes_9083c094_Wrapped" — wave64 2. "Jindirect_diffuse_lighting_CS_ScreenProbes_ResolveGBuffer_2972c805_Wrapped" — wave32 Observed behavior: - "ActivateProbes" compiles successfully, although compilation can take 20–27 minutes. - "ResolveGBuffer" then fails with "VK_ERROR_DEVICE_LOST (-4)". - "ResolveGBuffer" compiles successfully when tested alone. - The failure reproduces using the older translated SPIR-V and the newly translated SPIR-V from commit "a28927849". The updated translator significantly changed the SPIR-V output: Shader| Previous size| Updated size ActivateProbes| 35,381,480 bytes| 24,415,476 bytes ResolveGBuffer| 2,314,544 bytes| 2,419,504 bytes Experiment: disabling the application pipeline cache I made an isolated experimental modification to "runtime/test/vk_pipeline_check.cpp", adding a "--no-pipeline-cache" option that passes "VK_NULL_HANDLE" instead of an application "VkPipelineCache" to pipeline creation calls. The default behavior remains unchanged. Using the same two newly translated shaders, in the same order: - With application pipeline cache: 1 pipeline passed, 1 failed ("-4"). - Without application pipeline cache: 2 pipelines passed, 0 failed, exit code 0. - Successful run: November 24, 2026, 15:24:01–15:40:56 (approximately 16m55s). This suggests that application pipeline-cache usage, or its interaction with the AMD Vulkan driver, may contribute to the failure. It does not yet establish a definitive root cause. The successful no-cache configuration has been tested once, and driver-internal caching or other state may also matter. Importantly, the successful experiment required no modifications to shader instructions, no disabling of rendering functionality, and no changes to the game runtime. Would it be useful to investigate optional cache disabling or per-pipeline cache isolation in "vk_pipeline_check"? I can provide the verifier-only source diff and sanitized diagnostic output if helpful. No game files or shader binaries are attached.
Author
Owner

@NinsonD commented on GitHub (Nov 24, 2026):

The cache experiment is interesting, especially since ResolveGBuffer passes on its own but fails after ActivateProbes.

Before changing the default cache behavior, it might be worth repeating the same two-shader sequence with cache enabled/disabled a few times to rule out driver state or timing.

Would adding a small regression test for cache isolation in vk_pipeline_check be useful? I could look into that side if nobody’s working on it yet.

<!-- gh-comment-id:7143940102 --> @NinsonD commented on GitHub (Nov 24, 2026): The cache experiment is interesting, especially since ResolveGBuffer passes on its own but fails after ActivateProbes. Before changing the default cache behavior, it might be worth repeating the same two-shader sequence with cache enabled/disabled a few times to rule out driver state or timing. Would adding a small regression test for cache isolation in vk_pipeline_check be useful? I could look into that side if nobody’s working on it yet.
Author
Owner

@augustoluiz1423-dot commented on GitHub (Nov 24, 2026):

Thanks for the feedback! I agree that additional controlled A/B runs would be useful before drawing a firm conclusion.

So far, the cache-enabled configuration has failed repeatedly on my RX 9060 XT, while the first run with "--no-pipeline-cache" succeeded with both pipelines passing (2/2, exit code 0).

However, I agree that one successful no-cache run isn't enough to establish the root cause, especially considering possible driver-internal caching and GPU state differences.

A regression test for cache isolation in "vk_pipeline_check" would definitely be useful. I haven't started working on one myself, so I'd appreciate it if you'd like to investigate that side.

I already have an experimental implementation of "--no-pipeline-cache" that leaves the default behavior unchanged. I can share the source diff and diagnostic logs if that helps.

I can also perform a limited number of additional A/B runs locally to confirm reproducibility, since compiling ActivateProbes can take around 17–27 minutes per run.

<!-- gh-comment-id:7144151691 --> @augustoluiz1423-dot commented on GitHub (Nov 24, 2026): Thanks for the feedback! I agree that additional controlled A/B runs would be useful before drawing a firm conclusion. So far, the cache-enabled configuration has failed repeatedly on my RX 9060 XT, while the first run with "--no-pipeline-cache" succeeded with both pipelines passing (2/2, exit code 0). However, I agree that one successful no-cache run isn't enough to establish the root cause, especially considering possible driver-internal caching and GPU state differences. A regression test for cache isolation in "vk_pipeline_check" would definitely be useful. I haven't started working on one myself, so I'd appreciate it if you'd like to investigate that side. I already have an experimental implementation of "--no-pipeline-cache" that leaves the default behavior unchanged. I can share the source diff and diagnostic logs if that helps. I can also perform a limited number of additional A/B runs locally to confirm reproducibility, since compiling ActivateProbes can take around 17–27 minutes per run.
Author
Owner

@ZroIsHere commented on GitHub (Nov 26, 2026):

I added an opt-in --no-pipeline-cache mode to vk_pipeline_check for an app-cache A/B run; it uses VK_NULL_HANDLE and passes the mode through --isolate. Draft PR: https://github.com/ubiquitarianism/leonida/pull/2170. Driver-internal caches remain enabled, so this isolates only the application VkPipelineCache.

<!-- gh-comment-id:7179737906 --> @ZroIsHere commented on GitHub (Nov 26, 2026): I added an opt-in `--no-pipeline-cache` mode to vk_pipeline_check for an app-cache A/B run; it uses VK_NULL_HANDLE and passes the mode through --isolate. Draft PR: https://github.com/ubiquitarianism/leonida/pull/2170. Driver-internal caches remain enabled, so this isolates only the application VkPipelineCache.
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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
starred/leonida#15
No description provided.