Repository navigation
feat(gpu): typed texture, sampler and shader-interface prevalidation (#811) - #1405
Merged
Merged
Conversation
This was referenced Oct 6, 2026
godofecht
force-pushed
the
feat/811-gpu-resource-descriptor-contract
branch
from
October 7, 2026 13:47
9ba6cfd to
c7625a0
Compare
godofecht
marked this pull request as ready for review
October 7, 2026 13:48
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
Oct 7, 2026
…811) Rebuilt on main as one commit. Conflicts resolved per hunk: both webgpu-host.js copies keep the kernel-chain, graph-host and sampled-draw exports; appendix-d's GPU row lists the graph and the #811 modules; string.flow keeps main's comment wording. stdlib-api.md and the LSP completion golden were regenerated. The gpu crossing goldens ship gpu-sampled-draw.mjs, which webgpu-host.js now re-exports. Two doc sentences and the sampled-quad page title were reworded for the prose hook.
godofecht
force-pushed
the
feat/811-gpu-resource-descriptor-contract
branch
from
October 7, 2026 23:14
c7625a0 to
96cf75b
Compare
godofecht
enabled auto-merge
October 7, 2026 23:14
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.
Part of #811. Does not close it.
Change
lib/stdlib/gpu_resource_types.flow: typed texture, sampler, vertex-attribute and varying descriptors with checks for cube, MSAA, depth, format, usage and dimensions.lib/stdlib/gpu_stage_codegen.flow: draw descriptors (indexed and instanced, index-buffer capacity), render targets, and WGSL and Metal emission of a vertex position fetch and fragment texture sample from a validated descriptor.gpu-sampled-draw.mjsandrenderFlowSampledDraw: a WebGPU host that uploads the texture, sampler, vertex and index buffers, submits indexed and instanced draws with 1x or 4x MSAA and optional depth32f, and reads back RGBA8.sampled-quad.htmlis a browser demo;tools/gpu_graph/export_sampled.mjsexports the Flow-emitted shaders for it.tests/lang/test_gpu_resource_types.flow,tests/lang/test_gpu_stage_codegen.flow,tests/webgpu/sampled-draw.test.mjs.Changed in this rebase:
gpu_stage_codegen.flowreassigned immutablelets (components,uv_type,tex_type,uv_expr). The strict check rejected the module without printing why (flowc: duplicate let in one scope fails the strict check with no diagnostic #1434), so./flow test-langhad never runtest_gpu_stage_codegen. They are nowlet mut, and struct fields carry commas like the rest of the stdlib.stdlib-api.mdand the LSP completion golden, and added the matching class totests/tools/lsp/ACCEPTED.md(same text as feat(gpu): real Metal tensor model kernels on current main (#814) #1406 and feat(gpu): typed dependency graph and nonempty fluid/ocean Metal+WGSL kernels (#812) #1407). Two comments reworded for the prose hook.Evidence
Rebased onto main e2205a7.
examples/gpu/vgpu/sampled_quad.flowemits, drawn throughrenderFlowSampledDrawin Deno 2.7 (--unstable-webgpu, Metal backend on Apple silicon), 64x36 target, 2 instances, depth on: center pixel13,113,211,255equals the reference texel at 1x and at 4x MSAA. The script is a one-off and is not committed, since CI has no GPU../flow test-lang276/0, including both new tests.node --test tests/webgpu/sampled-draw.test.mjs: 6/6 (mocked device; feat(webgpu): execute chained Flow kernels over persistent device resources (#814) #1408'swebgpu_hosts.flowruns it once both land).gen_stdlib_docs --check,doc_coverage,wiki_nav,doc_links: clean../flow tool tests/tools/run.flow: all pass, LSP 9/9../flow test-runtime34/0../flow tool tests/cli/run.flow152 passed, 2 failed (jit_hello,test_mlir: golden drift on main).Not covered: compiling the Metal source on a device, importing arbitrary Flow render-stage declarations, and the vgpu instanced, geometry, environment and material scenes.
Merge notes
stdlib-api.md,appendix-d,coverage.json,nav.jsonand the LSP golden also change in feat(gpu): real Metal tensor model kernels on current main (#814) #1406 and feat(gpu): typed dependency graph and nonempty fluid/ocean Metal+WGSL kernels (#812) #1407. Keep every module's entries and regenerate the generated files after each lands.webgpu-host.jsexport line conflicts trivially with feat(gpu): typed dependency graph and nonempty fluid/ocean Metal+WGSL kernels (#812) #1407 and feat(webgpu): execute chained Flow kernels over persistent device resources (#814) #1408: keep all lines.