mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Fix AsBindGroup
sampler validation. (#15071)
Kind of confused why this wasn't breaking for me pre-`0.15-dev` since nothing obvious seems to have changed in `wgpu` upstream, but this fixes it and ensures that we return the correct sample type re: the actual device.
This commit is contained in:
parent
bca228fdaa
commit
8460cfa6ab
1 changed files with 1 additions and 1 deletions
|
@ -366,7 +366,7 @@ pub fn derive_as_bind_group(ast: syn::DeriveInput) -> Result<TokenStream> {
|
|||
if let Some(handle) = handle {
|
||||
let image = images.get(handle).ok_or_else(|| #render_path::render_resource::AsBindGroupError::RetryNextUpdate)?;
|
||||
|
||||
let Some(sample_type) = image.texture_format.sample_type(None, None) else {
|
||||
let Some(sample_type) = image.texture_format.sample_type(None, Some(render_device.features())) else {
|
||||
return Err(#render_path::render_resource::AsBindGroupError::InvalidSamplerType(
|
||||
#binding_index,
|
||||
"None".to_string(),
|
||||
|
|
Loading…
Reference in a new issue