Skip to content

Commit 8460cfa

Browse files
authored
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.
1 parent bca228f commit 8460cfa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_render/macros/src/as_bind_group.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ pub fn derive_as_bind_group(ast: syn::DeriveInput) -> Result<TokenStream> {
366366
if let Some(handle) = handle {
367367
let image = images.get(handle).ok_or_else(|| #render_path::render_resource::AsBindGroupError::RetryNextUpdate)?;
368368

369-
let Some(sample_type) = image.texture_format.sample_type(None, None) else {
369+
let Some(sample_type) = image.texture_format.sample_type(None, Some(render_device.features())) else {
370370
return Err(#render_path::render_resource::AsBindGroupError::InvalidSamplerType(
371371
#binding_index,
372372
"None".to_string(),

0 commit comments

Comments
 (0)