From 0e726fd38de0dadea3ba82259077e54c93de102c Mon Sep 17 00:00:00 2001 From: Rajesh Malviya Date: Thu, 7 Mar 2024 16:18:08 +0530 Subject: [PATCH] Expose PARTIALLY_BOUND_BINDING_ARRAY & STORAGE_RESOURCE_BINDING_ARRAY (#374) --- ffi/wgpu.h | 2 ++ src/conv.rs | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/ffi/wgpu.h b/ffi/wgpu.h index d397fa68..ce9c7589 100644 --- a/ffi/wgpu.h +++ b/ffi/wgpu.h @@ -27,6 +27,8 @@ typedef enum WGPUNativeFeature { WGPUNativeFeature_TextureBindingArray = 0x00030006, WGPUNativeFeature_SampledTextureAndStorageBufferArrayNonUniformIndexing = 0x00030007, WGPUNativeFeature_PipelineStatisticsQuery = 0x00030008, + WGPUNativeFeature_StorageResourceBindingArray = 0x00030009, + WGPUNativeFeature_PartiallyBoundBindingArray = 0x0003000A, WGPUNativeFeature_Force32 = 0x7FFFFFFF } WGPUNativeFeature; diff --git a/src/conv.rs b/src/conv.rs index dce131ee..d1915e28 100644 --- a/src/conv.rs +++ b/src/conv.rs @@ -1109,6 +1109,12 @@ pub fn features_to_native(features: wgt::Features) -> Vec Option { native::WGPUNativeFeature_TextureBindingArray => Some(Features::TEXTURE_BINDING_ARRAY), native::WGPUNativeFeature_SampledTextureAndStorageBufferArrayNonUniformIndexing => Some(Features::SAMPLED_TEXTURE_AND_STORAGE_BUFFER_ARRAY_NON_UNIFORM_INDEXING), native::WGPUNativeFeature_PipelineStatisticsQuery => Some(Features::PIPELINE_STATISTICS_QUERY), + native::WGPUNativeFeature_StorageResourceBindingArray => Some(Features::STORAGE_RESOURCE_BINDING_ARRAY), + native::WGPUNativeFeature_PartiallyBoundBindingArray => Some(Features::PARTIALLY_BOUND_BINDING_ARRAY), // fallback, probably not available in wgpu-core _ => None, }