1
0
Fork 0
forked from wry/wry

vulkan: move OnDrop out of vulkan module

This commit is contained in:
Julian Orth 2024-09-07 12:48:02 +02:00
parent e605940daa
commit 9f98603121
10 changed files with 24 additions and 17 deletions

View file

@ -14,7 +14,6 @@ mod semaphore;
mod shaders; mod shaders;
mod shm_image; mod shm_image;
mod staging; mod staging;
mod util;
use { use {
crate::{ crate::{

View file

@ -8,9 +8,9 @@ use {
gfx_apis::vulkan::{ gfx_apis::vulkan::{
allocator::VulkanAllocator, command::VulkanCommandBuffer, device::VulkanDevice, allocator::VulkanAllocator, command::VulkanCommandBuffer, device::VulkanDevice,
format::VulkanFormat, renderer::image_barrier, staging::VulkanStagingBuffer, format::VulkanFormat, renderer::image_barrier, staging::VulkanStagingBuffer,
util::OnDrop, VulkanError, VulkanError,
}, },
utils::errorfmt::ErrorFmt, utils::{errorfmt::ErrorFmt, on_drop::OnDrop},
video::{ video::{
dmabuf::{DmaBuf, DmaBufIds, DmaBufPlane, PlaneVec}, dmabuf::{DmaBuf, DmaBufIds, DmaBufPlane, PlaneVec},
drm::Drm, drm::Drm,

View file

@ -7,9 +7,9 @@ use {
map_extension_properties, ApiVersionDisplay, Extensions, VulkanInstance, map_extension_properties, ApiVersionDisplay, Extensions, VulkanInstance,
API_VERSION, API_VERSION,
}, },
util::OnDrop,
VulkanError, VulkanError,
}, },
utils::on_drop::OnDrop,
video::{ video::{
drm::{sync_obj::SyncObjCtx, Drm}, drm::{sync_obj::SyncObjCtx, Drm},
gbm::GbmDevice, gbm::GbmDevice,

View file

@ -4,10 +4,10 @@ use {
gfx_api::{GfxApiOpt, GfxError, GfxFramebuffer, GfxImage, GfxTexture, SyncFile}, gfx_api::{GfxApiOpt, GfxError, GfxFramebuffer, GfxImage, GfxTexture, SyncFile},
gfx_apis::vulkan::{ gfx_apis::vulkan::{
allocator::VulkanAllocation, device::VulkanDevice, format::VulkanModifierLimits, allocator::VulkanAllocation, device::VulkanDevice, format::VulkanModifierLimits,
renderer::VulkanRenderer, shm_image::VulkanShmImage, util::OnDrop, VulkanError, renderer::VulkanRenderer, shm_image::VulkanShmImage, VulkanError,
}, },
theme::Color, theme::Color,
utils::clonecell::CloneCell, utils::{clonecell::CloneCell, on_drop::OnDrop},
video::dmabuf::{DmaBuf, PlaneVec}, video::dmabuf::{DmaBuf, PlaneVec},
}, },
ash::vk::{ ash::vk::{

View file

@ -1,5 +1,8 @@
use { use {
crate::gfx_apis::vulkan::{util::OnDrop, VulkanError, VULKAN_VALIDATION}, crate::{
gfx_apis::vulkan::{VulkanError, VULKAN_VALIDATION},
utils::on_drop::OnDrop,
},
ahash::{AHashMap, AHashSet}, ahash::{AHashMap, AHashSet},
ash::{ ash::{
ext::{debug_utils, validation_features}, ext::{debug_utils, validation_features},

View file

@ -1,7 +1,10 @@
use { use {
crate::gfx_apis::vulkan::{ crate::{
descriptor::VulkanDescriptorSetLayout, device::VulkanDevice, shaders::VulkanShader, gfx_apis::vulkan::{
util::OnDrop, VulkanError, descriptor::VulkanDescriptorSetLayout, device::VulkanDevice, shaders::VulkanShader,
VulkanError,
},
utils::on_drop::OnDrop,
}, },
arrayvec::ArrayVec, arrayvec::ArrayVec,
ash::{ ash::{

View file

@ -9,11 +9,10 @@ use {
image::{VulkanImage, VulkanImageMemory}, image::{VulkanImage, VulkanImageMemory},
renderer::{image_barrier, VulkanRenderer}, renderer::{image_barrier, VulkanRenderer},
staging::VulkanStagingBuffer, staging::VulkanStagingBuffer,
util::OnDrop,
VulkanError, VulkanError,
}, },
rect::Rect, rect::Rect,
utils::errorfmt::ErrorFmt, utils::{errorfmt::ErrorFmt, on_drop::OnDrop},
}, },
ash::vk::{ ash::vk::{
AccessFlags2, BufferImageCopy2, BufferMemoryBarrier2, CommandBufferBeginInfo, AccessFlags2, BufferImageCopy2, BufferMemoryBarrier2, CommandBufferBeginInfo,

View file

@ -1,9 +1,11 @@
use { use {
crate::gfx_apis::vulkan::{ crate::{
allocator::{VulkanAllocation, VulkanAllocator}, gfx_apis::vulkan::{
device::VulkanDevice, allocator::{VulkanAllocation, VulkanAllocator},
util::OnDrop, device::VulkanDevice,
VulkanError, VulkanError,
},
utils::on_drop::OnDrop,
}, },
ash::vk::{Buffer, BufferCreateInfo, BufferUsageFlags, MappedMemoryRange}, ash::vk::{Buffer, BufferCreateInfo, BufferUsageFlags, MappedMemoryRange},
gpu_alloc::UsageFlags, gpu_alloc::UsageFlags,

View file

@ -27,6 +27,7 @@ pub mod nonblock;
pub mod num_cpus; pub mod num_cpus;
pub mod numcell; pub mod numcell;
pub mod on_change; pub mod on_change;
pub mod on_drop;
pub mod once; pub mod once;
pub mod opaque; pub mod opaque;
pub mod opaque_cell; pub mod opaque_cell;