mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:35:52 +01:00
[PR #120] Translator: computed I/J pairs under --bary-fallback (per-vertex values from the geometry shader) #172
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#172
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/120
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open
Base:
main← Head:old-pr/9855📝 Commits (2)
c99ad01Translator: computed I/J pairs under --bary-fallback (per-vertex values from the geometry shader)6cfe5efdocs/testing.md: ps_ij_computed is skipped on a Mac (no geometry stage) under either fallback📊 Changes
11 files changed (+304 additions, -84 deletions)
View changed files
📝
docs/design.md(+2 -2)📝
docs/testing.md(+4 -1)📝
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_run_gpu_tests.py(+21 -18)📝
tests/test_shader_build_fallbacks.py(+22 -14)📝
tools/bary_fallback_gs.py(+30 -5)📝
tools/rdna2spirv.py(+48 -12)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):Resubmission of
#3898, which was closed in the move to ProjectLeonida with no change requested. Same branch, same change, now onmain867d922f; it merges onto currentmainwith no conflicts. The test reports and discussion are on#3898.Item: SHADER-415 (claim). Overlaps
#3332(SHADER-574, also closed in the move); see the comparison on#3898. AI-assisted (Claude Code).What changed
Under
--bary-fallback, the translator refused every PS with a computed I/J pair (SHADER-177): "computed I/J pair under --bary-fallback: no PerVertexKHR inputs".Flat vec4[3]at the lowest three consecutive free locations, recorded in the index asbary_fallback_input.per_vertex(attribute → first location).inputskeeps the attribute's own number, which is the producer's location.tools/bary_fallback_gs.pywrites vertex k's value into element k at each of the three vertices it emits. The PS weights the three values exactly as on thePerVertexKHRpath: P0 + I·(P1 − P0) + J·(P2 − P0).--f16-interp-fallbackas well (NVIDIA Pascal gets both by default), a computed attribute's 16-bit reads decode the array's raw words and leavef16_halves. The f16 fallback alone still refuses; that's the Mac/MoltenVK case, with no geometry stage, noted indocs/testing.md's Known problems.v_interp_mov_f32:p0reads element 0 of the array.p10/p20(vertex_delta) read the array's deltas. A mixed flat/smooth attribute that isn't a computed pair is still refused.build.py,check.pyandrun_gpu_tests.pyskipps_ij_computedonly under the f16 fallback without the barycentric fallback, usingbarycentric_fallback()/BARY_FALLBACK, Mesa ANV probe included.docs/design.mdanddocs/testing.mdare updated.ComputedIJBaryFallbackintests/semantic/test_interp_computed_ij.pychecks:Why it matters on old GPUs: on a GPU without
VK_KHR_fragment_shader_barycentric,make_game.pypicks--bary-fallback.mainthen refuses these 207 shaders, and the shaders stage stops on its count check ("the translation index holds 26296 of the 26503 carved shaders"). So the build can't finish on such a GPU without this fix. I reproduced that today on my GTX 1060, and@Davidutz19hit the same on theirs (#3898).Tested
b52b7296:v_interpPS,mainvs this change:#3898, about 17:No game data.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.