Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature float32-filterable #4759

Merged
merged 24 commits into from
Dec 4, 2023
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix is_blendable
almarklein committed Nov 25, 2023
commit 3bd6c10a2c132d0c983970539d210f6648d8040d
3 changes: 2 additions & 1 deletion wgpu-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -3186,12 +3186,13 @@ impl TextureFormat {

let sample_type = self.sample_type(None);
let mut is_filterable = sample_type == Some(TextureSampleType::Float { filterable: true });
let is_blendable = is_filterable;
if device_features.contains(Features::FLOAT32_FILTERABLE) {
is_filterable |= sample_type == Some(TextureSampleType::Float { filterable: false });
}

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

TextureFormatFeatures {
allowed_usages,