-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Pad out binding arrays to their full length if partially bound binding arrays aren't supported. #18126
base: main
Are you sure you want to change the base?
Conversation
|
||
if let Some(required_binding_array_size) = required_binding_array_size { | ||
while sampler_bindings.len() < required_binding_array_size as usize { | ||
sampler_bindings.push(&**fallback_sampler); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using vec.extend(iter::repeat(fallback).take(n))
will be a little bit clearer here imo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the PR work for you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, see below comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW your suggestion isn't quite correct, but I can do what I think you meant.
Didn't work :(
I would also be totally fine with a patch to just disable bindless on systems without PARTIALLY_BOUND_BINDING_ARRAY support. |
Someone who can repro will have to fix it then. Doesn't make sense for me to back and forth. |
If you want to reproduce on your machine, you can remove PARTIALLY_BOUND_BINDING_ARRAY from the requested device features. Bevy enables everything supported (minus RT and primary mappable buffers) by default, but you can modify that. |
Ok, it should work now. |
@pcwalton it works now. But actually, I think we should consider disabling bindless support if PARTIALLY_BOUND_BINDING_ARRAY is not supported. It should be supported basically everywhere afaik. I didn't remember until today, but the only reason it's not working on Arc is due to a wgpu bug that was fixed, and will be in wgpu v25. Up to you, since you've already done all the work, but I'd personally be happy to drop the extra code to support this. |
I mistakenly thought that with the wgpu upgrade we'd have
PARTIALLY_BOUND_BINDING_ARRAY
everywhere. Unfortunately this is not the case. This PR adds a workaround back in.Closes #18098.