From 4d55c6917e43dc8f8fca4e68b56debcdd4656bc0 Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Thu, 12 Sep 2024 11:33:04 +0200 Subject: [PATCH] make remaining `Adapter` methods public --- wgpu-core/src/instance.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/wgpu-core/src/instance.rs b/wgpu-core/src/instance.rs index 2df804d06..bd8e2dc7e 100644 --- a/wgpu-core/src/instance.rs +++ b/wgpu-core/src/instance.rs @@ -257,7 +257,7 @@ pub struct Adapter { } impl Adapter { - fn new(mut raw: hal::DynExposedAdapter) -> Self { + pub fn new(mut raw: hal::DynExposedAdapter) -> Self { // WebGPU requires this offset alignment as lower bound on all adapters. const MIN_BUFFER_OFFSET_ALIGNMENT_LOWER_BOUND: u32 = 32; @@ -306,7 +306,7 @@ impl Adapter { unsafe { self.raw.adapter.get_presentation_timestamp() } } - pub(crate) fn get_texture_format_features( + pub fn get_texture_format_features( &self, format: wgt::TextureFormat, ) -> wgt::TextureFormatFeatures { @@ -399,8 +399,7 @@ impl Adapter { Ok((device, queue)) } - #[allow(clippy::type_complexity)] - fn create_device_and_queue( + pub fn create_device_and_queue( self: &Arc, desc: &DeviceDescriptor, instance_flags: wgt::InstanceFlags,