Skip to content

Commit

Permalink
Fix AsBindGroup sampler validation. (#15071)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tychedelia authored Sep 9, 2024
1 parent bca228f commit 8460cfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/bevy_render/macros/src/as_bind_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 8460cfa

Please sign in to comment.