Skip to content

Commit

Permalink
Fix clippy without the feature enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
DJMcNab committed Aug 23, 2024
1 parent 0189345 commit 8e975d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 4 additions & 4 deletions wgpu-hal/src/vulkan/adapter.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::conv;

use ash::{amd, ext, google, khr, vk};
use ash::{amd, ext, khr, vk};
use parking_lot::Mutex;

use std::{collections::BTreeMap, ffi::CStr, sync::Arc};
Expand Down Expand Up @@ -1006,8 +1006,8 @@ impl PhysicalDeviceProperties {

#[cfg(feature = "unstable_vulkan_google_display_timing")]
// Support VK_GOOGLE_display_timing if it is requested *and* available.
if self.supports_extension(google::display_timing::NAME) {
extensions.push(google::display_timing::NAME);
if self.supports_extension(ash::google::display_timing::NAME) {
extensions.push(ash::google::display_timing::NAME);
}

extensions
Expand Down Expand Up @@ -1819,7 +1819,7 @@ impl super::Adapter {
];

#[cfg(feature = "unstable_vulkan_google_display_timing")]
let has_display_timing = enabled_extensions.contains(&google::display_timing::NAME);
let has_display_timing = enabled_extensions.contains(&ash::google::display_timing::NAME);

let shared = Arc::new(super::DeviceShared {
raw: raw_device,
Expand Down
1 change: 1 addition & 0 deletions wgpu-hal/src/vulkan/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,7 @@ impl super::Device {
view_formats: wgt_view_formats,
surface_semaphores,
next_semaphore_index: 0,
#[cfg(feature = "unstable_vulkan_google_display_timing")]
next_present_times: None,
})
}
Expand Down
9 changes: 3 additions & 6 deletions wgpu-hal/src/vulkan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ use std::{
};

use arrayvec::ArrayVec;
use ash::{
ext, khr,
vk::{self, PresentTimeGOOGLE},
};
use ash::{ext, khr, vk};
use parking_lot::{Mutex, RwLock};
use wgt::InternalCounter;

Expand Down Expand Up @@ -359,7 +356,7 @@ struct Swapchain {
/// to the acquire_next_image function which is what tells us which image to use.
next_semaphore_index: usize,
#[cfg(feature = "unstable_vulkan_google_display_timing")]
next_present_times: Option<PresentTimeGOOGLE>,
next_present_times: Option<vk::PresentTimeGOOGLE>,
}

impl Swapchain {
Expand Down Expand Up @@ -398,7 +395,7 @@ impl Surface {
/// If the surface hasn't been configured.
#[cfg(feature = "unstable_vulkan_google_display_timing")]
#[track_caller]
pub fn set_next_present_times(&self, present_timing: PresentTimeGOOGLE) {
pub fn set_next_present_times(&self, present_timing: vk::PresentTimeGOOGLE) {
let mut swapchain = self.swapchain.write();
let swapchain = swapchain
.as_mut()
Expand Down

0 comments on commit 8e975d6

Please sign in to comment.