- test_bary_fallback: #3647 (BUILD-1046) made a missing input folder exit 2 with "does not exist"; the test from
#1379 still expected exit 1.
- test_format_decode_branch: the f16 reference uses the interpreter's pinned half_to_float (a NaN half widens to
the canonical quiet NaN) instead of struct's '<e', whose NaN payload changed in Python 3.14 (CPython gh-130317).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`bary_fallback_gs.py <dir>` with a path that does not exist (a typo, the wrong work folder) found no
index.json, built nothing and exited 0 with no output, so it looked like a successful run. It now exits 1
with `<dir>: not a directory`. build_for_index / write_for_index are unchanged: an existing directory
without index.json still means nothing to do.
A PS-only geometry helper cannot recover primitive culling from the fragment interface. Use the declared VS array for an explicit pair so fully negative primitives are discarded on the fallback path.
A geometry shader becomes the last stage before clipping and must forward the producing vertex shader's clip array. Key an explicitly paired helper by the array length so distinct pipelines retain independent clip layouts.
A PS whose only attribute is attr30 put %bary at Location 31, which Khronos
validation rejects on drivers with 128 fragment input components (found by
@Vonsek on #804). The lowest location no attribute uses is always available
and is 0 there. The corpus is unchanged: the 321 fallback shaders keep
locations 1-5, since their attributes are dense. New semantic test for the
sparse case.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSJXX67xeoorUsLJ2f9zms
The 321 pixel shaders that read the raw barycentric pair are translated to
BuiltIn BaryCoordKHR, so they can't run on a device without the extension
(NVIDIA Pascal, for one). With --bary-fallback the pair comes from an
ordinary vec3 input one location past the shader's attributes; the module
needs neither the capability nor the extension, and the index records the
location as bary_fallback_input. tools/bary_fallback_gs.py writes the
pass-through geometry shader that fills it: Position and the PS's inputs
copied unchanged, plus (1,0,0), (0,1,0), (0,0,1) at the three vertices,
whose perspective interpolation is the BaryCoordKHR value.
- LEONIDA_BARY_FALLBACK=1 for build.py, check.py and run_gpu_tests.py
(like LEONIDA_W64_EMULATE): translate with the flag, build
<name>.bary_gs.spv, draw those shaders through it.
- vk_harness: VKH_GS_HELPER=1 keeps VKH_SUBGROUP_SIZE on the fragment
stage when the GS only feeds the pixel shader under test.
- tests/semantic/test_bary_fallback.py and the ps_bary fixture.
- docs/design.md contract row and index key, docs/testing.md section.
GTX 1060 (Pascal): ps_bary 4096/4096 exact, ps_uniform_branch and
ps_scc_mask32 pass with the fallback (SKIP without it). Pixel-shader corpus:
12,101/12,101 translate and pass spirv-val with and without the flag.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SSJXX67xeoorUsLJ2f9zms