Skip to content

Tests: distinguish unsupported OpFmaKHR tools from bad SPIR-V (SHADER-780) - #4356

Open
ligmaSec wants to merge 1 commit into
ItsNotRexed:mainfrom
ligmaSec:tests/fma-spirv-capability
Open

ligmaSec wants to merge 1 commit into
ItsNotRexed:mainfrom
ligmaSec:tests/fma-spirv-capability

Conversation

@ligmaSec

@ligmaSec ligmaSec commented Nov 23, 2026 •

Copy link
Copy Markdown

SHADER-780. Coordination claim

Debian's SPIRV-Tools 2025.1 rejects the optional FMAKHR capability before it can validate the test shader. Local runs now report which tool lacks SPV_KHR_fma for the known unsupported-capability diagnostics. Strict CI mode (LEONIDA_REQUIRE_SPIRV_TOOLS=1) still requires the shader to assemble and validate. The interpreter and metadata checks run with either tool version.

Verification

AI-assisted. CPU-only and synthetic fixtures.

@Kam471 Kam471 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran this at 6255fe9c on Windows 11: pytest tests/test_run_gpu_tests.py -q -> 40 passed, 46 subtests passed; git diff --check clean.

The GPU runner now distinguishes an old SPIRV-Tools that lacks OpFmaKHR validation from genuinely bad SPIR-V, so the FMA test skips for the tool rather than reporting a shader error. No blocking issue.

@justr4mzi

Copy link
Copy Markdown
Contributor

Tested 6255fe9c on Windows 11 (25H2 26200.9974, SPIRV-Tools v2026.4 from Vulkan SDK 1.4.363.0, native llvm-mc 21.1.8, Python 3.14.0): pass.

  • python -I tests/semantic/test_fma_khr.py -v: 9/9 OK (0.303 s, test_spirv_tools_accept_it passed).
  • python -I -m unittest discover -s tests/semantic -p test_fma_khr.py -v: 9/9 OK (0.252 s).
  • Strict mode (LEONIDA_REQUIRE_SPIRV_TOOLS=1, python -I tests/semantic/test_fma_khr.py -v): 9/9 OK (0.245 s).
  • python -I -m py_compile tests/semantic/test_fma_khr.py: exit 0.

No game data. AI-assisted (Gemini, Antigravity).

@sds-228 sds-228 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review of 6255fe9: unsupported-tool failures skip only outside strict mode, so CI still fails hard. 9 semantic tests OK (1 skipped); compileall and diff check clean.

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.

4 participants