impl: 3D Rendering
This commit is contained in:
parent
dbf9544e80
commit
70176bb86a
18 changed files with 862 additions and 185 deletions
|
|
@ -63,6 +63,10 @@ pub enum GfxHalError {
|
|||
/// Placeholder for other specific errors.
|
||||
#[error("An unexpected error occurred: {0}")]
|
||||
Other(String),
|
||||
|
||||
/// Size for Buffer is invalid.
|
||||
#[error("Buffer size is invalid.")]
|
||||
BufferSizeInvalid,
|
||||
}
|
||||
|
||||
pub type Result<T, E = GfxHalError> = std::result::Result<T, E>;
|
||||
|
|
|
|||
|
|
@ -6,3 +6,12 @@ pub mod queue;
|
|||
pub mod surface;
|
||||
pub mod swapchain;
|
||||
pub mod sync;
|
||||
|
||||
pub use device::*;
|
||||
pub use error::*;
|
||||
pub use instance::*;
|
||||
pub use physical_device::*;
|
||||
pub use queue::*;
|
||||
pub use surface::*;
|
||||
pub use swapchain::*;
|
||||
pub use sync::*;
|
||||
|
|
|
|||
|
|
@ -65,18 +65,6 @@ impl Queue {
|
|||
submits: &[vk::SubmitInfo],
|
||||
signal_fence: Option<&Fence>,
|
||||
) -> Result<()> {
|
||||
debug_assert!(
|
||||
self.device.raw().handle() == submit_device_raw.handle(),
|
||||
"Queue::submit called with an ash::Device from a different logical VkDevice than the queue belongs to!"
|
||||
);
|
||||
// Optional: Check fence device consistency
|
||||
if let Some(fence) = signal_fence {
|
||||
debug_assert!(
|
||||
fence.device().raw().handle() == submit_device_raw.handle(),
|
||||
"Fence passed to Queue::submit belongs to a different logical device than submit_device_raw!"
|
||||
);
|
||||
}
|
||||
|
||||
let fence_handle = signal_fence.map_or(vk::Fence::null(), |f| f.handle());
|
||||
|
||||
// Keep the lock for thread-safety on the VkQueue object itself
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ use crate::{
|
|||
/// Wraps a `vk::Fence`, used for CPU-GPU synchronization.
|
||||
///
|
||||
/// Owns the `vk::Fence` handle.
|
||||
#[derive(Clone)]
|
||||
pub struct Fence {
|
||||
device: Arc<Device>,
|
||||
fence: vk::Fence,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue