fmt: run cargo fmt

This commit is contained in:
chyyran 2023-01-15 12:17:27 -05:00
parent ed3b61a931
commit 3b89c065fa
8 changed files with 7 additions and 18 deletions

View file

@ -6,9 +6,7 @@ use librashader_reflect::reflect::ShaderReflection;
use librashader_common::{ImageFormat, Size, Viewport}; use librashader_common::{ImageFormat, Size, Viewport};
use librashader_preprocess::ShaderSource; use librashader_preprocess::ShaderSource;
use librashader_presets::ShaderPassConfig; use librashader_presets::ShaderPassConfig;
use librashader_reflect::reflect::semantics::{ use librashader_reflect::reflect::semantics::{MemberOffset, TextureBinding, UniformBinding};
MemberOffset, TextureBinding, UniformBinding,
};
use librashader_runtime::binding::{BindSemantics, ContextOffset, TextureInput}; use librashader_runtime::binding::{BindSemantics, ContextOffset, TextureInput};
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;

View file

@ -14,9 +14,7 @@ use librashader_reflect::reflect::semantics::{
}; };
use librashader_reflect::reflect::ShaderReflection; use librashader_reflect::reflect::ShaderReflection;
use librashader_runtime::binding::{BindSemantics, TextureInput}; use librashader_runtime::binding::{BindSemantics, TextureInput};
use librashader_runtime::uniforms::{ use librashader_runtime::uniforms::{UniformStorage, UniformStorageAccess};
UniformStorage, UniformStorageAccess,
};
use rustc_hash::FxHashMap; use rustc_hash::FxHashMap;
use std::sync::Arc; use std::sync::Arc;

View file

@ -1,4 +1,3 @@
use ash::prelude::VkResult; use ash::prelude::VkResult;
use ash::vk; use ash::vk;

View file

@ -8,7 +8,7 @@ mod swapchain;
mod syncobjects; mod syncobjects;
pub mod vulkan_base; pub mod vulkan_base;
use crate::filter_chain::{FilterChainVulkan}; use crate::filter_chain::FilterChainVulkan;
use crate::hello_triangle::command::VulkanCommandPool; use crate::hello_triangle::command::VulkanCommandPool;
use crate::hello_triangle::framebuffer::VulkanFramebuffer; use crate::hello_triangle::framebuffer::VulkanFramebuffer;
use crate::hello_triangle::pipeline::VulkanPipeline; use crate::hello_triangle::pipeline::VulkanPipeline;

View file

@ -4,7 +4,7 @@ use crate::util::find_vulkan_memory_type;
use crate::vulkan_primitives::VulkanImageMemory; use crate::vulkan_primitives::VulkanImageMemory;
use ash::prelude::VkResult; use ash::prelude::VkResult;
use ash::vk; use ash::vk;
use ash::vk::{Extent3D}; use ash::vk::Extent3D;
use std::sync::Arc; use std::sync::Arc;

View file

@ -1,14 +1,12 @@
use ash::vk; use ash::vk;
use crate::error::FilterChainError; use crate::error::FilterChainError;
use crate::filter_chain::VulkanObjects; use crate::filter_chain::VulkanObjects;
use crate::hello_triangle::debug::VulkanDebug; use crate::hello_triangle::debug::VulkanDebug;
use crate::hello_triangle::physicaldevice::{find_queue_family, pick_physical_device}; use crate::hello_triangle::physicaldevice::{find_queue_family, pick_physical_device};
use ash::prelude::VkResult; use ash::prelude::VkResult;
use std::ffi::{CStr}; use std::ffi::CStr;
use std::sync::Arc; use std::sync::Arc;
const WINDOW_TITLE: &[u8] = b"librashader Vulkan\0"; const WINDOW_TITLE: &[u8] = b"librashader Vulkan\0";

View file

@ -22,11 +22,7 @@ impl VulkanImageMemory {
} }
pub fn bind(&self, image: &vk::Image) -> error::Result<()> { pub fn bind(&self, image: &vk::Image) -> error::Result<()> {
unsafe { unsafe { Ok(self.device.bind_image_memory(*image, self.handle, 0)?) }
Ok(self
.device
.bind_image_memory(*image, self.handle, 0)?)
}
} }
} }