Repository navigation
0.5.0: async pipelines, the pipeline cache, read/uniform buffers (from ShadyTracer's copy) - #24
Merged
Merged
Conversation
…ead/uniform buffers (0.5.0) ShadyTracer kept its own copy of tinywebgpu.js in RAYTRACER_WEBGPU/lib and had moved well ahead of the release: async pipelines with a ready promise, a per-device compute pipeline cache keyed by the whole text, moduleOnly, the `read ` and `uniform ` resource prefixes, timePasses, the extra error scopes, and option pass-through in makeCompute/makeCompute2D. ShadyTracer is moving to a repository of its own that consumes this one as a submodule, so the copy has to stop being the newer of the two. The additions are taken whole; upstream had nothing the copy lacked. Two things the move found. The check a dispatch makes before opening its pass asked for a bind group before asking for the pipeline, so an async pipeline still compiling, with its resources already parked, said "No resources bound" to a caller that had bound them; the pipeline is asked first now. And build-min's export splice refused the minified output, because esbuild folds the module-level cache declaration into the factory's statement; it now splits those declarators off. layout.test.mjs takes the copy's own cases (a write merging into the struct, read and uniform buffers) and gains the cache, async and moduleOnly ones nothing exercised here before. What rests on DIAG or on internal names is asked of the source build only. npm run test:all passes; dist rebuilt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EyK5zGwaAPiFoLVs2YbzTo
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.
ShadyTracer kept its own copy of
tinywebgpu.jsin RAYTRACER_WEBGPU and had moved ahead of the release. ShadyTracer now gets its own repository, which pulls this repository in as a git submodule, so its additions have to land here first. The diff of the source adds only: upstream had nothing the copy lacked.Added
async: trueon pipelines:p.pipelineis a getter that stays0untilp.readysettles.p.cachedsays whether a pipeline came from it.cache: falseopts out.G.pipelineCacheMaxandG.pipelineCacheChars.moduleOnly: truereturns{ wgsl, module }without a pipeline, andp.wgslgives the source.readanduniformresource prefixes.G.timePasses(fn)for per-pass descriptors such astimestampWrites.maxStorageBuffersPerShaderStageis now requested.makeComputeandmakeCompute2Dpass every option through.Fixed while moving it
build-minrefused the minified output. esbuild folds the new module-levelWeakMapinto the factory's statement, which broke the export splice. The splice now splits those declarators off.Tests
layout.test.mjstakes the copy's own cases: a write merging into the struct, andread/uniformbuffers.moduleOnlycases.npm run test:allpasses locally, anddist/is rebuilt.Also updated:
d.ts,docs/API.md, the CHANGELOG (0.5.0) andpackage.json.🤖 Generated with Claude Code
https://claude.ai/code/session_01EyK5zGwaAPiFoLVs2YbzTo
Generated by Claude Code