test: structural checks for the WebGPU compositor WGSL, close out the README GIF - #137
Merged
Merged
Conversation
…placeholder #62: the compositor still cannot be executed here. Re-checked rather than assumed -- navigator.gpu exists but requestAdapter() returns null by every route, including forceFallbackAdapter and SwiftShader forced on the command line. So the shader that shipped dormant in #129 has still never run a frame. Rather than leave it entirely unverified, the WGSL is now exported as COMPOSITOR_WGSL and checked structurally: that the entry points the pipeline names exist, that all three bindings the JS bind group provides are declared, that the Layout struct fits the 32-byte buffer allocated for it, that the quad array holds the six vertices pass.draw(6) requests, and that the Y flip is present. Those are the failure modes most likely to be sitting in code nobody has run. Each would surface as a pipeline or link error on the first machine with a GPU, and the Y flip in particular compiles perfectly while rendering the video upside down. Confirmed the tests bite, by mutation: renaming the vertex entry point and removing the Y flip each fail exactly one test. This is explicitly not a substitute for running it -- the test file says so. #62 stays open until it can be benchmarked on real hardware. #49: removes the commented-out GIF placeholder. The issue asked for a screenshot or a GIF, and the dual-view screenshot added in #131 meets its stated intent ("a single image will communicate the product better than the feature list"). A GIF of D/S switching needs the app running against real capture hardware, which cannot be produced here, and a fabricated one would misrepresent the product. Adding a real clip later is a two-line change and does not need an open issue to track it. 150 tests (was 142), lint clean, build clean, shadercheck 60/0. Closes #49 Refs #62 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Covers #62 (as far as is possible without hardware) and closes #49.
#62 — the shader still cannot be executed here
Re-checked rather than assumed.
navigator.gpuexists, butrequestAdapter()returns null by every route — default,low-power,forceFallbackAdapter: true, and SwiftShader forced on the command line. So the compositor that shipped dormant has still never rendered a frame.Leaving it wholly unverified isn't great, so the WGSL is now exported as
COMPOSITOR_WGSLand checked structurally:vs/fsentry points exist@bindings declaredtexture_external+textureSampleBaseClampToEdgeLayoutstruct fits 32 bytespass.draw(6)would index out of bounds otherwiseThese are the failure modes most likely to be sitting in code nobody has run — each would surface as a pipeline or link error on the first machine that has a GPU.
Confirmed the tests actually bite, by mutation: renaming the vertex entry point and removing the Y flip each fail exactly one test.
This is explicitly not a substitute for running it, and the test file says so in its header. #62 stays open until it can be benchmarked on real hardware — enable
gpuCompositing: truein settings.json at the wall.#49 — closing
The issue asked for "a screenshot/GIF", and its stated rationale was "a single image will communicate the product better than the feature list". The dual-view screenshot added in #131 does that and is live on the README.
The GIF half needs the app running against real capture hardware. I can't produce that, and a fabricated one would misrepresent the product. This removes the commented-out placeholder rather than leaving dead markup in the README — adding a real clip later is a two-line change and doesn't need an open issue to track it.
Verification
150 tests (was 142), lint clean, build clean,
npm run shadercheck60 runs / 0 failures.🤖 Generated with Claude Code