Commit Graph

9 Commits

Author SHA1 Message Date
912d15cc7a mesh_compute_vs: restore write mode before unlink on replace failure and publish mode (MESH-COMPUTE-VS-STAGE-CLEANUP)
Apply published_mode(spv) to temporary staged SPV before atomic replacement,
and restore write permission (0o600) before directory cleanup in exception block
when replace fails, preventing Windows PermissionError [WinError 5] and
stranded temporary files.

agent: yes
AI-assisted: yes
2026-11-29 18:24:15 +03:00
4bbeddd5ab mesh_compute_vs: reject duplicate or out-of-range pc_tail_address_dwords indices
Co-Authored-By: Gemini 4 Neon <noreply@google.com>
2026-11-25 22:59:07 +02:00
476f014a2e mesh_compute_vs: read output address from %pc_tail when pc_tail_address_dwords is set
When index.json's mesh_compute layout carries pc_tail_address_dwords (as
produced by rdna2spirv.py --mesh-compute --pc-tail-ubo), emit the vertex
shader's output-buffer address loads from the set-1 binding-0 Uniform block
%pc_tail (%PcTail) instead of a 152-byte PushConstant block, omitting
PushConstant completely so the vertex shader fits 128-byte push-constant
devices. Without pc_tail_address_dwords, the emitted SPIR-V assembly is
byte-identical to before.

Co-Authored-By: Gemini 4 Neon <noreply@google.com>
2026-11-25 22:59:07 +02:00
86d24c9452 Validate mesh helper index data before replacing assembly 2026-11-22 23:46:10 +01:00
78688eab40 Merge pull request #2389 from Julio Facal
# Conflicts:
#	docs/design.md
2026-11-22 13:14:35 -05:00
64b24f69fd SHADER-378: dynamic --f16-interp-fallback packing and per-pipeline SPIR-V half linking 2026-11-22 13:57:55 -03:00
26c89d8dad fix(mesh): publish fallback vertex shaders after validation
An assembler success can still produce a module that the validator rejects. Keep that binary private until it passes so the runtime cannot see it at the final shader path.
2026-11-22 17:38:01 +01:00
57e426f487 mesh_compute_vs: -h/--help prints usage, a missing spirv dir is an error
`mesh_compute_vs.py --help` took `--help` as the spirv dir, found no index.json and exited 0 with no output;
a path that does not exist did the same, so a typo looked like a successful run with nothing to do.
-h/--help now print the docstring and exit 0, and a path that is not a directory is one ERROR line and
exit 1, like the tool's other errors. build_for_index / write_for_index are unchanged. Same fix as #1379
for bary_fallback_gs.py.
2026-11-22 17:12:49 +05:30
7489bc8ddc mesh_compute_vs: name the missing SPIR-V tool instead of a FileNotFoundError
build_for_index ran spirv-as/spirv-val straight through subprocess, so a PATH
without them gave "the system cannot find the file specified" with no tool name,
and a shader the assembler rejects raised RuntimeError out of main() as a
traceback. Resolve both tools up front with shutil.which, and have main() report
a build or write failure as one ERROR line, with a wrong argument count a usage
error (exit 2) instead of the whole docstring with exit 1.

Also adds tests/test_mesh_compute_vs.py: the vertex shader assembles and
validates across layouts through build_for_index, the interface follows the
mesh shader's locations, and the three CLI error paths.
2026-11-22 03:56:52 -06:00