Skip to content

Commit

Permalink
Add missing webgpu features (#322)
Browse files Browse the repository at this point in the history
  • Loading branch information
almarklein authored Nov 23, 2023
1 parent 34fd2da commit afc44ae
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/conv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,9 +1059,6 @@ pub fn features_to_native(features: wgt::Features) -> Vec<native::WGPUFeatureNam
if features.contains(wgt::Features::DEPTH32FLOAT_STENCIL8) {
temp.push(native::WGPUFeatureName_Depth32FloatStencil8);
}
if features.contains(wgt::Features::TIMESTAMP_QUERY) {
temp.push(native::WGPUFeatureName_TimestampQuery);
}
if features.contains(wgt::Features::TEXTURE_COMPRESSION_BC) {
temp.push(native::WGPUFeatureName_TextureCompressionBC);
}
Expand All @@ -1071,6 +1068,9 @@ pub fn features_to_native(features: wgt::Features) -> Vec<native::WGPUFeatureNam
if features.contains(wgt::Features::TEXTURE_COMPRESSION_ASTC) {
temp.push(native::WGPUFeatureName_TextureCompressionASTC);
}
if features.contains(wgt::Features::TIMESTAMP_QUERY) {
temp.push(native::WGPUFeatureName_TimestampQuery);
}
if features.contains(wgt::Features::INDIRECT_FIRST_INSTANCE) {
temp.push(native::WGPUFeatureName_IndirectFirstInstance);
}
Expand All @@ -1080,6 +1080,12 @@ pub fn features_to_native(features: wgt::Features) -> Vec<native::WGPUFeatureNam
if features.contains(wgt::Features::RG11B10UFLOAT_RENDERABLE) {
temp.push(native::WGPUFeatureName_RG11B10UfloatRenderable);
}
if features.contains(wgt::Features::BGRA8UNORM_STORAGE) {
temp.push(native::WGPUFeatureName_BGRA8UnormStorage);
}
//if features.contains(wgt::Features::FLOAT32_FILTERABLE) {
// temp.push(native::WGPUFeatureName_Float32Filterable);
//} -> not yet available in wgpu-core

// wgpu-rs only features
if features.contains(wgt::Features::PUSH_CONSTANTS) {
Expand Down

0 comments on commit afc44ae

Please sign in to comment.