-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Handling of empty layouts #14
Comments
Descriptor set layouts with zero bindings are valid. |
So this is a bug in gpu-descriptor then? |
To be precise, not sure if it matters, but the observed crash happens when a bind group with zero entries is created (in |
I see where problem comes from. While it is valid to create descriptor set layout with no descriptors, it is invalid to create descriptor pool with no descriptors. Which is weird. Why not allow or forbid both. |
Probably |
Conceptually |
Well that was quick. Thank you! |
IIRC wgpu rolls its own |
It's supposed to be just a glue between gpu-descriptor and gfx-hal. If gpu-descriptor doesn't consider this in scope, then we'd move it into the glue. But I think it's better to have gpu-descriptor handling this. |
I think it's better to have Vulkan specific problem be handled in Vulkan API glue. gpu-descriptor will treat allocated pool as empty after all. |
This crate - gpu-descriptor - is supposed to be compatible with all the Vulkan users, right? So Ash, Erupt, gfx, and others potentially. So the problem affects everybody. If we put a fix in the glue, or into gfx-backend-vulkan, it's going to be fine for us. But it means that all the other clients will have to put in similar fixes. That doesn't sound good, comparing to a single place that address everything - right here. |
You are correct. But how about other APIs? I suppose there's no such problem in gfx-backend-dx12 and metal. |
I guess it is not big deal, giving that empty layout is degenerate case anyway. |
On gfx-rs side, other APIs don't care about this. So we could indeed put it into gfx-backend-vulkan, but then all the other users of gpu-descriptor would have to do the same. |
Ok. This sounds convincing enough. I'll put workaround into gpu-descriptor. |
See gfx-rs/wgpu#1390 (comment)
Is this supposed to be handled by this library?
The text was updated successfully, but these errors were encountered: