r/programming • u/mariuz • Oct 30 '26
Experimenting with Bindless Textures in WebGPU
https://toji.dev/2026/10/06/webgpu-bindless.html
31
Upvotes
r/programming • u/mariuz • Oct 30 '26
View all comments
Show parent comment
9
u/Rhed0x 29d ago
Well yeah, the desktop version of my renderer does that but Vulkan unfortunately doesn't run in the browser.
This doesn't have anything to do with what I wrote.
Which isn't exposed in the browser API then.
It basically only works for one specific use case: staging buffers. If you have a uniform buffer, you cannot use buffer mapping like you would on the other graphics APIs. You need to use Queue::writeBuffer or copy from a staging buffer to the uniform buffer. And that brings us back to the other complaint about ignoring ReBar, host memory and UMA.
Nobody outside of demo applications does that. Aside from some caching which is used at draw time.
Well yeah but typically you just block the thread while waiting for a fence. (Or rather, the wait finishes instantly because the buffer is only reused a couple of frames later.)
It being an async API makes it a nightmare to use with WASM.