-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Array binding provided zero elements validation error when using PARTIALLY_BOUND_BINDING_ARRAY #3692
Comments
@JMS55 Sorry to hear you're having issues here! Can I ask what backend you're using and which adapter features you've enabled? |
RTX 3080, Vulkan, all of them. Bevy enables all features by default. Let me know if there's more info you need. |
Thanks so much for the prompt response! To be totally upfront I'm absolutely not a wgpu expert; just someone who's contributing some work on bindless. That said, I'm more than happy to take a look for you in the next week. |
Ah, one last question: how are you using the texture array in your shader? At first glance what you've described should be legal, at least from a Vulkan perspective (as per: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkDescriptorBindingFlagBits.html) but there may be something wgpu specific that requires at least one texture view to be present in the array. |
I'm using it as a The issue is in bind group creation, though. It looks like wgpu unconditionally disallows zero-length arrays. wgpu/wgpu-core/src/device/mod.rs Lines 2299 to 2301 in bf8e6fe
I'm wondering if we can relax that, so that I don't have to work around it in user code. |
Hi, @JMS55 👋🏻 Thanks for your patience on this one. I've spoken with some of the wgpu maintainers and it looks like the solution here is something like the following:
I can't give you a timeframe on when this will be done, but I hope this clarification explains this a bit further. If you do have some spare time and are looking to contribute, I would be happy to help you tackle this one yourself; If you have any other questions or if there's anything else I can do to assist, please, just let me know. |
Hi, thank you for the update! Unfortunately I don't have time at the moment to contribute myself. No worries about it though, the work-around is easy enough, it's not a major issue :). |
Using the
PARTIALLY_BOUND_BINDING_ARRAY
feature and usingBindingResource::TextureViewArray(&[])
I get a validation errorArray binding provided zero elements
when creating the bind group. I'm not sure if this is intended.Currently I'm working around this by adding a dummy texture to my array to ensure it has at least one element.
CC @kanerogers
The text was updated successfully, but these errors were encountered: