Skip to content

Commit

Permalink
Don't compare booleans
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed Apr 18, 2021
1 parent 92886b4 commit 280ba30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion wgpu-core/src/device/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1433,7 +1433,7 @@ impl<B: GfxBackend> Device<B> {
});
}
// Check the actual sampler to be non-filtering, if required
if filtering < sampler.filtering {
if sampler.filtering && !filtering {
return Err(Error::WrongSamplerFiltering {
binding,
layout_flt: filtering,
Expand Down
6 changes: 3 additions & 3 deletions wgpu-core/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,9 @@ impl Interface {
sample_type: wgt::TextureSampleType::Float { filterable },
..
} => match sampler_layout.ty {
wgt::BindingType::Sampler { filtering, .. } if filtering > filterable => {
Some(FilteringError::NonFilterable)
}
wgt::BindingType::Sampler {
filtering: true, ..
} if !filterable => Some(FilteringError::NonFilterable),
_ => None,
},
wgt::BindingType::Texture {
Expand Down

0 comments on commit 280ba30

Please sign in to comment.