Expand description
§Vulkan Profiles Library
https://github.com/KhronosGroup/Vulkan-Profiles
§Examples
use ash::vk;
use vk_profiles_rs::{profiles, vp};
// Load the function pointers
let vk_profiles = vk_profiles_rs::VulkanProfiles::linked();
// Select the LunarG minimum Vulkan 1.3 profile and test instance support
let profile = profiles::LunargMinimumRequirements1_3::profile_properties();
assert!(unsafe { vk_profiles.get_instance_profile_support(None, &profile)? });
let instance_info = vk::InstanceCreateInfo::default();
let profiles = [profile];
let vp_instance_info = vp::InstanceCreateInfo::default()
.create_info(&instance_info)
.enabled_full_profiles(&profiles);
let entry = ash::Entry::linked();
// The created instance is a standard [ash::Instance]
let instance = unsafe { vk_profiles.create_instance(&entry, &vp_instance_info, None)? };§Ash design patterns
This crate uses ash design patterns wherever possible to allow for seamless usage. Structs have builder versions, enums use the same constructs etc.
§Important notes
Currently only static linking is supported. This means that the vulkan loader must also be statically linked in ash.
Modules§
Structs§
- Vulkan
Profiles - A wrapper struct that provides access to the vulkan profiles functions.