1
0
Fork 0
forked from wry/wry

all: set rust edition to 2024

This commit is contained in:
Julian Orth 2025-02-21 10:44:29 +01:00
parent 02a18f620b
commit 3338909170
515 changed files with 1225 additions and 1187 deletions

View file

@ -80,8 +80,8 @@ use {
texture::Texture,
},
sys::{
GL_BLEND, GL_FALSE, GL_FLOAT, GL_LINEAR, GL_TEXTURE0, GL_TEXTURE_MIN_FILTER,
GL_TRIANGLES, GL_TRIANGLE_STRIP,
GL_BLEND, GL_FALSE, GL_FLOAT, GL_LINEAR, GL_TEXTURE_MIN_FILTER, GL_TEXTURE0,
GL_TRIANGLE_STRIP, GL_TRIANGLES,
},
},
theme::Color,
@ -339,7 +339,9 @@ fn render_texture(ctx: &GlRenderContext, tex: &CopyTexture) {
true => match &ctx.tex_external {
Some(p) => p,
_ => {
log::error!("Trying to render an external-only texture but context does not support the required extension");
log::error!(
"Trying to render an external-only texture but context does not support the required extension"
);
return;
}
},

View file

@ -1,14 +1,14 @@
use {
crate::gfx_apis::gl::{
RenderError,
egl::sys::{
EGLAttrib, EGLLabelKHR, EGLenum, EGLint, EGL_DEBUG_MSG_CRITICAL_KHR,
EGL_DEBUG_MSG_ERROR_KHR, EGL_DEBUG_MSG_INFO_KHR, EGL_DEBUG_MSG_WARN_KHR, EGL_NONE,
EGL_OPENGL_ES_API, EGL_TRUE,
EGL_DEBUG_MSG_CRITICAL_KHR, EGL_DEBUG_MSG_ERROR_KHR, EGL_DEBUG_MSG_INFO_KHR,
EGL_DEBUG_MSG_WARN_KHR, EGL_NONE, EGL_OPENGL_ES_API, EGL_TRUE, EGLAttrib, EGLLabelKHR,
EGLenum, EGLint,
},
ext::{get_client_ext, ClientExt, EXT_PLATFORM_BASE, KHR_DEBUG, KHR_PLATFORM_GBM},
ext::{ClientExt, EXT_PLATFORM_BASE, KHR_DEBUG, KHR_PLATFORM_GBM, get_client_ext},
proc::ExtProc,
sys::EGL,
RenderError,
},
bstr::ByteSlice,
log::Level,

View file

@ -2,16 +2,16 @@ use {
crate::{
gfx_api::{GfxFormat, ResetStatus},
gfx_apis::gl::{
RenderError,
egl::{
display::EglDisplay,
sys::{EGLContext, EGLSurface, EGL_FALSE, EGL_TRUE},
sys::{EGL_FALSE, EGL_TRUE, EGLContext, EGLSurface},
},
ext::{GlExt, EXT_CREATE_CONTEXT_ROBUSTNESS},
ext::{EXT_CREATE_CONTEXT_ROBUSTNESS, GlExt},
sys::{
GL_GUILTY_CONTEXT_RESET_ARB, GL_INNOCENT_CONTEXT_RESET_ARB,
GL_UNKNOWN_CONTEXT_RESET_ARB,
},
RenderError,
},
},
ahash::AHashMap,

View file

@ -1,13 +1,14 @@
use {
crate::{
format::{formats, Format},
format::{Format, formats},
gfx_api::{GfxFormat, GfxWriteModifier},
gfx_apis::gl::{
RenderError,
egl::{
PROCS,
context::EglContext,
image::EglImage,
sys::{
EGLClientBuffer, EGLConfig, EGLContext, EGLDisplay, EGLint,
EGL_CONTEXT_CLIENT_VERSION, EGL_DMA_BUF_PLANE0_FD_EXT,
EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT, EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT,
EGL_DMA_BUF_PLANE0_OFFSET_EXT, EGL_DMA_BUF_PLANE0_PITCH_EXT,
@ -20,24 +21,23 @@ use {
EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT, EGL_DMA_BUF_PLANE3_OFFSET_EXT,
EGL_DMA_BUF_PLANE3_PITCH_EXT, EGL_HEIGHT, EGL_IMAGE_PRESERVED_KHR,
EGL_LINUX_DMA_BUF_EXT, EGL_LINUX_DRM_FOURCC_EXT, EGL_NONE, EGL_TRUE, EGL_WIDTH,
EGLClientBuffer, EGLConfig, EGLContext, EGLDisplay, EGLint,
},
PROCS,
},
ext::{
get_display_ext, get_gl_ext, DisplayExt, GlExt, ANDROID_NATIVE_FENCE_SYNC,
EXT_CREATE_CONTEXT_ROBUSTNESS, EXT_IMAGE_DMA_BUF_IMPORT_MODIFIERS,
GL_OES_EGL_IMAGE, GL_OES_EGL_IMAGE_EXTERNAL, KHR_FENCE_SYNC, KHR_IMAGE_BASE,
KHR_NO_CONFIG_CONTEXT, KHR_SURFACELESS_CONTEXT, KHR_WAIT_SYNC,
MESA_CONFIGLESS_CONTEXT,
ANDROID_NATIVE_FENCE_SYNC, DisplayExt, EXT_CREATE_CONTEXT_ROBUSTNESS,
EXT_IMAGE_DMA_BUF_IMPORT_MODIFIERS, GL_OES_EGL_IMAGE, GL_OES_EGL_IMAGE_EXTERNAL,
GlExt, KHR_FENCE_SYNC, KHR_IMAGE_BASE, KHR_NO_CONFIG_CONTEXT,
KHR_SURFACELESS_CONTEXT, KHR_WAIT_SYNC, MESA_CONFIGLESS_CONTEXT, get_display_ext,
get_gl_ext,
},
proc::ExtProc,
sys::{
Egl, GlesV2, EGL, EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
EGL_LOSE_CONTEXT_ON_RESET_EXT, EGL_PLATFORM_GBM_KHR, GLESV2,
EGL, EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT,
EGL_LOSE_CONTEXT_ON_RESET_EXT, EGL_PLATFORM_GBM_KHR, Egl, GLESV2, GlesV2,
},
RenderError,
},
video::{dmabuf::DmaBuf, drm::Drm, gbm::GbmDevice, Modifier, INVALID_MODIFIER},
video::{INVALID_MODIFIER, Modifier, dmabuf::DmaBuf, drm::Drm, gbm::GbmDevice},
},
ahash::AHashMap,
indexmap::{IndexMap, IndexSet},

View file

@ -2,7 +2,7 @@ use {
crate::{
gfx_apis::gl::egl::{
display::EglDisplay,
sys::{EGLImageKHR, EGL_FALSE},
sys::{EGL_FALSE, EGLImageKHR},
},
video::dmabuf::DmaBuf,
},

View file

@ -1,9 +1,9 @@
use {
crate::gfx_apis::gl::{
egl::sys::{EGLDisplay, EGL_EXTENSIONS},
RenderError,
egl::sys::{EGL_EXTENSIONS, EGLDisplay},
gl::sys::GL_EXTENSIONS,
sys::{EGL, GLESV2},
RenderError,
},
ahash::AHashSet,
bstr::ByteSlice,

View file

@ -1,11 +1,11 @@
use {
crate::gfx_apis::gl::{
RenderError,
egl::context::EglContext,
gl::{
shader::GlShader,
sys::{GLint, GLuint, GL_FALSE, GL_FRAGMENT_SHADER, GL_LINK_STATUS, GL_VERTEX_SHADER},
sys::{GL_FALSE, GL_FRAGMENT_SHADER, GL_LINK_STATUS, GL_VERTEX_SHADER, GLint, GLuint},
},
RenderError,
},
std::{ffi::CStr, rc::Rc},
};

View file

@ -2,15 +2,15 @@ use {
crate::{
format::Format,
gfx_apis::gl::{
RenderError,
egl::{context::EglContext, image::EglImage},
gl::{
frame_buffer::GlFrameBuffer,
sys::{
GLeglImageOES, GLuint, GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER,
GL_FRAMEBUFFER_COMPLETE, GL_RENDERBUFFER,
GL_COLOR_ATTACHMENT0, GL_FRAMEBUFFER, GL_FRAMEBUFFER_COMPLETE, GL_RENDERBUFFER,
GLeglImageOES, GLuint,
},
},
RenderError,
},
},
std::rc::Rc,

View file

@ -1,9 +1,9 @@
use {
crate::gfx_apis::gl::{
egl::context::EglContext,
gl::sys::{GLenum, GLuint, GL_COMPILE_STATUS, GL_FALSE},
sys::GLint,
RenderError,
egl::context::EglContext,
gl::sys::{GL_COMPILE_STATUS, GL_FALSE, GLenum, GLuint},
sys::GLint,
},
std::rc::Rc,
};

View file

@ -2,14 +2,14 @@ use {
crate::{
format::Format,
gfx_apis::gl::{
RenderError,
egl::{context::EglContext, image::EglImage},
ext::GL_OES_EGL_IMAGE_EXTERNAL,
gl::sys::{
GLint, GLuint, GL_CLAMP_TO_EDGE, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
GL_TEXTURE_WRAP_T, GL_UNPACK_ROW_LENGTH_EXT,
GL_CLAMP_TO_EDGE, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T,
GL_UNPACK_ROW_LENGTH_EXT, GLint, GLuint,
},
sys::{GLeglImageOES, GLenum, GL_TEXTURE_EXTERNAL_OES},
RenderError,
sys::{GL_TEXTURE_EXTERNAL_OES, GLeglImageOES, GLenum},
},
},
std::{cell::Cell, rc::Rc},

View file

@ -8,24 +8,24 @@ use {
GfxImage, GfxInternalFramebuffer, ResetStatus, ShmGfxTexture,
},
gfx_apis::gl::{
GfxGlState, RenderError, Texture,
egl::{context::EglContext, display::EglDisplay, image::EglImage},
ext::GL_OES_EGL_IMAGE_EXTERNAL,
gl::{
program::GlProgram, render_buffer::GlRenderBuffer, sys::GLint, texture::GlTexture,
},
renderer::{framebuffer::Framebuffer, image::Image},
GfxGlState, RenderError, Texture,
},
rect::Rect,
video::{
dmabuf::DmaBuf,
drm::{sync_obj::SyncObjCtx, Drm},
drm::{Drm, sync_obj::SyncObjCtx},
gbm::GbmDevice,
},
},
ahash::AHashMap,
jay_config::video::GfxApi,
linearize::{static_map, Linearize, StaticMap},
linearize::{Linearize, StaticMap, static_map},
std::{
cell::{Cell, RefCell},
ffi::CString,

View file

@ -7,6 +7,7 @@ use {
SyncFile,
},
gfx_apis::gl::{
RenderError,
gl::{
frame_buffer::GlFrameBuffer,
sys::{GL_COLOR_BUFFER_BIT, GL_FRAMEBUFFER},
@ -15,7 +16,6 @@ use {
renderer::context::GlRenderContext,
run_ops,
sys::{GL_ONE, GL_ONE_MINUS_SRC_ALPHA},
RenderError,
},
rect::Region,
theme::Color,

View file

@ -2,8 +2,8 @@ use {
crate::{
gfx_api::{GfxError, GfxFramebuffer, GfxImage, GfxTexture},
gfx_apis::gl::{
egl::image::EglImage, gl::texture::GlTexture, Framebuffer, GlRenderContext,
RenderError, Texture,
Framebuffer, GlRenderContext, RenderError, Texture, egl::image::EglImage,
gl::texture::GlTexture,
},
},
std::rc::Rc,

View file

@ -1,12 +1,12 @@
use {
crate::{
gfx_apis::gl::{
RenderError,
egl::context::EglContext,
sys::{
EGLBoolean, EGLSyncKHR, EGL_NONE, EGL_SYNC_NATIVE_FENCE_ANDROID,
EGL_SYNC_NATIVE_FENCE_FD_ANDROID, EGL_TRUE,
EGL_NONE, EGL_SYNC_NATIVE_FENCE_ANDROID, EGL_SYNC_NATIVE_FENCE_FD_ANDROID,
EGL_TRUE, EGLBoolean, EGLSyncKHR,
},
RenderError,
},
utils::errorfmt::ErrorFmt,
},

View file

@ -6,13 +6,13 @@ use {
PendingShmTransfer, ShmGfxTexture, ShmMemory,
},
gfx_apis::gl::{
RenderError,
gl::texture::GlTexture,
renderer::context::GlRenderContext,
sys::{
GLint, GL_CLAMP_TO_EDGE, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T,
GL_UNPACK_ROW_LENGTH_EXT,
GL_CLAMP_TO_EDGE, GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_TEXTURE_WRAP_T,
GL_UNPACK_ROW_LENGTH_EXT, GLint,
},
RenderError,
},
rect::Region,
video::dmabuf::DmaBuf,

View file

@ -21,12 +21,12 @@ use {
crate::{
allocator::{Allocator, AllocatorError},
async_engine::AsyncEngine,
cpu_worker::{jobs::read_write::ReadWriteJobError, CpuWorker},
cpu_worker::{CpuWorker, jobs::read_write::ReadWriteJobError},
format::Format,
gfx_api::{
AsyncShmGfxTexture, GfxContext, GfxError, GfxFormat, GfxImage, GfxInternalFramebuffer,
GfxStagingBuffer, ResetStatus, ShmGfxTexture, StagingBufferUsecase, STAGING_DOWNLOAD,
STAGING_UPLOAD,
GfxStagingBuffer, ResetStatus, STAGING_DOWNLOAD, STAGING_UPLOAD, ShmGfxTexture,
StagingBufferUsecase,
},
gfx_apis::vulkan::{
image::VulkanImageMemory, instance::VulkanInstance, renderer::VulkanRenderer,
@ -36,12 +36,12 @@ use {
utils::oserror::OsError,
video::{
dmabuf::DmaBuf,
drm::{sync_obj::SyncObjCtx, Drm, DrmError},
drm::{Drm, DrmError, sync_obj::SyncObjCtx},
gbm::GbmError,
},
},
ahash::AHashMap,
ash::{vk, LoadingError},
ash::{LoadingError, vk},
gpu_alloc::{AllocationError, MapError},
jay_config::video::GfxApi,
log::Level,

View file

@ -2,13 +2,13 @@ use {
crate::{
cpu_worker::{AsyncCpuWork, CpuJob, CpuWork, CpuWorker},
gfx_apis::vulkan::{
device::VulkanDevice, instance::API_VERSION, renderer::VulkanRenderer, VulkanError,
VulkanError, device::VulkanDevice, instance::API_VERSION, renderer::VulkanRenderer,
},
utils::{numcell::NumCell, ptr_ext::MutPtrExt},
},
ash::{
vk::{DeviceMemory, DeviceSize, MappedMemoryRange, MemoryRequirements},
Device,
vk::{DeviceMemory, DeviceSize, MappedMemoryRange, MemoryRequirements},
},
gpu_alloc::{Config, GpuAllocator, MemoryBlock, MemoryPropertyFlags, Request, UsageFlags},
gpu_alloc_ash::AshMemoryDevice,

View file

@ -1,20 +1,20 @@
use {
crate::{
allocator::{
Allocator, AllocatorError, BufferObject, BufferUsage, MappedBuffer, BO_USE_RENDERING,
BO_USE_WRITE,
Allocator, AllocatorError, BO_USE_RENDERING, BO_USE_WRITE, BufferObject, BufferUsage,
MappedBuffer,
},
format::Format,
gfx_apis::vulkan::{
allocator::VulkanAllocator, command::VulkanCommandBuffer, device::VulkanDevice,
format::VulkanFormat, renderer::image_barrier, staging::VulkanStagingBuffer,
VulkanError,
VulkanError, allocator::VulkanAllocator, command::VulkanCommandBuffer,
device::VulkanDevice, format::VulkanFormat, renderer::image_barrier,
staging::VulkanStagingBuffer,
},
utils::{errorfmt::ErrorFmt, on_drop::OnDrop},
video::{
Modifier,
dmabuf::{DmaBuf, DmaBufIds, DmaBufPlane, PlaneVec},
drm::Drm,
Modifier,
},
},
arrayvec::ArrayVec,
@ -30,8 +30,8 @@ use {
ImageSubresource, ImageSubresourceLayers, ImageTiling, ImageType, ImageUsageFlags,
ImportMemoryFdInfoKHR, MemoryAllocateInfo, MemoryDedicatedAllocateInfo,
MemoryFdPropertiesKHR, MemoryGetFdInfoKHR, MemoryPropertyFlags, MemoryRequirements2,
PipelineStageFlags2, SampleCountFlags, SharingMode, SubmitInfo2, SubresourceLayout,
QUEUE_FAMILY_FOREIGN_EXT,
PipelineStageFlags2, QUEUE_FAMILY_FOREIGN_EXT, SampleCountFlags, SharingMode, SubmitInfo2,
SubresourceLayout,
},
std::{rc::Rc, slice},
uapi::OwnedFd,

View file

@ -1,5 +1,5 @@
use {
crate::gfx_apis::vulkan::{device::VulkanDevice, renderer::CachedCommandBuffers, VulkanError},
crate::gfx_apis::vulkan::{VulkanError, device::VulkanDevice, renderer::CachedCommandBuffers},
ash::vk::{
CommandBuffer, CommandBufferAllocateInfo, CommandBufferLevel, CommandPool,
CommandPoolCreateFlags, CommandPoolCreateInfo,

View file

@ -1,5 +1,5 @@
use {
crate::gfx_apis::vulkan::{device::VulkanDevice, sampler::VulkanSampler, VulkanError},
crate::gfx_apis::vulkan::{VulkanError, device::VulkanDevice, sampler::VulkanSampler},
arrayvec::ArrayVec,
ash::vk::{
DescriptorSetLayout, DescriptorSetLayoutBinding, DescriptorSetLayoutCreateFlags,

View file

@ -1,10 +1,10 @@
use {
crate::{
gfx_apis::vulkan::{
VulkanError,
allocator::{VulkanAllocation, VulkanAllocator},
descriptor::VulkanDescriptorSetLayout,
device::VulkanDevice,
VulkanError,
},
utils::on_drop::OnDrop,
},

View file

@ -2,22 +2,23 @@ use {
crate::{
format::XRGB8888,
gfx_apis::vulkan::{
VulkanError,
format::VulkanFormat,
instance::{
map_extension_properties, ApiVersionDisplay, Extensions, VulkanInstance,
API_VERSION,
API_VERSION, ApiVersionDisplay, Extensions, VulkanInstance,
map_extension_properties,
},
VulkanError,
},
utils::on_drop::OnDrop,
video::{
drm::{sync_obj::SyncObjCtx, Drm},
drm::{Drm, sync_obj::SyncObjCtx},
gbm::GbmDevice,
},
},
ahash::AHashMap,
arrayvec::ArrayVec,
ash::{
Device,
ext::{
descriptor_buffer, external_memory_dma_buf, image_drm_format_modifier,
physical_device_drm, queue_family_foreign,
@ -28,16 +29,16 @@ use {
},
vk::{
DeviceCreateInfo, DeviceQueueCreateInfo, DeviceSize, ExternalSemaphoreFeatureFlags,
ExternalSemaphoreHandleTypeFlags, ExternalSemaphoreProperties, MemoryPropertyFlags,
MemoryType, PhysicalDevice, PhysicalDeviceBufferDeviceAddressFeatures,
PhysicalDeviceDescriptorBufferFeaturesEXT, PhysicalDeviceDescriptorBufferPropertiesEXT,
PhysicalDeviceDriverProperties, PhysicalDeviceDriverPropertiesKHR,
PhysicalDeviceDrmPropertiesEXT, PhysicalDeviceDynamicRenderingFeatures,
PhysicalDeviceExternalSemaphoreInfo, PhysicalDeviceProperties,
PhysicalDeviceProperties2, PhysicalDeviceSynchronization2Features,
PhysicalDeviceTimelineSemaphoreFeatures, Queue, QueueFlags, MAX_MEMORY_TYPES,
ExternalSemaphoreHandleTypeFlags, ExternalSemaphoreProperties, MAX_MEMORY_TYPES,
MemoryPropertyFlags, MemoryType, PhysicalDevice,
PhysicalDeviceBufferDeviceAddressFeatures, PhysicalDeviceDescriptorBufferFeaturesEXT,
PhysicalDeviceDescriptorBufferPropertiesEXT, PhysicalDeviceDriverProperties,
PhysicalDeviceDriverPropertiesKHR, PhysicalDeviceDrmPropertiesEXT,
PhysicalDeviceDynamicRenderingFeatures, PhysicalDeviceExternalSemaphoreInfo,
PhysicalDeviceProperties, PhysicalDeviceProperties2,
PhysicalDeviceSynchronization2Features, PhysicalDeviceTimelineSemaphoreFeatures, Queue,
QueueFlags,
},
Device,
},
isnt::std_1::collections::IsntHashMap2Ext,
std::{

View file

@ -1,7 +1,7 @@
use {
crate::{
gfx_api::SyncFile,
gfx_apis::vulkan::{device::VulkanDevice, VulkanError},
gfx_apis::vulkan::{VulkanError, device::VulkanDevice},
},
ash::vk::{
ExportFenceCreateInfo, ExternalFenceHandleTypeFlags, Fence, FenceCreateInfo,

View file

@ -1,8 +1,8 @@
use {
crate::{
format::{Format, FORMATS},
gfx_apis::vulkan::{instance::VulkanInstance, VulkanError},
video::{Modifier, LINEAR_MODIFIER},
format::{FORMATS, Format},
gfx_apis::vulkan::{VulkanError, instance::VulkanInstance},
video::{LINEAR_MODIFIER, Modifier},
},
ahash::AHashMap,
ash::{

View file

@ -8,9 +8,9 @@ use {
ShmGfxTexture, ShmMemory, SyncFile,
},
gfx_apis::vulkan::{
allocator::VulkanAllocation, device::VulkanDevice, format::VulkanModifierLimits,
renderer::VulkanRenderer, shm_image::VulkanShmImage, transfer::TransferType,
VulkanError,
VulkanError, allocator::VulkanAllocation, device::VulkanDevice,
format::VulkanModifierLimits, renderer::VulkanRenderer, shm_image::VulkanShmImage,
transfer::TransferType,
},
rect::Region,
theme::Color,

View file

@ -1,32 +1,32 @@
use {
crate::{
gfx_apis::vulkan::{VulkanError, VULKAN_VALIDATION},
gfx_apis::vulkan::{VULKAN_VALIDATION, VulkanError},
utils::on_drop::OnDrop,
},
ahash::{AHashMap, AHashSet},
ash::{
Entry, Instance, LoadingError,
ext::{debug_utils, validation_features},
vk::{
api_version_major, api_version_minor, api_version_patch, api_version_variant,
ApplicationInfo, Bool32, DebugUtilsMessageSeverityFlagsEXT,
API_VERSION_1_3, ApplicationInfo, Bool32, DebugUtilsMessageSeverityFlagsEXT,
DebugUtilsMessageTypeFlagsEXT, DebugUtilsMessengerCallbackDataEXT,
DebugUtilsMessengerCreateInfoEXT, DebugUtilsMessengerEXT, ExtensionProperties,
InstanceCreateInfo, LayerProperties, ValidationFeaturesEXT, API_VERSION_1_3, FALSE,
DebugUtilsMessengerCreateInfoEXT, DebugUtilsMessengerEXT, ExtensionProperties, FALSE,
InstanceCreateInfo, LayerProperties, ValidationFeaturesEXT, api_version_major,
api_version_minor, api_version_patch, api_version_variant,
},
Entry, Instance, LoadingError,
},
isnt::std_1::collections::IsntHashMap2Ext,
log::Level,
once_cell::sync::Lazy,
std::{
ffi::{c_void, CStr, CString},
ffi::{CStr, CString, c_void},
fmt::{Display, Formatter},
iter::IntoIterator,
rc::Rc,
slice,
sync::Arc,
},
uapi::{ustr, Ustr},
uapi::{Ustr, ustr},
};
pub struct VulkanInstance {

View file

@ -1,8 +1,8 @@
use {
crate::{
gfx_apis::vulkan::{
descriptor::VulkanDescriptorSetLayout, device::VulkanDevice, shaders::VulkanShader,
VulkanError,
VulkanError, descriptor::VulkanDescriptorSetLayout, device::VulkanDevice,
shaders::VulkanShader,
},
utils::on_drop::OnDrop,
},

View file

@ -8,6 +8,7 @@ use {
GfxWriteModifier, ReleaseSync, SyncFile,
},
gfx_apis::vulkan::{
VulkanError,
allocator::{VulkanAllocator, VulkanThreadedAllocator},
command::{VulkanCommandBuffer, VulkanCommandPool},
descriptor::VulkanDescriptorSetLayout,
@ -21,10 +22,9 @@ use {
sampler::VulkanSampler,
semaphore::VulkanSemaphore,
shaders::{
FillPushConstants, TexPushConstants, VulkanShader, FILL_FRAG, FILL_VERT, TEX_FRAG,
TEX_VERT,
FILL_FRAG, FILL_VERT, FillPushConstants, TEX_FRAG, TEX_VERT, TexPushConstants,
VulkanShader,
},
VulkanError,
},
io_uring::IoUring,
rect::Region,
@ -33,26 +33,25 @@ use {
copyhashmap::CopyHashMap, errorfmt::ErrorFmt, numcell::NumCell, once::Once,
stack::Stack,
},
video::dmabuf::{dma_buf_export_sync_file, DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE},
video::dmabuf::{DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, dma_buf_export_sync_file},
},
ahash::AHashMap,
ash::{
vk,
Device,
vk::{
AccessFlags2, AttachmentLoadOp, AttachmentStoreOp, ClearAttachment, ClearColorValue,
ClearRect, ClearValue, CommandBuffer, CommandBufferBeginInfo, CommandBufferSubmitInfo,
CommandBufferUsageFlags, CopyImageInfo2, DependencyInfoKHR,
self, AccessFlags2, AttachmentLoadOp, AttachmentStoreOp, ClearAttachment,
ClearColorValue, ClearRect, ClearValue, CommandBuffer, CommandBufferBeginInfo,
CommandBufferSubmitInfo, CommandBufferUsageFlags, CopyImageInfo2, DependencyInfoKHR,
DescriptorBufferBindingInfoEXT, DescriptorImageInfo, DescriptorType, DeviceSize,
Extent2D, Extent3D, ImageAspectFlags, ImageCopy2, ImageLayout, ImageMemoryBarrier2,
ImageSubresourceLayers, ImageSubresourceRange, Offset2D, Offset3D, PipelineBindPoint,
PipelineStageFlags2, Rect2D, RenderingAttachmentInfo, RenderingInfo,
SemaphoreSubmitInfo, SemaphoreSubmitInfoKHR, ShaderStageFlags, SubmitInfo2, Viewport,
WriteDescriptorSet, QUEUE_FAMILY_FOREIGN_EXT,
PipelineStageFlags2, QUEUE_FAMILY_FOREIGN_EXT, Rect2D, RenderingAttachmentInfo,
RenderingInfo, SemaphoreSubmitInfo, SemaphoreSubmitInfoKHR, ShaderStageFlags,
SubmitInfo2, Viewport, WriteDescriptorSet,
},
Device,
},
isnt::std_1::collections::IsntHashMapExt,
linearize::{static_map, Linearize, StaticMap},
linearize::{Linearize, StaticMap, static_map},
std::{
cell::{Cell, RefCell},
fmt::{Debug, Formatter},

View file

@ -1,5 +1,5 @@
use {
crate::gfx_apis::vulkan::{device::VulkanDevice, VulkanError},
crate::gfx_apis::vulkan::{VulkanError, device::VulkanDevice},
ash::vk::{
BorderColor, Filter, Sampler, SamplerAddressMode, SamplerCreateInfo, SamplerMipmapMode,
},

View file

@ -1,5 +1,5 @@
use {
crate::gfx_apis::vulkan::{device::VulkanDevice, VulkanError},
crate::gfx_apis::vulkan::{VulkanError, device::VulkanDevice},
ash::vk::{
ExternalSemaphoreHandleTypeFlags, ImportSemaphoreFdInfoKHR, Semaphore, SemaphoreCreateInfo,
SemaphoreImportFlags,

View file

@ -1,5 +1,5 @@
use {
crate::gfx_apis::vulkan::{device::VulkanDevice, VulkanError},
crate::gfx_apis::vulkan::{VulkanError, device::VulkanDevice},
ash::vk::{ShaderModule, ShaderModuleCreateInfo},
std::rc::Rc,
uapi::Packed,

View file

@ -4,14 +4,14 @@ use {
format::{Format, FormatShmInfo},
gfx_api::SyncFile,
gfx_apis::vulkan::{
VulkanError,
allocator::VulkanAllocation,
command::VulkanCommandBuffer,
fence::VulkanFence,
image::{QueueFamily, QueueState, VulkanImage, VulkanImageMemory},
renderer::{image_barrier, VulkanRenderer},
renderer::{VulkanRenderer, image_barrier},
staging::VulkanStagingBuffer,
transfer::{TransferType, VulkanShmImageAsyncData},
VulkanError,
},
rect::Rect,
utils::{errorfmt::ErrorFmt, on_drop::OnDrop},

View file

@ -3,10 +3,10 @@ use {
cpu_worker::CpuWorker,
gfx_api::GfxStagingBuffer,
gfx_apis::vulkan::{
VulkanError,
allocator::{VulkanAllocation, VulkanAllocator},
device::VulkanDevice,
renderer::VulkanRenderer,
VulkanError,
},
utils::{
clonecell::CloneCell,
@ -14,8 +14,8 @@ use {
},
},
ash::{
vk::{Buffer, BufferCreateInfo, BufferUsageFlags},
Device,
vk::{Buffer, BufferCreateInfo, BufferUsageFlags},
},
gpu_alloc::UsageFlags,
std::{any::Any, cell::Cell, rc::Rc},

View file

@ -1,23 +1,23 @@
use {
crate::{
cpu_worker::{
CpuJob, CpuWork, CpuWorker,
jobs::{
img_copy::ImgCopyWork,
read_write::{ReadWriteJobError, ReadWriteWork},
},
CpuJob, CpuWork, CpuWorker,
},
gfx_api::{
AsyncShmGfxTextureCallback, PendingShmTransfer, ShmMemory, ShmMemoryBacking, SyncFile,
},
gfx_apis::vulkan::{
VulkanError,
command::VulkanCommandBuffer,
fence::VulkanFence,
image::{QueueFamily, QueueState, QueueTransfer, VulkanImage, VulkanImageMemory},
renderer::image_barrier,
shm_image::VulkanShmImage,
staging::{VulkanStagingBuffer, VulkanStagingShell},
VulkanError,
},
rect::{Rect, Region},
utils::{clonecell::CloneCell, errorfmt::ErrorFmt},