Skip to content

[B4] ci: track and gate SPIR-V size regression per shader #876

Description

@MichaelFisher1997

Part of #834 (Production-Readiness Audit) — Batch B4 (regression prevention, parallel-safe).
Replaces audit item #24 (P3). Parallel with: audit-b4 siblings — this issue owns the SPIR-V size-check step (build/test wiring).

Problem

glslangValidator validates shader correctness in zig build test, but doesn't fail on a 2× SPIR-V size growth or compile-time spike. Shader bloat creeps in unobserved.

Acceptance criteria

  • SPIR-V size per shader logged during zig build test (or a dedicated step).
  • A baseline of SPIR-V sizes committed (e.g. docs/shaders/spirv-sizes.json).
  • Check fails on >N% regression vs baseline (start strict: e.g. 10%).
  • New shaders automatically added to the baseline on first appearance (with a clear "baseline updated" log line).
  • Compile time per shader optionally logged (stretch goal).

Files in scope

  • build.zig (test step wiring) — identify the shader-test invocation
  • docs/shaders/spirv-sizes.json (new baseline)
  • comparison helper script if needed (scripts/compare_spirv.sh)

Dependencies

Out of scope

  • Shader perf (covered by B4-3 ceilings + benchmark harness).
  • Cross-toolchain SPIR-V comparison.

Branch / PR

  • Branch: ci/spirv-size-regression · Targets: dev

Metadata

Metadata

Labels

audit-b4Audit Batch 4: Make bench/visual actually fail (needs B1)cidocumentationImprovements or additions to documentationhotfixproduction-readinessAudit findings: missing CI/lint/benchmark/regression guardrails for production-grade enginequestionFurther information is requestedshaders

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions