mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
a5090e5ae4
* 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>