Vulkan exposes bindless textures through the shaderSampledImageArrayDynamicIndexing extension, and most implementations support it. I saw that gfx_hal lists it as an optional feature. My question is, is there a way to actually use it from wgpu? That extension would improve the performance of 2D games for example.
I think you are looking for https://github.com/gpuweb/gpuweb/issues/380
Note: if the group doesn't end up designing any extension, we can try to figure something out here in wgpu, but that would be available only for native targets, not the web.
Thank you for the pointer, I missed it in my earlier search. In my case, I was thinking about high-performance native 2D engine using Rust, and as mentioned in the webgpu discussion page such an extension would also be very useful for native Rust 3D engines, where security concerns are lower than on Web.
I'm currently working on full blown descriptor indexing an an extention. If you think shaderSampledImageArrayDynamicIndexing without full non uniform indexing is useful to you, I'll add that as a separately checkable extension.
That's great! I would guess (without checking) that there would be more hardware support for shaderSampledImageArrayDynamicIndexing than for full blown description indexing, but I might be wrong.
shaderSampledImageArrayDynamicIndexing iirc is supported by basically 100% of implementations of vulkan on all platforms, or something stupidly close to that. shaderSampledImageArrayNonUniformIndexing is mainly desktop hardware. I'll expose that as a separate extension, so you can use choose which one you want to support. Doesn't take much extra work at all.
Most helpful comment
I'm currently working on full blown descriptor indexing an an extention. If you think
shaderSampledImageArrayDynamicIndexingwithout full non uniform indexing is useful to you, I'll add that as a separately checkable extension.