engawa-wgpu
wgpu-backed Dispatcher impl for engawa
render graphs. Compiles Material → wgpu::RenderPipeline;
walks the compiled graph; dispatches fullscreen-effect passes
against any wgpu::TextureView (most commonly a
garasu::HeadlessTarget for tests + a winit surface for live).
What it does
WgpuDispatcher::new(device, queue, target_format)— construct once per consumer.dispatcher.dispatch_with(graph, engawa_bindings, bound_resources)— pre-compiles every Material referenced in the graph into a cachedwgpu::RenderPipeline, walks the execution order, builds per-node bind groups, returns awgpu::CommandBufferready to submit.- Built-in fullscreen vertex shader (
FULLSCREEN_VERTEX_WGSL) — operators' WGSL only needsfs_main; the vertex stage is shared across every effect. - Pipeline cache keyed by
Material.name— recompile happens only when a new Material is referenced.
Status (v0.1)
- Render passes (fullscreen effects + clear-only nodes). This release.
- Compute + blit passes: pending.
- Multi-target render attachments (MRT): pending.
What it does NOT do
- Allocate textures / buffers / samplers — the consumer owns
those. Pass live handles via
BoundResources. - Manage the swapchain — the consumer owns winit / surface.
- Hot-reload shaders — that's shikumi + the consumer's notify watcher; this crate just compiles whatever WGSL it's handed.
Example
use ;
use ;
let material = Material ;
let graph = default
.with_resource
.with_resource
.with_output
.with_node
.with_node
.compile?;
let mut dispatcher = new;
let cmd = dispatcher.dispatch_with?;
gpu.queue.submit;
Tests
Layering
| Crate | Concern |
|---|---|
| engawa | Typed render-graph IR (no GPU) |
| engawa-wgpu (this crate) | Dispatcher impl backed by wgpu |
| garasu | GPU context + headless harness |
| madori | winit window + event loop |
License: MIT