r/programming • • 29d ago

Experimenting with Bindless Textures in WebGPU

https://toji.dev/2026/10/06/webgpu-bindless.html
31 Upvotes

10 comments sorted by

View all comments

Show parent comment

6

u/Rhed0x 28d ago

Not really. You don't want to block since it might still be used in in-flight frames. You are whining about the overhead of the staging buffers, but you are fine with actually blocking the thread until the commands are finished? Lol.

That's how pretty much every game engine works. You wait for the fence that was set ~2 frames ago and then reuse the resources like buffers.

1

u/South_Survey_2088 28d ago

So then just do that? WebGPU allows you to wait as well(e.g. wgpuInstanceWaitAny).

The async API just makes this easier. For example, you return your staging buffers to the pool via callback when done so you just wait until the pool is not empty instead of manually juggling fences.

But just because you wait for a fence doesn't mean it's not an async operation anymore. You are just replacing Futures/Promises with fences..