Skip to content

naga v0.17.11 + tagged union Value + docs#174

Merged
kolkov merged 3 commits intomainfrom
release/naga-0.17.11-tagged-union
May 6, 2026
Merged

naga v0.17.11 + tagged union Value + docs#174
kolkov merged 3 commits intomainfrom
release/naga-0.17.11-tagged-union

Conversation

@kolkov
Copy link
Copy Markdown
Contributor

@kolkov kolkov commented May 6, 2026

Summary

  • naga v0.17.11fix SIGSEGV instead of a syntax error #170 (SIGSEGV → error for dot(v) with wrong arg count) + BUG-DXIL-041 (fine.wgsl 100% valid)
  • Tagged union Value — replace any interface boxing with 48-byte inline struct. Fragment -25% allocs, -11% ns/op.
  • Docs — mark SPIR-V interpreter as debugging/testing tool, not production rendering

Test plan

  • go test ./... — all pass
  • golangci-lint — 0 issues
  • gofmt — clean
  • naga v0.17.11 verified: dot(diff) → error, not SIGSEGV
  • CI

kolkov added 2 commits May 6, 2026 17:41
executeFullscreenBlit (memcpy) must be checked BEFORE executeSPIRVDraw.
The SPIR-V interpreter interprets fragment shader per-pixel which is
100x slower than direct memcpy for textured quad blit.

Before: 0.65 FPS (SPIR-V interpreter per 440K pixels)
After: ~60 FPS (direct memcpy/swizzle)
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Replace Value = any with 48-byte tagged struct: Tag + F[4]float32 + U[4]uint32 + Ref.
Scalars/vectors stored inline, zero heap alloc for arithmetic ops.

Fragment: 4→3 allocs (-25%), 490→438 ns (-11%).
Vertex: stable at 9 allocs, ~1120 ns.

Docs: mark SPIR-V interpreter as debugging/testing tool, not production.
CHANGELOG, README, ARCHITECTURE updated.
@kolkov kolkov force-pushed the release/naga-0.17.11-tagged-union branch from 5c9a2f6 to 6d6a9f4 Compare May 6, 2026 15:53
@kolkov kolkov merged commit 9364a14 into main May 6, 2026
11 checks passed
@kolkov kolkov deleted the release/naga-0.17.11-tagged-union branch May 6, 2026 15:58
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.

SIGSEGV instead of a syntax error

1 participant