Repository navigation
Translate shader bundles to WGSL at build time, behind an opt-in - #472
Merged
Merged
Conversation
bdero
commented
Oct 6, 2026
bdero
left a comment
Owner
Author
There was a problem hiding this comment.
Two actionable findings in the WGSL build path, covering named shader entry points and native build caching.
bdero
force-pushed
the
bdero/build-time-wgsl
branch
from
October 6, 2026 07:56
a5e0372 to
74b64f9
Compare
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
isnan and isinf have no WGSL equivalent, so Tint rejects every shader that uses them. IEEE bit tests through floatBitsToUint work in every shading language, and fast math cannot fold them away.
Built from a pinned Dawn revision with the SPIR-V reader on, which Dawn's own prebuilt tint leaves off. A flutter_scene_tint-* tag builds it for macOS, Linux, and Windows and publishes the binaries with a sha256 manifest.
With flutter_scene_webgpu: true under hooks: user_defines:, shader bundles get a .wgsl.json sidecar beside them: each shader's Vulkan SPIR-V translated by the released flutter_scene_tint (downloaded and sha256-checked), its bindings verified, and the reflection it binds by. Constant arrays are hoisted before translation so Tint does not copy them per use. Off by default, and nothing reads the sidecars yet.
bdero
force-pushed
the
bdero/build-time-wgsl
branch
from
October 11, 2026 04:03
74b64f9 to
122aad1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #471.
Adds
flutter_scene_tint, a native SPIR-V to WGSL tool released from this repo (flutter_scene_tint-0.1.0), and a build-hook step that writes a.wgsl.jsonsidecar beside each shader bundle whenflutter_scene_webgpu: trueis set underhooks: user_defines:. Off by default and not read by anything yet; it is the input the WebGPU backend in the next PR loads. Also replaces the debug shader'sisnan/isinf, which WGSL cannot express, with bit tests.