Skip to content

WIP: wgsl-rs re-stack - #250

Draft
schell wants to merge 3 commits into
mainfrom
chore-wgsl-rs
Draft

schell wants to merge 3 commits into
mainfrom
chore-wgsl-rs

Conversation

@schell

@schell schell commented Oct 20, 2026

Copy link
Copy Markdown
Owner

Ongoing draft PR to see progress on the refactoring/restacking away from Rust-GPU onto wgsl-rs.

- Bloom shaders as wgsl-rs modules (vertex, sample, mix): a shared
  BloomInterStage with raw u32 ids at stage boundaries, compositional
  glob imports, declaration-order struct literals
- New Bloom runtime on crabslab 0.7 + craballoc 0.5 (renamed deps
  crabslab_wgsl/craballoc_wgsl; crabslab-derive pinned =0.4.6 so the
  legacy 0.6.6 side keeps its macro)
- Pipelines from WgpuLinkage built via assemble_ir; blend state
  carried per pipeline (upsample: ALPHA_BLENDING + LoadOp::Load at
  alpha 0.5, downsample: none, mix: Clear)
- Bloom-only test: procedural f16 HDR textures via write_texture,
  legacy Bloom as oracle, per-stage comparison
- img-diff: pixel_relative_threshold (absolute + relative per-pixel,
  default off, boundary unit test) and float .exr saves
- gltf: actually set the material emissive factor; only the strength
  multiplier was wired, so emissive meshes rendered black and the 5%
  image-diff threshold hid it
- integrate new wgsl-rs based bloom filter
- Cut over to the wgsl-rs bloom; remove the rust-gpu bloom
- bloom shader sources are gone along with the generated .spv/.wgsl
  artifacts, linkage modules, and manifest entries; the wgsl-rs Bloom
  (crabslab 0.7 / craballoc 0.5) is the only bloom now
- gltf: set the material emissive factor (emissive meshes rendered black)
- img-diff: pixel_relative_threshold (absolute + relative per-pixel,
  default off, boundary test) and float .exr saves
- texture: Texture::new_with_wgsl for the wgsl-rs bloom runtime
- bloom-only test: procedural f16 HDR textures, old Bloom oracle,
  per-stage comparison
Replaces the rust-gpu linkages with the ported WGSL module via
analyze_wgsl_module. The public API is unchanged (new(device, format),
composite(device, queue, source, target)), so renderling-ui needs no
changes; its GPU test suite (ui2d goldens) verifies the swap. The
rust-gpu compositor artifacts, linkage modules, and manifest entries
are removed; the legacy cpu.rs slab/bindgroup machinery and its
hand-written bind group layout are gone (the wgsl-rs linkage derives
the layout from the module).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant