diff --git a/vulkano/src/image/mod.rs b/vulkano/src/image/mod.rs index b0c25451b8..6b8c2b64f6 100644 --- a/vulkano/src/image/mod.rs +++ b/vulkano/src/image/mod.rs @@ -51,13 +51,17 @@ pub use self::{ attachment::AttachmentImage, immutable::ImmutableImage, layout::{ImageDescriptorLayouts, ImageLayout}, - storage::{StorageImage, SubresourceData}, + storage::StorageImage, swapchain::SwapchainImage, sys::ImageError, traits::{ImageAccess, ImageInner}, usage::ImageUsage, view::{ImageViewAbstract, ImageViewType}, }; + +#[cfg(target_os = "linux")] +pub use self::storage::SubresourceData; + use crate::{ format::Format, macros::{vulkan_bitflags, vulkan_bitflags_enum, vulkan_enum}, diff --git a/vulkano/src/image/storage.rs b/vulkano/src/image/storage.rs index 2583c5e226..5ed23427c1 100644 --- a/vulkano/src/image/storage.rs +++ b/vulkano/src/image/storage.rs @@ -16,22 +16,35 @@ use super::{ use crate::{ device::{Device, DeviceOwned, Queue}, format::Format, - image::{sys::ImageCreateInfo, view::ImageView, ImageFormatInfo, ImageTiling}, + image::{sys::ImageCreateInfo, view::ImageView, ImageFormatInfo}, memory::{ allocator::{ - AllocationCreateInfo, AllocationType, MemoryAlloc, MemoryAllocatePreference, + AllocationCreateInfo, AllocationType, MemoryAllocatePreference, MemoryAllocator, MemoryUsage, }, - DedicatedAllocation, DeviceMemory, DeviceMemoryError, ExternalMemoryHandleType, - ExternalMemoryHandleTypes, MemoryAllocateFlags, MemoryAllocateInfo, + DedicatedAllocation, DeviceMemoryError, ExternalMemoryHandleType, + ExternalMemoryHandleTypes, }, sync::Sharing, DeviceSize, }; -use ash::vk::{ImageDrmFormatModifierExplicitCreateInfoEXT, SubresourceLayout}; use smallvec::SmallVec; + #[cfg(target_os = "linux")] use std::os::unix::prelude::{FromRawFd, IntoRawFd, RawFd}; +#[cfg(target_os = "linux")] +use ash::vk::{ImageDrmFormatModifierExplicitCreateInfoEXT, SubresourceLayout}; +#[cfg(target_os = "linux")] +use crate::{ + image::ImageTiling, + memory::{ + allocator::MemoryAlloc, + DeviceMemory, + MemoryAllocateFlags, + MemoryAllocateInfo + } +}; + use std::{ fs::File, hash::{Hash, Hasher},