Refactor VK layer handling and add logging improvements
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
Refactored VK layer handling by changing return type of `use_layers` to `Vec<CString>`, adjusting subsequent usage of layers. Implemented `Display` for `VkPhysicalDevice` for better logging. Enhanced application initialization with detailed window attributes. Transitioned to using `log::info` for consistent logging.
This commit is contained in:
parent
f52832e0e5
commit
4048937a6c
5 changed files with 43 additions and 19 deletions
|
@ -15,9 +15,11 @@ impl VkInstance {
|
|||
|
||||
// Layers
|
||||
let layers = use_layers(&entry, vec![
|
||||
"VK_LAYER_KHRONOS_validation",
|
||||
"VK_LAYER_MANGOHUD_overlay_x86_64",
|
||||
"VK_LAYER_NV_optimus"
|
||||
]);
|
||||
let layers_raw = layers.iter().map(|s| s.as_ptr()).collect::<Vec<_>>();
|
||||
|
||||
// Extensions
|
||||
let mut extension_names =
|
||||
|
@ -50,7 +52,7 @@ impl VkInstance {
|
|||
// Instance Info
|
||||
let create_info = vk::InstanceCreateInfo::default()
|
||||
.application_info(&appinfo)
|
||||
.enabled_layer_names(&layers)
|
||||
.enabled_layer_names(&layers_raw)
|
||||
.enabled_extension_names(&extension_names)
|
||||
.flags(create_flags);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue