Use WebGPU render bundles in WebAssembly builds

Depends on !10090 (merged)

A render bundle is essentially a baked command buffer on the device that has pre-recorded commands like Draw(vertices, count), setBindGroup(i, bindGroup) and setPipeline(pipeline). The renderer keeps one RenderBundle per actor. If it turns out that a mapper didn't upload new polydata to the device, the corresponding actor's render bundle is reused, effectively skipping the entire series of draw calls. This saves a lot of frame time in WebAssembly environment where each webgpu API call has a fixed C++ -> JS cost. This design was inspired from a babylon.js developer post in https://github.com/gpuweb/gpuweb/issues/1596

Edited by Jaswant Panchumarti (Kitware)

Merge request reports

Loading