log: Remove vulkan target
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s
Some checks failed
Build legacy Nix package on Ubuntu / build (push) Failing after 0s
This commit is contained in:
parent
fc4a856048
commit
891835c4af
8 changed files with 52 additions and 50 deletions
|
@ -1,5 +1,5 @@
|
|||
use crate::vulkan::utils::layers::{use_layers, LayersSelector};
|
||||
use crate::vulkan::{VkPhysicalDevice, LOG_TARGET};
|
||||
use crate::vulkan::VkPhysicalDevice;
|
||||
use ash::khr::surface;
|
||||
use ash::{vk, Entry, Instance};
|
||||
use std::ffi::{c_char, CStr, CString};
|
||||
|
@ -14,9 +14,9 @@ impl VkInstance {
|
|||
pub fn new(required_extensions: &Vec<*const c_char>) -> Self {
|
||||
let entry = Entry::linked();
|
||||
|
||||
log::debug!(target: LOG_TARGET, "Initializing Vulkan instance");
|
||||
log::debug!("Initializing Vulkan instance");
|
||||
|
||||
if log::log_enabled!(target: LOG_TARGET, log::Level::Debug) {
|
||||
if log::log_enabled!(log::Level::Debug) {
|
||||
let layer_properties =
|
||||
unsafe { entry.enumerate_instance_layer_properties() }.unwrap_or_default();
|
||||
|
||||
|
@ -27,7 +27,7 @@ impl VkInstance {
|
|||
)
|
||||
}
|
||||
.unwrap_or_default();
|
||||
log::debug!(target: LOG_TARGET, "{layer_property:#?} {layer_extensions:#?}");
|
||||
log::debug!("{layer_property:#?} {layer_extensions:#?}");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,10 @@ impl VkInstance {
|
|||
.map(|str| unsafe { CStr::from_ptr(*str) })
|
||||
.map(|cstr| cstr.to_string_lossy())
|
||||
.collect::<Vec<_>>();
|
||||
log::debug!(target: LOG_TARGET, "Required instance extensions: {}", required_extensions.join(", "));
|
||||
log::debug!(
|
||||
"Required instance extensions: {}",
|
||||
required_extensions.join(", ")
|
||||
);
|
||||
}
|
||||
|
||||
// Layers
|
||||
|
@ -58,7 +61,7 @@ impl VkInstance {
|
|||
.iter()
|
||||
.map(|layer| layer.to_string_lossy())
|
||||
.collect::<Vec<_>>();
|
||||
log::debug!(target: LOG_TARGET, "Selected debug layers : {}", layers.join(", "))
|
||||
log::debug!("Selected debug layers : {}", layers.join(", "))
|
||||
}
|
||||
|
||||
let layers_raw = layers.iter().map(|s| s.as_ptr()).collect::<Vec<_>>();
|
||||
|
@ -93,7 +96,7 @@ impl VkInstance {
|
|||
|
||||
let surface_loader = surface::Instance::new(&entry, &instance);
|
||||
|
||||
log::debug!(target: LOG_TARGET, "Vulkan instance created ({:?})", instance.handle());
|
||||
log::debug!("Vulkan instance created ({:?})", instance.handle());
|
||||
|
||||
Self {
|
||||
entry,
|
||||
|
@ -117,6 +120,6 @@ impl Drop for VkInstance {
|
|||
unsafe {
|
||||
self.handle.destroy_instance(None);
|
||||
}
|
||||
log::debug!(target: LOG_TARGET, "Vulkan instance destroyed ({:?})", self.handle.handle());
|
||||
log::debug!("Vulkan instance destroyed ({:?})", self.handle.handle());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue