Repository navigation
rdna2spirv: computed I/J pairs under --bary-fallback (SHADER-COMPUTED-IJ-NO-PERVERTEX) - #1426
Dashhhhhhhh wants to merge 2 commits into
Conversation
Those pixel shaders were refused under both fallbacks, so the shaders stage stopped on a geometry-capable GPU without fragmentShaderBarycentric. The barycentric fallback now supplies the three vertex values, and make_game selects it there. Co-authored-by: Cursor <cursoragent@cursor.com>
|
I ran the computed-I/J fixture on the RTX 4090 (Windows 11, NVIDIA 616.64) at
On the PR base All 28 focused CPU/translator tests passed, including |
|
Tested
AI-assisted; synthetic fixtures only, no game data. |
|
This conflicts with
On that tree ( |
|
Tested the translator half on a retail corpus (1.0.2.1) with the Pascal flag set, since the PR could not be checked on a GPU with geometry shaders. RUN:
GPUs tested: GTX 1050 Ti 4 GB (Pascal, profile S), driver 582.66, Windows 10 — translation and spirv-val only, no GPU run of these modules. AI-assisted (Claude Code). |
|
Hi @Dashhhhhhhh, thanks for this pull request. It currently conflicts with AI-assisted (Claude Code, Claude Opus 5.5). |
|
@Dashhhhhhhh @mrgenty — I tested a fix for the sparse varying-location report. Commit With scalar inputs at 0, 1, 2, 4, 6 and 8, the old allocator raises
AI-assisted fix and synthetic hardware verification using OpenAI Codex (GPT-6). |
|
@ecox982745 thanks, I took |
|
Run on RTX 3090 (PR head only, because it conflicts with main)
The branch is 4161 commits behind main; could you merge main into it when you have a moment? Thanks. |
Claimed in the coordination issue as: SHADER-COMPUTED-IJ-NO-PERVERTEX
Fixes: #1285
What and why
A GPU without
PerVertexKHRinputs was translated with only--f16-interp-fallback. Every computed I/J pixel shader was then refused (computed I/J pair under --f16-interp-fallback/--bary-fallback), and the shaders stage stopped at 26,296 of 26,503. That is the RX 5700 XT report in #1285: geometry shaders are present,VK_KHR_fragment_shader_barycentricis not.--bary-fallbacknow keeps those attributes. Each one is aFlat vec4[3]at three free locations, recorded asbary_fallback_input.per_vertex. The pass-through geometry shader writes vertex k's value into element k, and the pixel shader weights them the same way as thePerVertexKHRpath: P0 + I·(P1 − P0) + J·(P2 − P0).--f16-interp-fallbackalone still refuses them. That is the MoltenVK case, which has no geometry stage.make_game.pyturns--bary-fallbackon together with--f16-interp-fallbackwhenper_vertex_inputsis false andgeometry_shaderis true.LEONIDA_BARY_FALLBACK=0still forces the native path. A GPU with no geometry stage stays on the f16 fallback alone.This is the translator half of draft #120 (old PR 9855), rebased onto current
mainbecause that draft no longer merges, plus themake_gameselection #1285 needs. #120 by itself left the automatic f16-only path refusing the same 207 shaders.Tested
python -I scripts/run_semantic_tests.py tests/semantic -p test_interp_computed_ij.py— 28 tests, 0 failedpython -I scripts/run_semantic_tests.py tests/semantic -p 'test_interp*.py'— 14 files, 211 tests, 0 failedpython -I scripts/run_semantic_tests.py tests/semantic -p 'test_bary*.py'and-p 'test_f16_interp*.py'— 0 failedpython -I tests/test_shader_build_fallbacks.py,tests/test_run_gpu_tests.py,tests/test_vk_subgroup_info.py,tests/test_make_game_translator_flags.py,tests/test_make_game_argparse.py,tests/test_make_game_wave64.pyspirv-valis not installed here, sotest_geometry_shader_validateswas skipped.GPUs tested: n/a (Apple M4, MoltenVK not installed; the geometry-shader path needs a device with geometry shaders)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.Made with Cursor