mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #1426] rdna2spirv: computed I/J pairs under --bary-fallback (SHADER-COMPUTED-IJ-NO-PERVERTEX) #1457
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1457
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1426
Author: @Dashhhhhhhh
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:fix/computed-ij-no-pervertex📝 Commits (2)
e7987dbTranslate computed I/J pairs when a GPU has no per-vertex inputs.b9191a3Merge remote-tracking branch 'origin/main' into fix/computed-ij-no-pervertex📊 Changes
15 files changed (+370 additions, -95 deletions)
View changed files
📝
docs/design.md(+2 -2)📝
docs/testing.md(+4 -1)📝
make_game.py(+22 -4)📝
runtime/test/shaders/build.py(+9 -7)📝
runtime/test/shaders/check.py(+5 -4)📝
scripts/run_gpu_tests.py(+6 -5)📝
tests/semantic/support.py(+4 -2)📝
tests/semantic/test_interp_computed_ij.py(+153 -14)📝
tests/test_make_game_translator_flags.py(+20 -5)📝
tests/test_run_gpu_tests.py(+21 -18)📝
tests/test_shader_build_fallbacks.py(+22 -14)📝
tests/test_vk_subgroup_info.py(+14 -0)📝
tools/bary_fallback_gs.py(+30 -5)📝
tools/rdna2spirv.py(+48 -12)📝
tools/vk_subgroup_info.py(+10 -2)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.