Files
Ming a5090e5ae4 add compute shader on webgpu (#323)
* feat(webgpu): support compute shader on webgpu

* fix(webgpu): fix webComputePassBuilder addTexture and descriptor set bind

* fix(webgpu): mark compute producer passes valid and force-prepare bound descriptor sets

* feat(profiler): add compute dispatch counter

* perf(webgpu): cache compute pipeline states

* refactor(webgpu): simplify descriptor set prepare and dedupe bind group collection

- WebGPUDescriptorSet.prepare(): build the bind group when it was never created,
  so command buffers no longer need a force-prepare branch.
- WebGPUCommandBuffer: extract _collectBindGroups() shared by the draw and
  compute paths; drop the defaultResource bind group fallback since prepare()
  now guarantees a valid bind group.
- executor: guard PreRenderVisitor.dispatch with the COMPUTE_SHADER feature
  (symmetric with PostRenderVisitor.compute) and drop the redundant pass check.

* fix(webgpu): respect storage buffer access type in bind group layout

* fix(types): narrow types to pass tsc  check

* chore(webgpu): clean up redundant assertions and long line in pipeline state

---------

Co-authored-by: VanityNie <vanitynie@qq.com>
2026-09-07 14:36:06 +08:00
..
2022-04-20 18:47:53 +08:00