From 191fa9d9f211ec121beaf1fa4d188fef4ba061df Mon Sep 17 00:00:00 2001 From: Alphyr <47725341+a1phyr@users.noreply.github.com> Date: Thu, 23 Dec 2021 17:23:13 +0100 Subject: [PATCH] Update ash to 0.34 (#2313) --- Cargo.lock | 4 ++-- wgpu-hal/Cargo.toml | 2 +- wgpu-hal/src/vulkan/adapter.rs | 2 +- wgpu-hal/src/vulkan/command.rs | 8 +++++--- wgpu-hal/src/vulkan/device.rs | 2 +- wgpu-hal/src/vulkan/instance.rs | 2 +- wgpu-hal/src/vulkan/mod.rs | 4 +--- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e02857f70..84b7910d7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,9 +43,9 @@ dependencies = [ [[package]] name = "ash" -version = "0.33.3+1.2.191" +version = "0.34.0+1.2.203" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc4f1d82f164f838ae413296d1131aa6fa79b917d25bebaa7033d25620c09219" +checksum = "b0f780da53d0063880d45554306489f09dd8d1bda47688b4a57bc579119356df" dependencies = [ "libloading", ] diff --git a/wgpu-hal/Cargo.toml b/wgpu-hal/Cargo.toml index 43e850ba6..e0f922d53 100644 --- a/wgpu-hal/Cargo.toml +++ b/wgpu-hal/Cargo.toml @@ -37,7 +37,7 @@ block = { version = "0.1", optional = true } foreign-types = { version = "0.3", optional = true } # backend: Vulkan -ash = { version = "0.33", optional = true } +ash = { version = "0.34", optional = true, default-features = false, features = ["debug", "loaded"] } gpu-alloc = { version = "0.5", optional = true } gpu-descriptor = { version = "0.2", optional = true } inplace_it = { version ="0.3.3", optional = true } diff --git a/wgpu-hal/src/vulkan/adapter.rs b/wgpu-hal/src/vulkan/adapter.rs index be4e94046..8c98f62df 100644 --- a/wgpu-hal/src/vulkan/adapter.rs +++ b/wgpu-hal/src/vulkan/adapter.rs @@ -1116,8 +1116,8 @@ impl super::Adapter { let timeline_semaphore_fn = if enabled_extensions.contains(&khr::TimelineSemaphore::name()) { Some(super::ExtensionFn::Extension(khr::TimelineSemaphore::new( - &self.instance.entry, &self.instance.raw, + &raw_device, ))) } else if self.phd_capabilities.properties.api_version >= vk::API_VERSION_1_2 { Some(super::ExtensionFn::Promoted) diff --git a/wgpu-hal/src/vulkan/command.rs b/wgpu-hal/src/vulkan/command.rs index deca4839d..dbcb1123e 100644 --- a/wgpu-hal/src/vulkan/command.rs +++ b/wgpu-hal/src/vulkan/command.rs @@ -594,9 +594,11 @@ impl crate::CommandEncoder for super::CommandEncoder { .cmd_set_scissor(self.active, 0, &vk_scissors); } unsafe fn set_stencil_reference(&mut self, value: u32) { - self.device - .raw - .cmd_set_stencil_reference(self.active, vk::StencilFaceFlags::all(), value); + self.device.raw.cmd_set_stencil_reference( + self.active, + vk::StencilFaceFlags::FRONT_AND_BACK, + value, + ); } unsafe fn set_blend_constants(&mut self, color: &[f32; 4]) { self.device.raw.cmd_set_blend_constants(self.active, color); diff --git a/wgpu-hal/src/vulkan/device.rs b/wgpu-hal/src/vulkan/device.rs index 1b21385c7..fd1b49853 100644 --- a/wgpu-hal/src/vulkan/device.rs +++ b/wgpu-hal/src/vulkan/device.rs @@ -1716,7 +1716,7 @@ impl crate::Device for super::Device { .values(&values); let result = match self.shared.extension_fns.timeline_semaphore { Some(super::ExtensionFn::Extension(ref ext)) => { - ext.wait_semaphores(self.shared.raw.handle(), &vk_info, timeout_us) + ext.wait_semaphores(&vk_info, timeout_us) } Some(super::ExtensionFn::Promoted) => { self.shared.raw.wait_semaphores(&vk_info, timeout_us) diff --git a/wgpu-hal/src/vulkan/instance.rs b/wgpu-hal/src/vulkan/instance.rs index 37cff7b19..71e0fc7e3 100644 --- a/wgpu-hal/src/vulkan/instance.rs +++ b/wgpu-hal/src/vulkan/instance.rs @@ -442,7 +442,7 @@ impl Drop for super::InstanceShared { impl crate::Instance for super::Instance { unsafe fn init(desc: &crate::InstanceDescriptor) -> Result { - let entry = match ash::Entry::new() { + let entry = match ash::Entry::load() { Ok(entry) => entry, Err(err) => { log::info!("Missing Vulkan entry points: {:?}", err); diff --git a/wgpu-hal/src/vulkan/mod.rs b/wgpu-hal/src/vulkan/mod.rs index 457911a3c..234d737a1 100644 --- a/wgpu-hal/src/vulkan/mod.rs +++ b/wgpu-hal/src/vulkan/mod.rs @@ -514,9 +514,7 @@ impl Fence { match *self { Self::TimelineSemaphore(raw) => unsafe { Ok(match *extension.unwrap() { - ExtensionFn::Extension(ref ext) => { - ext.get_semaphore_counter_value(device.handle(), raw)? - } + ExtensionFn::Extension(ref ext) => ext.get_semaphore_counter_value(raw)?, ExtensionFn::Promoted => device.get_semaphore_counter_value(raw)?, }) },