mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-26 08:44:08 +00:00
Only request features that are needed
This commit is contained in:
parent
1bac63c654
commit
45ade807cc
@ -659,7 +659,7 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
let mut enabled_features = available_features & wishful_features;
|
||||
if enabled_features != wishful_features {
|
||||
tracing::warn!(
|
||||
"Missing features: {:?}",
|
||||
"Missing internal features: {:?}",
|
||||
wishful_features - enabled_features
|
||||
);
|
||||
}
|
||||
@ -667,38 +667,30 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
|
||||
// Features
|
||||
enabled_features.set(
|
||||
hal::Features::TEXTURE_DESCRIPTOR_ARRAY,
|
||||
adapter
|
||||
.features
|
||||
desc.features
|
||||
.contains(wgt::Features::SAMPLED_TEXTURE_BINDING_ARRAY),
|
||||
);
|
||||
enabled_features.set(
|
||||
hal::Features::SHADER_SAMPLED_IMAGE_ARRAY_DYNAMIC_INDEXING,
|
||||
adapter
|
||||
.features
|
||||
desc.features
|
||||
.contains(wgt::Features::SAMPLED_TEXTURE_ARRAY_DYNAMIC_INDEXING),
|
||||
);
|
||||
enabled_features.set(
|
||||
hal::Features::SAMPLED_TEXTURE_DESCRIPTOR_INDEXING,
|
||||
adapter
|
||||
.features
|
||||
desc.features
|
||||
.contains(wgt::Features::SAMPLED_TEXTURE_ARRAY_NON_UNIFORM_INDEXING),
|
||||
);
|
||||
enabled_features.set(
|
||||
hal::Features::UNSIZED_DESCRIPTOR_ARRAY,
|
||||
adapter
|
||||
.features
|
||||
.contains(wgt::Features::UNSIZED_BINDING_ARRAY),
|
||||
desc.features.contains(wgt::Features::UNSIZED_BINDING_ARRAY),
|
||||
);
|
||||
enabled_features.set(
|
||||
hal::Features::MULTI_DRAW_INDIRECT,
|
||||
adapter
|
||||
.features
|
||||
.contains(wgt::Features::MULTI_DRAW_INDIRECT),
|
||||
desc.features.contains(wgt::Features::MULTI_DRAW_INDIRECT),
|
||||
);
|
||||
enabled_features.set(
|
||||
hal::Features::DRAW_INDIRECT_COUNT,
|
||||
adapter
|
||||
.features
|
||||
desc.features
|
||||
.contains(wgt::Features::MULTI_DRAW_INDIRECT_COUNT),
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user