Skip to content

Commit fc6bd3f

Browse files
fixup! feat: support blendable f32 textures on vulkan
1 parent a1ad8bc commit fc6bd3f

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

wgpu-types/src/texture/format.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -920,11 +920,9 @@ impl TextureFormat {
920920

921921
// Features that enable filtering don't affect blendability
922922
let sample_type2 = self.sample_type(None, None);
923-
let is_blendable = matches!(
924-
sample_type2,
925-
Some(TextureSampleType::Float { filterable: true })
926-
) || device_features.contains(Features::FLOAT32_BLENDABLE)
927-
&& matches!(self, Self::R32Float | Self::Rg32Float | Self::Rgba32Float);
923+
let is_blendable = sample_type2 == Some(TextureSampleType::Float { filterable: true })
924+
|| device_features.contains(Features::FLOAT32_BLENDABLE)
925+
&& matches!(self, Self::R32Float | Self::Rg32Float | Self::Rgba32Float);
928926

929927
flags.set(TextureFormatFeatureFlags::FILTERABLE, is_filterable);
930928
flags.set(TextureFormatFeatureFlags::BLENDABLE, is_blendable);

0 commit comments

Comments
 (0)