pub use ash;
pub use log;
pub use seq_macro;
pub const NONZEROU32_ONE: std::num::NonZeroU32 = unsafe { std::num::NonZeroU32::new_unchecked(1) };
#[macro_use]
pub mod util;
pub mod command;
pub mod descriptor;
pub mod device;
pub mod entry;
pub mod framebuffer;
pub mod instance;
pub mod memory;
pub mod physical_device;
pub mod pipeline;
pub mod prelude;
pub mod queue;
pub mod render_pass;
pub mod resource;
pub mod shader;
pub mod surface;
pub mod swapchain;
pub mod sync;
#[cfg(test)]
mod test {
pub fn setup_testing_logger() {
static LOGGER_INITIALIZED: std::sync::atomic::AtomicBool =
std::sync::atomic::AtomicBool::new(false);
if LOGGER_INITIALIZED.compare_and_swap(false, true, std::sync::atomic::Ordering::SeqCst)
== false
{
let logger = edwardium_logger::Logger::new(
[edwardium_logger::targets::stderr::StderrTarget::new(
log::Level::Trace
)],
std::time::Instant::now()
);
logger.init_boxed().expect("Could not initialize logger");
}
}
#[test]
fn debug() {
setup_testing_logger();
fn print_size<T>(name: &str) {
log::info!(
"{} size: {} align: {}",
name,
std::mem::size_of::<T>(),
std::mem::align_of::<T>()
);
}
print_size::<crate::memory::host::HostMemoryAllocator>("HostMemoryAllocator");
print_size::<ash::Instance>("ash::Instance");
print_size::<ash::Device>("ash::Instance");
print_size::<crate::instance::Instance>("Instance");
print_size::<crate::device::Device>("Device");
}
}