Skip to content

GPU tests: honor assembler and validation settings for fallback shaders - #7401

Open
gautch29 wants to merge 1 commit into
ItsNotRexed:mainfrom
gautch29:codex/gpu-mesh-respect-no-validate
Open

gautch29 wants to merge 1 commit into
ItsNotRexed:mainfrom
gautch29:codex/gpu-mesh-respect-no-validate

Conversation

@gautch29

Copy link
Copy Markdown

Claimed in the coordination issue as a new GPU runner item.

What and why

With --assembler python and validation disabled, ms_v5_workgroup still fails if spirv-val is unavailable. The mesh-compute and barycentric fallback generators also invoke SPIRV-Tools directly. Use the runner's assembler and validation settings for these generated shaders and guard the mesh fixture's extra validator call. The default validation path remains in use.

Tested

  • Apple M3 Pro, macOS 27.0, MoltenVK 1.4.2 / Vulkan 1.4.357, LLVM 23.1.6. With SPIRV-Tools absent from PATH, the Python assembler and mesh-compute fallback passed all 24 ms_v5_workgroup coordinate checks. The native mesh path reported the expected unsupported-feature skip.
  • The Python assembler emitted a valid barycentric fallback helper. spirv-val checked it separately. MoltenVK skipped the draw because geometry shaders are unavailable.
  • Five focused test suites passed (127 tests), including explicit validation opt-out, automatic opt-out with no validator, and an enabled validator reporting a failure.

AI-assisted: Yes (Codex).

Checklist

  • No game data, keys or decryption, including in logs or reports quoted here.

@umnitus

umnitus commented Nov 23, 2026

Copy link
Copy Markdown

Independent Windows check at 50a6cbf with Python 3.12.10. test_run_gpu_tests_python_assembler (7), test_run_gpu_tests (58) and test_run_gpu_tests_paths (21) passed, including the validation-mode regression and Python helper assembly. The hard-link subcase passed on a repeat with filesystem sandboxing lifted. This was runner-test coverage. AI-assisted testing.

@crastinator

Copy link
Copy Markdown
Contributor

Tested 50a6cbf3 merged onto main 37398f98 on AMD + RADV: pass, no change in results.

AMD Radeon RX 6700 XT (gfx1031, RDNA2), RADV Mesa 26.3.1, CachyOS, Linux 7.3.5, Python 3.14.

  • run_gpu_tests.py: per-test results identical to main, native 223/240 and LEONIDA_W64_EMULATE=1 223/240. The only failure is ms_wave_info_s3, which also fails on main here (6 of 6 native reruns of main fail it). RADV has native barycentrics and mesh shaders, so the default run here doesn't use the fallback helpers this changes; it shows only that nothing else moved.
  • tests/test_run_gpu_tests.py + tests/test_run_gpu_tests_python_assembler.py: 69 passed, 103 subtests passed.

AI-assisted (Claude Code).

@NiHuShu

NiHuShu commented Nov 23, 2026

Copy link
Copy Markdown

Independent native Linux GPU check on CachyOS, NVIDIA GeForce RTX 4080, driver 620.70.06 (subgroup 32), using synthetic fixtures and the pinned Vulkan headers. Compared base 042c5f37836dc2c8d5913c2fc5a88e99bdee083b and head 50a6cbf329891a19839970b1dab4b1c38f0882a0.

I forced mesh-as-compute with wave64 emulation and the barycentric geometry fallback, using --assembler python --require-pass with both SPIRV-Tools executables absent from PATH. SPIR-V validation was auto-skipped and Vulkan layer validation was unset.

Fixture Base Head
ms_v5_workgroup Exit 1 generating the mesh helper, missing spirv-as Exit 0, 24/24 workgroup coordinates exact
ps_bary Exit 1 generating the barycentric helper, missing spirv-as Exit 0, 4096/4096 pixels match

Both base runs stopped before the draw. The head passed both checks with zero GPU fixture skips. This exercises the two fallback paths on an actual Linux draw. AI-assisted build and test execution.

@kamilolejnik

Copy link
Copy Markdown

Tested 50a6cbf on Intel Iris Xe Graphics (TGL GT2, Xe-LP: geometry shaders yes, no VK_EXT_mesh_shader, no VK_KHR_fragment_shader_barycentric, subgroup 8..32), Mesa ANV 26.3.1, Vulkan 1.4.363, Linux 6.12 (Arch container on Debian 13), llvm-mc 23.1.5, CPython 3.14: pass. Branch and its merge-base 042c5f3 side by side, each with its own build. This device actually draws the barycentric-fallback GS that MoltenVK had to skip.

Both runs with LEONIDA_MESH_COMPUTE=1 LEONIDA_BARY_FALLBACK=1 LEONIDA_W64_EMULATE=1:

base 042c5f3 this PR
A: SPIRV-Tools on PATH, default assembler 216/240 passed, 23 skipped 216/240 passed, 23 skipped (every test's status identical)
B: spirv-as/spirv-val removed from PATH, --assembler python crashes before the first test: FileNotFoundError: 'spirv-as' from tools/bary_fallback_gs.py:182 (build_for_index, called from run_suite) 216/240 passed, 23 skipped, the same per-test result as A

In B on the branch, the runner prints note: spirv-val not found on PATH; translating with --no-validate, builds ps_bary.bary_gs.spv, ps_persp_bary.bary_gs.spv, ms_tri.mesh_vs.spv and ms_v5_workgroup.mesh_vs.spv with the Python assembler, and they run on the GPU: ms_tri 4096/4096 exact, ms_v5_workgroup 24/24 workgroup coordinates exact, ps_bary 4096/4096 match, ps_persp_bary perspective-correct on every covered pixel. The one failure in every run is the known ms_wave_info_s3 (got -1.0 at (0,0); #5741, #7136), on base and branch alike.

CPU: tests/test_run_gpu_tests_python_assembler.py 7 OK, tests/test_run_gpu_tests.py 58 OK, tests/test_run_gpu_tests_paths.py 21 OK.

Synthetic fixtures only, no game files. AI-assisted (Claude Code).

@thehollowedone

Copy link
Copy Markdown

The Linux fallback result also holds on native Windows at 50a6cbf3. RTX 3080 Ti, driver 621.35, Vulkan SDK 1.4.363.0.

I ran both forced fallbacks with --assembler python and neither spirv-as nor spirv-val on the runner's PATH. ps_bary matched all 4,096 pixels and ms_v5_workgroup with wave64 emulation matched all 24 coordinates. Both ran with Vulkan core and synchronization validation active, with zero diagnostics. A separate spirv-val --target-env vulkan1.2 run passed all 10 generated modules.

Synthetic inputs only. AI-assisted.

@duudiis

duudiis commented Nov 23, 2026

Copy link
Copy Markdown

Tested 50a6cbf merged onto main 603d53e on RTX 5070 (Blackwell), NVIDIA Windows driver 32.0.16.2124 (621.24), Windows 11 Pro 26300, CPython 3.11.0; no llvm-mc, no SPIRV-Tools, with the CI runtime-windows test programs of main 7b7d73f (the runner is newer than those programs): pass

  • python -I scripts/run_gpu_tests.py --build <rt> --disasm-dir tests/semantic/fixtures/disasm --assembler python: main 81/96 passed, 15 skipped (wave64, no 64-wide subgroup); merge 81/96 passed, 15 skipped. Per-test status identical.
  • Same with LEONIDA_W64_EMULATE=1: main 96/96, merge 96/96, per-test status identical.
  • Same with LEONIDA_BARY_FALLBACK=1 LEONIDA_MESH_COMPUTE=1 LEONIDA_W64_EMULATE=1 (spirv-as/spirv-val not on PATH): main crashes after translation, before any test runs, with FileNotFoundError from tools/bary_fallback_gs.py:182 (build_for_index, called from run_suite). Merge 96/96 passed. It builds ps_bary.bary_gs.spv with the Python assembler, and ps_bary matches 4096/4096 pixels through the geometry-shader fallback.
  • LEONIDA_BARY_FALLBACK=1 ... --filter ps_bary --require-pass on the merge: 1/1 passed, exit 0.
  • Not run: ms_v5_workgroup, ms_tri and the mesh-compute fallback. They have no pre-disassembled .s in tests/semantic/fixtures/disasm, and without llvm-mc they cannot be assembled here.
  • CPU: pytest -q tests/test_run_gpu_tests.py tests/test_run_gpu_tests_python_assembler.py tests/test_run_gpu_tests_paths.py on the merge: 90 passed, 110 subtests passed.

AI-assisted (Claude Code).

@boboman-188

Copy link
Copy Markdown

Tested 50a6cbf32 against 042c5f378 on a Radeon RX 6700 XT, AMD driver 26.11.2, Windows 11 build 26300.9974, Python 3.14.6 and LLVM 23.1.6.

I forced mesh-as-compute, barycentric fallback and wave64 emulation with --assembler python and both SPIRV-Tools executables off PATH. On the parent, both fixtures exited while trying to start spirv-as. On the PR, ms_v5_workgroup passed all 24 workgroup coordinate checks and ps_bary matched all 4,096 pixels. I validated both generated helper modules separately afterward. The three focused Python suites passed all 86 tests.

Synthetic fixtures only. AI-assisted testing.

@javdc

javdc commented Nov 23, 2026

Copy link
Copy Markdown

Tested 50a6cbf on Steam Deck LCD (Jupiter), AMD Custom GPU 0405 "Van Gogh", RADV Mesa 26.2.0-devel (git-5c65d4fc31), Vulkan 1.4.350, SteamOS 3.9.5 (holo), kernel 7.2.7-valve2-2-neptune-72-g31504582a073: pass

  • python3 -m pytest tests/test_run_gpu_tests.py tests/test_run_gpu_tests_python_assembler.py -q — 65 passed, 103 subtests passed

AI-assisted (OpenCode).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants