Skip to content

test: pin uniform struct-array constant indexing across all 5 shader targets - #227

Merged
Yona-Appletree merged 3 commits into
mainfrom
claude/zen-darwin-4d6328
Aug 1, 2026
Merged

test: pin uniform struct-array constant indexing across all 5 shader targets#227
Yona-Appletree merged 3 commits into
mainfrom
claude/zen-darwin-4d6328

Conversation

@Yona-Appletree

Copy link
Copy Markdown
Member

Plan: lp2025/2026-07-31-1002-modules-buses-panels (Q9, out-of-band harvest)
Path: ~/.photomancer/planning/lp2025/2026-07-31-1002-modules-buses-panels/plan.md

Harvests one standalone piece from the composite-effects spike (#218) onto main, per Q9 of the modules-buses-panels plan:

  • Filetest lp-shader/lps-filetests/filetests/uniform/array-of-struct.glsl — pins the supported uniform-struct-array idiom (constant-index member reads, including through a helper) green on all five targets. The runtime-indexed form compile-fails on 4 of 5 targets (all but rv32lpn.q32), so this is the shape example shaders must follow.
  • Defect entry docs/defects/2026-07-29-uniform-struct-array-runtime-index.md — the meteor spike shader used runtime indexing; the engine render test's host backend accepts it, so every automated gate stayed green while the browser sim broke.
  • Debt entry docs/debt/example-shaders-not-compile-gated.md — the standing condition: nothing compile-gates examples/**/*.glsl on non-host targets. Conformed to the register template (carried/since/logged) that landed after the spike branched; both registry indexes updated.

No meteor/plasma example content or scoped-bus code — those stay on #218.

One deviation from the spike version, load-bearing: as harvested, the filetest ran zero cases yet reported green. Its header comment cited the corpus glob array/of-struct/*, and the parser's block-comment stripper (new since the spike branched) treats that /* inside a // line comment as a real block-comment opener, silently stripping every later directive. Reworded the comment to drop the *; the stripper bug + a zero-case guard are chipped for a separate fix. No other corpus file has the poisoning pattern.

Local validation: just check test green; ./scripts/filetests.sh uniform/array-of-struct.glsl runs 2/2 cases on each of rv32n.q32, rv32c.q32, rv32lpn.q32, wasm.q32, interp.f32 (10/10).

🤖 Generated with Claude Code

Yona-Appletree and others added 2 commits July 31, 2026 11:05
…l 5 targets

Harvested from the composite-effects spike (PR #218): a uniform array of
structs has no element address resolvable at lower time, so members must
be read through constant indices and passed to helpers as
scalars/vectors. This file pins the supported idiom green on rv32n,
rv32c, rv32lpn, wasm, and interp — the runtime-indexed form
compile-fails on 4 of the 5.

One change from the spike version: the header comment cited the corpus
glob `array/of-struct/*`, whose `/*` the harness's block-comment
stripper (new since the spike branched) reads as a real block-comment
opener, silently stripping every subsequent directive — the file passed
with zero cases. Reworded to `array/of-struct/`; the stripper bug is
flagged separately.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Defect entry (2026-07-29, fixed): meteor's render shader indexed a
uniform struct array with a runtime value; it compiled on the host
backend and failed on 4 of 5 targets, so the engine render test and CI
stayed green while the browser sim broke. Debt entry (carried): the
condition behind it — nothing compile-gates examples/**/*.glsl on the
non-host targets, and an engine-level render test structurally cannot.
Both indexed; the debt entry is conformed to the register template
(carried/since/logged) that landed after the spike branched.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Yona-Appletree
Yona-Appletree marked this pull request as ready for review July 31, 2026 18:46
@Yona-Appletree
Yona-Appletree merged commit c2e4f45 into main Aug 1, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant