1

What is the necessary lifetime of a bind group in WebGPU? I have not been able to find clear documentation on this. I'm using the C/C++ bindings for wgpu.

Is it allowed to release a bind group immediately after submitting the command buffer to the queue, or does it have to persist longer?

I am doing some compute shader work and I need to dispatch work onto subranges of buffers. These ranges are generally not known until runtime, so it seems I need to create a one-off bind group selecting the range, after which it is not needed anymore. After submitting, when does it become safe to release them?

As a bonus, is there a better way to select dynamic subranges of buffers?

2
  • Update: I've found how to dispatch dynamic ranges via setBindGroup(), which solves half of my problem. But my question about lifetime still remains! Commented Aug 3, 2024 at 22:46
  • 1
    Following. I'm surprised that the GPU spec says almost nothing about this. Commented Aug 4, 2024 at 16:44

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.