diff --git a/Cargo.toml b/Cargo.toml index 02bc7784..99bba67a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,3 @@ [workspace] -members = [ - "examples", - "vk-sys", - "vulkano", - "vulkano-shaders", - "vulkano-win" -] - -exclude = [ - "www" -] +members = ["examples", "vk-sys", "vulkano", "vulkano-shaders", "vulkano-win"] +exclude = ["www"] diff --git a/vulkano/Cargo.toml b/vulkano/Cargo.toml index bdbeb1aa..13b6ee1f 100644 --- a/vulkano/Cargo.toml +++ b/vulkano/Cargo.toml @@ -14,7 +14,9 @@ readme = "../README.md" build = "build.rs" [dependencies] -ash = "0.32" +# When updating Ash, also update vk.xml to the same Vulkan patch version that Ash uses. +# All versions of vk.xml can be found at https://github.com/KhronosGroup/Vulkan-Headers/commits/master/registry/vk.xml. +ash = "0.32.1" crossbeam-queue = "0.3" fnv = "1.0" half = "1.7" @@ -22,3 +24,9 @@ lazy_static = "1.4" parking_lot = { version = "0.11.1", features = ["send_guard"] } shared_library = "0.1" smallvec = "1.6" + +[build-dependencies] +heck = "0.3" +indexmap = "1.6" +regex = "1.5" +vk-parse = "0.6" diff --git a/vulkano/autogen/extensions.rs b/vulkano/autogen/extensions.rs new file mode 100644 index 00000000..4db67479 --- /dev/null +++ b/vulkano/autogen/extensions.rs @@ -0,0 +1,399 @@ +// Copyright (c) 2021 The Vulkano developers +// Licensed under the Apache License, Version 2.0 +// or the MIT +// license , +// at your option. All files in the project carrying such +// notice may not be copied, modified, or distributed except +// according to those terms. + +use heck::SnakeCase; +use indexmap::IndexMap; +use std::io::Write; +use vk_parse::Extension; + +// This is not included in vk.xml, so it's added here manually +fn required_if_supported(name: &str) -> bool { + match name { + "VK_KHR_portability_subset" => true, + _ => false, + } +} + +fn conflicts_extensions(name: &str) -> &'static [&'static str] { + match name { + "VK_KHR_buffer_device_address" => &["VK_EXT_buffer_device_address"], + "VK_EXT_buffer_device_address" => &["VK_KHR_buffer_device_address"], + _ => &[], + } +} + +pub fn write(writer: &mut W, extensions: &IndexMap<&str, &Extension>) { + write_device_extensions(writer, make_vulkano_extensions("device", &extensions)); + write!(writer, "\n\n").unwrap(); + write_instance_extensions(writer, make_vulkano_extensions("instance", &extensions)); +} + +#[derive(Clone, Debug)] +struct VulkanoExtension { + member: String, + raw: String, + requires_core: (u16, u16), + requires_device_extensions: Vec, + requires_instance_extensions: Vec, + required_if_supported: bool, + conflicts_device_extensions: Vec, + status: Option, +} + +#[derive(Clone, Debug)] +enum Replacement { + Core((u16, u16)), + DeviceExtension(String), + InstanceExtension(String), +} + +#[derive(Clone, Debug)] +enum ExtensionStatus { + Promoted(Replacement), + Deprecated(Option), +} + +fn make_vulkano_extensions( + ty: &str, + extensions: &IndexMap<&str, &Extension>, +) -> Vec { + extensions + .values() + .filter(|ext| ext.ext_type.as_ref().unwrap() == ty) + .map(|ext| { + let raw = ext.name.to_owned(); + let member = raw.strip_prefix("VK_").unwrap().to_snake_case(); + let (major, minor) = ext + .requires_core + .as_ref() + .map(|s| s.as_str()) + .unwrap_or("1.0") + .split_once('.') + .unwrap(); + let requires_extensions: Vec<_> = ext + .requires + .as_ref() + .map(|s| s.split(',').collect()) + .unwrap_or_default(); + let conflicts_extensions = conflicts_extensions(&ext.name); + + VulkanoExtension { + member: member.clone(), + raw, + requires_core: (major.parse().unwrap(), minor.parse().unwrap()), + requires_device_extensions: requires_extensions + .iter() + .filter(|&&vk_name| extensions[vk_name].ext_type.as_ref().unwrap() == "device") + .map(|vk_name| vk_name.strip_prefix("VK_").unwrap().to_snake_case()) + .collect(), + requires_instance_extensions: requires_extensions + .iter() + .filter(|&&vk_name| { + extensions[vk_name].ext_type.as_ref().unwrap() == "instance" + }) + .map(|vk_name| vk_name.strip_prefix("VK_").unwrap().to_snake_case()) + .collect(), + required_if_supported: required_if_supported(ext.name.as_str()), + conflicts_device_extensions: conflicts_extensions + .iter() + .filter(|&&vk_name| extensions[vk_name].ext_type.as_ref().unwrap() == "device") + .map(|vk_name| vk_name.strip_prefix("VK_").unwrap().to_snake_case()) + .collect(), + status: ext + .promotedto + .as_ref() + .map(|s| s.as_str()) + .and_then(|pr| { + if let Some(version) = pr.strip_prefix("VK_VERSION_") { + let (major, minor) = version.split_once('_').unwrap(); + Some(ExtensionStatus::Promoted(Replacement::Core(( + major.parse().unwrap(), + minor.parse().unwrap(), + )))) + } else { + let member = pr.strip_prefix("VK_").unwrap().to_snake_case(); + match extensions[pr].ext_type.as_ref().unwrap().as_str() { + "device" => Some(ExtensionStatus::Promoted( + Replacement::DeviceExtension(member), + )), + "instance" => Some(ExtensionStatus::Promoted( + Replacement::InstanceExtension(member), + )), + _ => unreachable!(), + } + } + }) + .or_else(|| { + ext.deprecatedby + .as_ref() + .map(|s| s.as_str()) + .and_then(|depr| { + if depr.is_empty() { + Some(ExtensionStatus::Deprecated(None)) + } else if let Some(version) = depr.strip_prefix("VK_VERSION_") { + let (major, minor) = version.split_once('_').unwrap(); + Some(ExtensionStatus::Deprecated(Some(Replacement::Core(( + major.parse().unwrap(), + minor.parse().unwrap(), + ))))) + } else { + let member = depr.strip_prefix("VK_").unwrap().to_snake_case(); + match extensions[depr].ext_type.as_ref().unwrap().as_str() { + "device" => Some(ExtensionStatus::Deprecated(Some( + Replacement::DeviceExtension(member), + ))), + "instance" => Some(ExtensionStatus::Deprecated(Some( + Replacement::InstanceExtension(member), + ))), + _ => unreachable!(), + } + } + }) + }), + } + }) + .collect() +} + +fn write_device_extensions(writer: &mut W, extensions: I) +where + W: Write, + I: IntoIterator, +{ + write!(writer, "crate::device::extensions::device_extensions! {{").unwrap(); + for ext in extensions { + write!(writer, "\n\t{} => {{", ext.member).unwrap(); + write_doc(writer, &ext); + write!(writer, "\n\t\traw: b\"{}\",", ext.raw).unwrap(); + write!( + writer, + "\n\t\trequires_core: crate::Version::V{}_{},", + ext.requires_core.0, ext.requires_core.1 + ) + .unwrap(); + write!( + writer, + "\n\t\trequires_device_extensions: [{}],", + ext.requires_device_extensions.join(", ") + ) + .unwrap(); + write!( + writer, + "\n\t\trequires_instance_extensions: [{}],", + ext.requires_instance_extensions.join(", ") + ) + .unwrap(); + write!( + writer, + "\n\t\trequired_if_supported: {},", + ext.required_if_supported + ) + .unwrap(); + write!( + writer, + "\n\t\tconflicts_device_extensions: [{}],", + ext.conflicts_device_extensions.join(", ") + ) + .unwrap(); + + /*if let Some(promoted_to_core) = ext.promoted_to_core { + write!( + writer, + "\n\t\tpromoted_to_core: Some(Version::V{}_{}),", + promoted_to_core.0, promoted_to_core.1 + ) + .unwrap(); + } else { + write!(writer, "\n\t\tpromoted_to_core: None,",).unwrap(); + }*/ + + write!(writer, "\n\t}},").unwrap(); + } + write!(writer, "\n}}").unwrap(); +} + +fn write_instance_extensions(writer: &mut W, extensions: I) +where + W: Write, + I: IntoIterator, +{ + write!( + writer, + "crate::instance::extensions::instance_extensions! {{" + ) + .unwrap(); + for ext in extensions { + write!(writer, "\n\t{} => {{", ext.member).unwrap(); + write_doc(writer, &ext); + write!(writer, "\n\t\traw: b\"{}\",", ext.raw).unwrap(); + write!( + writer, + "\n\t\trequires_core: crate::Version::V{}_{},", + ext.requires_core.0, ext.requires_core.1 + ) + .unwrap(); + write!( + writer, + "\n\t\trequires_extensions: [{}],", + ext.requires_instance_extensions.join(", ") + ) + .unwrap(); + + /*if let Some(promoted_to_core) = ext.promoted_to_core { + write!( + writer, + "\n\t\tpromoted_to_core: Some(crate::Version::V{}_{}),", + promoted_to_core.0, promoted_to_core.1 + ) + .unwrap(); + } else { + write!(writer, "\n\t\tpromoted_to_core: None,",).unwrap(); + }*/ + + write!(writer, "\n\t}},").unwrap(); + } + write!(writer, "\n}}").unwrap(); +} + +fn write_doc(writer: &mut W, ext: &VulkanoExtension) +where + W: Write, +{ + write!(writer, "\n\t\tdoc: \"\n\t\t\t- [Vulkan documentation](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/{}.html)", ext.raw).unwrap(); + + if ext.requires_core != (1, 0) { + write!( + writer, + "\n\t\t\t- Requires Vulkan {}.{}", + ext.requires_core.0, ext.requires_core.1 + ) + .unwrap(); + } + + if !ext.requires_device_extensions.is_empty() { + let links: Vec<_> = ext + .requires_device_extensions + .iter() + .map(|ext| format!("[`{}`](crate::device::DeviceExtensions::{0})", ext)) + .collect(); + write!( + writer, + "\n\t\t\t- Requires device extension{}: {}", + if ext.requires_device_extensions.len() > 1 { + "s" + } else { + "" + }, + links.join(", ") + ) + .unwrap(); + } + + if !ext.requires_instance_extensions.is_empty() { + let links: Vec<_> = ext + .requires_instance_extensions + .iter() + .map(|ext| format!("[`{}`](crate::instance::InstanceExtensions::{0})", ext)) + .collect(); + write!( + writer, + "\n\t\t\t- Requires instance extension{}: {}", + if ext.requires_instance_extensions.len() > 1 { + "s" + } else { + "" + }, + links.join(", ") + ) + .unwrap(); + } + + if ext.required_if_supported { + write!( + writer, + "\n\t\t\t- Must be enabled if it is supported by the physical device", + ) + .unwrap(); + } + + if !ext.conflicts_device_extensions.is_empty() { + let links: Vec<_> = ext + .conflicts_device_extensions + .iter() + .map(|ext| format!("[`{}`](crate::device::DeviceExtensions::{0})", ext)) + .collect(); + write!( + writer, + "\n\t\t\t- Conflicts with device extension{}: {}", + if ext.conflicts_device_extensions.len() > 1 { + "s" + } else { + "" + }, + links.join(", ") + ) + .unwrap(); + } + + if let Some(status) = ext.status.as_ref() { + match status { + ExtensionStatus::Promoted(replacement) => { + write!(writer, "\n\t\t\t- Promoted to ",).unwrap(); + + match replacement { + Replacement::Core(version) => { + write!(writer, "Vulkan {}.{}", version.0, version.1).unwrap(); + } + Replacement::DeviceExtension(ext) => { + write!(writer, "[`{}`](crate::device::DeviceExtensions::{0})", ext) + .unwrap(); + } + Replacement::InstanceExtension(ext) => { + write!( + writer, + "[`{}`](crate::instance::InstanceExtensions::{0})", + ext + ) + .unwrap(); + } + } + } + ExtensionStatus::Deprecated(replacement) => { + write!(writer, "\n\t\t\t- Deprecated ",).unwrap(); + + match replacement { + Some(Replacement::Core(version)) => { + write!(writer, "by Vulkan {}.{}", version.0, version.1).unwrap(); + } + Some(Replacement::DeviceExtension(ext)) => { + write!( + writer, + "by [`{}`](crate::device::DeviceExtensions::{0})", + ext + ) + .unwrap(); + } + Some(Replacement::InstanceExtension(ext)) => { + write!( + writer, + "by [`{}`](crate::instance::InstanceExtensions::{0})", + ext + ) + .unwrap(); + } + None => { + write!(writer, "without a replacement").unwrap(); + } + } + } + } + } + + write!(writer, "\n\t\t\",").unwrap(); +} diff --git a/vulkano/autogen/features.rs b/vulkano/autogen/features.rs new file mode 100644 index 00000000..afec0e1b --- /dev/null +++ b/vulkano/autogen/features.rs @@ -0,0 +1,384 @@ +// Copyright (c) 2021 The Vulkano developers +// Licensed under the Apache License, Version 2.0 +// or the MIT +// license , +// at your option. All files in the project carrying such +// notice may not be copied, modified, or distributed except +// according to those terms. + +use heck::SnakeCase; +use regex::Regex; +use std::{ + collections::{hash_map::Entry, HashMap}, + io::Write, +}; +use vk_parse::{Type, TypeMember, TypeMemberMarkup, TypeSpec}; + +// This is not included in vk.xml, so it's added here manually +fn requires_features(name: &str) -> &'static [&'static str] { + match name { + "sparseImageInt64Atomics" => &["shaderImageInt64Atomics"], + "sparseImageFloat32Atomics" => &["shaderImageFloat32Atomics"], + "sparseImageFloat32AtomicAdd" => &["shaderImageFloat32AtomicAdd"], + _ => &[], + } +} + +fn conflicts_features(name: &str) -> &'static [&'static str] { + match name { + "shadingRateImage" => &[ + "pipelineFragmentShadingRate", + "primitiveFragmentShadingRate", + "attachmentFragmentShadingRate", + ], + "fragmentDensityMap" => &[ + "pipelineFragmentShadingRate", + "primitiveFragmentShadingRate", + "attachmentFragmentShadingRate", + ], + "pipelineFragmentShadingRate" => &["shadingRateImage", "fragmentDensityMap"], + "primitiveFragmentShadingRate" => &["shadingRateImage", "fragmentDensityMap"], + "attachmentFragmentShadingRate" => &["shadingRateImage", "fragmentDensityMap"], + _ => &[], + } +} + +fn required_by_extensions(name: &str) -> &'static [&'static str] { + match name { + "shaderDrawParameters" => &["VK_KHR_shader_draw_parameters"], + "drawIndirectCount" => &["VK_KHR_draw_indirect_count"], + "samplerMirrorClampToEdge" => &["VK_KHR_sampler_mirror_clamp_to_edge"], + "descriptorIndexing" => &["VK_EXT_descriptor_indexing"], + "samplerFilterMinmax" => &["VK_EXT_sampler_filter_minmax"], + "shaderOutputViewportIndex" => &["VK_EXT_shader_viewport_index_layer"], + "shaderOutputLayer" => &["VK_EXT_shader_viewport_index_layer"], + _ => &[], + } +} + +pub fn write(writer: &mut W, types: &HashMap<&str, (&Type, Vec<&str>)>) { + write!(writer, "crate::device::features::features! {{").unwrap(); + + for feat in make_vulkano_features(&types) { + write!(writer, "\n\t{} => {{", feat.member).unwrap(); + write_doc(writer, &feat); + write!(writer, "\n\t\tffi_name: {},", feat.ffi_name).unwrap(); + write!( + writer, + "\n\t\tffi_members: [{}],", + feat.ffi_members.join(", ") + ) + .unwrap(); + write!( + writer, + "\n\t\trequires_features: [{}],", + feat.requires_features.join(", ") + ) + .unwrap(); + write!( + writer, + "\n\t\tconflicts_features: [{}],", + feat.conflicts_features.join(", ") + ) + .unwrap(); + write!( + writer, + "\n\t\trequired_by_extensions: [{}],", + feat.required_by_extensions.join(", ") + ) + .unwrap(); + write!(writer, "\n\t}},").unwrap(); + } + + write!( + writer, + "\n}}\n\ncrate::device::features::features_ffi! {{\n\tapi_version,\n\textensions," + ) + .unwrap(); + + for ffi in make_vulkano_features_ffi(&types) { + write!(writer, "\n\t{} => {{", ffi.member).unwrap(); + write!(writer, "\n\t\tty: {},", ffi.ty).unwrap(); + write!( + writer, + "\n\t\tprovided_by: [{}],", + ffi.provided_by.join(", ") + ) + .unwrap(); + write!(writer, "\n\t\tconflicts: [{}],", ffi.conflicts.join(", ")).unwrap(); + write!(writer, "\n\t}},").unwrap(); + } + + write!(writer, "\n}}").unwrap(); +} + +#[derive(Clone, Debug)] +struct VulkanoFeature { + member: String, + vulkan_doc: String, + ffi_name: String, + ffi_members: Vec, + requires_features: Vec, + conflicts_features: Vec, + required_by_extensions: Vec, +} + +fn make_vulkano_features(types: &HashMap<&str, (&Type, Vec<&str>)>) -> Vec { + let mut features = HashMap::new(); + std::iter::once(&types["VkPhysicalDeviceFeatures"]) + .chain(sorted_structs(types).into_iter()) + .filter(|(ty, _)| { + ty.name.as_ref().map(|s| s.as_str()) == Some("VkPhysicalDeviceFeatures") + || ty.structextends.as_ref().map(|s| s.as_str()) + == Some("VkPhysicalDeviceFeatures2,VkDeviceCreateInfo") + }) + .for_each(|(ty, _)| { + let vulkan_ty_name = ty.name.as_ref().unwrap(); + + let ty_name = if vulkan_ty_name == "VkPhysicalDeviceFeatures" { + "features_vulkan10.features".to_owned() + } else { + ffi_member(vulkan_ty_name) + }; + + members(ty).into_iter().for_each(|name| { + let member = name.to_snake_case(); + match features.entry(member.clone()) { + Entry::Vacant(entry) => { + let requires_features = requires_features(name); + let conflicts_features = conflicts_features(name); + let required_by_extensions = required_by_extensions(name); + + entry.insert(VulkanoFeature { + member: member.clone(), + vulkan_doc: format!("{}.html#features-{}", vulkan_ty_name, name), + ffi_name: member, + ffi_members: vec![ty_name.to_owned()], + requires_features: requires_features + .into_iter() + .map(|&s| s.to_snake_case()) + .collect(), + conflicts_features: conflicts_features + .into_iter() + .map(|&s| s.to_snake_case()) + .collect(), + required_by_extensions: required_by_extensions + .iter() + .map(|vk_name| vk_name.strip_prefix("VK_").unwrap().to_snake_case()) + .collect(), + }); + } + Entry::Occupied(entry) => { + entry.into_mut().ffi_members.push(ty_name.to_owned()); + } + }; + }); + }); + + let mut names: Vec<_> = features.values().map(|feat| feat.member.clone()).collect(); + names.sort_unstable(); + names + .into_iter() + .map(|name| features.remove(&name).unwrap()) + .collect() +} + +fn write_doc(writer: &mut W, feat: &VulkanoFeature) +where + W: Write, +{ + write!(writer, "\n\t\tdoc: \"\n\t\t\t- [Vulkan documentation](https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/{})", feat.vulkan_doc).unwrap(); + + if !feat.requires_features.is_empty() { + let links: Vec<_> = feat + .requires_features + .iter() + .map(|ext| format!("[`{}`](crate::device::Features::{0})", ext)) + .collect(); + write!( + writer, + "\n\t\t\t- Requires feature{}: {}", + if feat.requires_features.len() > 1 { + "s" + } else { + "" + }, + links.join(", ") + ) + .unwrap(); + } + + if !feat.required_by_extensions.is_empty() { + let links: Vec<_> = feat + .required_by_extensions + .iter() + .map(|ext| format!("[`{}`](crate::device::DeviceExtensions::{0})", ext)) + .collect(); + write!( + writer, + "\n\t\t\t- Required by device extension{}: {}", + if feat.required_by_extensions.len() > 1 { + "s" + } else { + "" + }, + links.join(", ") + ) + .unwrap(); + } + + if !feat.conflicts_features.is_empty() { + let links: Vec<_> = feat + .conflicts_features + .iter() + .map(|ext| format!("[`{}`](crate::device::Features::{0})", ext)) + .collect(); + write!( + writer, + "\n\t\t\t- Conflicts with feature{}: {}", + if feat.conflicts_features.len() > 1 { + "s" + } else { + "" + }, + links.join(", ") + ) + .unwrap(); + } + + write!(writer, "\n\t\t\",").unwrap(); +} + +#[derive(Clone, Debug)] +struct VulkanoFeatureFfi { + member: String, + ty: String, + provided_by: Vec, + conflicts: Vec, +} + +fn make_vulkano_features_ffi(types: &HashMap<&str, (&Type, Vec<&str>)>) -> Vec { + let mut feature_included_in: HashMap<&str, Vec<&str>> = HashMap::new(); + sorted_structs(types) + .into_iter() + .map(|(ty, provided_by)| { + let name = ty.name.as_ref().unwrap(); + let provided_by = provided_by + .iter() + .map(|provided_by| { + if let Some(version) = provided_by.strip_prefix("VK_VERSION_") { + format!("api_version >= crate::Version::V{}", version) + } else { + format!( + "extensions.{}", + provided_by + .strip_prefix("VK_") + .unwrap() + .to_ascii_lowercase() + ) + } + }) + .collect(); + let mut conflicts = vec![]; + members(ty) + .into_iter() + .for_each(|member| match feature_included_in.entry(member) { + Entry::Vacant(entry) => { + entry.insert(vec![name]); + } + Entry::Occupied(entry) => { + let conflicters = entry.into_mut(); + conflicters.iter().for_each(|conflicter| { + let conflicter = ffi_member(conflicter); + if !conflicts.contains(&conflicter) { + conflicts.push(conflicter); + } + }); + conflicters.push(name); + } + }); + + VulkanoFeatureFfi { + member: ffi_member(name), + ty: name.strip_prefix("Vk").unwrap().to_owned(), + provided_by, + conflicts, + } + }) + .collect() +} + +fn sorted_structs<'a>( + types: &'a HashMap<&str, (&'a Type, Vec<&'a str>)>, +) -> Vec<&'a (&'a Type, Vec<&'a str>)> { + let mut structs: Vec<_> = types + .values() + .filter(|(ty, _)| { + ty.structextends.as_ref().map(|s| s.as_str()) + == Some("VkPhysicalDeviceFeatures2,VkDeviceCreateInfo") + }) + .collect(); + let regex = Regex::new(r"^VkPhysicalDeviceVulkan\d+Features$").unwrap(); + structs.sort_unstable_by_key(|&(ty, provided_by)| { + let name = ty.name.as_ref().unwrap(); + ( + !regex.is_match(name), + if let Some(version) = provided_by + .iter() + .find_map(|s| s.strip_prefix("VK_VERSION_")) + { + let (major, minor) = version.split_once('_').unwrap(); + major.parse::().unwrap() << 22 | minor.parse::().unwrap() << 12 + } else if provided_by + .iter() + .find(|s| s.starts_with("VK_KHR_")) + .is_some() + { + i32::MAX - 2 + } else if provided_by + .iter() + .find(|s| s.starts_with("VK_EXT_")) + .is_some() + { + i32::MAX - 1 + } else { + i32::MAX + }, + name, + ) + }); + + structs +} + +fn ffi_member(ty_name: &str) -> String { + let ty_name = ty_name + .strip_prefix("VkPhysicalDevice") + .unwrap() + .to_snake_case(); + let (base, suffix) = ty_name.rsplit_once("_features").unwrap(); + format!("features_{}{}", base, suffix) +} + +fn members(ty: &Type) -> Vec<&str> { + if let TypeSpec::Members(members) = &ty.spec { + members + .iter() + .filter_map(|member| { + if let TypeMember::Definition(def) = member { + let name = def.markup.iter().find_map(|markup| match markup { + TypeMemberMarkup::Name(name) => Some(name.as_str()), + _ => None, + }); + if name != Some("sType") && name != Some("pNext") { + return name; + } + } + None + }) + .collect() + } else { + vec![] + } +} diff --git a/vulkano/autogen/fns.rs b/vulkano/autogen/fns.rs new file mode 100644 index 00000000..da25938b --- /dev/null +++ b/vulkano/autogen/fns.rs @@ -0,0 +1,79 @@ +// Copyright (c) 2021 The Vulkano developers +// Licensed under the Apache License, Version 2.0 +// or the MIT +// license , +// at your option. All files in the project carrying such +// notice may not be copied, modified, or distributed except +// according to those terms. + +use heck::{CamelCase, SnakeCase}; +use indexmap::IndexMap; +use std::io::Write; +use vk_parse::{Extension, ExtensionChild, InterfaceItem}; + +pub fn write(writer: &mut W, extensions: &IndexMap<&str, &Extension>) { + write_fns(writer, std::iter::empty(), "Entry"); + write!(writer, "\n\n").unwrap(); + write_fns( + writer, + make_vulkano_extension_fns("instance", &extensions), + "Instance", + ); + write!(writer, "\n\n").unwrap(); + write_fns( + writer, + make_vulkano_extension_fns("device", &extensions), + "Device", + ); +} + +#[derive(Clone, Debug)] +struct VulkanoFns { + member: String, + fn_struct: String, +} + +fn make_vulkano_extension_fns( + ty: &str, + extensions: &IndexMap<&str, &Extension>, +) -> Vec { + extensions + .values() + .filter(|ext| ext.ext_type.as_ref().unwrap() == ty) + // Filter only extensions that have functions + .filter(|ext| { + ext.children.iter().any(|ch| { + if let ExtensionChild::Require { items, .. } = ch { + items + .iter() + .any(|i| matches!(i, InterfaceItem::Command { .. })) + } else { + false + } + }) + }) + .map(|ext| { + let member = ext.name.strip_prefix("VK_").unwrap().to_snake_case(); + let fn_struct = member.to_camel_case() + "Fn"; + VulkanoFns { member, fn_struct } + }) + .collect() +} + +fn write_fns(writer: &mut W, extension_fns: I, ty: &str) +where + W: Write, + I: IntoIterator, +{ + write!(writer, "crate::fns::fns!({}Functions, {{", ty).unwrap(); + + for version in std::array::IntoIter::new(["1_0", "1_1", "1_2"]) { + write!(writer, "\n\tv{} => {}FnV{0},", version, ty).unwrap(); + } + + for ext in extension_fns { + write!(writer, "\n\t{} => {},", ext.member, ext.fn_struct).unwrap(); + } + write!(writer, "\n}});").unwrap(); +} diff --git a/vulkano/autogen/mod.rs b/vulkano/autogen/mod.rs new file mode 100644 index 00000000..2adb3def --- /dev/null +++ b/vulkano/autogen/mod.rs @@ -0,0 +1,212 @@ +// Copyright (c) 2021 The Vulkano developers +// Licensed under the Apache License, Version 2.0 +// or the MIT +// license , +// at your option. All files in the project carrying such +// notice may not be copied, modified, or distributed except +// according to those terms. + +use indexmap::IndexMap; +use std::{collections::HashMap, io::Write, path::Path}; +use vk_parse::{ + Extension, ExtensionChild, Feature, InterfaceItem, Registry, RegistryChild, Type, + TypeCodeMarkup, TypeSpec, TypesChild, +}; + +mod extensions; +mod features; +mod fns; + +pub fn write(writer: &mut W) { + let registry = get_registry("vk.xml"); + let aliases = get_aliases(®istry); + let extensions = get_extensions(®istry); + let features = get_features(®istry); + let types = get_types(®istry, &aliases, &features, &extensions); + let header_version = get_header_version(®istry); + + write!( + writer, + "\ + // This file is auto-generated by vulkano-gen from vk.xml header version {}.\n\ + // It should not be edited manually. Changes should be made by editing vulkano-gen.\n\ + \n", + header_version + ) + .unwrap(); + + extensions::write(writer, &extensions); + write!(writer, "\n\n").unwrap(); + fns::write(writer, &extensions); + write!(writer, "\n\n").unwrap(); + features::write(writer, &types); + write!(writer, "\n").unwrap(); +} + +fn get_registry + ?Sized>(path: &P) -> Registry { + let (registry, errors) = vk_parse::parse_file(path.as_ref()).unwrap(); + + if !errors.is_empty() { + eprintln!("The following errors were found while parsing the file:"); + + for error in errors { + eprintln!("{:?}", error); + } + } + + registry +} + +fn get_aliases(registry: &Registry) -> HashMap<&str, &str> { + registry + .0 + .iter() + .filter_map(|child| { + if let RegistryChild::Types(types) = child { + return Some(types.children.iter().filter_map(|ty| { + if let TypesChild::Type(ty) = ty { + if let Some(alias) = ty.alias.as_ref().map(|s| s.as_str()) { + return Some((ty.name.as_ref().unwrap().as_str(), alias)); + } + } + None + })); + } + None + }) + .flatten() + .collect() +} + +fn get_extensions(registry: &Registry) -> IndexMap<&str, &Extension> { + let iter = registry + .0 + .iter() + .filter_map(|child| { + if let RegistryChild::Extensions(ext) = child { + return Some(ext.children.iter().filter_map(|ext| { + if ext.supported.as_ref().map(|s| s.as_str()) == Some("vulkan") + && ext.obsoletedby.is_none() + { + return Some(ext); + } + None + })); + } + None + }) + .flatten(); + + let extensions: HashMap<&str, &Extension> = + iter.clone().map(|ext| (ext.name.as_str(), ext)).collect(); + let mut names: Vec<_> = iter.map(|ext| ext.name.as_str()).collect(); + names.sort_unstable_by_key(|name| { + if name.starts_with("VK_KHR_") { + (0, name.to_owned()) + } else if name.starts_with("VK_EXT_") { + (1, name.to_owned()) + } else { + (2, name.to_owned()) + } + }); + + names.iter().map(|&name| (name, extensions[name])).collect() +} + +fn get_features(registry: &Registry) -> IndexMap<&str, &Feature> { + registry + .0 + .iter() + .filter_map(|child| { + if let RegistryChild::Feature(feat) = child { + return Some((feat.name.as_str(), feat)); + } + + None + }) + .collect() +} + +fn get_types<'a>( + registry: &'a Registry, + aliases: &'a HashMap<&str, &str>, + features: &'a IndexMap<&str, &Feature>, + extensions: &'a IndexMap<&str, &Extension>, +) -> HashMap<&'a str, (&'a Type, Vec<&'a str>)> { + let mut types: HashMap<&str, (&Type, Vec<&str>)> = registry + .0 + .iter() + .filter_map(|child| { + if let RegistryChild::Types(types) = child { + return Some(types.children.iter().filter_map(|ty| { + if let TypesChild::Type(ty) = ty { + if ty.alias.is_none() { + return ty.name.as_ref().map(|name| (name.as_str(), (ty, vec![]))); + } + } + None + })); + } + None + }) + .flatten() + .collect(); + + features + .iter() + .map(|(name, feature)| (name, &feature.children)) + .chain(extensions.iter().map(|(name, ext)| (name, &ext.children))) + .for_each(|(provided_by, children)| { + children + .iter() + .filter_map(|child| { + if let ExtensionChild::Require { items, .. } = child { + return Some(items.iter()); + } + None + }) + .flatten() + .filter_map(|item| { + if let InterfaceItem::Type { name, .. } = item { + return Some(name.as_str()); + } + None + }) + .for_each(|item_name| { + let item_name = aliases.get(item_name).unwrap_or(&item_name); + if let Some(ty) = types.get_mut(item_name) { + if !ty.1.contains(provided_by) { + ty.1.push(provided_by); + } + } + }); + }); + + types + .into_iter() + .filter(|(_key, val)| !val.1.is_empty()) + .collect() +} + +fn get_header_version(registry: &Registry) -> u16 { + registry.0.iter() + .find_map(|child| -> Option { + if let RegistryChild::Types(types) = child { + return types.children.iter().find_map(|ty| -> Option { + if let TypesChild::Type(ty) = ty { + if let TypeSpec::Code(code) = &ty.spec { + if code.markup.iter().any(|mkup| matches!(mkup, TypeCodeMarkup::Name(name) if name == "VK_HEADER_VERSION")) { + return Some(code.code.rsplit_once(' ').unwrap().1.parse().unwrap()); + } + } + } + + None + }); + } + + None + }) + .unwrap() +} diff --git a/vulkano/build.rs b/vulkano/build.rs index c8f3fcf6..0145ddff 100644 --- a/vulkano/build.rs +++ b/vulkano/build.rs @@ -7,7 +7,9 @@ // notice may not be copied, modified, or distributed except // according to those terms. -use std::env; +use std::{env, fs::File, io::BufWriter, path::Path}; + +mod autogen; fn main() { let target = env::var("TARGET").unwrap(); @@ -21,4 +23,9 @@ fn main() { println!("cargo:rustc-link-lib=framework=UIKit"); println!("cargo:rustc-link-lib=framework=Foundation"); } + + // Write autogen.rs + let path = Path::new(&env::var_os("OUT_DIR").unwrap()).join("autogen.rs"); + let mut writer = BufWriter::new(File::create(path).unwrap()); + autogen::write(&mut writer); } diff --git a/vulkano/src/buffer/sys.rs b/vulkano/src/buffer/sys.rs index 25ac01e7..169514cc 100644 --- a/vulkano/src/buffer/sys.rs +++ b/vulkano/src/buffer/sys.rs @@ -102,10 +102,7 @@ impl UnsafeBuffer { ash::vk::BufferCreateFlags::empty() }; - if usage.device_address - && !(device.enabled_features().buffer_device_address - || device.enabled_features().ext_buffer_device_address) - { + if usage.device_address && !device.enabled_features().buffer_device_address { usage.device_address = false; if ash::vk::BufferUsageFlags::from(usage).is_empty() { // return an error iff device_address was the only requested usage and the diff --git a/vulkano/src/device/extensions.rs b/vulkano/src/device/extensions.rs index c5544530..7203e281 100644 --- a/vulkano/src/device/extensions.rs +++ b/vulkano/src/device/extensions.rs @@ -7,146 +7,164 @@ // notice may not be copied, modified, or distributed except // according to those terms. -use std::collections::HashSet; -use std::ffi::{CStr, CString}; -use std::fmt; -use std::iter::FromIterator; -use std::ptr; -use std::str; - use crate::check_errors; -use crate::extensions::SupportedExtensionsError; +pub use crate::extensions::{ + ExtensionRestriction, ExtensionRestrictionError, SupportedExtensionsError, +}; use crate::instance::PhysicalDevice; use crate::VulkanObject; +use std::ffi::CStr; +use std::ptr; macro_rules! device_extensions { - ($sname:ident, $rawname:ident, [$($ext_req_if_supported:ident,)*], $($ext:ident => $s:expr,)*) => ( + ( + $($member:ident => { + doc: $doc:expr, + raw: $raw:expr, + requires_core: $requires_core:expr, + requires_device_extensions: [$($requires_device_extension:ident),*], + requires_instance_extensions: [$($requires_instance_extension:ident),*], + required_if_supported: $required_if_supported:expr, + conflicts_device_extensions: [$($conflicts_device_extension:ident),*], + },)* + ) => ( extensions! { - $sname, $rawname, - $( $ext => $s,)* + DeviceExtensions, + $( $member => { + doc: $doc, + raw: $raw, + requires_core: $requires_core, + requires_device_extensions: [$($requires_device_extension),*], + requires_instance_extensions: [$($requires_instance_extension),*], + },)* } - impl $rawname { - /// See the docs of supported_by_device(). - pub fn supported_by_device_raw(physical_device: PhysicalDevice) -> Result { - let fns = physical_device.instance().fns(); - - let properties: Vec = unsafe { - let mut num = 0; - check_errors(fns.v1_0.enumerate_device_extension_properties( - physical_device.internal_object(), ptr::null(), &mut num, ptr::null_mut() - ))?; - - let mut properties = Vec::with_capacity(num as usize); - check_errors(fns.v1_0.enumerate_device_extension_properties( - physical_device.internal_object(), ptr::null(), &mut num, properties.as_mut_ptr() - ))?; - properties.set_len(num as usize); - properties - }; - Ok($rawname(properties.iter().map(|x| unsafe { CStr::from_ptr(x.extension_name.as_ptr()) }.to_owned()).collect())) - } - - /// Returns an `Extensions` object with extensions supported by the `PhysicalDevice`. - pub fn supported_by_device(physical_device: PhysicalDevice) -> Self { - match $rawname::supported_by_device_raw(physical_device) { - Ok(l) => l, - Err(SupportedExtensionsError::LoadingError(_)) => unreachable!(), - Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), - } - } - } - - impl $sname { - /// See the docs of supported_by_device(). - pub fn supported_by_device_raw(physical_device: PhysicalDevice) -> Result { - let fns = physical_device.instance().fns(); - - let properties: Vec = unsafe { - let mut num = 0; - check_errors(fns.v1_0.enumerate_device_extension_properties( - physical_device.internal_object(), ptr::null(), &mut num, ptr::null_mut() - ))?; - - let mut properties = Vec::with_capacity(num as usize); - check_errors(fns.v1_0.enumerate_device_extension_properties( - physical_device.internal_object(), ptr::null(), &mut num, properties.as_mut_ptr() - ))?; - properties.set_len(num as usize); - properties - }; - - let mut extensions = $sname::none(); - for property in properties { - let name = unsafe { CStr::from_ptr(property.extension_name.as_ptr()) }; - $( - // TODO: Check specVersion? - if name.to_bytes() == &$s[..] { - extensions.$ext = true; + impl DeviceExtensions { + /// Checks enabled extensions against the device version, instance extensions and each other. + pub(super) fn check_requirements( + &self, + supported: &DeviceExtensions, + api_version: crate::Version, + instance_extensions: &InstanceExtensions, + ) -> Result<(), crate::extensions::ExtensionRestrictionError> { + $( + if self.$member { + if !supported.$member { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::NotSupported, + }); } - )* - } - Ok(extensions) + if api_version < $requires_core { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::RequiresCore($requires_core), + }); + } + + $( + if !self.$requires_device_extension { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::RequiresDeviceExtension(stringify!($requires_device_extension)), + }); + } + )* + + $( + if !instance_extensions.$requires_instance_extension { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::RequiresInstanceExtension(stringify!($requires_instance_extension)), + }); + } + )* + + $( + if self.$conflicts_device_extension { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::ConflictsDeviceExtension(stringify!($conflicts_device_extension)), + }); + } + )* + } else { + if $required_if_supported && supported.$member { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::RequiredIfSupported, + }); + } + } + )* + Ok(()) } - /// Returns an `Extensions` object with extensions supported by the `PhysicalDevice`. - pub fn supported_by_device(physical_device: PhysicalDevice) -> Self { - match $sname::supported_by_device_raw(physical_device) { - Ok(l) => l, - Err(SupportedExtensionsError::LoadingError(_)) => unreachable!(), - Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), - } - } - - /// Returns an `Extensions` object with extensions required as well as supported by the `PhysicalDevice`. - /// They are needed to be passed to `Device::new(...)`. - pub fn required_extensions(physical_device: PhysicalDevice) -> Self { - let supported = Self::supported_by_device(physical_device); - let required_if_supported = Self::required_if_supported_extensions(); - - required_if_supported.intersection(&supported) - } - - fn required_if_supported_extensions() -> Self { + pub(crate) fn required_if_supported_extensions() -> Self { Self { $( - $ext_req_if_supported: true, + $member: $required_if_supported, )* - ..Self::none() + _unbuildable: crate::extensions::Unbuildable(()) } } } - ); + ); } -device_extensions! { - DeviceExtensions, - RawDeviceExtensions, - [ // required if supported extensions - // https://vulkan.lunarg.com/doc/view/1.2.162.1/mac/1.2-extensions/vkspec.html#VUID-VkDeviceCreateInfo-pProperties-04451 - khr_portability_subset, - ], +pub use crate::autogen::DeviceExtensions; +pub(crate) use device_extensions; - // List in order: khr, ext, then alphabetical - khr_16bit_storage => b"VK_KHR_16bit_storage", - khr_8bit_storage => b"VK_KHR_8bit_storage", - khr_dedicated_allocation => b"VK_KHR_dedicated_allocation", - khr_display_swapchain => b"VK_KHR_display_swapchain", - khr_external_memory => b"VK_KHR_external_memory", - khr_external_memory_fd => b"VK_KHR_external_memory_fd", - khr_get_memory_requirements2 => b"VK_KHR_get_memory_requirements2", - khr_incremental_present => b"VK_KHR_incremental_present", - khr_maintenance1 => b"VK_KHR_maintenance1", - khr_multiview => b"VK_KHR_multiview", - khr_portability_subset => b"VK_KHR_portability_subset", - khr_sampler_mirror_clamp_to_edge => b"VK_KHR_sampler_mirror_clamp_to_edge", - khr_spirv_1_4 => b"VK_KHR_spirv_1_4", - khr_storage_buffer_storage_class => b"VK_KHR_storage_buffer_storage_class", - khr_swapchain => b"VK_KHR_swapchain", - ext_debug_utils => b"VK_EXT_debug_utils", - ext_external_memory_dmabuf => b"VK_EXT_external_memory_dma_buf", - ext_full_screen_exclusive => b"VK_EXT_full_screen_exclusive", +impl DeviceExtensions { + /// See the docs of supported_by_device(). + pub fn supported_by_device_raw( + physical_device: PhysicalDevice, + ) -> Result { + let fns = physical_device.instance().fns(); + + let properties: Vec = unsafe { + let mut num = 0; + check_errors(fns.v1_0.enumerate_device_extension_properties( + physical_device.internal_object(), + ptr::null(), + &mut num, + ptr::null_mut(), + ))?; + + let mut properties = Vec::with_capacity(num as usize); + check_errors(fns.v1_0.enumerate_device_extension_properties( + physical_device.internal_object(), + ptr::null(), + &mut num, + properties.as_mut_ptr(), + ))?; + properties.set_len(num as usize); + properties + }; + + Ok(Self::from(properties.iter().map(|property| unsafe { + CStr::from_ptr(property.extension_name.as_ptr()) + }))) + } + + /// Returns a `DeviceExtensions` object with extensions supported by the `PhysicalDevice`. + pub fn supported_by_device(physical_device: PhysicalDevice) -> Self { + match DeviceExtensions::supported_by_device_raw(physical_device) { + Ok(l) => l, + Err(SupportedExtensionsError::LoadingError(_)) => unreachable!(), + Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), + } + } + + /// Returns a `DeviceExtensions` object with extensions required as well as supported by the `PhysicalDevice`. + /// They are needed to be passed to `Device::new(...)`. + pub fn required_extensions(physical_device: PhysicalDevice) -> Self { + let supported = Self::supported_by_device(physical_device); + let required_if_supported = Self::required_if_supported_extensions(); + + required_if_supported.intersection(&supported) + } } /// This helper type can only be instantiated inside this module. @@ -157,11 +175,12 @@ pub struct Unbuildable(()); #[cfg(test)] mod tests { - use crate::device::{DeviceExtensions, RawDeviceExtensions}; + use crate::device::DeviceExtensions; + use std::ffi::CString; #[test] fn empty_extensions() { - let d: RawDeviceExtensions = (&DeviceExtensions::none()).into(); + let d: Vec = (&DeviceExtensions::none()).into(); assert!(d.iter().next().is_none()); } diff --git a/vulkano/src/device/features.rs b/vulkano/src/device/features.rs index d7e18231..8c0e2128 100644 --- a/vulkano/src/device/features.rs +++ b/vulkano/src/device/features.rs @@ -7,13 +7,19 @@ // notice may not be copied, modified, or distributed except // according to those terms. -use crate::Version; -use std::marker::PhantomPinned; -use std::ptr::addr_of_mut; +use std::error; +use std::fmt; macro_rules! features { { - $({ $member:ident => $($ffi_struct:ident.$($ffi_field:ident).+)|+ },)* + $($member:ident => { + doc: $doc:expr, + ffi_name: $ffi_field:ident, + ffi_members: [$($ffi_struct:ident $(.$ffi_struct_field:ident)?),+], + requires_features: [$($requires_feature:ident),*], + conflicts_features: [$($conflicts_feature:ident),*], + required_by_extensions: [$($required_by_extension:ident),*], + },)* } => { /// Represents all the features that are available on a physical device or enabled on /// a logical device. @@ -48,10 +54,61 @@ macro_rules! features { #[derive(Debug, Clone, PartialEq, Eq, Hash, Default)] #[allow(missing_docs)] pub struct Features { - $(pub $member: bool,)* + $( + #[doc = $doc] + pub $member: bool, + )* } impl Features { + /// Checks enabled features against the device version, device extensions and each other. + pub(super) fn check_requirements( + &self, + supported: &Features, + api_version: + crate::Version, + extensions: &crate::device::DeviceExtensions, + ) -> Result<(), crate::device::features::FeatureRestrictionError> { + $( + if self.$member { + if !supported.$member { + return Err(crate::device::features::FeatureRestrictionError { + feature: stringify!($member), + restriction: crate::device::features::FeatureRestriction::NotSupported, + }); + } + + $( + if !self.$requires_feature { + return Err(crate::device::features::FeatureRestrictionError { + feature: stringify!($member), + restriction: crate::device::features::FeatureRestriction::RequiresFeature(stringify!($requires_feature)), + }); + } + )* + + $( + if self.$conflicts_feature { + return Err(crate::device::features::FeatureRestrictionError { + feature: stringify!($member), + restriction: crate::device::features::FeatureRestriction::ConflictsFeature(stringify!($conflicts_feature)), + }); + } + )* + } else { + $( + if extensions.$required_by_extension { + return Err(crate::device::features::FeatureRestrictionError { + feature: stringify!($member), + restriction: crate::device::features::FeatureRestriction::RequiredByExtension(stringify!($required_by_extension)), + }); + } + )* + } + )* + Ok(()) + } + /// Builds a `Features` object with all values to false. pub fn none() -> Features { Features { @@ -97,235 +154,128 @@ macro_rules! features { } } - impl From<&Features> for FeaturesFfi { - #[inline(always)] - fn from(features: &Features) -> Self { - let mut features_ffi = FeaturesFfi::default(); + impl FeaturesFfi { + pub(crate) fn write(&mut self, features: &Features) { $( - $(features_ffi.$ffi_struct.$($ffi_field).+ |= features.$member as ash::vk::Bool32;)* - )+ - features_ffi + std::array::IntoIter::new([ + $(self.$ffi_struct.as_mut().map(|s| &mut s$(.$ffi_struct_field)?.$ffi_field)),+ + ]).flatten().next().map(|f| *f = features.$member as ash::vk::Bool32); + )* } } impl From<&FeaturesFfi> for Features { - #[inline(always)] fn from(features_ffi: &FeaturesFfi) -> Self { Features { - $($member: $(features_ffi.$ffi_struct.$($ffi_field).+ != 0)||+,)* + $( + $member: std::array::IntoIter::new([ + $(features_ffi.$ffi_struct.map(|s| s$(.$ffi_struct_field)?.$ffi_field)),+ + ]).flatten().next().unwrap_or(0) != 0, + )* } } } }; } -features! { - // Vulkan 1.0 - {robust_buffer_access => vulkan_1_0.features.robust_buffer_access}, - {full_draw_index_uint32 => vulkan_1_0.features.full_draw_index_uint32}, - {image_cube_array => vulkan_1_0.features.image_cube_array}, - {independent_blend => vulkan_1_0.features.independent_blend}, - {geometry_shader => vulkan_1_0.features.geometry_shader}, - {tessellation_shader => vulkan_1_0.features.tessellation_shader}, - {sample_rate_shading => vulkan_1_0.features.sample_rate_shading}, - {dual_src_blend => vulkan_1_0.features.dual_src_blend}, - {logic_op => vulkan_1_0.features.logic_op}, - {multi_draw_indirect => vulkan_1_0.features.multi_draw_indirect}, - {draw_indirect_first_instance => vulkan_1_0.features.draw_indirect_first_instance}, - {depth_clamp => vulkan_1_0.features.depth_clamp}, - {depth_bias_clamp => vulkan_1_0.features.depth_bias_clamp}, - {fill_mode_non_solid => vulkan_1_0.features.fill_mode_non_solid}, - {depth_bounds => vulkan_1_0.features.depth_bounds}, - {wide_lines => vulkan_1_0.features.wide_lines}, - {large_points => vulkan_1_0.features.large_points}, - {alpha_to_one => vulkan_1_0.features.alpha_to_one}, - {multi_viewport => vulkan_1_0.features.multi_viewport}, - {sampler_anisotropy => vulkan_1_0.features.sampler_anisotropy}, - {texture_compression_etc2 => vulkan_1_0.features.texture_compression_etc2}, - {texture_compression_astc_ldr => vulkan_1_0.features.texture_compression_astc_ldr}, - {texture_compression_bc => vulkan_1_0.features.texture_compression_bc}, - {occlusion_query_precise => vulkan_1_0.features.occlusion_query_precise}, - {pipeline_statistics_query => vulkan_1_0.features.pipeline_statistics_query}, - {vertex_pipeline_stores_and_atomics => vulkan_1_0.features.vertex_pipeline_stores_and_atomics}, - {fragment_stores_and_atomics => vulkan_1_0.features.fragment_stores_and_atomics}, - {shader_tessellation_and_geometry_point_size => vulkan_1_0.features.shader_tessellation_and_geometry_point_size}, - {shader_image_gather_extended => vulkan_1_0.features.shader_image_gather_extended}, - {shader_storage_image_extended_formats => vulkan_1_0.features.shader_storage_image_extended_formats}, - {shader_storage_image_multisample => vulkan_1_0.features.shader_storage_image_multisample}, - {shader_storage_image_read_without_format => vulkan_1_0.features.shader_storage_image_read_without_format}, - {shader_storage_image_write_without_format => vulkan_1_0.features.shader_storage_image_write_without_format}, - {shader_uniform_buffer_array_dynamic_indexing => vulkan_1_0.features.shader_uniform_buffer_array_dynamic_indexing}, - {shader_sampled_image_array_dynamic_indexing => vulkan_1_0.features.shader_sampled_image_array_dynamic_indexing}, - {shader_storage_buffer_array_dynamic_indexing => vulkan_1_0.features.shader_storage_buffer_array_dynamic_indexing}, - {shader_storage_image_array_dynamic_indexing => vulkan_1_0.features.shader_storage_image_array_dynamic_indexing}, - {shader_clip_distance => vulkan_1_0.features.shader_clip_distance}, - {shader_cull_distance => vulkan_1_0.features.shader_cull_distance}, - {shader_float64 => vulkan_1_0.features.shader_float64}, - {shader_int64 => vulkan_1_0.features.shader_int64}, - {shader_int16 => vulkan_1_0.features.shader_int16}, - {shader_resource_residency => vulkan_1_0.features.shader_resource_residency}, - {shader_resource_min_lod => vulkan_1_0.features.shader_resource_min_lod}, - {sparse_binding => vulkan_1_0.features.sparse_binding}, - {sparse_residency_buffer => vulkan_1_0.features.sparse_residency_buffer}, - {sparse_residency_image2d => vulkan_1_0.features.sparse_residency_image2_d}, - {sparse_residency_image3d => vulkan_1_0.features.sparse_residency_image3_d}, - {sparse_residency2_samples => vulkan_1_0.features.sparse_residency2_samples}, - {sparse_residency4_samples => vulkan_1_0.features.sparse_residency4_samples}, - {sparse_residency8_samples => vulkan_1_0.features.sparse_residency8_samples}, - {sparse_residency16_samples => vulkan_1_0.features.sparse_residency16_samples}, - {sparse_residency_aliased => vulkan_1_0.features.sparse_residency_aliased}, - {variable_multisample_rate => vulkan_1_0.features.variable_multisample_rate}, - {inherited_queries => vulkan_1_0.features.inherited_queries}, +pub use crate::autogen::Features; +pub(crate) use {crate::autogen::FeaturesFfi, features}; - // Vulkan 1.1 - {storage_buffer_16bit => vulkan_1_1.storage_buffer16_bit_access | khr_16bit_storage.storage_buffer16_bit_access}, - {storage_uniform_16bit => vulkan_1_1.uniform_and_storage_buffer16_bit_access | khr_16bit_storage.uniform_and_storage_buffer16_bit_access}, - {storage_push_constant_16bit => vulkan_1_1.storage_push_constant16 | khr_16bit_storage.storage_push_constant16}, - {storage_input_output_16bit => vulkan_1_1.storage_input_output16 | khr_16bit_storage.storage_input_output16}, - {multiview => vulkan_1_1.multiview | khr_multiview.multiview}, - {multiview_geometry_shader => vulkan_1_1.multiview_geometry_shader | khr_multiview.multiview_geometry_shader}, - {multiview_tessellation_shader => vulkan_1_1.multiview_tessellation_shader | khr_multiview.multiview_tessellation_shader}, - {variable_pointers_storage_buffer => vulkan_1_1.variable_pointers_storage_buffer | khr_variable_pointers.variable_pointers_storage_buffer}, - {variable_pointers => vulkan_1_1.variable_pointers | khr_variable_pointers.variable_pointers}, - {protected_memory => vulkan_1_1.protected_memory | protected_memory.protected_memory}, - {sampler_ycbcr_conversion => vulkan_1_1.sampler_ycbcr_conversion | khr_sampler_ycbcr_conversion.sampler_ycbcr_conversion}, - {shader_draw_parameters => vulkan_1_1.shader_draw_parameters | shader_draw_parameters.shader_draw_parameters}, - - // Vulkan 1.2 - {sampler_mirror_clamp_to_edge => vulkan_1_2.sampler_mirror_clamp_to_edge}, - {draw_indirect_count => vulkan_1_2.draw_indirect_count}, - {storage_buffer_8bit => vulkan_1_2.storage_buffer8_bit_access | khr_8bit_storage.storage_buffer8_bit_access}, - {storage_uniform_8bit => vulkan_1_2.uniform_and_storage_buffer8_bit_access | khr_8bit_storage.uniform_and_storage_buffer8_bit_access}, - {storage_push_constant_8bit => vulkan_1_2.storage_push_constant8 | khr_8bit_storage.storage_push_constant8}, - {shader_buffer_int64_atomics => vulkan_1_2.shader_buffer_int64_atomics | khr_shader_atomic_int64.shader_buffer_int64_atomics}, - {shader_shared_int64_atomics => vulkan_1_2.shader_shared_int64_atomics | khr_shader_atomic_int64.shader_shared_int64_atomics}, - {shader_float16 => vulkan_1_2.shader_float16 | khr_shader_float16_int8.shader_float16}, - {shader_int8 => vulkan_1_2.shader_int8 | khr_shader_float16_int8.shader_int8}, - {descriptor_indexing => vulkan_1_2.descriptor_indexing}, - {shader_input_attachment_array_dynamic_indexing => vulkan_1_2.shader_input_attachment_array_dynamic_indexing | ext_descriptor_indexing.shader_input_attachment_array_dynamic_indexing}, - {shader_uniform_texel_buffer_array_dynamic_indexing => vulkan_1_2.shader_uniform_texel_buffer_array_dynamic_indexing | ext_descriptor_indexing.shader_uniform_texel_buffer_array_dynamic_indexing}, - {shader_storage_texel_buffer_array_dynamic_indexing => vulkan_1_2.shader_storage_texel_buffer_array_dynamic_indexing | ext_descriptor_indexing.shader_storage_texel_buffer_array_dynamic_indexing}, - {shader_uniform_buffer_array_non_uniform_indexing => vulkan_1_2.shader_uniform_buffer_array_non_uniform_indexing | ext_descriptor_indexing.shader_uniform_buffer_array_non_uniform_indexing}, - {shader_sampled_image_array_non_uniform_indexing => vulkan_1_2.shader_sampled_image_array_non_uniform_indexing | ext_descriptor_indexing.shader_sampled_image_array_non_uniform_indexing}, - {shader_storage_buffer_array_non_uniform_indexing => vulkan_1_2.shader_storage_buffer_array_non_uniform_indexing | ext_descriptor_indexing.shader_storage_buffer_array_non_uniform_indexing}, - {shader_storage_image_array_non_uniform_indexing => vulkan_1_2.shader_storage_image_array_non_uniform_indexing | ext_descriptor_indexing.shader_storage_image_array_non_uniform_indexing}, - {shader_input_attachment_array_non_uniform_indexing => vulkan_1_2.shader_input_attachment_array_non_uniform_indexing | ext_descriptor_indexing.shader_input_attachment_array_non_uniform_indexing}, - {shader_uniform_texel_buffer_array_non_uniform_indexing => vulkan_1_2.shader_uniform_texel_buffer_array_non_uniform_indexing | ext_descriptor_indexing.shader_uniform_texel_buffer_array_non_uniform_indexing}, - {shader_storage_texel_buffer_array_non_uniform_indexing => vulkan_1_2.shader_storage_texel_buffer_array_non_uniform_indexing | ext_descriptor_indexing.shader_storage_texel_buffer_array_non_uniform_indexing}, - {descriptor_binding_uniform_buffer_update_after_bind => vulkan_1_2.descriptor_binding_uniform_buffer_update_after_bind | ext_descriptor_indexing.descriptor_binding_uniform_buffer_update_after_bind}, - {descriptor_binding_sampled_image_update_after_bind => vulkan_1_2.descriptor_binding_sampled_image_update_after_bind | ext_descriptor_indexing.descriptor_binding_sampled_image_update_after_bind}, - {descriptor_binding_storage_image_update_after_bind => vulkan_1_2.descriptor_binding_storage_image_update_after_bind | ext_descriptor_indexing.descriptor_binding_storage_image_update_after_bind}, - {descriptor_binding_storage_buffer_update_after_bind => vulkan_1_2.descriptor_binding_storage_buffer_update_after_bind | ext_descriptor_indexing.descriptor_binding_storage_buffer_update_after_bind}, - {descriptor_binding_uniform_texel_buffer_update_after_bind => vulkan_1_2.descriptor_binding_uniform_texel_buffer_update_after_bind | ext_descriptor_indexing.descriptor_binding_uniform_texel_buffer_update_after_bind}, - {descriptor_binding_storage_texel_buffer_update_after_bind => vulkan_1_2.descriptor_binding_storage_texel_buffer_update_after_bind | ext_descriptor_indexing.descriptor_binding_storage_texel_buffer_update_after_bind}, - {descriptor_binding_update_unused_while_pending => vulkan_1_2.descriptor_binding_update_unused_while_pending | ext_descriptor_indexing.descriptor_binding_update_unused_while_pending}, - {descriptor_binding_partially_bound => vulkan_1_2.descriptor_binding_partially_bound | ext_descriptor_indexing.descriptor_binding_partially_bound}, - {descriptor_binding_variable_descriptor_count => vulkan_1_2.descriptor_binding_variable_descriptor_count | ext_descriptor_indexing.descriptor_binding_variable_descriptor_count}, - {runtime_descriptor_array => vulkan_1_2.runtime_descriptor_array | ext_descriptor_indexing.runtime_descriptor_array}, - {sampler_filter_minmax => vulkan_1_2.sampler_filter_minmax}, - {scalar_block_layout => vulkan_1_2.scalar_block_layout | ext_scalar_block_layout.scalar_block_layout}, - {imageless_framebuffer => vulkan_1_2.imageless_framebuffer | khr_imageless_framebuffer.imageless_framebuffer}, - {uniform_buffer_standard_layout => vulkan_1_2.uniform_buffer_standard_layout | khr_uniform_buffer_standard_layout.uniform_buffer_standard_layout}, - {shader_subgroup_extended_types => vulkan_1_2.shader_subgroup_extended_types | khr_shader_subgroup_extended_types.shader_subgroup_extended_types}, - {separate_depth_stencil_layouts => vulkan_1_2.separate_depth_stencil_layouts | khr_separate_depth_stencil_layouts.separate_depth_stencil_layouts}, - {host_query_reset => vulkan_1_2.host_query_reset | ext_host_query_reset.host_query_reset}, - {timeline_semaphore => vulkan_1_2.timeline_semaphore | khr_timeline_semaphore.timeline_semaphore}, - {buffer_device_address => vulkan_1_2.buffer_device_address | khr_buffer_device_address.buffer_device_address}, - {buffer_device_address_capture_replay => vulkan_1_2.buffer_device_address_capture_replay | khr_buffer_device_address.buffer_device_address_capture_replay}, - {buffer_device_address_multi_device => vulkan_1_2.buffer_device_address_multi_device | khr_buffer_device_address.buffer_device_address_multi_device}, - {vulkan_memory_model => vulkan_1_2.vulkan_memory_model | khr_vulkan_memory_model.vulkan_memory_model}, - {vulkan_memory_model_device_scope => vulkan_1_2.vulkan_memory_model_device_scope | khr_vulkan_memory_model.vulkan_memory_model_device_scope}, - {vulkan_memory_model_availability_visibility_chains => vulkan_1_2.vulkan_memory_model_availability_visibility_chains | khr_vulkan_memory_model.vulkan_memory_model_availability_visibility_chains}, - {shader_output_viewport_index => vulkan_1_2.shader_output_viewport_index}, - {shader_output_layer => vulkan_1_2.shader_output_layer}, - {subgroup_broadcast_dynamic_id => vulkan_1_2.subgroup_broadcast_dynamic_id}, - - // Extensions - {ext_buffer_device_address => ext_buffer_address.buffer_device_address}, - {ext_buffer_device_address_capture_replay => ext_buffer_address.buffer_device_address_capture_replay}, - {ext_buffer_device_address_multi_device => ext_buffer_address.buffer_device_address_multi_device}, +/// An error that can happen when enabling a feature on a device. +#[derive(Clone, Copy, Debug)] +pub struct FeatureRestrictionError { + /// The feature in question. + pub feature: &'static str, + /// The restriction that was not met. + pub restriction: FeatureRestriction, } -#[derive(Default)] -pub(crate) struct FeaturesFfi { - _pinned: PhantomPinned, +impl error::Error for FeatureRestrictionError {} - vulkan_1_0: ash::vk::PhysicalDeviceFeatures2KHR, - vulkan_1_1: ash::vk::PhysicalDeviceVulkan11Features, - vulkan_1_2: ash::vk::PhysicalDeviceVulkan12Features, - - protected_memory: ash::vk::PhysicalDeviceProtectedMemoryFeatures, - shader_draw_parameters: ash::vk::PhysicalDeviceShaderDrawParametersFeatures, - - khr_16bit_storage: ash::vk::PhysicalDevice16BitStorageFeaturesKHR, - khr_8bit_storage: ash::vk::PhysicalDevice8BitStorageFeaturesKHR, - khr_buffer_device_address: ash::vk::PhysicalDeviceBufferDeviceAddressFeaturesKHR, - khr_imageless_framebuffer: ash::vk::PhysicalDeviceImagelessFramebufferFeaturesKHR, - khr_multiview: ash::vk::PhysicalDeviceMultiviewFeaturesKHR, - khr_sampler_ycbcr_conversion: ash::vk::PhysicalDeviceSamplerYcbcrConversionFeaturesKHR, - khr_separate_depth_stencil_layouts: - ash::vk::PhysicalDeviceSeparateDepthStencilLayoutsFeaturesKHR, - khr_shader_atomic_int64: ash::vk::PhysicalDeviceShaderAtomicInt64FeaturesKHR, - khr_shader_float16_int8: ash::vk::PhysicalDeviceShaderFloat16Int8FeaturesKHR, - khr_shader_subgroup_extended_types: - ash::vk::PhysicalDeviceShaderSubgroupExtendedTypesFeaturesKHR, - khr_timeline_semaphore: ash::vk::PhysicalDeviceTimelineSemaphoreFeaturesKHR, - khr_uniform_buffer_standard_layout: - ash::vk::PhysicalDeviceUniformBufferStandardLayoutFeaturesKHR, - khr_variable_pointers: ash::vk::PhysicalDeviceVariablePointersFeaturesKHR, - khr_vulkan_memory_model: ash::vk::PhysicalDeviceVulkanMemoryModelFeaturesKHR, - - ext_buffer_address: ash::vk::PhysicalDeviceBufferAddressFeaturesEXT, - ext_descriptor_indexing: ash::vk::PhysicalDeviceDescriptorIndexingFeaturesEXT, - ext_host_query_reset: ash::vk::PhysicalDeviceHostQueryResetFeaturesEXT, - ext_scalar_block_layout: ash::vk::PhysicalDeviceScalarBlockLayoutFeaturesEXT, +impl fmt::Display for FeatureRestrictionError { + #[inline] + fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { + write!( + fmt, + "a restriction for the feature {} was not met: {}", + self.feature, self.restriction, + ) + } } -macro_rules! push_struct { - ($self:ident, $struct:ident) => { - $self.$struct.p_next = $self.vulkan_1_0.p_next; - $self.vulkan_1_0.p_next = addr_of_mut!($self.$struct) as _; +#[derive(Clone, Copy, Debug)] +pub enum FeatureRestriction { + /// Not supported by the physical device. + NotSupported, + /// Requires a feature to be enabled. + RequiresFeature(&'static str), + /// Requires a feature to be disabled. + ConflictsFeature(&'static str), + /// An extension requires this feature to be enabled. + RequiredByExtension(&'static str), +} + +impl fmt::Display for FeatureRestriction { + #[inline] + fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + FeatureRestriction::NotSupported => { + write!(fmt, "not supported by the physical device") + } + FeatureRestriction::RequiresFeature(feat) => { + write!(fmt, "requires feature {} to be enabled", feat) + } + FeatureRestriction::ConflictsFeature(feat) => { + write!(fmt, "requires feature {} to be disabled", feat) + } + FeatureRestriction::RequiredByExtension(ext) => { + write!(fmt, "required to be enabled by extension {}", ext) + } + } + } +} + +macro_rules! features_ffi { + { + $api_version:ident, + $extensions:ident, + $($member:ident => { + ty: $ty:ident, + provided_by: [$($provided_by:expr),+], + conflicts: [$($conflicts:ident),*], + },)+ + } => { + #[derive(Default)] + pub(crate) struct FeaturesFfi { + features_vulkan10: Option, + + $( + $member: Option, + )+ + } + + impl FeaturesFfi { + pub(crate) fn make_chain(&mut self, $api_version: crate::Version, $extensions: &DeviceExtensions) { + self.features_vulkan10 = Some(Default::default()); + $( + if std::array::IntoIter::new([$($provided_by),+]).any(|x| x) && + std::array::IntoIter::new([$(self.$conflicts.is_none()),*]).all(|x| x) { + self.$member = Some(Default::default()); + self.$member.unwrap().p_next = self.features_vulkan10.unwrap().p_next; + self.features_vulkan10.unwrap().p_next = self.$member.as_mut().unwrap() as *mut _ as _; + } + )+ + } + + pub(crate) fn head_as_ref(&self) -> &ash::vk::PhysicalDeviceFeatures2KHR { + self.features_vulkan10.as_ref().unwrap() + } + + pub(crate) fn head_as_mut(&mut self) -> &mut ash::vk::PhysicalDeviceFeatures2KHR { + self.features_vulkan10.as_mut().unwrap() + } + } }; } -impl FeaturesFfi { - pub(crate) fn make_chain(&mut self, api_version: Version) { - if api_version >= Version::V1_2 { - push_struct!(self, vulkan_1_1); - push_struct!(self, vulkan_1_2); - } else { - if api_version >= Version::V1_1 { - push_struct!(self, protected_memory); - push_struct!(self, shader_draw_parameters); - } - - push_struct!(self, khr_16bit_storage); - push_struct!(self, khr_8bit_storage); - push_struct!(self, khr_buffer_device_address); - push_struct!(self, khr_imageless_framebuffer); - push_struct!(self, khr_multiview); - push_struct!(self, khr_sampler_ycbcr_conversion); - push_struct!(self, khr_separate_depth_stencil_layouts); - push_struct!(self, khr_shader_atomic_int64); - push_struct!(self, khr_shader_float16_int8); - push_struct!(self, khr_shader_subgroup_extended_types); - push_struct!(self, khr_timeline_semaphore); - push_struct!(self, khr_uniform_buffer_standard_layout); - push_struct!(self, khr_variable_pointers); - push_struct!(self, khr_vulkan_memory_model); - push_struct!(self, ext_descriptor_indexing); - push_struct!(self, ext_host_query_reset); - push_struct!(self, ext_scalar_block_layout); - } - - push_struct!(self, ext_buffer_address); - } - - pub(crate) fn head_as_ref(&self) -> &ash::vk::PhysicalDeviceFeatures2KHR { - &self.vulkan_1_0 - } - - pub(crate) fn head_as_mut(&mut self) -> &mut ash::vk::PhysicalDeviceFeatures2KHR { - &mut self.vulkan_1_0 - } -} +pub(crate) use features_ffi; diff --git a/vulkano/src/device/mod.rs b/vulkano/src/device/mod.rs index f8cd0a8b..59ecdc44 100644 --- a/vulkano/src/device/mod.rs +++ b/vulkano/src/device/mod.rs @@ -90,13 +90,15 @@ //! //! TODO: write -pub use self::extensions::DeviceExtensions; -pub use self::extensions::RawDeviceExtensions; -pub use self::features::Features; pub(crate) use self::features::FeaturesFfi; +pub use self::features::{FeatureRestriction, FeatureRestrictionError, Features}; +pub use crate::autogen::DeviceExtensions; use crate::check_errors; use crate::command_buffer::pool::StandardCommandPool; use crate::descriptor::descriptor_set::StdDescriptorPool; +pub use crate::extensions::{ + ExtensionRestriction, ExtensionRestrictionError, SupportedExtensionsError, +}; use crate::fns::DeviceFunctions; use crate::format::Format; use crate::image::ImageCreateFlags; @@ -120,6 +122,7 @@ use std::collections::hash_map::Entry; use std::collections::HashMap; use std::error; use std::ffi::CStr; +use std::ffi::CString; use std::fmt; use std::hash::BuildHasherDefault; use std::hash::Hash; @@ -133,8 +136,8 @@ use std::sync::Mutex; use std::sync::MutexGuard; use std::sync::Weak; -mod extensions; -mod features; +pub(crate) mod extensions; +pub(crate) mod features; /// Represents a Vulkan context. pub struct Device { @@ -186,68 +189,70 @@ impl Device { /// // TODO: return Arc and handle synchronization in the Queue // TODO: should take the PhysicalDevice by value - pub fn new<'a, I, Ext>( - phys: PhysicalDevice, + pub fn new<'a, I>( + physical_device: PhysicalDevice, requested_features: &Features, - extensions: Ext, + requested_extensions: &DeviceExtensions, queue_families: I, ) -> Result<(Arc, QueuesIter), DeviceCreationError> where I: IntoIterator, f32)>, - Ext: Into, { - let instance = phys.instance(); + let instance = physical_device.instance(); let fns_i = instance.fns(); let max_api_version = instance.max_api_version(); - let api_version = std::cmp::min(max_api_version, phys.api_version()); + let api_version = std::cmp::min(max_api_version, physical_device.api_version()); - let queue_families = queue_families.into_iter(); + // Check if the extensions are correct + requested_extensions.check_requirements( + &DeviceExtensions::supported_by_device(physical_device), + api_version, + instance.loaded_extensions(), + )?; - if !phys.supported_features().superset_of(&requested_features) { - return Err(DeviceCreationError::FeatureNotPresent); - } + let mut requested_features = requested_features.clone(); - // this variable will contain the queue family ID and queue ID of each requested queue - let mut output_queues: SmallVec<[(u32, u32); 8]> = SmallVec::new(); - - // Device layers were deprecated in Vulkan 1.0.13, and device layer requests should be - // ignored by the driver. For backwards compatibility, the spec recommends passing the - // exact instance layers to the device as well. There's no need to support separate - // requests at device creation time for legacy drivers: the spec claims that "[at] the - // time of deprecation there were no known device-only layers." + // TODO: The plan regarding `robust_buffer_access` is to check the shaders' code to see + // if they can possibly perform out-of-bounds reads and writes. If the user tries + // to use a shader that can perform out-of-bounds operations without having + // `robust_buffer_access` enabled, an error is returned. // - // Because there's no way to query the list of layers enabled for an instance, we need - // to save it alongside the instance. (`vkEnumerateDeviceLayerProperties` should get - // the right list post-1.0.13, but not pre-1.0.13, so we can't use it here.) - let layers_ptr = instance - .loaded_layers() - .map(|layer| layer.as_ptr()) - .collect::>(); + // However for the moment this verification isn't performed. In order to be safe, + // we always enable the `robust_buffer_access` feature as it is guaranteed to be + // supported everywhere. + // + // The only alternative (while waiting for shaders introspection to work) is to + // make all shaders depend on `robust_buffer_access`. But since usually the + // majority of shaders don't need this feature, it would be very annoying to have + // to enable it manually when you don't need it. + // + // Note that if we ever remove this, don't forget to adjust the change in + // `Device`'s construction below. + requested_features.robust_buffer_access = true; - let extensions = extensions.into(); - let extensions_list = extensions - .iter() - .map(|extension| extension.as_ptr()) - .collect::>(); - - let requested_features = Features { - // Always enabled; see below. - robust_buffer_access: true, - ..*requested_features - }; + // Check if the features are correct + requested_features.check_requirements( + physical_device.supported_features(), + api_version, + requested_extensions, + )?; // device creation - let device = unsafe { + let (device, queues) = unsafe { // each element of `queues` is a `(queue_family, priorities)` // each queue family must only have one entry in `queues` - let mut queues: Vec<(u32, Vec)> = Vec::with_capacity(phys.queue_families().len()); + let mut queues: Vec<(u32, Vec)> = + Vec::with_capacity(physical_device.queue_families().len()); + + // this variable will contain the queue family ID and queue ID of each requested queue + let mut output_queues: SmallVec<[(u32, u32); 8]> = SmallVec::new(); for (queue_family, priority) in queue_families { // checking the parameters assert_eq!( queue_family.physical_device().internal_object(), - phys.internal_object() + physical_device.internal_object() ); if priority < 0.0 || priority > 1.0 { return Err(DeviceCreationError::PriorityOutOfRange); @@ -280,25 +285,29 @@ impl Device { ) .collect::>(); - // TODO: The plan regarding `robust_buffer_access` is to check the shaders' code to see - // if they can possibly perform out-of-bounds reads and writes. If the user tries - // to use a shader that can perform out-of-bounds operations without having - // `robust_buffer_access` enabled, an error is returned. - // - // However for the moment this verification isn't performed. In order to be safe, - // we always enable the `robust_buffer_access` feature as it is guaranteed to be - // supported everywhere. - // - // The only alternative (while waiting for shaders introspection to work) is to - // make all shaders depend on `robust_buffer_access`. But since usually the - // majority of shaders don't need this feature, it would be very annoying to have - // to enable it manually when you don't need it. - // - // Note that if we ever remove this, don't forget to adjust the change in - // `Device`'s construction below. + let mut features_ffi = FeaturesFfi::default(); + features_ffi.make_chain(api_version, requested_extensions); + features_ffi.write(&requested_features); - let mut features_ffi = ::from(&requested_features); - features_ffi.make_chain(api_version); + // Device layers were deprecated in Vulkan 1.0.13, and device layer requests should be + // ignored by the driver. For backwards compatibility, the spec recommends passing the + // exact instance layers to the device as well. There's no need to support separate + // requests at device creation time for legacy drivers: the spec claims that "[at] the + // time of deprecation there were no known device-only layers." + // + // Because there's no way to query the list of layers enabled for an instance, we need + // to save it alongside the instance. (`vkEnumerateDeviceLayerProperties` should get + // the right list post-1.0.13, but not pre-1.0.13, so we can't use it here.) + let layers_ptrs = instance + .loaded_layers() + .map(|layer| layer.as_ptr()) + .collect::>(); + + let extensions_strings: Vec = requested_extensions.into(); + let extensions_ptrs = extensions_strings + .iter() + .map(|extension| extension.as_ptr()) + .collect::>(); let has_khr_get_physical_device_properties2 = instance .loaded_extensions() @@ -313,10 +322,10 @@ impl Device { flags: ash::vk::DeviceCreateFlags::empty(), queue_create_info_count: queues.len() as u32, p_queue_create_infos: queues.as_ptr(), - enabled_layer_count: layers_ptr.len() as u32, - pp_enabled_layer_names: layers_ptr.as_ptr(), - enabled_extension_count: extensions_list.len() as u32, - pp_enabled_extension_names: extensions_list.as_ptr(), + enabled_layer_count: layers_ptrs.len() as u32, + pp_enabled_layer_names: layers_ptrs.as_ptr(), + enabled_extension_count: extensions_ptrs.len() as u32, + pp_enabled_extension_names: extensions_ptrs.as_ptr(), p_enabled_features: if has_khr_get_physical_device_properties2 { ptr::null() } else { @@ -327,12 +336,13 @@ impl Device { let mut output = MaybeUninit::uninit(); check_errors(fns_i.v1_0.create_device( - phys.internal_object(), + physical_device.internal_object(), &infos, ptr::null(), output.as_mut_ptr(), ))?; - output.assume_init() + + (output.assume_init(), output_queues) }; // loading the function pointers of the newly-created device @@ -341,7 +351,7 @@ impl Device { }); let mut active_queue_families: SmallVec<[u32; 8]> = SmallVec::new(); - for (queue_family, _) in output_queues.iter() { + for (queue_family, _) in queues.iter() { if let None = active_queue_families .iter() .find(|&&qf| qf == *queue_family) @@ -351,8 +361,8 @@ impl Device { } let device = Arc::new(Device { - instance: phys.instance().clone(), - physical_device: phys.index(), + instance: physical_device.instance().clone(), + physical_device: physical_device.index(), device: device, api_version, fns, @@ -364,7 +374,7 @@ impl Device { robust_buffer_access: true, ..requested_features.clone() }, - extensions: (&extensions).into(), + extensions: requested_extensions.clone(), active_queue_families, allocation_count: Mutex::new(0), fence_pool: Mutex::new(Vec::new()), @@ -373,16 +383,16 @@ impl Device { }); // Iterator for the produced queues. - let output_queues = QueuesIter { + let queues = QueuesIter { next_queue: 0, device: device.clone(), - families_and_ids: output_queues, + families_and_ids: queues, }; - Ok((device, output_queues)) + Ok((device, queues)) } - /// Returns the Vulkan version supported by this `Device`. + /// Returns the Vulkan version supported by the device. /// /// This is the lower of the /// [physical device's supported version](crate::instance::PhysicalDevice::api_version) and @@ -442,13 +452,13 @@ impl Device { ) } - /// Returns the features that are enabled in the device. + /// Returns the features that have been enabled on the device. #[inline] pub fn enabled_features(&self) -> &Features { &self.features } - /// Returns the list of extensions that have been loaded. + /// Returns the extensions that have been enabled on the device. #[inline] pub fn loaded_extensions(&self) -> &DeviceExtensions { &self.extensions @@ -742,7 +752,7 @@ impl Iterator for QueuesIter { impl ExactSizeIterator for QueuesIter {} /// Error that can be returned when creating a device. -#[derive(Copy, Clone, Debug, PartialEq, Eq)] +#[derive(Copy, Clone, Debug)] pub enum DeviceCreationError { /// Failed to create the device for an implementation-specific reason. InitializationFailed, @@ -763,6 +773,10 @@ pub enum DeviceCreationError { OutOfHostMemory, /// There is no memory available on the device (ie. video memory). OutOfDeviceMemory, + /// A restriction for an extension was not met. + ExtensionRestrictionNotMet(ExtensionRestrictionError), + /// A restriction for a feature was not met. + FeatureRestrictionNotMet(FeatureRestrictionError), } impl error::Error for DeviceCreationError {} @@ -770,35 +784,42 @@ impl error::Error for DeviceCreationError {} impl fmt::Display for DeviceCreationError { #[inline] fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!( - fmt, - "{}", - match *self { - DeviceCreationError::InitializationFailed => { + match *self { + DeviceCreationError::InitializationFailed => { + write!( + fmt, "failed to create the device for an implementation-specific reason" - } - DeviceCreationError::OutOfHostMemory => "no memory available on the host", - DeviceCreationError::OutOfDeviceMemory => - "no memory available on the graphical device", - DeviceCreationError::DeviceLost => "failed to connect to the device", - DeviceCreationError::TooManyQueuesForFamily => { - "tried to create too many queues for a given family" - } - DeviceCreationError::FeatureNotPresent => { - "some of the requested features are unsupported by the physical device" - } - DeviceCreationError::PriorityOutOfRange => { - "the priority of one of the queues is out of the [0.0; 1.0] range" - } - DeviceCreationError::ExtensionNotPresent => { - "some of the requested device extensions are not supported by the physical device" - } - DeviceCreationError::TooManyObjects => { - "you have reached the limit to the number of devices that can be created from the - same physical device" - } + ) } - ) + DeviceCreationError::OutOfHostMemory => write!(fmt, "no memory available on the host"), + DeviceCreationError::OutOfDeviceMemory => { + write!(fmt, "no memory available on the graphical device") + } + DeviceCreationError::DeviceLost => write!(fmt, "failed to connect to the device"), + DeviceCreationError::TooManyQueuesForFamily => { + write!(fmt, "tried to create too many queues for a given family") + } + DeviceCreationError::FeatureNotPresent => { + write!( + fmt, + "some of the requested features are unsupported by the physical device" + ) + } + DeviceCreationError::PriorityOutOfRange => { + write!( + fmt, + "the priority of one of the queues is out of the [0.0; 1.0] range" + ) + } + DeviceCreationError::ExtensionNotPresent => { + write!(fmt,"some of the requested device extensions are not supported by the physical device") + } + DeviceCreationError::TooManyObjects => { + write!(fmt,"you have reached the limit to the number of devices that can be created from the same physical device") + } + DeviceCreationError::ExtensionRestrictionNotMet(err) => err.fmt(fmt), + DeviceCreationError::FeatureRestrictionNotMet(err) => err.fmt(fmt), + } } } @@ -818,6 +839,20 @@ impl From for DeviceCreationError { } } +impl From for DeviceCreationError { + #[inline] + fn from(err: ExtensionRestrictionError) -> Self { + Self::ExtensionRestrictionNotMet(err) + } +} + +impl From for DeviceCreationError { + #[inline] + fn from(err: FeatureRestrictionError) -> Self { + Self::FeatureRestrictionNotMet(err) + } +} + /// Represents a queue where commands can be submitted. // TODO: should use internal synchronization? #[derive(Debug)] @@ -900,7 +935,7 @@ mod tests { use crate::device::Device; use crate::device::DeviceCreationError; use crate::device::DeviceExtensions; - use crate::device::Features; + use crate::device::{FeatureRestriction, FeatureRestrictionError, Features}; use crate::instance; use std::sync::Arc; @@ -954,7 +989,10 @@ mod tests { &DeviceExtensions::none(), Some((family, 1.0)), ) { - Err(DeviceCreationError::FeatureNotPresent) => return, // Success + Err(DeviceCreationError::FeatureRestrictionNotMet(FeatureRestrictionError { + restriction: FeatureRestriction::NotSupported, + .. + })) => return, // Success _ => panic!(), }; } diff --git a/vulkano/src/extensions.rs b/vulkano/src/extensions.rs index 514da01d..4b71e9b6 100644 --- a/vulkano/src/extensions.rs +++ b/vulkano/src/extensions.rs @@ -7,28 +7,37 @@ // notice may not be copied, modified, or distributed except // according to those terms. -use std::error; -use std::fmt; - use crate::instance::loader::LoadingError; use crate::Error; use crate::OomError; +use crate::Version; +use std::error; +use std::fmt; macro_rules! extensions { - ($sname:ident, $rawname:ident, $($ext:ident => $s:expr,)*) => ( + ( + $sname:ident, + $($member:ident => { + doc: $doc:expr, + raw: $raw:expr, + requires_core: $requires_core:expr, + requires_device_extensions: [$($requires_device_extension:ident),*], + requires_instance_extensions: [$($requires_instance_extension:ident),*]$(,)? + },)* + ) => ( /// List of extensions that are enabled or available. #[derive(Copy, Clone, PartialEq, Eq)] - #[allow(missing_docs)] pub struct $sname { $( - pub $ext: bool, + #[doc = $doc] + pub $member: bool, )* /// This field ensures that an instance of this `Extensions` struct /// can only be created through Vulkano functions and the update /// syntax. This way, extensions can be added to Vulkano without /// breaking existing code. - pub _unbuildable: Unbuildable, + pub _unbuildable: crate::extensions::Unbuildable, } impl $sname { @@ -36,8 +45,8 @@ macro_rules! extensions { #[inline] pub const fn none() -> $sname { $sname { - $($ext: false,)* - _unbuildable: Unbuildable(()) + $($member: false,)* + _unbuildable: crate::extensions::Unbuildable(()) } } @@ -46,9 +55,9 @@ macro_rules! extensions { pub const fn union(&self, other: &$sname) -> $sname { $sname { $( - $ext: self.$ext || other.$ext, + $member: self.$member || other.$member, )* - _unbuildable: Unbuildable(()) + _unbuildable: crate::extensions::Unbuildable(()) } } @@ -57,9 +66,9 @@ macro_rules! extensions { pub const fn intersection(&self, other: &$sname) -> $sname { $sname { $( - $ext: self.$ext && other.$ext, + $member: self.$member && other.$member, )* - _unbuildable: Unbuildable(()) + _unbuildable: crate::extensions::Unbuildable(()) } } @@ -68,25 +77,25 @@ macro_rules! extensions { pub const fn difference(&self, other: &$sname) -> $sname { $sname { $( - $ext: self.$ext && !other.$ext, + $member: self.$member && !other.$member, )* - _unbuildable: Unbuildable(()) + _unbuildable: crate::extensions::Unbuildable(()) } } } - impl fmt::Debug for $sname { + impl std::fmt::Debug for $sname { #[allow(unused_assignments)] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { write!(f, "[")?; let mut first = true; $( - if self.$ext { + if self.$member { if !first { write!(f, ", ")? } else { first = false; } - f.write_str(str::from_utf8($s).unwrap())?; + f.write_str(std::str::from_utf8($raw).unwrap())?; } )* @@ -94,82 +103,28 @@ macro_rules! extensions { } } - /// Set of extensions, not restricted to those vulkano knows about. - /// - /// This is useful when interacting with external code that has statically-unknown extension - /// requirements. - #[derive(Clone, Eq, PartialEq)] - pub struct $rawname(HashSet); - - impl $rawname { - /// Constructs an extension set containing the supplied extensions. - pub fn new(extensions: I) -> Self - where I: IntoIterator - { - $rawname(extensions.into_iter().collect()) - } - - /// Constructs an empty extension set. - pub fn none() -> Self { $rawname(HashSet::new()) } - - /// Adds an extension to the set if it is not already present. - pub fn insert(&mut self, extension: CString) { - self.0.insert(extension); - } - - /// Returns the intersection of this set and another. - pub fn intersection(&self, other: &Self) -> Self { - $rawname(self.0.intersection(&other.0).cloned().collect()) - } - - /// Returns the difference of another set from this one. - pub fn difference(&self, other: &Self) -> Self { - $rawname(self.0.difference(&other.0).cloned().collect()) - } - - /// Returns the union of both extension sets - pub fn union(&self, other: &Self) -> Self { - $rawname(self.0.union(&other.0).cloned().collect()) - } - - // TODO: impl Iterator - pub fn iter(&self) -> ::std::collections::hash_set::Iter { self.0.iter() } - } - - impl fmt::Debug for $rawname { - #[allow(unused_assignments)] - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.0.fmt(f) - } - } - - impl FromIterator for $rawname { - fn from_iter(iter: T) -> Self - where T: IntoIterator - { - $rawname(iter.into_iter().collect()) - } - } - - impl<'a> From<&'a $sname> for $rawname { - fn from(x: &'a $sname) -> Self { - let mut data = HashSet::new(); - $(if x.$ext { data.insert(CString::new(&$s[..]).unwrap()); })* - $rawname(data) - } - } - - impl<'a> From<&'a $rawname> for $sname { - fn from(x: &'a $rawname) -> Self { - let mut extensions = $sname::none(); - $( - if x.0.iter().any(|x| x.as_bytes() == &$s[..]) { - extensions.$ext = true; + impl<'a, I> From for $sname where I: IntoIterator { + fn from(names: I) -> Self { + let mut extensions = Self::none(); + for name in names { + match name.to_bytes() { + $( + $raw => { extensions.$member = true; } + )* + _ => (), } - )* + } extensions } } + + impl<'a> From<&'a $sname> for Vec { + fn from(x: &'a $sname) -> Self { + let mut data = Self::new(); + $(if x.$member { data.push(std::ffi::CString::new(&$raw[..]).unwrap()); })* + data + } + } ); } @@ -233,3 +188,76 @@ impl From for SupportedExtensionsError { } } } + +/// An error that can happen when enabling an extension on an instance or device. +#[derive(Clone, Copy, Debug)] +pub struct ExtensionRestrictionError { + /// The extension in question. + pub extension: &'static str, + /// The restriction that was not met. + pub restriction: ExtensionRestriction, +} + +impl error::Error for ExtensionRestrictionError {} + +impl fmt::Display for ExtensionRestrictionError { + #[inline] + fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { + write!( + fmt, + "a restriction for the extension {} was not met: {}", + self.extension, self.restriction, + ) + } +} + +#[derive(Clone, Copy, Debug)] +pub enum ExtensionRestriction { + /// Not supported by the loader or physical device. + NotSupported, + /// Requires a minimum Vulkan API version. + RequiresCore(Version), + /// Requires a device extension to be enabled. + RequiresDeviceExtension(&'static str), + /// Requires an instance extension to be enabled. + RequiresInstanceExtension(&'static str), + /// Required to be enabled by the physical device. + RequiredIfSupported, + /// Requires a device extension to be disabled. + ConflictsDeviceExtension(&'static str), +} + +impl fmt::Display for ExtensionRestriction { + #[inline] + fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { + match *self { + ExtensionRestriction::NotSupported => { + write!(fmt, "not supported by the loader or physical device") + } + ExtensionRestriction::RequiresCore(version) => { + write!( + fmt, + "requires Vulkan API version {}.{}", + version.major, version.minor + ) + } + ExtensionRestriction::RequiresDeviceExtension(ext) => { + write!(fmt, "requires device extension {} to be enabled", ext) + } + ExtensionRestriction::RequiresInstanceExtension(ext) => { + write!(fmt, "requires instance extension {} to be enabled", ext) + } + ExtensionRestriction::RequiredIfSupported => { + write!(fmt, "required to be enabled by the physical device") + } + ExtensionRestriction::ConflictsDeviceExtension(ext) => { + write!(fmt, "requires device extension {} to be disabled", ext) + } + } + } +} + +/// This helper type can only be instantiated inside this module. +#[doc(hidden)] +#[derive(Debug, Copy, Clone, PartialEq, Eq)] +pub struct Unbuildable(pub(crate) ()); diff --git a/vulkano/src/fns.rs b/vulkano/src/fns.rs index d7837f43..88a83541 100644 --- a/vulkano/src/fns.rs +++ b/vulkano/src/fns.rs @@ -7,21 +7,17 @@ // notice may not be copied, modified, or distributed except // according to those terms. -use ash::vk::*; -use std::ffi::CStr; -use std::os::raw::c_void; - macro_rules! fns { ($struct_name:ident, { $($member:ident => $fn_struct:ident,)+ }) => { pub struct $struct_name { $( - pub $member: $fn_struct, + pub $member: ash::vk::$fn_struct, )+ } impl $struct_name { pub fn load(mut load_fn: F) -> $struct_name - where F: FnMut(&CStr) -> *const c_void + where F: FnMut(&std::ffi::CStr) -> *const std::ffi::c_void { $struct_name { $( @@ -33,50 +29,5 @@ macro_rules! fns { }; } -// TODO: would be nice if these could be generated automatically from Vulkano's list of extensions - -fns!(EntryFunctions, { - v1_0 => EntryFnV1_0, - v1_1 => EntryFnV1_1, - v1_2 => EntryFnV1_2, -}); - -fns!(InstanceFunctions, { - v1_0 => InstanceFnV1_0, - v1_1 => InstanceFnV1_1, - v1_2 => InstanceFnV1_2, - - khr_android_surface => KhrAndroidSurfaceFn, - khr_display => KhrDisplayFn, - khr_get_physical_device_properties2 => KhrGetPhysicalDeviceProperties2Fn, // Promoted - khr_surface => KhrSurfaceFn, - khr_wayland_surface => KhrWaylandSurfaceFn, - khr_win32_surface => KhrWin32SurfaceFn, - khr_xcb_surface => KhrXcbSurfaceFn, - khr_xlib_surface => KhrXlibSurfaceFn, - - // This is an instance extension, so it should be loaded with `vkGetInstanceProcAddr`, despite - // having device-level functions. This is an unfortunate exception in the spec that even causes - // the LunarG people headaches: - // https://github.com/KhronosGroup/Vulkan-Loader/issues/116#issuecomment-580982393 - ext_debug_utils => ExtDebugUtilsFn, - - mvk_ios_surface => MvkIosSurfaceFn, - mvk_macos_surface => MvkMacosSurfaceFn, - - nn_vi_surface => NnViSurfaceFn, -}); - -fns!(DeviceFunctions, { - v1_0 => DeviceFnV1_0, - v1_1 => DeviceFnV1_1, - v1_2 => DeviceFnV1_2, - - khr_external_memory_fd => KhrExternalMemoryFdFn, - khr_get_memory_requirements2 => KhrGetMemoryRequirements2Fn, // Promoted - khr_maintenance1 => KhrMaintenance1Fn, // Promoted - khr_swapchain => KhrSwapchainFn, - - ext_buffer_device_address => ExtBufferDeviceAddressFn, - ext_full_screen_exclusive => ExtFullScreenExclusiveFn, -}); +pub use crate::autogen::{DeviceFunctions, EntryFunctions, InstanceFunctions}; +pub(crate) use fns; diff --git a/vulkano/src/instance/extensions.rs b/vulkano/src/instance/extensions.rs index 9c24e10d..704a97be 100644 --- a/vulkano/src/instance/extensions.rs +++ b/vulkano/src/instance/extensions.rs @@ -7,184 +7,147 @@ // notice may not be copied, modified, or distributed except // according to those terms. -use std::collections::HashSet; -use std::ffi::{CStr, CString}; -use std::fmt; -use std::iter::FromIterator; -use std::ptr; -use std::str; - use crate::check_errors; -use crate::extensions::SupportedExtensionsError; +pub use crate::extensions::{ + ExtensionRestriction, ExtensionRestrictionError, SupportedExtensionsError, +}; use crate::instance::loader; use crate::instance::loader::LoadingError; +use std::ffi::CStr; +use std::ptr; macro_rules! instance_extensions { - ($sname:ident, $rawname:ident, $($ext:ident => $s:expr,)*) => ( + ( + $($member:ident => { + doc: $doc:expr, + raw: $raw:expr, + requires_core: $requires_core:expr, + requires_extensions: [$($requires_extension:ident),*]$(,)? + },)* + ) => ( extensions! { - $sname, $rawname, - $( $ext => $s,)* + InstanceExtensions, + $($member => { + doc: $doc, + raw: $raw, + requires_core: $requires_core, + requires_device_extensions: [], + requires_instance_extensions: [$($requires_extension),*], + },)* } - impl $rawname { - /// See the docs of supported_by_core(). - pub fn supported_by_core_raw() -> Result { - $rawname::supported_by_core_raw_with_loader(loader::auto_loader()?) - } - - /// Same as `supported_by_core_raw()`, but allows specifying a loader. - pub fn supported_by_core_raw_with_loader(ptrs: &loader::FunctionPointers) - -> Result - where L: loader::Loader - { - let fns = ptrs.fns(); - - let properties: Vec = unsafe { - let mut num = 0; - check_errors(fns.v1_0.enumerate_instance_extension_properties( - ptr::null(), &mut num, ptr::null_mut() - ))?; - - let mut properties = Vec::with_capacity(num as usize); - check_errors(fns.v1_0.enumerate_instance_extension_properties( - ptr::null(), &mut num, properties.as_mut_ptr() - ))?; - properties.set_len(num as usize); - properties - }; - Ok($rawname(properties.iter().map(|x| unsafe { CStr::from_ptr(x.extension_name.as_ptr()) }.to_owned()).collect())) - } - - /// Returns a `RawExtensions` object with extensions supported by the core driver. - pub fn supported_by_core() -> Result { - match $rawname::supported_by_core_raw() { - Ok(l) => Ok(l), - Err(SupportedExtensionsError::LoadingError(e)) => Err(e), - Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), - } - } - - /// Same as `supported_by_core`, but allows specifying a loader. - pub fn supported_by_core_with_loader(ptrs: &loader::FunctionPointers) - -> Result - where L: loader::Loader - { - match $rawname::supported_by_core_raw_with_loader(ptrs) { - Ok(l) => Ok(l), - Err(SupportedExtensionsError::LoadingError(e)) => Err(e), - Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), - } - } - } - - impl $sname { - /// See the docs of supported_by_core(). - pub fn supported_by_core_raw() -> Result { - $sname::supported_by_core_raw_with_loader(loader::auto_loader()?) - } - - /// See the docs of supported_by_core(). - pub fn supported_by_core_raw_with_loader(ptrs: &loader::FunctionPointers) - -> Result - where L: loader::Loader - { - let fns = ptrs.fns(); - - let properties: Vec = unsafe { - let mut num = 0; - check_errors(fns.v1_0.enumerate_instance_extension_properties( - ptr::null(), &mut num, ptr::null_mut() - ))?; - - let mut properties = Vec::with_capacity(num as usize); - check_errors(fns.v1_0.enumerate_instance_extension_properties( - ptr::null(), &mut num, properties.as_mut_ptr() - ))?; - properties.set_len(num as usize); - properties - }; - - let mut extensions = $sname::none(); - for property in properties { - let name = unsafe { CStr::from_ptr(property.extension_name.as_ptr()) }; - $( - // TODO: Check specVersion? - if name.to_bytes() == &$s[..] { - extensions.$ext = true; + impl InstanceExtensions { + /// Checks enabled extensions against the instance version and each other. + pub(super) fn check_requirements( + &self, + supported: &InstanceExtensions, + api_version: crate::Version, + ) -> Result<(), crate::extensions::ExtensionRestrictionError> { + $( + if self.$member { + if !supported.$member { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::NotSupported, + }); } - )* - } - Ok(extensions) - } - /// Returns a `RawExtensions` object with extensions supported by the core driver. - pub fn supported_by_core() -> Result { - match $sname::supported_by_core_raw() { - Ok(l) => Ok(l), - Err(SupportedExtensionsError::LoadingError(e)) => Err(e), - Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), - } - } - - /// Same as `supported_by_core`, but allows specifying a loader. - pub fn supported_by_core_with_loader(ptrs: &loader::FunctionPointers) - -> Result - where L: loader::Loader - { - match $sname::supported_by_core_raw_with_loader(ptrs) { - Ok(l) => Ok(l), - Err(SupportedExtensionsError::LoadingError(e)) => Err(e), - Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), - } + if api_version < $requires_core { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::RequiresCore($requires_core), + }); + } else { + $( + if !self.$requires_extension { + return Err(crate::extensions::ExtensionRestrictionError { + extension: stringify!($member), + restriction: crate::extensions::ExtensionRestriction::RequiresInstanceExtension(stringify!($requires_extension)), + }); + } + )* + } + } + )* + Ok(()) } } ); } -instance_extensions! { - InstanceExtensions, - RawInstanceExtensions, +pub use crate::autogen::InstanceExtensions; +pub(crate) use instance_extensions; - // List in order: khr, ext, then alphabetical - khr_android_surface => b"VK_KHR_android_surface", - khr_device_group_creation => b"VK_KHR_device_group_creation", - khr_display => b"VK_KHR_display", - khr_external_fence_capabilities => b"VK_KHR_external_fence_capabilities", - khr_external_memory_capabilities => b"VK_KHR_external_memory_capabilities", - khr_external_semaphore_capabilities => b"VK_KHR_external_semaphore_capabilities", - khr_get_display_properties2 => b"VK_KHR_get_display_properties2", - khr_get_physical_device_properties2 => b"VK_KHR_get_physical_device_properties2", - khr_get_surface_capabilities2 => b"VK_KHR_get_surface_capabilities2", - khr_surface => b"VK_KHR_surface", - khr_wayland_surface => b"VK_KHR_wayland_surface", - khr_win32_surface => b"VK_KHR_win32_surface", - khr_xcb_surface => b"VK_KHR_xcb_surface", - khr_xlib_surface => b"VK_KHR_xlib_surface", - ext_acquire_xlib_display => b"VK_EXT_acquire_xlib_display", - ext_debug_report => b"VK_EXT_debug_report", - ext_debug_utils => b"VK_EXT_debug_utils", - ext_direct_mode_display => b"VK_EXT_direct_mode_display", - ext_display_surface_counter => b"VK_EXT_display_surface_counter", - ext_swapchain_colorspace => b"VK_EXT_swapchain_colorspace", - mvk_ios_surface => b"VK_MVK_ios_surface", - mvk_macos_surface => b"VK_MVK_macos_surface", - mvk_moltenvk => b"VK_MVK_moltenvk", // TODO: confirm that it's an instance extension - nn_vi_surface => b"VK_NN_vi_surface", +impl InstanceExtensions { + /// See the docs of supported_by_core(). + pub fn supported_by_core_raw() -> Result { + InstanceExtensions::supported_by_core_raw_with_loader(loader::auto_loader()?) + } + + /// Returns an `InstanceExtensions` object with extensions supported by the core driver. + pub fn supported_by_core() -> Result { + match InstanceExtensions::supported_by_core_raw() { + Ok(l) => Ok(l), + Err(SupportedExtensionsError::LoadingError(e)) => Err(e), + Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), + } + } + + /// Same as `supported_by_core`, but allows specifying a loader. + pub fn supported_by_core_with_loader( + ptrs: &loader::FunctionPointers, + ) -> Result + where + L: loader::Loader, + { + match InstanceExtensions::supported_by_core_raw_with_loader(ptrs) { + Ok(l) => Ok(l), + Err(SupportedExtensionsError::LoadingError(e)) => Err(e), + Err(SupportedExtensionsError::OomError(e)) => panic!("{:?}", e), + } + } + + /// See the docs of supported_by_core(). + pub fn supported_by_core_raw_with_loader( + ptrs: &loader::FunctionPointers, + ) -> Result + where + L: loader::Loader, + { + let fns = ptrs.fns(); + + let properties: Vec = unsafe { + let mut num = 0; + check_errors(fns.v1_0.enumerate_instance_extension_properties( + ptr::null(), + &mut num, + ptr::null_mut(), + ))?; + + let mut properties = Vec::with_capacity(num as usize); + check_errors(fns.v1_0.enumerate_instance_extension_properties( + ptr::null(), + &mut num, + properties.as_mut_ptr(), + ))?; + properties.set_len(num as usize); + properties + }; + + Ok(Self::from(properties.iter().map(|property| unsafe { + CStr::from_ptr(property.extension_name.as_ptr()) + }))) + } } -/// This helper type can only be instantiated inside this module. -/// See `*Extensions::_unbuildable`. -#[doc(hidden)] -#[derive(Debug, Copy, Clone, PartialEq, Eq)] -pub struct Unbuildable(()); - #[cfg(test)] mod tests { - use crate::instance::{InstanceExtensions, RawInstanceExtensions}; + use crate::instance::InstanceExtensions; + use std::ffi::CString; #[test] fn empty_extensions() { - let i: RawInstanceExtensions = (&InstanceExtensions::none()).into(); + let i: Vec = (&InstanceExtensions::none()).into(); assert!(i.iter().next().is_none()); } } diff --git a/vulkano/src/instance/instance.rs b/vulkano/src/instance/instance.rs index a203d4c7..b887f1e2 100644 --- a/vulkano/src/instance/instance.rs +++ b/vulkano/src/instance/instance.rs @@ -8,13 +8,14 @@ // according to those terms. use crate::check_errors; +use crate::extensions::ExtensionRestrictionError; use crate::fns::InstanceFunctions; use crate::instance::loader; use crate::instance::loader::FunctionPointers; use crate::instance::loader::Loader; use crate::instance::loader::LoadingError; use crate::instance::physical_device::{init_physical_devices, PhysicalDeviceInfos}; -use crate::instance::{InstanceExtensions, RawInstanceExtensions}; +use crate::instance::InstanceExtensions; use crate::Error; use crate::OomError; use crate::Version; @@ -181,7 +182,7 @@ pub struct Instance { pub(super) physical_devices: Vec, fns: InstanceFunctions, - extensions: RawInstanceExtensions, + extensions: InstanceExtensions, layers: SmallVec<[CString; 16]>, function_pointers: OwnedOrRef>>, } @@ -217,15 +218,14 @@ impl Instance { // TODO: add a test for these ^ // TODO: if no allocator is specified by the user, use Rust's allocator instead of leaving // the choice to Vulkan - pub fn new<'a, L, Ext>( + pub fn new<'a, L>( app_infos: Option<&ApplicationInfo>, max_api_version: Version, - extensions: Ext, + extensions: &InstanceExtensions, layers: L, ) -> Result, InstanceCreationError> where L: IntoIterator, - Ext: Into, { let layers = layers .into_iter() @@ -235,23 +235,22 @@ impl Instance { Instance::new_inner( app_infos, max_api_version, - extensions.into(), + extensions, layers, OwnedOrRef::Ref(loader::auto_loader()?), ) } /// Same as `new`, but allows specifying a loader where to load Vulkan from. - pub fn with_loader<'a, L, Ext>( + pub fn with_loader<'a, L>( loader: FunctionPointers>, app_infos: Option<&ApplicationInfo>, max_api_version: Version, - extensions: Ext, + extensions: &InstanceExtensions, layers: L, ) -> Result, InstanceCreationError> where L: IntoIterator, - Ext: Into, { let layers = layers .into_iter() @@ -261,7 +260,7 @@ impl Instance { Instance::new_inner( app_infos, max_api_version, - extensions.into(), + extensions, layers, OwnedOrRef::Owned(loader), ) @@ -270,10 +269,18 @@ impl Instance { fn new_inner( app_infos: Option<&ApplicationInfo>, max_api_version: Version, - extensions: RawInstanceExtensions, + extensions: &InstanceExtensions, layers: SmallVec<[CString; 16]>, function_pointers: OwnedOrRef>>, ) -> Result, InstanceCreationError> { + let api_version = std::cmp::min(max_api_version, function_pointers.api_version()?); + + // Check if the extensions are correct + extensions.check_requirements( + &InstanceExtensions::supported_by_core_with_loader(&function_pointers)?, + api_version, + )?; + // TODO: For now there are still buggy drivers that will segfault if you don't pass any // appinfos. Therefore for now we ensure that it can't be `None`. let def = Default::default(); @@ -299,8 +306,6 @@ impl Instance { None }; - let api_version = std::cmp::min(max_api_version, function_pointers.api_version()?); - // Building the `vk::ApplicationInfo` if required. let app_infos = if let Some(app_infos) = app_infos { Some(ash::vk::ApplicationInfo { @@ -334,12 +339,13 @@ impl Instance { }; // FIXME: check whether each layer is supported - let layers_ptr = layers + let layers_ptrs = layers .iter() .map(|layer| layer.as_ptr()) .collect::>(); - let extensions_list = extensions + let extensions_list: Vec = extensions.into(); + let extensions_ptrs = extensions_list .iter() .map(|extension| extension.as_ptr()) .collect::>(); @@ -354,10 +360,10 @@ impl Instance { } else { ptr::null() }, - enabled_layer_count: layers_ptr.len() as u32, - pp_enabled_layer_names: layers_ptr.as_ptr(), - enabled_extension_count: extensions_list.len() as u32, - pp_enabled_extension_names: extensions_list.as_ptr(), + enabled_layer_count: layers_ptrs.len() as u32, + pp_enabled_layer_names: layers_ptrs.as_ptr(), + enabled_extension_count: extensions_ptrs.len() as u32, + pp_enabled_extension_names: extensions_ptrs.as_ptr(), ..Default::default() }; @@ -383,7 +389,7 @@ impl Instance { //alloc: None, physical_devices: Vec::new(), fns, - extensions, + extensions: extensions.clone(), layers, function_pointers, }; @@ -402,7 +408,7 @@ impl Instance { unimplemented!() }*/ - /// Returns the Vulkan version supported by this `Instance`. + /// Returns the Vulkan version supported by the instance. /// /// This is the lower of the /// [driver's supported version](crate::instance::loader::FunctionPointers::api_version) and @@ -412,7 +418,7 @@ impl Instance { self.api_version } - /// Returns the maximum Vulkan version that was specified when creating this `Instance`. + /// Returns the maximum Vulkan version that was specified when creating the instance. #[inline] pub fn max_api_version(&self) -> Version { self.max_api_version @@ -424,7 +430,7 @@ impl Instance { &self.fns } - /// Returns the list of extensions that have been loaded. + /// Returns the extensions that have been enabled on the instance. /// /// This list is equal to what was passed to `Instance::new()`. /// @@ -437,19 +443,14 @@ impl Instance { /// /// let extensions = InstanceExtensions::supported_by_core().unwrap(); /// let instance = Instance::new(None, Version::V1_1, &extensions, None).unwrap(); - /// assert_eq!(instance.loaded_extensions(), extensions); + /// assert_eq!(instance.loaded_extensions(), &extensions); /// ``` #[inline] - pub fn loaded_extensions(&self) -> InstanceExtensions { - InstanceExtensions::from(&self.extensions) - } - - #[inline] - pub fn raw_loaded_extensions(&self) -> &RawInstanceExtensions { + pub fn loaded_extensions(&self) -> &InstanceExtensions { &self.extensions } - /// Returns the list of layers requested when creating this instance. + /// Returns the layers that have been enabled on the instance. #[doc(hidden)] #[inline] pub fn loaded_layers(&self) -> slice::Iter { @@ -605,11 +606,12 @@ pub enum InstanceCreationError { InitializationFailed, /// One of the requested layers is missing. LayerNotPresent, - /// One of the requested extensions is missing. + /// One of the requested extensions is not supported by the implementation. ExtensionNotPresent, /// The version requested is not supported by the implementation. - // TODO: more info about this once the question of the version has been resolved IncompatibleDriver, + /// A restriction for an extension was not met. + ExtensionRestrictionNotMet(ExtensionRestrictionError), } impl error::Error for InstanceCreationError { @@ -626,19 +628,17 @@ impl error::Error for InstanceCreationError { impl fmt::Display for InstanceCreationError { #[inline] fn fmt(&self, fmt: &mut fmt::Formatter) -> Result<(), fmt::Error> { - write!( - fmt, - "{}", - match *self { - InstanceCreationError::LoadingError(_) => - "failed to load the Vulkan shared library", - InstanceCreationError::OomError(_) => "not enough memory available", - InstanceCreationError::InitializationFailed => "initialization failed", - InstanceCreationError::LayerNotPresent => "layer not present", - InstanceCreationError::ExtensionNotPresent => "extension not present", - InstanceCreationError::IncompatibleDriver => "incompatible driver", + match *self { + InstanceCreationError::LoadingError(_) => { + write!(fmt, "failed to load the Vulkan shared library") } - ) + InstanceCreationError::OomError(_) => write!(fmt, "not enough memory available"), + InstanceCreationError::InitializationFailed => write!(fmt, "initialization failed"), + InstanceCreationError::LayerNotPresent => write!(fmt, "layer not present"), + InstanceCreationError::ExtensionNotPresent => write!(fmt, "extension not present"), + InstanceCreationError::IncompatibleDriver => write!(fmt, "incompatible driver"), + InstanceCreationError::ExtensionRestrictionNotMet(err) => err.fmt(fmt), + } } } @@ -656,6 +656,13 @@ impl From for InstanceCreationError { } } +impl From for InstanceCreationError { + #[inline] + fn from(err: ExtensionRestrictionError) -> Self { + Self::ExtensionRestrictionNotMet(err) + } +} + impl From for InstanceCreationError { #[inline] fn from(err: Error) -> InstanceCreationError { diff --git a/vulkano/src/instance/mod.rs b/vulkano/src/instance/mod.rs index 9fb5d572..295ffd96 100644 --- a/vulkano/src/instance/mod.rs +++ b/vulkano/src/instance/mod.rs @@ -52,7 +52,6 @@ //! `device` module for more info. pub use self::extensions::InstanceExtensions; -pub use self::extensions::RawInstanceExtensions; pub use self::instance::ApplicationInfo; pub use self::instance::Instance; pub use self::instance::InstanceCreationError; @@ -71,10 +70,13 @@ pub use self::physical_device::PhysicalDeviceType; pub use self::physical_device::PhysicalDevicesIter; pub use self::physical_device::QueueFamiliesIter; pub use self::physical_device::QueueFamily; +pub use crate::extensions::{ + ExtensionRestriction, ExtensionRestrictionError, SupportedExtensionsError, +}; pub use crate::version::Version; pub mod debug; -mod extensions; +pub(crate) mod extensions; mod instance; mod layers; mod limits; diff --git a/vulkano/src/instance/physical_device.rs b/vulkano/src/instance/physical_device.rs index e19b4b00..95f17660 100644 --- a/vulkano/src/instance/physical_device.rs +++ b/vulkano/src/instance/physical_device.rs @@ -8,7 +8,7 @@ // according to those terms. use crate::check_errors; -use crate::device::{Features, FeaturesFfi}; +use crate::device::{DeviceExtensions, Features, FeaturesFfi}; use crate::instance::limits::Limits; use crate::instance::{Instance, InstanceCreationError}; use crate::sync::PipelineStage; @@ -24,7 +24,7 @@ pub(super) fn init_physical_devices( instance: &Instance, ) -> Result, InstanceCreationError> { let fns = instance.fns(); - let extensions = instance.loaded_extensions(); + let instance_extensions = instance.loaded_extensions(); let physical_devices: Vec = unsafe { let mut num = 0; @@ -44,213 +44,254 @@ pub(super) fn init_physical_devices( devices }; + let supported_extensions: Vec = physical_devices + .iter() + .map( + |&physical_device| -> Result { + let extension_properties: Vec = unsafe { + let mut num = 0; + check_errors(fns.v1_0.enumerate_device_extension_properties( + physical_device, + ptr::null(), + &mut num, + ptr::null_mut(), + ))?; + + let mut properties = Vec::with_capacity(num as usize); + check_errors(fns.v1_0.enumerate_device_extension_properties( + physical_device, + ptr::null(), + &mut num, + properties.as_mut_ptr(), + ))?; + properties.set_len(num as usize); + properties + }; + + Ok(DeviceExtensions::from(extension_properties.iter().map( + |property| unsafe { CStr::from_ptr(property.extension_name.as_ptr()) }, + ))) + }, + ) + .collect::>()?; + + let iter = physical_devices + .into_iter() + .zip(supported_extensions.into_iter()); + // Getting the properties of all physical devices. // If possible, we use VK_KHR_get_physical_device_properties2. let physical_devices = if instance.api_version() >= Version::V1_1 - || extensions.khr_get_physical_device_properties2 + || instance_extensions.khr_get_physical_device_properties2 { - init_physical_devices_inner2(instance, physical_devices) + init_physical_devices_inner2(instance, iter) } else { - init_physical_devices_inner(instance, physical_devices) + init_physical_devices_inner(instance, iter) }; Ok(physical_devices) } /// Initialize all physical devices -fn init_physical_devices_inner( - instance: &Instance, - physical_devices: Vec, -) -> Vec { +fn init_physical_devices_inner(instance: &Instance, info: I) -> Vec +where + I: IntoIterator, +{ let fns = instance.fns(); - let mut output = Vec::with_capacity(physical_devices.len()); - for device in physical_devices.into_iter() { - let properties: ash::vk::PhysicalDeviceProperties = unsafe { - let mut output = MaybeUninit::uninit(); - fns.v1_0 - .get_physical_device_properties(device, output.as_mut_ptr()); - output.assume_init() - }; + info.into_iter() + .map(|(physical_device, supported_extensions)| { + let properties: ash::vk::PhysicalDeviceProperties = unsafe { + let mut output = MaybeUninit::uninit(); + fns.v1_0 + .get_physical_device_properties(physical_device, output.as_mut_ptr()); + output.assume_init() + }; - let queue_families = unsafe { - let mut num = 0; - fns.v1_0 - .get_physical_device_queue_family_properties(device, &mut num, ptr::null_mut()); + let queue_families = unsafe { + let mut num = 0; + fns.v1_0.get_physical_device_queue_family_properties( + physical_device, + &mut num, + ptr::null_mut(), + ); - let mut families = Vec::with_capacity(num as usize); - fns.v1_0.get_physical_device_queue_family_properties( - device, - &mut num, - families.as_mut_ptr(), - ); - families.set_len(num as usize); - families - }; + let mut families = Vec::with_capacity(num as usize); + fns.v1_0.get_physical_device_queue_family_properties( + physical_device, + &mut num, + families.as_mut_ptr(), + ); + families.set_len(num as usize); + families + }; - let memory: ash::vk::PhysicalDeviceMemoryProperties = unsafe { - let mut output = MaybeUninit::uninit(); - fns.v1_0 - .get_physical_device_memory_properties(device, output.as_mut_ptr()); - output.assume_init() - }; + let memory: ash::vk::PhysicalDeviceMemoryProperties = unsafe { + let mut output = MaybeUninit::uninit(); + fns.v1_0 + .get_physical_device_memory_properties(physical_device, output.as_mut_ptr()); + output.assume_init() + }; - let available_features: Features = unsafe { - let mut output = FeaturesFfi::default(); - fns.v1_0 - .get_physical_device_features(device, &mut output.head_as_mut().features); - Features::from(&output) - }; + let available_features: Features = unsafe { + let mut output = FeaturesFfi::default(); + fns.v1_0.get_physical_device_features( + physical_device, + &mut output.head_as_mut().features, + ); + Features::from(&output) + }; - output.push(PhysicalDeviceInfos { - device, - properties, - extended_properties: PhysicalDeviceExtendedProperties::empty(), - memory, - queue_families, - available_features: Features::from(available_features), - }); - } - output + PhysicalDeviceInfos { + physical_device, + properties, + extended_properties: PhysicalDeviceExtendedProperties::empty(), + memory, + queue_families, + available_features, + } + }) + .collect() } /// Initialize all physical devices, but use VK_KHR_get_physical_device_properties2 /// TODO: Query extension-specific physical device properties, once a new instance extension is supported. -fn init_physical_devices_inner2( - instance: &Instance, - physical_devices: Vec, -) -> Vec { +fn init_physical_devices_inner2(instance: &Instance, info: I) -> Vec +where + I: IntoIterator, +{ let fns = instance.fns(); - let mut output = Vec::with_capacity(physical_devices.len()); - for device in physical_devices.into_iter() { - let mut extended_properties = PhysicalDeviceExtendedProperties::empty(); + info.into_iter() + .map(|(physical_device, supported_extensions)| { + let mut extended_properties = PhysicalDeviceExtendedProperties::empty(); - let properties: ash::vk::PhysicalDeviceProperties = unsafe { - let mut subgroup_properties = ash::vk::PhysicalDeviceSubgroupProperties::default(); + let properties: ash::vk::PhysicalDeviceProperties = unsafe { + let mut subgroup_properties = ash::vk::PhysicalDeviceSubgroupProperties::default(); - let mut multiview_properties = ash::vk::PhysicalDeviceMultiviewProperties { - p_next: &mut subgroup_properties as *mut _ as *mut c_void, - ..Default::default() - }; + let mut multiview_properties = ash::vk::PhysicalDeviceMultiviewProperties { + p_next: &mut subgroup_properties as *mut _ as *mut c_void, + ..Default::default() + }; - let mut output = ash::vk::PhysicalDeviceProperties2 { - p_next: if instance.api_version() >= Version::V1_1 { - &mut multiview_properties as *mut _ as *mut c_void + let mut output = ash::vk::PhysicalDeviceProperties2 { + p_next: if instance.api_version() >= Version::V1_1 { + &mut multiview_properties as *mut _ as *mut c_void + } else { + ptr::null_mut() + }, + ..Default::default() + }; + + if instance.api_version() >= Version::V1_1 { + fns.v1_1 + .get_physical_device_properties2(physical_device, &mut output); } else { - ptr::null_mut() - }, - ..Default::default() + fns.khr_get_physical_device_properties2 + .get_physical_device_properties2_khr(physical_device, &mut output); + } + + extended_properties = PhysicalDeviceExtendedProperties { + subgroup_size: Some(subgroup_properties.subgroup_size), + max_multiview_view_count: Some(multiview_properties.max_multiview_view_count), + max_multiview_instance_index: Some( + multiview_properties.max_multiview_instance_index, + ), + + ..extended_properties + }; + + output.properties }; - if instance.api_version() >= Version::V1_1 { - fns.v1_1 - .get_physical_device_properties2(device, &mut output); - } else { - fns.khr_get_physical_device_properties2 - .get_physical_device_properties2_khr(device, &mut output); - } + let queue_families = unsafe { + let mut num = 0; - extended_properties = PhysicalDeviceExtendedProperties { - subgroup_size: Some(subgroup_properties.subgroup_size), - max_multiview_view_count: Some(multiview_properties.max_multiview_view_count), - max_multiview_instance_index: Some( - multiview_properties.max_multiview_instance_index, - ), - - ..extended_properties - }; - - output.properties - }; - - let queue_families = unsafe { - let mut num = 0; - - if instance.api_version() >= Version::V1_1 { - fns.v1_1.get_physical_device_queue_family_properties2( - device, - &mut num, - ptr::null_mut(), - ); - } else { - fns.khr_get_physical_device_properties2 - .get_physical_device_queue_family_properties2_khr( - device, + if instance.api_version() >= Version::V1_1 { + fns.v1_1.get_physical_device_queue_family_properties2( + physical_device, &mut num, ptr::null_mut(), ); - } + } else { + fns.khr_get_physical_device_properties2 + .get_physical_device_queue_family_properties2_khr( + physical_device, + &mut num, + ptr::null_mut(), + ); + } - let mut families = vec![ash::vk::QueueFamilyProperties2::default(); num as usize]; + let mut families = vec![ash::vk::QueueFamilyProperties2::default(); num as usize]; - if instance.api_version() >= Version::V1_1 { - fns.v1_1.get_physical_device_queue_family_properties2( - device, - &mut num, - families.as_mut_ptr(), - ); - } else { - fns.khr_get_physical_device_properties2 - .get_physical_device_queue_family_properties2_khr( - device, + if instance.api_version() >= Version::V1_1 { + fns.v1_1.get_physical_device_queue_family_properties2( + physical_device, &mut num, families.as_mut_ptr(), ); + } else { + fns.khr_get_physical_device_properties2 + .get_physical_device_queue_family_properties2_khr( + physical_device, + &mut num, + families.as_mut_ptr(), + ); + } + + families + .into_iter() + .map(|family| family.queue_family_properties) + .collect() + }; + + let memory: ash::vk::PhysicalDeviceMemoryProperties = unsafe { + let mut output = ash::vk::PhysicalDeviceMemoryProperties2KHR::default(); + + if instance.api_version() >= Version::V1_1 { + fns.v1_1 + .get_physical_device_memory_properties2(physical_device, &mut output); + } else { + fns.khr_get_physical_device_properties2 + .get_physical_device_memory_properties2_khr(physical_device, &mut output); + } + + output.memory_properties + }; + + let available_features: Features = unsafe { + let max_api_version = instance.max_api_version(); + let api_version = + std::cmp::min(max_api_version, Version::from(properties.api_version)); + + let mut output = FeaturesFfi::default(); + output.make_chain(api_version, &supported_extensions); + + if instance.api_version() >= Version::V1_1 { + fns.v1_1 + .get_physical_device_features2(physical_device, output.head_as_mut()); + } else { + fns.khr_get_physical_device_properties2 + .get_physical_device_features2_khr(physical_device, output.head_as_mut()); + } + + Features::from(&output) + }; + + PhysicalDeviceInfos { + physical_device, + properties, + extended_properties, + memory, + queue_families, + available_features, } - - families - .into_iter() - .map(|family| family.queue_family_properties) - .collect() - }; - - let memory: ash::vk::PhysicalDeviceMemoryProperties = unsafe { - let mut output = ash::vk::PhysicalDeviceMemoryProperties2KHR::default(); - - if instance.api_version() >= Version::V1_1 { - fns.v1_1 - .get_physical_device_memory_properties2(device, &mut output); - } else { - fns.khr_get_physical_device_properties2 - .get_physical_device_memory_properties2_khr(device, &mut output); - } - - output.memory_properties - }; - - let available_features: Features = unsafe { - let max_api_version = instance.max_api_version(); - let api_version = std::cmp::min(max_api_version, Version::from(properties.api_version)); - - let mut output = FeaturesFfi::default(); - output.make_chain(api_version); - - if instance.api_version() >= Version::V1_1 { - fns.v1_1 - .get_physical_device_features2(device, output.head_as_mut()); - } else { - fns.khr_get_physical_device_properties2 - .get_physical_device_features2_khr(device, output.head_as_mut()); - } - - Features::from(&output) - }; - - output.push(PhysicalDeviceInfos { - device, - properties, - extended_properties, - memory, - queue_families, - available_features, - }); - } - output + }) + .collect() } pub(super) struct PhysicalDeviceInfos { - device: ash::vk::PhysicalDevice, + physical_device: ash::vk::PhysicalDevice, properties: ash::vk::PhysicalDeviceProperties, extended_properties: PhysicalDeviceExtendedProperties, queue_families: Vec, @@ -588,7 +629,7 @@ unsafe impl<'a> VulkanObject for PhysicalDevice<'a> { #[inline] fn internal_object(&self) -> ash::vk::PhysicalDevice { - self.infos().device + self.infos().physical_device } } diff --git a/vulkano/src/lib.rs b/vulkano/src/lib.rs index 4400f0a5..c1a133eb 100644 --- a/vulkano/src/lib.rs +++ b/vulkano/src/lib.rs @@ -93,6 +93,11 @@ pub mod sampler; pub mod swapchain; pub mod sync; +mod autogen { + // Generated by build.rs + include!(concat!(env!("OUT_DIR"), "/autogen.rs")); +} + /// Alternative to the `Deref` trait. Contrary to `Deref`, must always return the same object. pub unsafe trait SafeDeref: Deref {} unsafe impl<'a, T: ?Sized> SafeDeref for &'a T {} diff --git a/vulkano/src/memory/device_memory.rs b/vulkano/src/memory/device_memory.rs index 1704996f..fbc23483 100644 --- a/vulkano/src/memory/device_memory.rs +++ b/vulkano/src/memory/device_memory.rs @@ -291,7 +291,7 @@ impl<'a> DeviceMemoryBuilder<'a> { if !(export_handle_bits & ash::vk::ExternalMemoryHandleTypeFlags::DMA_BUF_EXT) .is_empty() { - if !self.device.loaded_extensions().ext_external_memory_dmabuf { + if !self.device.loaded_extensions().ext_external_memory_dma_buf { return Err(DeviceMemoryAllocError::MissingExtension( "ext_external_memory_dmabuf", )); @@ -310,7 +310,7 @@ impl<'a> DeviceMemoryBuilder<'a> { if !(import_handle_bits & ash::vk::ExternalMemoryHandleTypeFlags::DMA_BUF_EXT) .is_empty() { - if !self.device.loaded_extensions().ext_external_memory_dmabuf { + if !self.device.loaded_extensions().ext_external_memory_dma_buf { return Err(DeviceMemoryAllocError::MissingExtension( "ext_external_memory_dmabuf", )); diff --git a/vulkano/vk.xml b/vulkano/vk.xml new file mode 100644 index 00000000..fa31b42f --- /dev/null +++ b/vulkano/vk.xml @@ -0,0 +1,15238 @@ + + + +Copyright (c) 2015-2020 The Khronos Group Inc. + +SPDX-License-Identifier: Apache-2.0 OR MIT + + + +This file, vk.xml, is the Vulkan API Registry. It is a critically important +and normative part of the Vulkan Specification, including a canonical +machine-readable definition of the API, parameter and member validation +language incorporated into the Specification and reference pages, and other +material which is registered by Khronos, such as tags used by extension and +layer authors. The authoritative public version of vk.xml is maintained in +the default branch (currently named main) of the Khronos Vulkan GitHub +project. The authoritative private version is maintained in the default +branch of the member gitlab server. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + #include "vk_platform.h" + + WSI extensions + + + + + + + + + + + In the current header structure, each platform's interfaces + are confined to a platform-specific header (vulkan_xlib.h, + vulkan_win32.h, etc.). These headers are not self-contained, + and should not include native headers (X11/Xlib.h, + windows.h, etc.). Code should either include vulkan.h after + defining the appropriate VK_USE_PLATFORM_platform + macros, or include the required native headers prior to + explicitly including the corresponding platform header. + + To accomplish this, the dependencies of native types require + native headers, but the XML defines the content for those + native headers as empty. The actual native header includes + can be restored by modifying the native header tags above + to #include the header file in the 'name' attribute. + + + + + + + + + + + + + + + + + + + + + + + + + #define VK_MAKE_VERSION(major, minor, patch) \ + ((((uint32_t)(major)) << 22) | (((uint32_t)(minor)) << 12) | ((uint32_t)(patch))) + #define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22) + #define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff) + #define VK_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff) + + // DEPRECATED: This define has been removed. Specific version defines (e.g. VK_API_VERSION_1_0), or the VK_MAKE_VERSION macro, should be used instead. +//#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 0) // Patch version should always be set to 0 + // Vulkan 1.0 version number +#define VK_API_VERSION_1_0 VK_MAKE_VERSION(1, 0, 0)// Patch version should always be set to 0 + // Vulkan 1.1 version number +#define VK_API_VERSION_1_1 VK_MAKE_VERSION(1, 1, 0)// Patch version should always be set to 0 + // Vulkan 1.2 version number +#define VK_API_VERSION_1_2 VK_MAKE_VERSION(1, 2, 0)// Patch version should always be set to 0 + // Version of this file +#define VK_HEADER_VERSION 168 + // Complete version of this file +#define VK_HEADER_VERSION_COMPLETE VK_MAKE_VERSION(1, 2, VK_HEADER_VERSION) + + +#define VK_DEFINE_HANDLE(object) typedef struct object##_T* object; + + +#if !defined(VK_DEFINE_NON_DISPATCHABLE_HANDLE) +#if defined(__LP64__) || defined(_WIN64) || (defined(__x86_64__) && !defined(__ILP32__) ) || defined(_M_X64) || defined(__ia64) || defined (_M_IA64) || defined(__aarch64__) || defined(__powerpc64__) + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef struct object##_T *object; +#else + #define VK_DEFINE_NON_DISPATCHABLE_HANDLE(object) typedef uint64_t object; +#endif +#endif + + +#define VK_NULL_HANDLE 0 + + struct ANativeWindow; + struct AHardwareBuffer; + +#ifdef __OBJC__ +@class CAMetalLayer; +#else +typedef void CAMetalLayer; +#endif + + typedef uint32_t VkSampleMask; + typedef uint32_t VkBool32; + typedef uint32_t VkFlags; + typedef uint64_t VkDeviceSize; + typedef uint64_t VkDeviceAddress; + + Basic C types, pulled in via vk_platform.h + + + + + + + + + + + + + + Bitmask types + typedef VkFlags VkFramebufferCreateFlags; + typedef VkFlags VkQueryPoolCreateFlags; + typedef VkFlags VkRenderPassCreateFlags; + typedef VkFlags VkSamplerCreateFlags; + typedef VkFlags VkPipelineLayoutCreateFlags; + typedef VkFlags VkPipelineCacheCreateFlags; + typedef VkFlags VkPipelineDepthStencilStateCreateFlags; + typedef VkFlags VkPipelineDynamicStateCreateFlags; + typedef VkFlags VkPipelineColorBlendStateCreateFlags; + typedef VkFlags VkPipelineMultisampleStateCreateFlags; + typedef VkFlags VkPipelineRasterizationStateCreateFlags; + typedef VkFlags VkPipelineViewportStateCreateFlags; + typedef VkFlags VkPipelineTessellationStateCreateFlags; + typedef VkFlags VkPipelineInputAssemblyStateCreateFlags; + typedef VkFlags VkPipelineVertexInputStateCreateFlags; + typedef VkFlags VkPipelineShaderStageCreateFlags; + typedef VkFlags VkDescriptorSetLayoutCreateFlags; + typedef VkFlags VkBufferViewCreateFlags; + typedef VkFlags VkInstanceCreateFlags; + typedef VkFlags VkDeviceCreateFlags; + typedef VkFlags VkDeviceQueueCreateFlags; + typedef VkFlags VkQueueFlags; + typedef VkFlags VkMemoryPropertyFlags; + typedef VkFlags VkMemoryHeapFlags; + typedef VkFlags VkAccessFlags; + typedef VkFlags VkBufferUsageFlags; + typedef VkFlags VkBufferCreateFlags; + typedef VkFlags VkShaderStageFlags; + typedef VkFlags VkImageUsageFlags; + typedef VkFlags VkImageCreateFlags; + typedef VkFlags VkImageViewCreateFlags; + typedef VkFlags VkPipelineCreateFlags; + typedef VkFlags VkColorComponentFlags; + typedef VkFlags VkFenceCreateFlags; + When VkSemaphoreCreateFlagBits is first extended, need to add a requires= attribute for it to VkSemaphoreCreateFlags + typedef VkFlags VkSemaphoreCreateFlags; + typedef VkFlags VkFormatFeatureFlags; + typedef VkFlags VkQueryControlFlags; + typedef VkFlags VkQueryResultFlags; + typedef VkFlags VkShaderModuleCreateFlags; + typedef VkFlags VkEventCreateFlags; + typedef VkFlags VkCommandPoolCreateFlags; + typedef VkFlags VkCommandPoolResetFlags; + typedef VkFlags VkCommandBufferResetFlags; + typedef VkFlags VkCommandBufferUsageFlags; + typedef VkFlags VkQueryPipelineStatisticFlags; + typedef VkFlags VkMemoryMapFlags; + typedef VkFlags VkImageAspectFlags; + typedef VkFlags VkSparseMemoryBindFlags; + typedef VkFlags VkSparseImageFormatFlags; + typedef VkFlags VkSubpassDescriptionFlags; + typedef VkFlags VkPipelineStageFlags; + typedef VkFlags VkSampleCountFlags; + typedef VkFlags VkAttachmentDescriptionFlags; + typedef VkFlags VkStencilFaceFlags; + typedef VkFlags VkCullModeFlags; + typedef VkFlags VkDescriptorPoolCreateFlags; + typedef VkFlags VkDescriptorPoolResetFlags; + typedef VkFlags VkDependencyFlags; + typedef VkFlags VkSubgroupFeatureFlags; + typedef VkFlags VkIndirectCommandsLayoutUsageFlagsNV; + typedef VkFlags VkIndirectStateFlagsNV; + typedef VkFlags VkGeometryFlagsKHR; + + typedef VkFlags VkGeometryInstanceFlagsKHR; + + typedef VkFlags VkBuildAccelerationStructureFlagsKHR; + + typedef VkFlags VkPrivateDataSlotCreateFlagsEXT; + typedef VkFlags VkAccelerationStructureCreateFlagsKHR; + typedef VkFlags VkDescriptorUpdateTemplateCreateFlags; + + typedef VkFlags VkPipelineCreationFeedbackFlagsEXT; + typedef VkFlags VkPerformanceCounterDescriptionFlagsKHR; + typedef VkFlags VkAcquireProfilingLockFlagsKHR; + typedef VkFlags VkSemaphoreWaitFlags; + + typedef VkFlags VkPipelineCompilerControlFlagsAMD; + typedef VkFlags VkShaderCorePropertiesFlagsAMD; + typedef VkFlags VkDeviceDiagnosticsConfigFlagsNV; + + WSI extensions + typedef VkFlags VkCompositeAlphaFlagsKHR; + typedef VkFlags VkDisplayPlaneAlphaFlagsKHR; + typedef VkFlags VkSurfaceTransformFlagsKHR; + typedef VkFlags VkSwapchainCreateFlagsKHR; + typedef VkFlags VkDisplayModeCreateFlagsKHR; + typedef VkFlags VkDisplaySurfaceCreateFlagsKHR; + typedef VkFlags VkAndroidSurfaceCreateFlagsKHR; + typedef VkFlags VkViSurfaceCreateFlagsNN; + typedef VkFlags VkWaylandSurfaceCreateFlagsKHR; + typedef VkFlags VkWin32SurfaceCreateFlagsKHR; + typedef VkFlags VkXlibSurfaceCreateFlagsKHR; + typedef VkFlags VkXcbSurfaceCreateFlagsKHR; + typedef VkFlags VkDirectFBSurfaceCreateFlagsEXT; + typedef VkFlags VkIOSSurfaceCreateFlagsMVK; + typedef VkFlags VkMacOSSurfaceCreateFlagsMVK; + typedef VkFlags VkMetalSurfaceCreateFlagsEXT; + typedef VkFlags VkImagePipeSurfaceCreateFlagsFUCHSIA; + typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; + typedef VkFlags VkHeadlessSurfaceCreateFlagsEXT; + typedef VkFlags VkPeerMemoryFeatureFlags; + + typedef VkFlags VkMemoryAllocateFlags; + + typedef VkFlags VkDeviceGroupPresentModeFlagsKHR; + + typedef VkFlags VkDebugReportFlagsEXT; + typedef VkFlags VkCommandPoolTrimFlags; + + typedef VkFlags VkExternalMemoryHandleTypeFlagsNV; + typedef VkFlags VkExternalMemoryFeatureFlagsNV; + typedef VkFlags VkExternalMemoryHandleTypeFlags; + + typedef VkFlags VkExternalMemoryFeatureFlags; + + typedef VkFlags VkExternalSemaphoreHandleTypeFlags; + + typedef VkFlags VkExternalSemaphoreFeatureFlags; + + typedef VkFlags VkSemaphoreImportFlags; + + typedef VkFlags VkExternalFenceHandleTypeFlags; + + typedef VkFlags VkExternalFenceFeatureFlags; + + typedef VkFlags VkFenceImportFlags; + + typedef VkFlags VkSurfaceCounterFlagsEXT; + typedef VkFlags VkPipelineViewportSwizzleStateCreateFlagsNV; + typedef VkFlags VkPipelineDiscardRectangleStateCreateFlagsEXT; + typedef VkFlags VkPipelineCoverageToColorStateCreateFlagsNV; + typedef VkFlags VkPipelineCoverageModulationStateCreateFlagsNV; + typedef VkFlags VkPipelineCoverageReductionStateCreateFlagsNV; + typedef VkFlags VkValidationCacheCreateFlagsEXT; + typedef VkFlags VkDebugUtilsMessageSeverityFlagsEXT; + typedef VkFlags VkDebugUtilsMessageTypeFlagsEXT; + typedef VkFlags VkDebugUtilsMessengerCreateFlagsEXT; + typedef VkFlags VkDebugUtilsMessengerCallbackDataFlagsEXT; + typedef VkFlags VkDeviceMemoryReportFlagsEXT; + typedef VkFlags VkPipelineRasterizationConservativeStateCreateFlagsEXT; + typedef VkFlags VkDescriptorBindingFlags; + + typedef VkFlags VkConditionalRenderingFlagsEXT; + typedef VkFlags VkResolveModeFlags; + + typedef VkFlags VkPipelineRasterizationStateStreamCreateFlagsEXT; + typedef VkFlags VkPipelineRasterizationDepthClipStateCreateFlagsEXT; + typedef VkFlags VkSwapchainImageUsageFlagsANDROID; + typedef VkFlags VkToolPurposeFlagsEXT; + + Types which can be void pointers or class pointers, selected at compile time + VK_DEFINE_HANDLE(VkInstance) + VK_DEFINE_HANDLE(VkPhysicalDevice) + VK_DEFINE_HANDLE(VkDevice) + VK_DEFINE_HANDLE(VkQueue) + VK_DEFINE_HANDLE(VkCommandBuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeviceMemory) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkCommandPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkBufferView) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImage) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkImageView) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkShaderModule) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipeline) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineLayout) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSampler) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSet) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorSetLayout) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFence) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSemaphore) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkEvent) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkQueryPool) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkFramebuffer) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkRenderPass) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPipelineCache) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkIndirectCommandsLayoutNV) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDescriptorUpdateTemplate) + + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSamplerYcbcrConversion) + + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkValidationCacheEXT) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkAccelerationStructureNV) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPerformanceConfigurationINTEL) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDeferredOperationKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkPrivateDataSlotEXT) + + WSI extensions + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDisplayModeKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSwapchainKHR) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT) + VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugUtilsMessengerEXT) + + Types generated from corresponding enums tags below + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + When VkSemaphoreCreateFlagBits is first extended, need to add a type enum tag for it here + + Extensions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WSI extensions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Enumerated types in the header, but not used by the API + + + + + + + + The PFN_vk*Function types are used by VkAllocationCallbacks below + typedef void (VKAPI_PTR *PFN_vkInternalAllocationNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)( + void* pUserData, + size_t size, + VkInternalAllocationType allocationType, + VkSystemAllocationScope allocationScope); + typedef void* (VKAPI_PTR *PFN_vkReallocationFunction)( + void* pUserData, + void* pOriginal, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + typedef void* (VKAPI_PTR *PFN_vkAllocationFunction)( + void* pUserData, + size_t size, + size_t alignment, + VkSystemAllocationScope allocationScope); + typedef void (VKAPI_PTR *PFN_vkFreeFunction)( + void* pUserData, + void* pMemory); + + The PFN_vkVoidFunction type are used by VkGet*ProcAddr below + typedef void (VKAPI_PTR *PFN_vkVoidFunction)(void); + + The PFN_vkDebugReportCallbackEXT type are used by the DEBUG_REPORT extension + typedef VkBool32 (VKAPI_PTR *PFN_vkDebugReportCallbackEXT)( + VkDebugReportFlagsEXT flags, + VkDebugReportObjectTypeEXT objectType, + uint64_t object, + size_t location, + int32_t messageCode, + const char* pLayerPrefix, + const char* pMessage, + void* pUserData); + + The PFN_vkDebugUtilsMessengerCallbackEXT type are used by the VK_EXT_debug_utils extension + typedef VkBool32 (VKAPI_PTR *PFN_vkDebugUtilsMessengerCallbackEXT)( + VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity, + VkDebugUtilsMessageTypeFlagsEXT messageTypes, + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData, + void* pUserData); + + The PFN_vkDeviceMemoryReportCallbackEXT type is used by the VK_EXT_device_memory_report extension + typedef void (VKAPI_PTR *PFN_vkDeviceMemoryReportCallbackEXT)( + const VkDeviceMemoryReportCallbackDataEXT* pCallbackData, + void* pUserData); + + Struct types + + VkStructureType sType + struct VkBaseOutStructure* pNext + + + VkStructureType sType + const struct VkBaseInStructure* pNext + + + int32_t x + int32_t y + + + int32_t x + int32_t y + int32_t z + + + uint32_t width + uint32_t height + + + uint32_t width + uint32_t height + uint32_t depth + + + float x + float y + float width + float height + float minDepth + float maxDepth + + + VkOffset2D offset + VkExtent2D extent + + + VkRect2D rect + uint32_t baseArrayLayer + uint32_t layerCount + + + VkComponentSwizzle r + VkComponentSwizzle g + VkComponentSwizzle b + VkComponentSwizzle a + + + uint32_t apiVersion + uint32_t driverVersion + uint32_t vendorID + uint32_t deviceID + VkPhysicalDeviceType deviceType + char deviceName[VK_MAX_PHYSICAL_DEVICE_NAME_SIZE] + uint8_t pipelineCacheUUID[VK_UUID_SIZE] + VkPhysicalDeviceLimits limits + VkPhysicalDeviceSparseProperties sparseProperties + + + char extensionName[VK_MAX_EXTENSION_NAME_SIZE]extension name + uint32_t specVersionversion of the extension specification implemented + + + char layerName[VK_MAX_EXTENSION_NAME_SIZE]layer name + uint32_t specVersionversion of the layer specification implemented + uint32_t implementationVersionbuild or release version of the layer's library + char description[VK_MAX_DESCRIPTION_SIZE]Free-form description of the layer + + + VkStructureType sType + const void* pNext + const char* pApplicationName + uint32_t applicationVersion + const char* pEngineName + uint32_t engineVersion + uint32_t apiVersion + + + void* pUserData + PFN_vkAllocationFunction pfnAllocation + PFN_vkReallocationFunction pfnReallocation + PFN_vkFreeFunction pfnFree + PFN_vkInternalAllocationNotification pfnInternalAllocation + PFN_vkInternalFreeNotification pfnInternalFree + + + VkStructureType sType + const void* pNext + VkDeviceQueueCreateFlags flags + uint32_t queueFamilyIndex + uint32_t queueCount + const float* pQueuePriorities + + + VkStructureType sType + const void* pNext + VkDeviceCreateFlags flags + uint32_t queueCreateInfoCount + const VkDeviceQueueCreateInfo* pQueueCreateInfos + uint32_t enabledLayerCount + const char* const* ppEnabledLayerNamesOrdered list of layer names to be enabled + uint32_t enabledExtensionCount + const char* const* ppEnabledExtensionNames + const VkPhysicalDeviceFeatures* pEnabledFeatures + + + VkStructureType sType + const void* pNext + VkInstanceCreateFlags flags + const VkApplicationInfo* pApplicationInfo + uint32_t enabledLayerCount + const char* const* ppEnabledLayerNamesOrdered list of layer names to be enabled + uint32_t enabledExtensionCount + const char* const* ppEnabledExtensionNamesExtension names to be enabled + + + VkQueueFlags queueFlagsQueue flags + uint32_t queueCount + uint32_t timestampValidBits + VkExtent3D minImageTransferGranularityMinimum alignment requirement for image transfers + + + uint32_t memoryTypeCount + VkMemoryType memoryTypes[VK_MAX_MEMORY_TYPES] + uint32_t memoryHeapCount + VkMemoryHeap memoryHeaps[VK_MAX_MEMORY_HEAPS] + + + VkStructureType sType + const void* pNext + VkDeviceSize allocationSizeSize of memory allocation + uint32_t memoryTypeIndexIndex of the of the memory type to allocate from + + + VkDeviceSize sizeSpecified in bytes + VkDeviceSize alignmentSpecified in bytes + uint32_t memoryTypeBitsBitmask of the allowed memory type indices into memoryTypes[] for this object + + + VkImageAspectFlags aspectMask + VkExtent3D imageGranularity + VkSparseImageFormatFlags flags + + + VkSparseImageFormatProperties formatProperties + uint32_t imageMipTailFirstLod + VkDeviceSize imageMipTailSizeSpecified in bytes, must be a multiple of sparse block size in bytes / alignment + VkDeviceSize imageMipTailOffsetSpecified in bytes, must be a multiple of sparse block size in bytes / alignment + VkDeviceSize imageMipTailStrideSpecified in bytes, must be a multiple of sparse block size in bytes / alignment + + + VkMemoryPropertyFlags propertyFlagsMemory properties of this memory type + uint32_t heapIndexIndex of the memory heap allocations of this memory type are taken from + + + VkDeviceSize sizeAvailable memory in the heap + VkMemoryHeapFlags flagsFlags for the heap + + + VkStructureType sType + const void* pNext + VkDeviceMemory memoryMapped memory object + VkDeviceSize offsetOffset within the memory object where the range starts + VkDeviceSize sizeSize of the range within the memory object + + + VkFormatFeatureFlags linearTilingFeaturesFormat features in case of linear tiling + VkFormatFeatureFlags optimalTilingFeaturesFormat features in case of optimal tiling + VkFormatFeatureFlags bufferFeaturesFormat features supported by buffers + + + VkExtent3D maxExtentmax image dimensions for this resource type + uint32_t maxMipLevelsmax number of mipmap levels for this resource type + uint32_t maxArrayLayersmax array size for this resource type + VkSampleCountFlags sampleCountssupported sample counts for this resource type + VkDeviceSize maxResourceSizemax size (in bytes) of this resource type + + + VkBuffer bufferBuffer used for this descriptor slot. + VkDeviceSize offsetBase offset from buffer start in bytes to update in the descriptor set. + VkDeviceSize rangeSize in bytes of the buffer resource for this descriptor update. + + + VkSampler samplerSampler to write to the descriptor in case it is a SAMPLER or COMBINED_IMAGE_SAMPLER descriptor. Ignored otherwise. + VkImageView imageViewImage view to write to the descriptor in case it is a SAMPLED_IMAGE, STORAGE_IMAGE, COMBINED_IMAGE_SAMPLER, or INPUT_ATTACHMENT descriptor. Ignored otherwise. + VkImageLayout imageLayoutLayout the image is expected to be in when accessed using this descriptor (only used if imageView is not VK_NULL_HANDLE). + + + VkStructureType sType + const void* pNext + VkDescriptorSet dstSetDestination descriptor set + uint32_t dstBindingBinding within the destination descriptor set to write + uint32_t dstArrayElementArray element within the destination binding to write + uint32_t descriptorCountNumber of descriptors to write (determines the size of the array pointed by pDescriptors) + VkDescriptorType descriptorTypeDescriptor type to write (determines which members of the array pointed by pDescriptors are going to be used) + const VkDescriptorImageInfo* pImageInfoSampler, image view, and layout for SAMPLER, COMBINED_IMAGE_SAMPLER, {SAMPLED,STORAGE}_IMAGE, and INPUT_ATTACHMENT descriptor types. + const VkDescriptorBufferInfo* pBufferInfoRaw buffer, size, and offset for {UNIFORM,STORAGE}_BUFFER[_DYNAMIC] descriptor types. + const VkBufferView* pTexelBufferViewBuffer view to write to the descriptor for {UNIFORM,STORAGE}_TEXEL_BUFFER descriptor types. + + + VkStructureType sType + const void* pNext + VkDescriptorSet srcSetSource descriptor set + uint32_t srcBindingBinding within the source descriptor set to copy from + uint32_t srcArrayElementArray element within the source binding to copy from + VkDescriptorSet dstSetDestination descriptor set + uint32_t dstBindingBinding within the destination descriptor set to copy to + uint32_t dstArrayElementArray element within the destination binding to copy to + uint32_t descriptorCountNumber of descriptors to write (determines the size of the array pointed by pDescriptors) + + + VkStructureType sType + const void* pNext + VkBufferCreateFlags flagsBuffer creation flags + VkDeviceSize sizeSpecified in bytes + VkBufferUsageFlags usageBuffer usage flags + VkSharingMode sharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + + + VkStructureType sType + const void* pNext + VkBufferViewCreateFlagsflags + VkBuffer buffer + VkFormat formatOptionally specifies format of elements + VkDeviceSize offsetSpecified in bytes + VkDeviceSize rangeView size specified in bytes + + + VkImageAspectFlags aspectMask + uint32_t mipLevel + uint32_t arrayLayer + + + VkImageAspectFlags aspectMask + uint32_t mipLevel + uint32_t baseArrayLayer + uint32_t layerCount + + + VkImageAspectFlags aspectMask + uint32_t baseMipLevel + uint32_t levelCount + uint32_t baseArrayLayer + uint32_t layerCount + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize + VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize + VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize + uint32_t srcQueueFamilyIndexQueue family to transition ownership from + uint32_t dstQueueFamilyIndexQueue family to transition ownership to + VkBuffer bufferBuffer to sync + VkDeviceSize offsetOffset within the buffer to sync + VkDeviceSize sizeAmount of bytes to sync + + + VkStructureType sType + const void* pNext + VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize + VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize + VkImageLayout oldLayoutCurrent layout of the image + VkImageLayout newLayoutNew layout to transition the image to + uint32_t srcQueueFamilyIndexQueue family to transition ownership from + uint32_t dstQueueFamilyIndexQueue family to transition ownership to + VkImage imageImage to sync + VkImageSubresourceRange subresourceRangeSubresource range to sync + + + VkStructureType sType + const void* pNext + VkImageCreateFlags flagsImage creation flags + VkImageType imageType + VkFormat format + VkExtent3D extent + uint32_t mipLevels + uint32_t arrayLayers + VkSampleCountFlagBits samples + VkImageTiling tiling + VkImageUsageFlags usageImage usage flags + VkSharingMode sharingModeCross-queue-family sharing mode + uint32_t queueFamilyIndexCountNumber of queue families to share across + const uint32_t* pQueueFamilyIndicesArray of queue family indices to share across + VkImageLayout initialLayoutInitial image layout for all subresources + + + VkDeviceSize offsetSpecified in bytes + VkDeviceSize sizeSpecified in bytes + VkDeviceSize rowPitchSpecified in bytes + VkDeviceSize arrayPitchSpecified in bytes + VkDeviceSize depthPitchSpecified in bytes + + + VkStructureType sType + const void* pNext + VkImageViewCreateFlags flags + VkImage image + VkImageViewType viewType + VkFormat format + VkComponentMapping components + VkImageSubresourceRange subresourceRange + + + VkDeviceSize srcOffsetSpecified in bytes + VkDeviceSize dstOffsetSpecified in bytes + VkDeviceSize sizeSpecified in bytes + + + VkDeviceSize resourceOffsetSpecified in bytes + VkDeviceSize sizeSpecified in bytes + VkDeviceMemory memory + VkDeviceSize memoryOffsetSpecified in bytes + VkSparseMemoryBindFlagsflags + + + VkImageSubresource subresource + VkOffset3D offset + VkExtent3D extent + VkDeviceMemory memory + VkDeviceSize memoryOffsetSpecified in bytes + VkSparseMemoryBindFlagsflags + + + VkBuffer buffer + uint32_t bindCount + const VkSparseMemoryBind* pBinds + + + VkImage image + uint32_t bindCount + const VkSparseMemoryBind* pBinds + + + VkImage image + uint32_t bindCount + const VkSparseImageMemoryBind* pBinds + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + uint32_t bufferBindCount + const VkSparseBufferMemoryBindInfo* pBufferBinds + uint32_t imageOpaqueBindCount + const VkSparseImageOpaqueMemoryBindInfo* pImageOpaqueBinds + uint32_t imageBindCount + const VkSparseImageMemoryBindInfo* pImageBinds + uint32_t signalSemaphoreCount + const VkSemaphore* pSignalSemaphores + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffsetSpecified in pixels for both compressed and uncompressed images + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffsetSpecified in pixels for both compressed and uncompressed images + VkExtent3D extentSpecified in pixels for both compressed and uncompressed images + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffsets[2]Specified in pixels for both compressed and uncompressed images + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffsets[2]Specified in pixels for both compressed and uncompressed images + + + VkDeviceSize bufferOffsetSpecified in bytes + uint32_t bufferRowLengthSpecified in texels + uint32_t bufferImageHeight + VkImageSubresourceLayers imageSubresource + VkOffset3D imageOffsetSpecified in pixels for both compressed and uncompressed images + VkExtent3D imageExtentSpecified in pixels for both compressed and uncompressed images + + + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffset + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffset + VkExtent3D extent + + + VkStructureType sType + const void* pNext + VkShaderModuleCreateFlags flags + size_t codeSizeSpecified in bytes + const uint32_t* pCodeBinary code of size codeSize + + + uint32_t bindingBinding number for this entry + VkDescriptorType descriptorTypeType of the descriptors in this binding + uint32_t descriptorCountNumber of descriptors in this binding + VkShaderStageFlags stageFlagsShader stages this binding is visible to + const VkSampler* pImmutableSamplersImmutable samplers (used if descriptor type is SAMPLER or COMBINED_IMAGE_SAMPLER, is either NULL or contains count number of elements) + + + VkStructureType sType + const void* pNext + VkDescriptorSetLayoutCreateFlags flags + uint32_t bindingCountNumber of bindings in the descriptor set layout + const VkDescriptorSetLayoutBinding* pBindingsArray of descriptor set layout bindings + + + VkDescriptorType type + uint32_t descriptorCount + + + VkStructureType sType + const void* pNext + VkDescriptorPoolCreateFlags flags + uint32_t maxSets + uint32_t poolSizeCount + const VkDescriptorPoolSize* pPoolSizes + + + VkStructureType sType + const void* pNext + VkDescriptorPool descriptorPool + uint32_t descriptorSetCount + const VkDescriptorSetLayout* pSetLayouts + + + uint32_t constantIDThe SpecConstant ID specified in the BIL + uint32_t offsetOffset of the value in the data block + size_t sizeSize in bytes of the SpecConstant + + + uint32_t mapEntryCountNumber of entries in the map + const VkSpecializationMapEntry* pMapEntriesArray of map entries + size_t dataSizeSize in bytes of pData + const void* pDataPointer to SpecConstant data + + + VkStructureType sType + const void* pNext + VkPipelineShaderStageCreateFlags flags + VkShaderStageFlagBits stageShader stage + VkShaderModule moduleModule containing entry point + const char* pNameNull-terminated entry point name + const VkSpecializationInfo* pSpecializationInfo + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flagsPipeline creation flags + VkPipelineShaderStageCreateInfo stage + VkPipelineLayout layoutInterface layout of the pipeline + VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of + int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of + + + uint32_t bindingVertex buffer binding id + uint32_t strideDistance between vertices in bytes (0 = no advancement) + VkVertexInputRate inputRateThe rate at which the vertex data is consumed + + + uint32_t locationlocation of the shader vertex attrib + uint32_t bindingVertex buffer binding id + VkFormat formatformat of source data + uint32_t offsetOffset of first element in bytes from base of vertex + + + VkStructureType sType + const void* pNext + VkPipelineVertexInputStateCreateFlags flags + uint32_t vertexBindingDescriptionCountnumber of bindings + const VkVertexInputBindingDescription* pVertexBindingDescriptions + uint32_t vertexAttributeDescriptionCountnumber of attributes + const VkVertexInputAttributeDescription* pVertexAttributeDescriptions + + + VkStructureType sType + const void* pNext + VkPipelineInputAssemblyStateCreateFlags flags + VkPrimitiveTopology topology + VkBool32 primitiveRestartEnable + + + VkStructureType sType + const void* pNext + VkPipelineTessellationStateCreateFlags flags + uint32_t patchControlPoints + + + VkStructureType sType + const void* pNext + VkPipelineViewportStateCreateFlags flags + uint32_t viewportCount + const VkViewport* pViewports + uint32_t scissorCount + const VkRect2D* pScissors + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationStateCreateFlags flags + VkBool32 depthClampEnable + VkBool32 rasterizerDiscardEnable + VkPolygonMode polygonModeoptional (GL45) + VkCullModeFlags cullMode + VkFrontFace frontFace + VkBool32 depthBiasEnable + float depthBiasConstantFactor + float depthBiasClamp + float depthBiasSlopeFactor + float lineWidth + + + VkStructureType sType + const void* pNext + VkPipelineMultisampleStateCreateFlags flags + VkSampleCountFlagBits rasterizationSamplesNumber of samples used for rasterization + VkBool32 sampleShadingEnableoptional (GL45) + float minSampleShadingoptional (GL45) + const VkSampleMask* pSampleMaskArray of sampleMask words + VkBool32 alphaToCoverageEnable + VkBool32 alphaToOneEnable + + + VkBool32 blendEnable + VkBlendFactor srcColorBlendFactor + VkBlendFactor dstColorBlendFactor + VkBlendOp colorBlendOp + VkBlendFactor srcAlphaBlendFactor + VkBlendFactor dstAlphaBlendFactor + VkBlendOp alphaBlendOp + VkColorComponentFlags colorWriteMask + + + VkStructureType sType + const void* pNext + VkPipelineColorBlendStateCreateFlags flags + VkBool32 logicOpEnable + VkLogicOp logicOp + uint32_t attachmentCount# of pAttachments + const VkPipelineColorBlendAttachmentState* pAttachments + float blendConstants[4] + + + VkStructureType sType + const void* pNext + VkPipelineDynamicStateCreateFlags flags + uint32_t dynamicStateCount + const VkDynamicState* pDynamicStates + + + VkStencilOp failOp + VkStencilOp passOp + VkStencilOp depthFailOp + VkCompareOp compareOp + uint32_t compareMask + uint32_t writeMask + uint32_t reference + + + VkStructureType sType + const void* pNext + VkPipelineDepthStencilStateCreateFlags flags + VkBool32 depthTestEnable + VkBool32 depthWriteEnable + VkCompareOp depthCompareOp + VkBool32 depthBoundsTestEnableoptional (depth_bounds_test) + VkBool32 stencilTestEnable + VkStencilOpState front + VkStencilOpState back + float minDepthBounds + float maxDepthBounds + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flagsPipeline creation flags + uint32_t stageCount + const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage + const VkPipelineVertexInputStateCreateInfo* pVertexInputState + const VkPipelineInputAssemblyStateCreateInfo* pInputAssemblyState + const VkPipelineTessellationStateCreateInfo* pTessellationState + const VkPipelineViewportStateCreateInfo* pViewportState + const VkPipelineRasterizationStateCreateInfo* pRasterizationState + const VkPipelineMultisampleStateCreateInfo* pMultisampleState + const VkPipelineDepthStencilStateCreateInfo* pDepthStencilState + const VkPipelineColorBlendStateCreateInfo* pColorBlendState + const VkPipelineDynamicStateCreateInfo* pDynamicState + VkPipelineLayout layoutInterface layout of the pipeline + VkRenderPass renderPass + uint32_t subpass + VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of + int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of + + + VkStructureType sType + const void* pNext + VkPipelineCacheCreateFlags flags + size_t initialDataSizeSize of initial data to populate cache, in bytes + const void* pInitialDataInitial data to populate cache + + + VkShaderStageFlags stageFlagsWhich stages use the range + uint32_t offsetStart of the range, in bytes + uint32_t sizeSize of the range, in bytes + + + VkStructureType sType + const void* pNext + VkPipelineLayoutCreateFlags flags + uint32_t setLayoutCountNumber of descriptor sets interfaced by the pipeline + const VkDescriptorSetLayout* pSetLayoutsArray of setCount number of descriptor set layout objects defining the layout of the + uint32_t pushConstantRangeCountNumber of push-constant ranges used by the pipeline + const VkPushConstantRange* pPushConstantRangesArray of pushConstantRangeCount number of ranges used by various shader stages + + + VkStructureType sType + const void* pNext + VkSamplerCreateFlags flags + VkFilter magFilterFilter mode for magnification + VkFilter minFilterFilter mode for minifiation + VkSamplerMipmapMode mipmapModeMipmap selection mode + VkSamplerAddressMode addressModeU + VkSamplerAddressMode addressModeV + VkSamplerAddressMode addressModeW + float mipLodBias + VkBool32 anisotropyEnable + float maxAnisotropy + VkBool32 compareEnable + VkCompareOp compareOp + float minLod + float maxLod + VkBorderColor borderColor + VkBool32 unnormalizedCoordinates + + + VkStructureType sType + const void* pNext + VkCommandPoolCreateFlags flagsCommand pool creation flags + uint32_t queueFamilyIndex + + + VkStructureType sType + const void* pNext + VkCommandPool commandPool + VkCommandBufferLevel level + uint32_t commandBufferCount + + + VkStructureType sType + const void* pNext + VkRenderPass renderPassRender pass for secondary command buffers + uint32_t subpass + VkFramebuffer framebufferFramebuffer for secondary command buffers + VkBool32 occlusionQueryEnableWhether this secondary command buffer may be executed during an occlusion query + VkQueryControlFlags queryFlagsQuery flags used by this secondary command buffer, if executed during an occlusion query + VkQueryPipelineStatisticFlags pipelineStatisticsPipeline statistics that may be counted for this secondary command buffer + + + VkStructureType sType + const void* pNext + VkCommandBufferUsageFlags flagsCommand buffer usage flags + const VkCommandBufferInheritanceInfo* pInheritanceInfoPointer to inheritance info for secondary command buffers + + + VkStructureType sType + const void* pNext + VkRenderPass renderPass + VkFramebuffer framebuffer + VkRect2D renderArea + uint32_t clearValueCount + const VkClearValue* pClearValues + + + float float32[4] + int32_t int32[4] + uint32_t uint32[4] + + + float depth + uint32_t stencil + + + VkClearColorValue color + VkClearDepthStencilValue depthStencil + + + VkImageAspectFlags aspectMask + uint32_t colorAttachment + VkClearValue clearValue + + + VkAttachmentDescriptionFlags flags + VkFormat format + VkSampleCountFlagBits samples + VkAttachmentLoadOp loadOpLoad operation for color or depth data + VkAttachmentStoreOp storeOpStore operation for color or depth data + VkAttachmentLoadOp stencilLoadOpLoad operation for stencil data + VkAttachmentStoreOp stencilStoreOpStore operation for stencil data + VkImageLayout initialLayout + VkImageLayout finalLayout + + + uint32_t attachment + VkImageLayout layout + + + VkSubpassDescriptionFlags flags + VkPipelineBindPoint pipelineBindPointMust be VK_PIPELINE_BIND_POINT_GRAPHICS for now + uint32_t inputAttachmentCount + const VkAttachmentReference* pInputAttachments + uint32_t colorAttachmentCount + const VkAttachmentReference* pColorAttachments + const VkAttachmentReference* pResolveAttachments + const VkAttachmentReference* pDepthStencilAttachment + uint32_t preserveAttachmentCount + const uint32_t* pPreserveAttachments + + + uint32_t srcSubpass + uint32_t dstSubpass + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkAccessFlags srcAccessMaskMemory accesses from the source of the dependency to synchronize + VkAccessFlags dstAccessMaskMemory accesses from the destination of the dependency to synchronize + VkDependencyFlags dependencyFlags + + + VkStructureType sType + const void* pNext + VkRenderPassCreateFlags flags + uint32_t attachmentCount + const VkAttachmentDescription* pAttachments + uint32_t subpassCount + const VkSubpassDescription* pSubpasses + uint32_t dependencyCount + const VkSubpassDependency* pDependencies + + + VkStructureType sType + const void* pNext + VkEventCreateFlags flagsEvent creation flags + + + VkStructureType sType + const void* pNext + VkFenceCreateFlags flagsFence creation flags + + + VkBool32 robustBufferAccessout of bounds buffer accesses are well defined + VkBool32 fullDrawIndexUint32full 32-bit range of indices for indexed draw calls + VkBool32 imageCubeArrayimage views which are arrays of cube maps + VkBool32 independentBlendblending operations are controlled per-attachment + VkBool32 geometryShadergeometry stage + VkBool32 tessellationShadertessellation control and evaluation stage + VkBool32 sampleRateShadingper-sample shading and interpolation + VkBool32 dualSrcBlendblend operations which take two sources + VkBool32 logicOplogic operations + VkBool32 multiDrawIndirectmulti draw indirect + VkBool32 drawIndirectFirstInstanceindirect draws can use non-zero firstInstance + VkBool32 depthClampdepth clamping + VkBool32 depthBiasClampdepth bias clamping + VkBool32 fillModeNonSolidpoint and wireframe fill modes + VkBool32 depthBoundsdepth bounds test + VkBool32 wideLineslines with width greater than 1 + VkBool32 largePointspoints with size greater than 1 + VkBool32 alphaToOnethe fragment alpha component can be forced to maximum representable alpha value + VkBool32 multiViewportviewport arrays + VkBool32 samplerAnisotropyanisotropic sampler filtering + VkBool32 textureCompressionETC2ETC texture compression formats + VkBool32 textureCompressionASTC_LDRASTC LDR texture compression formats + VkBool32 textureCompressionBCBC1-7 texture compressed formats + VkBool32 occlusionQueryPreciseprecise occlusion queries returning actual sample counts + VkBool32 pipelineStatisticsQuerypipeline statistics query + VkBool32 vertexPipelineStoresAndAtomicsstores and atomic ops on storage buffers and images are supported in vertex, tessellation, and geometry stages + VkBool32 fragmentStoresAndAtomicsstores and atomic ops on storage buffers and images are supported in the fragment stage + VkBool32 shaderTessellationAndGeometryPointSizetessellation and geometry stages can export point size + VkBool32 shaderImageGatherExtendedimage gather with run-time values and independent offsets + VkBool32 shaderStorageImageExtendedFormatsthe extended set of formats can be used for storage images + VkBool32 shaderStorageImageMultisamplemultisample images can be used for storage images + VkBool32 shaderStorageImageReadWithoutFormatread from storage image does not require format qualifier + VkBool32 shaderStorageImageWriteWithoutFormatwrite to storage image does not require format qualifier + VkBool32 shaderUniformBufferArrayDynamicIndexingarrays of uniform buffers can be accessed with dynamically uniform indices + VkBool32 shaderSampledImageArrayDynamicIndexingarrays of sampled images can be accessed with dynamically uniform indices + VkBool32 shaderStorageBufferArrayDynamicIndexingarrays of storage buffers can be accessed with dynamically uniform indices + VkBool32 shaderStorageImageArrayDynamicIndexingarrays of storage images can be accessed with dynamically uniform indices + VkBool32 shaderClipDistanceclip distance in shaders + VkBool32 shaderCullDistancecull distance in shaders + VkBool32 shaderFloat6464-bit floats (doubles) in shaders + VkBool32 shaderInt6464-bit integers in shaders + VkBool32 shaderInt1616-bit integers in shaders + VkBool32 shaderResourceResidencyshader can use texture operations that return resource residency information (requires sparseNonResident support) + VkBool32 shaderResourceMinLodshader can use texture operations that specify minimum resource LOD + VkBool32 sparseBindingSparse resources support: Resource memory can be managed at opaque page level rather than object level + VkBool32 sparseResidencyBufferSparse resources support: GPU can access partially resident buffers + VkBool32 sparseResidencyImage2DSparse resources support: GPU can access partially resident 2D (non-MSAA non-depth/stencil) images + VkBool32 sparseResidencyImage3DSparse resources support: GPU can access partially resident 3D images + VkBool32 sparseResidency2SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 2 samples + VkBool32 sparseResidency4SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 4 samples + VkBool32 sparseResidency8SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 8 samples + VkBool32 sparseResidency16SamplesSparse resources support: GPU can access partially resident MSAA 2D images with 16 samples + VkBool32 sparseResidencyAliasedSparse resources support: GPU can correctly access data aliased into multiple locations (opt-in) + VkBool32 variableMultisampleRatemultisample rate must be the same for all pipelines in a subpass + VkBool32 inheritedQueriesQueries may be inherited from primary to secondary command buffers + + + VkBool32 residencyStandard2DBlockShapeSparse resources support: GPU will access all 2D (single sample) sparse resources using the standard sparse image block shapes (based on pixel format) + VkBool32 residencyStandard2DMultisampleBlockShapeSparse resources support: GPU will access all 2D (multisample) sparse resources using the standard sparse image block shapes (based on pixel format) + VkBool32 residencyStandard3DBlockShapeSparse resources support: GPU will access all 3D sparse resources using the standard sparse image block shapes (based on pixel format) + VkBool32 residencyAlignedMipSizeSparse resources support: Images with mip level dimensions that are NOT a multiple of the sparse image block dimensions will be placed in the mip tail + VkBool32 residencyNonResidentStrictSparse resources support: GPU can consistently access non-resident regions of a resource, all reads return as if data is 0, writes are discarded + + + resource maximum sizes + uint32_t maxImageDimension1Dmax 1D image dimension + uint32_t maxImageDimension2Dmax 2D image dimension + uint32_t maxImageDimension3Dmax 3D image dimension + uint32_t maxImageDimensionCubemax cubemap image dimension + uint32_t maxImageArrayLayersmax layers for image arrays + uint32_t maxTexelBufferElementsmax texel buffer size (fstexels) + uint32_t maxUniformBufferRangemax uniform buffer range (bytes) + uint32_t maxStorageBufferRangemax storage buffer range (bytes) + uint32_t maxPushConstantsSizemax size of the push constants pool (bytes) + memory limits + uint32_t maxMemoryAllocationCountmax number of device memory allocations supported + uint32_t maxSamplerAllocationCountmax number of samplers that can be allocated on a device + VkDeviceSize bufferImageGranularityGranularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage + VkDeviceSize sparseAddressSpaceSizeTotal address space available for sparse allocations (bytes) + descriptor set limits + uint32_t maxBoundDescriptorSetsmax number of descriptors sets that can be bound to a pipeline + uint32_t maxPerStageDescriptorSamplersmax number of samplers allowed per-stage in a descriptor set + uint32_t maxPerStageDescriptorUniformBuffersmax number of uniform buffers allowed per-stage in a descriptor set + uint32_t maxPerStageDescriptorStorageBuffersmax number of storage buffers allowed per-stage in a descriptor set + uint32_t maxPerStageDescriptorSampledImagesmax number of sampled images allowed per-stage in a descriptor set + uint32_t maxPerStageDescriptorStorageImagesmax number of storage images allowed per-stage in a descriptor set + uint32_t maxPerStageDescriptorInputAttachmentsmax number of input attachments allowed per-stage in a descriptor set + uint32_t maxPerStageResourcesmax number of resources allowed by a single stage + uint32_t maxDescriptorSetSamplersmax number of samplers allowed in all stages in a descriptor set + uint32_t maxDescriptorSetUniformBuffersmax number of uniform buffers allowed in all stages in a descriptor set + uint32_t maxDescriptorSetUniformBuffersDynamicmax number of dynamic uniform buffers allowed in all stages in a descriptor set + uint32_t maxDescriptorSetStorageBuffersmax number of storage buffers allowed in all stages in a descriptor set + uint32_t maxDescriptorSetStorageBuffersDynamicmax number of dynamic storage buffers allowed in all stages in a descriptor set + uint32_t maxDescriptorSetSampledImagesmax number of sampled images allowed in all stages in a descriptor set + uint32_t maxDescriptorSetStorageImagesmax number of storage images allowed in all stages in a descriptor set + uint32_t maxDescriptorSetInputAttachmentsmax number of input attachments allowed in all stages in a descriptor set + vertex stage limits + uint32_t maxVertexInputAttributesmax number of vertex input attribute slots + uint32_t maxVertexInputBindingsmax number of vertex input binding slots + uint32_t maxVertexInputAttributeOffsetmax vertex input attribute offset added to vertex buffer offset + uint32_t maxVertexInputBindingStridemax vertex input binding stride + uint32_t maxVertexOutputComponentsmax number of output components written by vertex shader + tessellation control stage limits + uint32_t maxTessellationGenerationLevelmax level supported by tessellation primitive generator + uint32_t maxTessellationPatchSizemax patch size (vertices) + uint32_t maxTessellationControlPerVertexInputComponentsmax number of input components per-vertex in TCS + uint32_t maxTessellationControlPerVertexOutputComponentsmax number of output components per-vertex in TCS + uint32_t maxTessellationControlPerPatchOutputComponentsmax number of output components per-patch in TCS + uint32_t maxTessellationControlTotalOutputComponentsmax total number of per-vertex and per-patch output components in TCS + tessellation evaluation stage limits + uint32_t maxTessellationEvaluationInputComponentsmax number of input components per vertex in TES + uint32_t maxTessellationEvaluationOutputComponentsmax number of output components per vertex in TES + geometry stage limits + uint32_t maxGeometryShaderInvocationsmax invocation count supported in geometry shader + uint32_t maxGeometryInputComponentsmax number of input components read in geometry stage + uint32_t maxGeometryOutputComponentsmax number of output components written in geometry stage + uint32_t maxGeometryOutputVerticesmax number of vertices that can be emitted in geometry stage + uint32_t maxGeometryTotalOutputComponentsmax total number of components (all vertices) written in geometry stage + fragment stage limits + uint32_t maxFragmentInputComponentsmax number of input components read in fragment stage + uint32_t maxFragmentOutputAttachmentsmax number of output attachments written in fragment stage + uint32_t maxFragmentDualSrcAttachmentsmax number of output attachments written when using dual source blending + uint32_t maxFragmentCombinedOutputResourcesmax total number of storage buffers, storage images and output buffers + compute stage limits + uint32_t maxComputeSharedMemorySizemax total storage size of work group local storage (bytes) + uint32_t maxComputeWorkGroupCount[3]max num of compute work groups that may be dispatched by a single command (x,y,z) + uint32_t maxComputeWorkGroupInvocationsmax total compute invocations in a single local work group + uint32_t maxComputeWorkGroupSize[3]max local size of a compute work group (x,y,z) + uint32_t subPixelPrecisionBitsnumber bits of subpixel precision in screen x and y + uint32_t subTexelPrecisionBitsnumber bits of precision for selecting texel weights + uint32_t mipmapPrecisionBitsnumber bits of precision for selecting mipmap weights + uint32_t maxDrawIndexedIndexValuemax index value for indexed draw calls (for 32-bit indices) + uint32_t maxDrawIndirectCountmax draw count for indirect draw calls + float maxSamplerLodBiasmax absolute sampler LOD bias + float maxSamplerAnisotropymax degree of sampler anisotropy + uint32_t maxViewportsmax number of active viewports + uint32_t maxViewportDimensions[2]max viewport dimensions (x,y) + float viewportBoundsRange[2]viewport bounds range (min,max) + uint32_t viewportSubPixelBitsnumber bits of subpixel precision for viewport + size_t minMemoryMapAlignmentmin required alignment of pointers returned by MapMemory (bytes) + VkDeviceSize minTexelBufferOffsetAlignmentmin required alignment for texel buffer offsets (bytes) + VkDeviceSize minUniformBufferOffsetAlignmentmin required alignment for uniform buffer sizes and offsets (bytes) + VkDeviceSize minStorageBufferOffsetAlignmentmin required alignment for storage buffer offsets (bytes) + int32_t minTexelOffsetmin texel offset for OpTextureSampleOffset + uint32_t maxTexelOffsetmax texel offset for OpTextureSampleOffset + int32_t minTexelGatherOffsetmin texel offset for OpTextureGatherOffset + uint32_t maxTexelGatherOffsetmax texel offset for OpTextureGatherOffset + float minInterpolationOffsetfurthest negative offset for interpolateAtOffset + float maxInterpolationOffsetfurthest positive offset for interpolateAtOffset + uint32_t subPixelInterpolationOffsetBitsnumber of subpixel bits for interpolateAtOffset + uint32_t maxFramebufferWidthmax width for a framebuffer + uint32_t maxFramebufferHeightmax height for a framebuffer + uint32_t maxFramebufferLayersmax layer count for a layered framebuffer + VkSampleCountFlags framebufferColorSampleCountssupported color sample counts for a framebuffer + VkSampleCountFlags framebufferDepthSampleCountssupported depth sample counts for a framebuffer + VkSampleCountFlags framebufferStencilSampleCountssupported stencil sample counts for a framebuffer + VkSampleCountFlags framebufferNoAttachmentsSampleCountssupported sample counts for a subpass which uses no attachments + uint32_t maxColorAttachmentsmax number of color attachments per subpass + VkSampleCountFlags sampledImageColorSampleCountssupported color sample counts for a non-integer sampled image + VkSampleCountFlags sampledImageIntegerSampleCountssupported sample counts for an integer image + VkSampleCountFlags sampledImageDepthSampleCountssupported depth sample counts for a sampled image + VkSampleCountFlags sampledImageStencilSampleCountssupported stencil sample counts for a sampled image + VkSampleCountFlags storageImageSampleCountssupported sample counts for a storage image + uint32_t maxSampleMaskWordsmax number of sample mask words + VkBool32 timestampComputeAndGraphicstimestamps on graphics and compute queues + float timestampPeriodnumber of nanoseconds it takes for timestamp query value to increment by 1 + uint32_t maxClipDistancesmax number of clip distances + uint32_t maxCullDistancesmax number of cull distances + uint32_t maxCombinedClipAndCullDistancesmax combined number of user clipping + uint32_t discreteQueuePrioritiesdistinct queue priorities available + float pointSizeRange[2]range (min,max) of supported point sizes + float lineWidthRange[2]range (min,max) of supported line widths + float pointSizeGranularitygranularity of supported point sizes + float lineWidthGranularitygranularity of supported line widths + VkBool32 strictLinesline rasterization follows preferred rules + VkBool32 standardSampleLocationssupports standard sample locations for all supported sample counts + VkDeviceSize optimalBufferCopyOffsetAlignmentoptimal offset of buffer copies + VkDeviceSize optimalBufferCopyRowPitchAlignmentoptimal pitch of buffer copies + VkDeviceSize nonCoherentAtomSizeminimum size and alignment for non-coherent host-mapped device memory access + + + VkStructureType sType + const void* pNext + VkSemaphoreCreateFlags flagsSemaphore creation flags + + + VkStructureType sType + const void* pNext + VkQueryPoolCreateFlags flags + VkQueryType queryType + uint32_t queryCount + VkQueryPipelineStatisticFlags pipelineStatisticsOptional + + + VkStructureType sType + const void* pNext + VkFramebufferCreateFlags flags + VkRenderPass renderPass + uint32_t attachmentCount + const VkImageView* pAttachments + uint32_t width + uint32_t height + uint32_t layers + + + uint32_t vertexCount + uint32_t instanceCount + uint32_t firstVertex + uint32_t firstInstance + + + uint32_t indexCount + uint32_t instanceCount + uint32_t firstIndex + int32_t vertexOffset + uint32_t firstInstance + + + uint32_t x + uint32_t y + uint32_t z + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + const VkPipelineStageFlags* pWaitDstStageMask + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + uint32_t signalSemaphoreCount + const VkSemaphore* pSignalSemaphores + + WSI extensions + + VkDisplayKHR displayHandle of the display object + const char* displayNameName of the display + VkExtent2D physicalDimensionsIn millimeters? + VkExtent2D physicalResolutionMax resolution for CRT? + VkSurfaceTransformFlagsKHR supportedTransformsone or more bits from VkSurfaceTransformFlagsKHR + VkBool32 planeReorderPossibleVK_TRUE if the overlay plane's z-order can be changed on this display. + VkBool32 persistentContentVK_TRUE if this is a "smart" display that supports self-refresh/internal buffering. + + + VkDisplayKHR currentDisplayDisplay the plane is currently associated with. Will be VK_NULL_HANDLE if the plane is not in use. + uint32_t currentStackIndexCurrent z-order of the plane. + + + VkExtent2D visibleRegionVisible scanout region. + uint32_t refreshRateNumber of times per second the display is updated. + + + VkDisplayModeKHR displayModeHandle of this display mode. + VkDisplayModeParametersKHR parametersThe parameters this mode uses. + + + VkStructureType sType + const void* pNext + VkDisplayModeCreateFlagsKHR flags + VkDisplayModeParametersKHR parametersThe parameters this mode uses. + + + VkDisplayPlaneAlphaFlagsKHR supportedAlphaTypes of alpha blending supported, if any. + VkOffset2D minSrcPositionDoes the plane have any position and extent restrictions? + VkOffset2D maxSrcPosition + VkExtent2D minSrcExtent + VkExtent2D maxSrcExtent + VkOffset2D minDstPosition + VkOffset2D maxDstPosition + VkExtent2D minDstExtent + VkExtent2D maxDstExtent + + + VkStructureType sType + const void* pNext + VkDisplaySurfaceCreateFlagsKHR flags + VkDisplayModeKHR displayModeThe mode to use when displaying this surface + uint32_t planeIndexThe plane on which this surface appears. Must be between 0 and the value returned by vkGetPhysicalDeviceDisplayPlanePropertiesKHR() in pPropertyCount. + uint32_t planeStackIndexThe z-order of the plane. + VkSurfaceTransformFlagBitsKHR transformTransform to apply to the images as part of the scanout operation + float globalAlphaGlobal alpha value. Must be between 0 and 1, inclusive. Ignored if alphaMode is not VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR + VkDisplayPlaneAlphaFlagBitsKHR alphaModeWhat type of alpha blending to use. Must be a bit from vkGetDisplayPlanePropertiesKHR::supportedAlpha. + VkExtent2D imageExtentsize of the images to use with this surface + + + VkStructureType sType + const void* pNext + VkRect2D srcRectRectangle within the presentable image to read pixel data from when presenting to the display. + VkRect2D dstRectRectangle within the current display mode's visible region to display srcRectangle in. + VkBool32 persistentFor smart displays, use buffered mode. If the display properties member "persistentMode" is VK_FALSE, this member must always be VK_FALSE. + + + uint32_t minImageCountSupported minimum number of images for the surface + uint32_t maxImageCountSupported maximum number of images for the surface, 0 for unlimited + VkExtent2D currentExtentCurrent image width and height for the surface, (0, 0) if undefined + VkExtent2D minImageExtentSupported minimum image width and height for the surface + VkExtent2D maxImageExtentSupported maximum image width and height for the surface + uint32_t maxImageArrayLayersSupported maximum number of image layers for the surface + VkSurfaceTransformFlagsKHR supportedTransforms1 or more bits representing the transforms supported + VkSurfaceTransformFlagBitsKHR currentTransformThe surface's current transform relative to the device's natural orientation + VkCompositeAlphaFlagsKHR supportedCompositeAlpha1 or more bits representing the alpha compositing modes supported + VkImageUsageFlags supportedUsageFlagsSupported image usage flags for the surface + + + VkStructureType sType + const void* pNext + VkAndroidSurfaceCreateFlagsKHR flags + struct ANativeWindow* window + + + VkStructureType sType + const void* pNext + VkViSurfaceCreateFlagsNN flags + void* window + + + VkStructureType sType + const void* pNext + VkWaylandSurfaceCreateFlagsKHR flags + struct wl_display* display + struct wl_surface* surface + + + VkStructureType sType + const void* pNext + VkWin32SurfaceCreateFlagsKHR flags + HINSTANCE hinstance + HWND hwnd + + + VkStructureType sType + const void* pNext + VkXlibSurfaceCreateFlagsKHR flags + Display* dpy + Window window + + + VkStructureType sType + const void* pNext + VkXcbSurfaceCreateFlagsKHR flags + xcb_connection_t* connection + xcb_window_t window + + + VkStructureType sType + const void* pNext + VkDirectFBSurfaceCreateFlagsEXT flags + IDirectFB* dfb + IDirectFBSurface* surface + + + VkStructureType sType + const void* pNext + VkImagePipeSurfaceCreateFlagsFUCHSIA flags + zx_handle_t imagePipeHandle + + + VkStructureType sType + const void* pNext + VkStreamDescriptorSurfaceCreateFlagsGGP flags + GgpStreamDescriptor streamDescriptor + + + VkFormat formatSupported pair of rendering format + VkColorSpaceKHR colorSpaceand color space for the surface + + + VkStructureType sType + const void* pNext + VkSwapchainCreateFlagsKHR flags + VkSurfaceKHR surfaceThe swapchain's target surface + uint32_t minImageCountMinimum number of presentation images the application needs + VkFormat imageFormatFormat of the presentation images + VkColorSpaceKHR imageColorSpaceColorspace of the presentation images + VkExtent2D imageExtentDimensions of the presentation images + uint32_t imageArrayLayersDetermines the number of views for multiview/stereo presentation + VkImageUsageFlags imageUsageBits indicating how the presentation images will be used + VkSharingMode imageSharingModeSharing mode used for the presentation images + uint32_t queueFamilyIndexCountNumber of queue families having access to the images in case of concurrent sharing mode + const uint32_t* pQueueFamilyIndicesArray of queue family indices having access to the images in case of concurrent sharing mode + VkSurfaceTransformFlagBitsKHR preTransformThe transform, relative to the device's natural orientation, applied to the image content prior to presentation + VkCompositeAlphaFlagBitsKHR compositeAlphaThe alpha blending mode used when compositing this surface with other surfaces in the window system + VkPresentModeKHR presentModeWhich presentation mode to use for presents on this swap chain + VkBool32 clippedSpecifies whether presentable images may be affected by window clip regions + VkSwapchainKHR oldSwapchainExisting swap chain to replace, if any + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCountNumber of semaphores to wait for before presenting + const VkSemaphore* pWaitSemaphoresSemaphores to wait for before presenting + uint32_t swapchainCountNumber of swapchains to present in this call + const VkSwapchainKHR* pSwapchainsSwapchains to present an image from + const uint32_t* pImageIndicesIndices of which presentable images to present + VkResult* pResultsOptional (i.e. if non-NULL) VkResult for each swapchain + + + VkStructureType sType + const void* pNext + VkDebugReportFlagsEXT flagsIndicates which events call this callback + PFN_vkDebugReportCallbackEXT pfnCallbackFunction pointer of a callback function + void* pUserDataUser data provided to callback function + + + VkStructureType sTypeMust be VK_STRUCTURE_TYPE_VALIDATION_FLAGS_EXT + const void* pNext + uint32_t disabledValidationCheckCountNumber of validation checks to disable + const VkValidationCheckEXT* pDisabledValidationChecksValidation checks to disable + + + VkStructureType sTypeMust be VK_STRUCTURE_TYPE_VALIDATION_FEATURES_EXT + const void* pNext + uint32_t enabledValidationFeatureCountNumber of validation features to enable + const VkValidationFeatureEnableEXT* pEnabledValidationFeaturesValidation features to enable + uint32_t disabledValidationFeatureCountNumber of validation features to disable + const VkValidationFeatureDisableEXT* pDisabledValidationFeaturesValidation features to disable + + + VkStructureType sType + const void* pNext + VkRasterizationOrderAMD rasterizationOrderRasterization order to use for the pipeline + + + VkStructureType sType + const void* pNext + VkDebugReportObjectTypeEXT objectTypeThe type of the object + uint64_t objectThe handle of the object, cast to uint64_t + const char* pObjectNameName to apply to the object + + + VkStructureType sType + const void* pNext + VkDebugReportObjectTypeEXT objectTypeThe type of the object + uint64_t objectThe handle of the object, cast to uint64_t + uint64_t tagNameThe name of the tag to set on the object + size_t tagSizeThe length in bytes of the tag data + const void* pTagTag data to attach to the object + + + VkStructureType sType + const void* pNext + const char* pMarkerNameName of the debug marker + float color[4]Optional color for debug marker + + + VkStructureType sType + const void* pNext + VkBool32 dedicatedAllocationWhether this image uses a dedicated allocation + + + VkStructureType sType + const void* pNext + VkBool32 dedicatedAllocationWhether this buffer uses a dedicated allocation + + + VkStructureType sType + const void* pNext + VkImage imageImage that this allocation will be bound to + VkBuffer bufferBuffer that this allocation will be bound to + + + VkImageFormatProperties imageFormatProperties + VkExternalMemoryFeatureFlagsNV externalMemoryFeatures + VkExternalMemoryHandleTypeFlagsNV exportFromImportedHandleTypes + VkExternalMemoryHandleTypeFlagsNV compatibleHandleTypes + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagsNV handleTypes + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagsNV handleTypes + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagsNV handleType + HANDLE handle + + + VkStructureType sType + const void* pNext + const SECURITY_ATTRIBUTES* pAttributes + DWORD dwAccess + + + VkStructureType sType + const void* pNext + uint32_t acquireCount + const VkDeviceMemory* pAcquireSyncs + const uint64_t* pAcquireKeys + const uint32_t* pAcquireTimeoutMilliseconds + uint32_t releaseCount + const VkDeviceMemory* pReleaseSyncs + const uint64_t* pReleaseKeys + + + VkStructureTypesType + void* pNext + VkBool32 deviceGeneratedCommands + + + VkStructureType sType + const void* pNext + uint32_t privateDataSlotRequestCount + + + VkStructureType sType + const void* pNext + VkPrivateDataSlotCreateFlagsEXT flags + + + VkStructureType sType + void* pNext + VkBool32 privateData + + + VkStructureType sType + void* pNext + uint32_t maxGraphicsShaderGroupCount + uint32_t maxIndirectSequenceCount + uint32_t maxIndirectCommandsTokenCount + uint32_t maxIndirectCommandsStreamCount + uint32_t maxIndirectCommandsTokenOffset + uint32_t maxIndirectCommandsStreamStride + uint32_t minSequencesCountBufferOffsetAlignment + uint32_t minSequencesIndexBufferOffsetAlignment + uint32_t minIndirectCommandsBufferOffsetAlignment + + + VkStructureType sType + const void* pNext + uint32_t stageCount + const VkPipelineShaderStageCreateInfo* pStages + const VkPipelineVertexInputStateCreateInfo* pVertexInputState + const VkPipelineTessellationStateCreateInfo* pTessellationState + + + VkStructureType sType + const void* pNext + uint32_t groupCount + const VkGraphicsShaderGroupCreateInfoNV* pGroups + uint32_t pipelineCount + const VkPipeline* pPipelines + + + uint32_t groupIndex + + + VkDeviceAddress bufferAddress + uint32_t size + VkIndexType indexType + + + VkDeviceAddress bufferAddress + uint32_t size + uint32_t stride + + + uint32_t data + + + VkBuffer buffer + VkDeviceSize offset + + + VkStructureType sType + const void* pNext + VkIndirectCommandsTokenTypeNV tokenType + uint32_t stream + uint32_t offset + uint32_t vertexBindingUnit + VkBool32 vertexDynamicStride + VkPipelineLayout pushconstantPipelineLayout + VkShaderStageFlags pushconstantShaderStageFlags + uint32_t pushconstantOffset + uint32_t pushconstantSize + VkIndirectStateFlagsNV indirectStateFlags + uint32_t indexTypeCount + const VkIndexType* pIndexTypes + const uint32_t* pIndexTypeValues + + + VkStructureType sType + const void* pNext + VkIndirectCommandsLayoutUsageFlagsNV flags + VkPipelineBindPoint pipelineBindPoint + uint32_t tokenCount + const VkIndirectCommandsLayoutTokenNV* pTokens + uint32_t streamCount + const uint32_t* pStreamStrides + + + VkStructureType sType + const void* pNext + VkPipelineBindPoint pipelineBindPoint + VkPipeline pipeline + VkIndirectCommandsLayoutNV indirectCommandsLayout + uint32_t streamCount + const VkIndirectCommandsStreamNV* pStreams + uint32_t sequencesCount + VkBuffer preprocessBuffer + VkDeviceSize preprocessOffset + VkDeviceSize preprocessSize + VkBuffer sequencesCountBuffer + VkDeviceSize sequencesCountOffset + VkBuffer sequencesIndexBuffer + VkDeviceSize sequencesIndexOffset + + + VkStructureType sType + const void* pNext + VkPipelineBindPoint pipelineBindPoint + VkPipeline pipeline + VkIndirectCommandsLayoutNV indirectCommandsLayout + uint32_t maxSequencesCount + + + VkStructureType sType + void* pNext + VkPhysicalDeviceFeatures features + + + + VkStructureType sType + void* pNext + VkPhysicalDeviceProperties properties + + + + VkStructureType sType + void* pNext + VkFormatProperties formatProperties + + + + VkStructureType sType + void* pNext + VkImageFormatProperties imageFormatProperties + + + + VkStructureType sType + const void* pNext + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + + + + VkStructureType sType + void* pNext + VkQueueFamilyProperties queueFamilyProperties + + + + VkStructureType sType + void* pNext + VkPhysicalDeviceMemoryProperties memoryProperties + + + + VkStructureType sType + void* pNext + VkSparseImageFormatProperties properties + + + + VkStructureType sType + const void* pNext + VkFormat format + VkImageType type + VkSampleCountFlagBits samples + VkImageUsageFlags usage + VkImageTiling tiling + + + + VkStructureType sType + void* pNext + uint32_t maxPushDescriptors + + + uint8_t major + uint8_t minor + uint8_t subminor + uint8_t patch + + + + VkStructureType sType + void* pNext + VkDriverId driverID + char driverName[VK_MAX_DRIVER_NAME_SIZE] + char driverInfo[VK_MAX_DRIVER_INFO_SIZE] + VkConformanceVersion conformanceVersion + + + + VkStructureType sType + const void* pNext + uint32_t swapchainCountCopy of VkPresentInfoKHR::swapchainCount + const VkPresentRegionKHR* pRegionsThe regions that have changed + + + uint32_t rectangleCountNumber of rectangles in pRectangles + const VkRectLayerKHR* pRectanglesArray of rectangles that have changed in a swapchain's image(s) + + + VkOffset2D offsetupper-left corner of a rectangle that has not changed, in pixels of a presentation images + VkExtent2D extentDimensions of a rectangle that has not changed, in pixels of a presentation images + uint32_t layerLayer of a swapchain's image(s), for stereoscopic-3D images + + + VkStructureType sType + void* pNext + VkBool32 variablePointersStorageBuffer + VkBool32 variablePointers + + + + + + VkExternalMemoryFeatureFlags externalMemoryFeatures + VkExternalMemoryHandleTypeFlags exportFromImportedHandleTypes + VkExternalMemoryHandleTypeFlags compatibleHandleTypes + + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagBits handleType + + + + VkStructureType sType + void* pNext + VkExternalMemoryProperties externalMemoryProperties + + + + VkStructureType sType + const void* pNext + VkBufferCreateFlags flags + VkBufferUsageFlags usage + VkExternalMemoryHandleTypeFlagBits handleType + + + + VkStructureType sType + void* pNext + VkExternalMemoryProperties externalMemoryProperties + + + + VkStructureType sType + void* pNext + uint8_t deviceUUID[VK_UUID_SIZE] + uint8_t driverUUID[VK_UUID_SIZE] + uint8_t deviceLUID[VK_LUID_SIZE] + uint32_t deviceNodeMask + VkBool32 deviceLUIDValid + + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlags handleTypes + + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlags handleTypes + + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlags handleTypes + + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagBits handleType + HANDLE handle + LPCWSTR name + + + VkStructureType sType + const void* pNext + const SECURITY_ATTRIBUTES* pAttributes + DWORD dwAccess + LPCWSTR name + + + VkStructureType sType + void* pNext + uint32_t memoryTypeBits + + + VkStructureType sType + const void* pNext + VkDeviceMemory memory + VkExternalMemoryHandleTypeFlagBits handleType + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagBits handleType + int fd + + + VkStructureType sType + void* pNext + uint32_t memoryTypeBits + + + VkStructureType sType + const void* pNext + VkDeviceMemory memory + VkExternalMemoryHandleTypeFlagBits handleType + + + VkStructureType sType + const void* pNext + uint32_t acquireCount + const VkDeviceMemory* pAcquireSyncs + const uint64_t* pAcquireKeys + const uint32_t* pAcquireTimeouts + uint32_t releaseCount + const VkDeviceMemory* pReleaseSyncs + const uint64_t* pReleaseKeys + + + VkStructureType sType + const void* pNext + VkExternalSemaphoreHandleTypeFlagBits handleType + + + + VkStructureType sType + void* pNext + VkExternalSemaphoreHandleTypeFlags exportFromImportedHandleTypes + VkExternalSemaphoreHandleTypeFlags compatibleHandleTypes + VkExternalSemaphoreFeatureFlags externalSemaphoreFeatures + + + + VkStructureType sType + const void* pNext + VkExternalSemaphoreHandleTypeFlags handleTypes + + + + VkStructureType sType + const void* pNext + VkSemaphore semaphore + VkSemaphoreImportFlags flags + VkExternalSemaphoreHandleTypeFlagBits handleType + HANDLE handle + LPCWSTR name + + + VkStructureType sType + const void* pNext + const SECURITY_ATTRIBUTES* pAttributes + DWORD dwAccess + LPCWSTR name + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreValuesCount + const uint64_t* pWaitSemaphoreValues + uint32_t signalSemaphoreValuesCount + const uint64_t* pSignalSemaphoreValues + + + VkStructureType sType + const void* pNext + VkSemaphore semaphore + VkExternalSemaphoreHandleTypeFlagBits handleType + + + VkStructureType sType + const void* pNext + VkSemaphore semaphore + VkSemaphoreImportFlags flags + VkExternalSemaphoreHandleTypeFlagBits handleType + int fd + + + VkStructureType sType + const void* pNext + VkSemaphore semaphore + VkExternalSemaphoreHandleTypeFlagBits handleType + + + VkStructureType sType + const void* pNext + VkExternalFenceHandleTypeFlagBits handleType + + + + VkStructureType sType + void* pNext + VkExternalFenceHandleTypeFlags exportFromImportedHandleTypes + VkExternalFenceHandleTypeFlags compatibleHandleTypes + VkExternalFenceFeatureFlags externalFenceFeatures + + + + VkStructureType sType + const void* pNext + VkExternalFenceHandleTypeFlags handleTypes + + + + VkStructureType sType + const void* pNext + VkFence fence + VkFenceImportFlags flags + VkExternalFenceHandleTypeFlagBits handleType + HANDLE handle + LPCWSTR name + + + VkStructureType sType + const void* pNext + const SECURITY_ATTRIBUTES* pAttributes + DWORD dwAccess + LPCWSTR name + + + VkStructureType sType + const void* pNext + VkFence fence + VkExternalFenceHandleTypeFlagBits handleType + + + VkStructureType sType + const void* pNext + VkFence fence + VkFenceImportFlags flags + VkExternalFenceHandleTypeFlagBits handleType + int fd + + + VkStructureType sType + const void* pNext + VkFence fence + VkExternalFenceHandleTypeFlagBits handleType + + + VkStructureType sType + void* pNext + VkBool32 multiviewMultiple views in a renderpass + VkBool32 multiviewGeometryShaderMultiple views in a renderpass w/ geometry shader + VkBool32 multiviewTessellationShaderMultiple views in a renderpass w/ tessellation shader + + + + VkStructureType sType + void* pNext + uint32_t maxMultiviewViewCountmax number of views in a subpass + uint32_t maxMultiviewInstanceIndexmax instance index for a draw in a multiview subpass + + + + VkStructureType sType + const void* pNext + uint32_t subpassCount + const uint32_t* pViewMasks + uint32_t dependencyCount + const int32_t* pViewOffsets + uint32_t correlationMaskCount + const uint32_t* pCorrelationMasks + + + + VkStructureType sType + void* pNext + uint32_t minImageCountSupported minimum number of images for the surface + uint32_t maxImageCountSupported maximum number of images for the surface, 0 for unlimited + VkExtent2D currentExtentCurrent image width and height for the surface, (0, 0) if undefined + VkExtent2D minImageExtentSupported minimum image width and height for the surface + VkExtent2D maxImageExtentSupported maximum image width and height for the surface + uint32_t maxImageArrayLayersSupported maximum number of image layers for the surface + VkSurfaceTransformFlagsKHR supportedTransforms1 or more bits representing the transforms supported + VkSurfaceTransformFlagBitsKHR currentTransformThe surface's current transform relative to the device's natural orientation + VkCompositeAlphaFlagsKHR supportedCompositeAlpha1 or more bits representing the alpha compositing modes supported + VkImageUsageFlags supportedUsageFlagsSupported image usage flags for the surface + VkSurfaceCounterFlagsEXT supportedSurfaceCounters + + + VkStructureType sType + const void* pNext + VkDisplayPowerStateEXT powerState + + + VkStructureType sType + const void* pNext + VkDeviceEventTypeEXT deviceEvent + + + VkStructureType sType + const void* pNext + VkDisplayEventTypeEXT displayEvent + + + VkStructureType sType + const void* pNext + VkSurfaceCounterFlagsEXT surfaceCounters + + + VkStructureType sType + void* pNext + uint32_t physicalDeviceCount + VkPhysicalDevice physicalDevices[VK_MAX_DEVICE_GROUP_SIZE] + VkBool32 subsetAllocation + + + + VkStructureType sType + const void* pNext + VkMemoryAllocateFlags flags + uint32_t deviceMask + + + + VkStructureType sType + const void* pNext + VkBuffer buffer + VkDeviceMemory memory + VkDeviceSize memoryOffset + + + + VkStructureType sType + const void* pNext + uint32_t deviceIndexCount + const uint32_t* pDeviceIndices + + + + VkStructureType sType + const void* pNext + VkImage image + VkDeviceMemory memory + VkDeviceSize memoryOffset + + + + VkStructureType sType + const void* pNext + uint32_t deviceIndexCount + const uint32_t* pDeviceIndices + uint32_t splitInstanceBindRegionCount + const VkRect2D* pSplitInstanceBindRegions + + + + VkStructureType sType + const void* pNext + uint32_t deviceMask + uint32_t deviceRenderAreaCount + const VkRect2D* pDeviceRenderAreas + + + + VkStructureType sType + const void* pNext + uint32_t deviceMask + + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreCount + const uint32_t* pWaitSemaphoreDeviceIndices + uint32_t commandBufferCount + const uint32_t* pCommandBufferDeviceMasks + uint32_t signalSemaphoreCount + const uint32_t* pSignalSemaphoreDeviceIndices + + + + VkStructureType sType + const void* pNext + uint32_t resourceDeviceIndex + uint32_t memoryDeviceIndex + + + + VkStructureType sType + const void* pNext + uint32_t presentMask[VK_MAX_DEVICE_GROUP_SIZE] + VkDeviceGroupPresentModeFlagsKHR modes + + + VkStructureType sType + const void* pNext + VkSwapchainKHR swapchain + + + VkStructureType sType + const void* pNext + VkSwapchainKHR swapchain + uint32_t imageIndex + + + VkStructureType sType + const void* pNext + VkSwapchainKHR swapchain + uint64_t timeout + VkSemaphore semaphore + VkFence fence + uint32_t deviceMask + + + VkStructureType sType + const void* pNext + uint32_t swapchainCount + const uint32_t* pDeviceMasks + VkDeviceGroupPresentModeFlagBitsKHR mode + + + VkStructureType sType + const void* pNext + uint32_t physicalDeviceCount + const VkPhysicalDevice* pPhysicalDevices + + + + VkStructureType sType + const void* pNext + VkDeviceGroupPresentModeFlagsKHR modes + + + uint32_t dstBindingBinding within the destination descriptor set to write + uint32_t dstArrayElementArray element within the destination binding to write + uint32_t descriptorCountNumber of descriptors to write + VkDescriptorType descriptorTypeDescriptor type to write + size_t offsetOffset into pData where the descriptors to update are stored + size_t strideStride between two descriptors in pData when writing more than one descriptor + + + + VkStructureType sType + const void* pNext + VkDescriptorUpdateTemplateCreateFlags flags + uint32_t descriptorUpdateEntryCountNumber of descriptor update entries to use for the update template + const VkDescriptorUpdateTemplateEntry* pDescriptorUpdateEntriesDescriptor update entries for the template + VkDescriptorUpdateTemplateType templateType + VkDescriptorSetLayout descriptorSetLayout + VkPipelineBindPoint pipelineBindPoint + VkPipelineLayoutpipelineLayoutIf used for push descriptors, this is the only allowed layout + uint32_t set + + + + float x + float y + + + Display primary in chromaticity coordinates + VkStructureType sType + const void* pNext + From SMPTE 2086 + VkXYColorEXT displayPrimaryRedDisplay primary's Red + VkXYColorEXT displayPrimaryGreenDisplay primary's Green + VkXYColorEXT displayPrimaryBlueDisplay primary's Blue + VkXYColorEXT whitePointDisplay primary's Blue + float maxLuminanceDisplay maximum luminance + float minLuminanceDisplay minimum luminance + From CTA 861.3 + float maxContentLightLevelContent maximum luminance + float maxFrameAverageLightLevel + + + VkStructureType sType + void* pNext + VkBool32 localDimmingSupport + + + VkStructureType sType + const void* pNext + VkBool32 localDimmingEnable + + + uint64_t refreshDurationNumber of nanoseconds from the start of one refresh cycle to the next + + + uint32_t presentIDApplication-provided identifier, previously given to vkQueuePresentKHR + uint64_t desiredPresentTimeEarliest time an image should have been presented, previously given to vkQueuePresentKHR + uint64_t actualPresentTimeTime the image was actually displayed + uint64_t earliestPresentTimeEarliest time the image could have been displayed + uint64_t presentMarginHow early vkQueuePresentKHR was processed vs. how soon it needed to be and make earliestPresentTime + + + VkStructureType sType + const void* pNext + uint32_t swapchainCountCopy of VkPresentInfoKHR::swapchainCount + const VkPresentTimeGOOGLE* pTimesThe earliest times to present images + + + uint32_t presentIDApplication-provided identifier + uint64_t desiredPresentTimeEarliest time an image should be presented + + + VkStructureType sType + const void* pNext + VkIOSSurfaceCreateFlagsMVK flags + const void* pView + + + VkStructureType sType + const void* pNext + VkMacOSSurfaceCreateFlagsMVK flags + const void* pView + + + VkStructureType sType + const void* pNext + VkMetalSurfaceCreateFlagsEXT flags + const CAMetalLayer* pLayer + + + float xcoeff + float ycoeff + + + VkStructureType sType + const void* pNext + VkBool32 viewportWScalingEnable + uint32_t viewportCount + const VkViewportWScalingNV* pViewportWScalings + + + VkViewportCoordinateSwizzleNV x + VkViewportCoordinateSwizzleNV y + VkViewportCoordinateSwizzleNV z + VkViewportCoordinateSwizzleNV w + + + VkStructureType sType + const void* pNext + VkPipelineViewportSwizzleStateCreateFlagsNV flags + uint32_t viewportCount + const VkViewportSwizzleNV* pViewportSwizzles + + + VkStructureType sType + void* pNext + uint32_t maxDiscardRectanglesmax number of active discard rectangles + + + VkStructureType sType + const void* pNext + VkPipelineDiscardRectangleStateCreateFlagsEXT flags + VkDiscardRectangleModeEXT discardRectangleMode + uint32_t discardRectangleCount + const VkRect2D* pDiscardRectangles + + + VkStructureType sType + void* pNext + VkBool32 perViewPositionAllComponents + + + uint32_t subpass + uint32_t inputAttachmentIndex + VkImageAspectFlags aspectMask + + + + VkStructureType sType + const void* pNext + uint32_t aspectReferenceCount + const VkInputAttachmentAspectReference* pAspectReferences + + + + VkStructureType sType + const void* pNext + VkSurfaceKHR surface + + + VkStructureType sType + void* pNext + VkSurfaceCapabilitiesKHR surfaceCapabilities + + + VkStructureType sType + void* pNext + VkSurfaceFormatKHR surfaceFormat + + + VkStructureType sType + void* pNext + VkDisplayPropertiesKHR displayProperties + + + VkStructureType sType + void* pNext + VkDisplayPlanePropertiesKHR displayPlaneProperties + + + VkStructureType sType + void* pNext + VkDisplayModePropertiesKHR displayModeProperties + + + VkStructureType sType + const void* pNext + VkDisplayModeKHR mode + uint32_t planeIndex + + + VkStructureType sType + void* pNext + VkDisplayPlaneCapabilitiesKHR capabilities + + + VkStructureType sType + void* pNext + VkImageUsageFlags sharedPresentSupportedUsageFlagsSupported image usage flags if swapchain created using a shared present mode + + + VkStructureType sType + void* pNext + VkBool32 storageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock + VkBool32 uniformAndStorageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock and Block + VkBool32 storagePushConstant1616-bit integer/floating-point variables supported in PushConstant + VkBool32 storageInputOutput1616-bit integer/floating-point variables supported in shader inputs and outputs + + + + VkStructureType sType + void* pNext + uint32_t subgroupSizeThe size of a subgroup for this queue. + VkShaderStageFlags supportedStagesBitfield of what shader stages support subgroup operations + VkSubgroupFeatureFlags supportedOperationsBitfield of what subgroup operations are supported. + VkBool32 quadOperationsInAllStagesFlag to specify whether quad operations are available in all stages. + + + VkStructureType sType + void* pNext + VkBool32 shaderSubgroupExtendedTypesFlag to specify whether subgroup operations with extended types are supported + + + + VkStructureType sType + const void* pNext + VkBuffer buffer + + + + VkStructureType sType + const void* pNext + VkImage image + + + + VkStructureType sType + const void* pNext + VkImage image + + + + VkStructureType sType + void* pNext + VkMemoryRequirements memoryRequirements + + + + VkStructureType sType + void* pNext + VkSparseImageMemoryRequirements memoryRequirements + + + + VkStructureType sType + void* pNext + VkPointClippingBehavior pointClippingBehavior + + + + VkStructureType sType + void* pNext + VkBool32 prefersDedicatedAllocation + VkBool32 requiresDedicatedAllocation + + + + VkStructureType sType + const void* pNext + VkImage imageImage that this allocation will be bound to + VkBuffer bufferBuffer that this allocation will be bound to + + + + VkStructureType sType + const void* pNext + VkImageUsageFlags usage + + + + VkStructureType sType + const void* pNext + VkTessellationDomainOrigin domainOrigin + + + + VkStructureType sType + const void* pNext + VkSamplerYcbcrConversion conversion + + + + VkStructureType sType + const void* pNext + VkFormat format + VkSamplerYcbcrModelConversion ycbcrModel + VkSamplerYcbcrRange ycbcrRange + VkComponentMapping components + VkChromaLocation xChromaOffset + VkChromaLocation yChromaOffset + VkFilter chromaFilter + VkBool32 forceExplicitReconstruction + + + + VkStructureType sType + const void* pNext + VkImageAspectFlagBits planeAspect + + + + VkStructureType sType + const void* pNext + VkImageAspectFlagBits planeAspect + + + + VkStructureType sType + void* pNext + VkBool32 samplerYcbcrConversionSampler color conversion supported + + + + VkStructureType sType + void* pNext + uint32_t combinedImageSamplerDescriptorCount + + + + VkStructureType sType + void* pNext + VkBool32 supportsTextureGatherLODBiasAMD + + + VkStructureType sType + const void* pNext + VkBuffer buffer + VkDeviceSize offset + VkConditionalRenderingFlagsEXT flags + + + VkStructureType sType + const void* pNext + VkBool32 protectedSubmitSubmit protected command buffers + + + VkStructureType sType + void* pNext + VkBool32 protectedMemory + + + VkStructureType sType + void* pNext + VkBool32 protectedNoFault + + + VkStructureType sType + const void* pNext + VkDeviceQueueCreateFlags flags + uint32_t queueFamilyIndex + uint32_t queueIndex + + + VkStructureType sType + const void* pNext + VkPipelineCoverageToColorStateCreateFlagsNV flags + VkBool32 coverageToColorEnable + uint32_t coverageToColorLocation + + + VkStructureType sType + void* pNext + VkBool32 filterMinmaxSingleComponentFormats + VkBool32 filterMinmaxImageComponentMapping + + + + float x + float y + + + VkStructureType sType + const void* pNext + VkSampleCountFlagBits sampleLocationsPerPixel + VkExtent2D sampleLocationGridSize + uint32_t sampleLocationsCount + const VkSampleLocationEXT* pSampleLocations + + + uint32_t attachmentIndex + VkSampleLocationsInfoEXT sampleLocationsInfo + + + uint32_t subpassIndex + VkSampleLocationsInfoEXT sampleLocationsInfo + + + VkStructureType sType + const void* pNext + uint32_t attachmentInitialSampleLocationsCount + const VkAttachmentSampleLocationsEXT* pAttachmentInitialSampleLocations + uint32_t postSubpassSampleLocationsCount + const VkSubpassSampleLocationsEXT* pPostSubpassSampleLocations + + + VkStructureType sType + const void* pNext + VkBool32 sampleLocationsEnable + VkSampleLocationsInfoEXT sampleLocationsInfo + + + VkStructureType sType + void* pNext + VkSampleCountFlags sampleLocationSampleCounts + VkExtent2D maxSampleLocationGridSize + float sampleLocationCoordinateRange[2] + uint32_t sampleLocationSubPixelBits + VkBool32 variableSampleLocations + + + VkStructureType sType + void* pNext + VkExtent2D maxSampleLocationGridSize + + + VkStructureType sType + const void* pNext + VkSamplerReductionMode reductionMode + + + + VkStructureType sType + void* pNext + VkBool32 advancedBlendCoherentOperations + + + VkStructureType sType + void* pNext + uint32_t advancedBlendMaxColorAttachments + VkBool32 advancedBlendIndependentBlend + VkBool32 advancedBlendNonPremultipliedSrcColor + VkBool32 advancedBlendNonPremultipliedDstColor + VkBool32 advancedBlendCorrelatedOverlap + VkBool32 advancedBlendAllOperations + + + VkStructureType sType + const void* pNext + VkBool32 srcPremultiplied + VkBool32 dstPremultiplied + VkBlendOverlapEXT blendOverlap + + + VkStructureType sType + void* pNext + VkBool32 inlineUniformBlock + VkBool32 descriptorBindingInlineUniformBlockUpdateAfterBind + + + VkStructureType sType + void* pNext + uint32_t maxInlineUniformBlockSize + uint32_t maxPerStageDescriptorInlineUniformBlocks + uint32_t maxPerStageDescriptorUpdateAfterBindInlineUniformBlocks + uint32_t maxDescriptorSetInlineUniformBlocks + uint32_t maxDescriptorSetUpdateAfterBindInlineUniformBlocks + + + VkStructureType sType + const void* pNext + uint32_t dataSize + const void* pData + + + VkStructureType sType + const void* pNext + uint32_t maxInlineUniformBlockBindings + + + VkStructureType sType + const void* pNext + VkPipelineCoverageModulationStateCreateFlagsNV flags + VkCoverageModulationModeNV coverageModulationMode + VkBool32 coverageModulationTableEnable + uint32_t coverageModulationTableCount + const float* pCoverageModulationTable + + + VkStructureType sType + const void* pNext + uint32_t viewFormatCount + const VkFormat* pViewFormats + + + + VkStructureType sType + const void* pNext + VkValidationCacheCreateFlagsEXT flags + size_t initialDataSize + const void* pInitialData + + + VkStructureType sType + const void* pNext + VkValidationCacheEXT validationCache + + + VkStructureType sType + void* pNext + uint32_t maxPerSetDescriptors + VkDeviceSize maxMemoryAllocationSize + + + + VkStructureType sType + void* pNext + VkBool32 supported + + + + VkStructureType sType + void* pNext + VkBool32 shaderDrawParameters + + + + VkStructureType sType + void* pNext + VkBool32 shaderFloat1616-bit floats (halfs) in shaders + VkBool32 shaderInt88-bit integers in shaders + + + + + VkStructureType sType + void* pNext + VkShaderFloatControlsIndependence denormBehaviorIndependence + VkShaderFloatControlsIndependence roundingModeIndependence + VkBool32 shaderSignedZeroInfNanPreserveFloat16An implementation can preserve signed zero, nan, inf + VkBool32 shaderSignedZeroInfNanPreserveFloat32An implementation can preserve signed zero, nan, inf + VkBool32 shaderSignedZeroInfNanPreserveFloat64An implementation can preserve signed zero, nan, inf + VkBool32 shaderDenormPreserveFloat16An implementation can preserve denormals + VkBool32 shaderDenormPreserveFloat32An implementation can preserve denormals + VkBool32 shaderDenormPreserveFloat64An implementation can preserve denormals + VkBool32 shaderDenormFlushToZeroFloat16An implementation can flush to zero denormals + VkBool32 shaderDenormFlushToZeroFloat32An implementation can flush to zero denormals + VkBool32 shaderDenormFlushToZeroFloat64An implementation can flush to zero denormals + VkBool32 shaderRoundingModeRTEFloat16An implementation can support RTE + VkBool32 shaderRoundingModeRTEFloat32An implementation can support RTE + VkBool32 shaderRoundingModeRTEFloat64An implementation can support RTE + VkBool32 shaderRoundingModeRTZFloat16An implementation can support RTZ + VkBool32 shaderRoundingModeRTZFloat32An implementation can support RTZ + VkBool32 shaderRoundingModeRTZFloat64An implementation can support RTZ + + + + VkStructureType sType + void* pNext + VkBool32 hostQueryReset + + + + uint64_t consumer + uint64_t producer + + + VkStructureType sType + const void* pNext + const void* handle + int stride + int format + int usage + VkNativeBufferUsage2ANDROID usage2 + + + VkStructureType sType + const void* pNext + VkSwapchainImageUsageFlagsANDROID usage + + + VkStructureType sType + const void* pNext + VkBool32 sharedImage + + + uint32_t numUsedVgprs + uint32_t numUsedSgprs + uint32_t ldsSizePerLocalWorkGroup + size_t ldsUsageSizeInBytes + size_t scratchMemUsageInBytes + + + VkShaderStageFlags shaderStageMask + VkShaderResourceUsageAMD resourceUsage + uint32_t numPhysicalVgprs + uint32_t numPhysicalSgprs + uint32_t numAvailableVgprs + uint32_t numAvailableSgprs + uint32_t computeWorkGroupSize[3] + + + VkStructureType sType + const void* pNext + VkQueueGlobalPriorityEXT globalPriority + + + VkStructureType sType + const void* pNext + VkObjectType objectType + uint64_t objectHandle + const char* pObjectName + + + VkStructureType sType + const void* pNext + VkObjectType objectType + uint64_t objectHandle + uint64_t tagName + size_t tagSize + const void* pTag + + + VkStructureType sType + const void* pNext + const char* pLabelName + float color[4] + + + VkStructureType sType + const void* pNext + VkDebugUtilsMessengerCreateFlagsEXT flags + VkDebugUtilsMessageSeverityFlagsEXT messageSeverity + VkDebugUtilsMessageTypeFlagsEXT messageType + PFN_vkDebugUtilsMessengerCallbackEXT pfnUserCallback + void* pUserData + + + VkStructureType sType + const void* pNext + VkDebugUtilsMessengerCallbackDataFlagsEXT flags + const char* pMessageIdName + int32_t messageIdNumber + const char* pMessage + uint32_t queueLabelCount + const VkDebugUtilsLabelEXT* pQueueLabels + uint32_t cmdBufLabelCount + const VkDebugUtilsLabelEXT* pCmdBufLabels + uint32_t objectCount + const VkDebugUtilsObjectNameInfoEXT* pObjects + + + VkStructureType sType + void* pNext + VkBool32 deviceMemoryReport + + + VkStructureType sType + const void* pNext + VkDeviceMemoryReportFlagsEXT flags + PFN_vkDeviceMemoryReportCallbackEXT pfnUserCallback + void* pUserData + + + VkStructureType sType + const void* pNext + VkDeviceMemoryReportFlagsEXT flags + VkDeviceMemoryReportEventTypeEXT type + uint64_t memoryObjectId + VkDeviceSize size + VkObjectType objectType + uint64_t objectHandle + uint32_t heapIndex + + + VkStructureType sType + const void* pNext + VkExternalMemoryHandleTypeFlagBits handleType + void* pHostPointer + + + VkStructureType sType + void* pNext + uint32_t memoryTypeBits + + + VkStructureType sType + void* pNext + VkDeviceSize minImportedHostPointerAlignment + + + VkStructureType sType + void* pNext + float primitiveOverestimationSizeThe size in pixels the primitive is enlarged at each edge during conservative rasterization + float maxExtraPrimitiveOverestimationSizeThe maximum additional overestimation the client can specify in the pipeline state + float extraPrimitiveOverestimationSizeGranularityThe granularity of extra overestimation sizes the implementations supports between 0 and maxExtraOverestimationSize + VkBool32 primitiveUnderestimationtrue if the implementation supports conservative rasterization underestimation mode + VkBool32 conservativePointAndLineRasterizationtrue if conservative rasterization also applies to points and lines + VkBool32 degenerateTrianglesRasterizedtrue if degenerate triangles (those with zero area after snap) are rasterized + VkBool32 degenerateLinesRasterizedtrue if degenerate lines (those with zero length after snap) are rasterized + VkBool32 fullyCoveredFragmentShaderInputVariabletrue if the implementation supports the FullyCoveredEXT SPIR-V builtin fragment shader input variable + VkBool32 conservativeRasterizationPostDepthCoveragetrue if the implementation supports both conservative rasterization and post depth coverage sample coverage mask + + + VkStructureType sType + const void* pNext + VkTimeDomainEXT timeDomain + + + VkStructureType sType + void* pNext + uint32_t shaderEngineCountnumber of shader engines + uint32_t shaderArraysPerEngineCountnumber of shader arrays + uint32_t computeUnitsPerShaderArraynumber of physical CUs per shader array + uint32_t simdPerComputeUnitnumber of SIMDs per compute unit + uint32_t wavefrontsPerSimdnumber of wavefront slots in each SIMD + uint32_t wavefrontSizemaximum number of threads per wavefront + uint32_t sgprsPerSimdnumber of physical SGPRs per SIMD + uint32_t minSgprAllocationminimum number of SGPRs that can be allocated by a wave + uint32_t maxSgprAllocationnumber of available SGPRs + uint32_t sgprAllocationGranularitySGPRs are allocated in groups of this size + uint32_t vgprsPerSimdnumber of physical VGPRs per SIMD + uint32_t minVgprAllocationminimum number of VGPRs that can be allocated by a wave + uint32_t maxVgprAllocationnumber of available VGPRs + uint32_t vgprAllocationGranularityVGPRs are allocated in groups of this size + + + VkStructureType sType + void* pNextPointer to next structure + VkShaderCorePropertiesFlagsAMD shaderCoreFeaturesfeatures supported by the shader core + uint32_t activeComputeUnitCountnumber of active compute units across all shader engines/arrays + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationConservativeStateCreateFlagsEXT flagsReserved + VkConservativeRasterizationModeEXT conservativeRasterizationModeConservative rasterization mode + float extraPrimitiveOverestimationSizeExtra overestimation to add to the primitive + + + VkStructureType sType + void* pNext + VkBool32 shaderInputAttachmentArrayDynamicIndexing + VkBool32 shaderUniformTexelBufferArrayDynamicIndexing + VkBool32 shaderStorageTexelBufferArrayDynamicIndexing + VkBool32 shaderUniformBufferArrayNonUniformIndexing + VkBool32 shaderSampledImageArrayNonUniformIndexing + VkBool32 shaderStorageBufferArrayNonUniformIndexing + VkBool32 shaderStorageImageArrayNonUniformIndexing + VkBool32 shaderInputAttachmentArrayNonUniformIndexing + VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing + VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing + VkBool32 descriptorBindingUniformBufferUpdateAfterBind + VkBool32 descriptorBindingSampledImageUpdateAfterBind + VkBool32 descriptorBindingStorageImageUpdateAfterBind + VkBool32 descriptorBindingStorageBufferUpdateAfterBind + VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind + VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind + VkBool32 descriptorBindingUpdateUnusedWhilePending + VkBool32 descriptorBindingPartiallyBound + VkBool32 descriptorBindingVariableDescriptorCount + VkBool32 runtimeDescriptorArray + + + + VkStructureType sType + void* pNext + uint32_t maxUpdateAfterBindDescriptorsInAllPools + VkBool32 shaderUniformBufferArrayNonUniformIndexingNative + VkBool32 shaderSampledImageArrayNonUniformIndexingNative + VkBool32 shaderStorageBufferArrayNonUniformIndexingNative + VkBool32 shaderStorageImageArrayNonUniformIndexingNative + VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative + VkBool32 robustBufferAccessUpdateAfterBind + VkBool32 quadDivergentImplicitLod + uint32_t maxPerStageDescriptorUpdateAfterBindSamplers + uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers + uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers + uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages + uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages + uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments + uint32_t maxPerStageUpdateAfterBindResources + uint32_t maxDescriptorSetUpdateAfterBindSamplers + uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers + uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers + uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindSampledImages + uint32_t maxDescriptorSetUpdateAfterBindStorageImages + uint32_t maxDescriptorSetUpdateAfterBindInputAttachments + + + + VkStructureType sType + const void* pNext + uint32_t bindingCount + const VkDescriptorBindingFlags* pBindingFlags + + + + VkStructureType sType + const void* pNext + uint32_t descriptorSetCount + const uint32_t* pDescriptorCounts + + + + VkStructureType sType + void* pNext + uint32_t maxVariableDescriptorCount + + + + VkStructureType sType + const void* pNext + VkAttachmentDescriptionFlags flags + VkFormat format + VkSampleCountFlagBits samples + VkAttachmentLoadOp loadOpLoad operation for color or depth data + VkAttachmentStoreOp storeOpStore operation for color or depth data + VkAttachmentLoadOp stencilLoadOpLoad operation for stencil data + VkAttachmentStoreOp stencilStoreOpStore operation for stencil data + VkImageLayout initialLayout + VkImageLayout finalLayout + + + + VkStructureType sType + const void* pNext + uint32_t attachment + VkImageLayout layout + VkImageAspectFlags aspectMask + + + + VkStructureType sType + const void* pNext + VkSubpassDescriptionFlags flags + VkPipelineBindPoint pipelineBindPoint + uint32_t viewMask + uint32_t inputAttachmentCount + const VkAttachmentReference2* pInputAttachments + uint32_t colorAttachmentCount + const VkAttachmentReference2* pColorAttachments + const VkAttachmentReference2* pResolveAttachments + const VkAttachmentReference2* pDepthStencilAttachment + uint32_t preserveAttachmentCount + const uint32_t* pPreserveAttachments + + + + VkStructureType sType + const void* pNext + uint32_t srcSubpass + uint32_t dstSubpass + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkAccessFlags srcAccessMask + VkAccessFlags dstAccessMask + VkDependencyFlags dependencyFlags + int32_t viewOffset + + + + VkStructureType sType + const void* pNext + VkRenderPassCreateFlags flags + uint32_t attachmentCount + const VkAttachmentDescription2* pAttachments + uint32_t subpassCount + const VkSubpassDescription2* pSubpasses + uint32_t dependencyCount + const VkSubpassDependency2* pDependencies + uint32_t correlatedViewMaskCount + const uint32_t* pCorrelatedViewMasks + + + + VkStructureType sType + const void* pNext + VkSubpassContents contents + + + + VkStructureType sType + const void* pNext + + + + VkStructureType sType + void* pNext + VkBool32 timelineSemaphore + + + + VkStructureType sType + void* pNext + uint64_t maxTimelineSemaphoreValueDifference + + + + VkStructureType sType + const void* pNext + VkSemaphoreType semaphoreType + uint64_t initialValue + + + + VkStructureType sType + const void* pNext + uint32_t waitSemaphoreValueCount + const uint64_t* pWaitSemaphoreValues + uint32_t signalSemaphoreValueCount + const uint64_t* pSignalSemaphoreValues + + + + VkStructureType sType + const void* pNext + VkSemaphoreWaitFlags flags + uint32_t semaphoreCount + const VkSemaphore* pSemaphores + const uint64_t* pValues + + + + VkStructureType sType + const void* pNext + VkSemaphore semaphore + uint64_t value + + + + uint32_t binding + uint32_t divisor + + + VkStructureType sType + const void* pNext + uint32_t vertexBindingDivisorCount + const VkVertexInputBindingDivisorDescriptionEXT* pVertexBindingDivisors + + + VkStructureType sType + void* pNext + uint32_t maxVertexAttribDivisormax value of vertex attribute divisor + + + VkStructureType sType + void* pNext + uint32_t pciDomain + uint32_t pciBus + uint32_t pciDevice + uint32_t pciFunction + + + VkStructureType sType + const void* pNext + struct AHardwareBuffer* buffer + + + VkStructureType sType + void* pNext + uint64_t androidHardwareBufferUsage + + + VkStructureType sType + void* pNext + VkDeviceSize allocationSize + uint32_t memoryTypeBits + + + VkStructureType sType + const void* pNext + VkDeviceMemory memory + + + VkStructureType sType + void* pNext + VkFormat format + uint64_t externalFormat + VkFormatFeatureFlags formatFeatures + VkComponentMapping samplerYcbcrConversionComponents + VkSamplerYcbcrModelConversion suggestedYcbcrModel + VkSamplerYcbcrRange suggestedYcbcrRange + VkChromaLocation suggestedXChromaOffset + VkChromaLocation suggestedYChromaOffset + + + VkStructureType sType + const void* pNext + VkBool32 conditionalRenderingEnableWhether this secondary command buffer may be executed during an active conditional rendering + + + VkStructureType sType + void* pNext + uint64_t externalFormat + + + VkStructureType sType + void* pNext + VkBool32 storageBuffer8BitAccess8-bit integer variables supported in StorageBuffer + VkBool32 uniformAndStorageBuffer8BitAccess8-bit integer variables supported in StorageBuffer and Uniform + VkBool32 storagePushConstant88-bit integer variables supported in PushConstant + + + + VkStructureType sType + void* pNext + VkBool32 conditionalRendering + VkBool32 inheritedConditionalRendering + + + VkStructureType sType + void* pNext + VkBool32 vulkanMemoryModel + VkBool32 vulkanMemoryModelDeviceScope + VkBool32 vulkanMemoryModelAvailabilityVisibilityChains + + + + VkStructureType sType + void* pNext + VkBool32 shaderBufferInt64Atomics + VkBool32 shaderSharedInt64Atomics + + + + VkStructureType sType + void* pNext + VkBool32 shaderBufferFloat32Atomics + VkBool32 shaderBufferFloat32AtomicAdd + VkBool32 shaderBufferFloat64Atomics + VkBool32 shaderBufferFloat64AtomicAdd + VkBool32 shaderSharedFloat32Atomics + VkBool32 shaderSharedFloat32AtomicAdd + VkBool32 shaderSharedFloat64Atomics + VkBool32 shaderSharedFloat64AtomicAdd + VkBool32 shaderImageFloat32Atomics + VkBool32 shaderImageFloat32AtomicAdd + VkBool32 sparseImageFloat32Atomics + VkBool32 sparseImageFloat32AtomicAdd + + + VkStructureType sType + void* pNext + VkBool32 vertexAttributeInstanceRateDivisor + VkBool32 vertexAttributeInstanceRateZeroDivisor + + + VkStructureType sType + void* pNext + VkPipelineStageFlags checkpointExecutionStageMask + + + VkStructureType sType + void* pNext + VkPipelineStageFlagBits stage + void* pCheckpointMarker + + + VkStructureType sType + void* pNext + VkResolveModeFlags supportedDepthResolveModessupported depth resolve modes + VkResolveModeFlags supportedStencilResolveModessupported stencil resolve modes + VkBool32 independentResolveNonedepth and stencil resolve modes can be set independently if one of them is none + VkBool32 independentResolvedepth and stencil resolve modes can be set independently + + + + VkStructureType sType + const void* pNext + VkResolveModeFlagBits depthResolveModedepth resolve mode + VkResolveModeFlagBits stencilResolveModestencil resolve mode + const VkAttachmentReference2* pDepthStencilResolveAttachmentdepth/stencil resolve attachment + + + + VkStructureType sType + const void* pNext + VkFormat decodeMode + + + VkStructureType sType + void* pNext + VkBool32 decodeModeSharedExponent + + + VkStructureType sType + void* pNext + VkBool32 transformFeedback + VkBool32 geometryStreams + + + VkStructureType sType + void* pNext + uint32_t maxTransformFeedbackStreams + uint32_t maxTransformFeedbackBuffers + VkDeviceSize maxTransformFeedbackBufferSize + uint32_t maxTransformFeedbackStreamDataSize + uint32_t maxTransformFeedbackBufferDataSize + uint32_t maxTransformFeedbackBufferDataStride + VkBool32 transformFeedbackQueries + VkBool32 transformFeedbackStreamsLinesTriangles + VkBool32 transformFeedbackRasterizationStreamSelect + VkBool32 transformFeedbackDraw + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationStateStreamCreateFlagsEXT flags + uint32_t rasterizationStream + + + VkStructureTypesType + void* pNext + VkBool32 representativeFragmentTest + + + VkStructureType sType + const void* pNext + VkBool32 representativeFragmentTestEnable + + + VkStructureType sType + void* pNext + VkBool32 exclusiveScissor + + + VkStructureType sType + const void* pNext + uint32_t exclusiveScissorCount + const VkRect2D* pExclusiveScissors + + + VkStructureType sType + void* pNext + VkBool32 cornerSampledImage + + + VkStructureType sType + void* pNext + VkBool32 computeDerivativeGroupQuads + VkBool32 computeDerivativeGroupLinear + + + VkStructureType sType + void* pNext + VkBool32 fragmentShaderBarycentric + + + VkStructureType sType + void* pNext + VkBool32 imageFootprint + + + VkStructureType sType + void* pNext + VkBool32 dedicatedAllocationImageAliasing + + + uint32_t shadingRatePaletteEntryCount + const VkShadingRatePaletteEntryNV* pShadingRatePaletteEntries + + + VkStructureType sType + const void* pNext + VkBool32 shadingRateImageEnable + uint32_t viewportCount + const VkShadingRatePaletteNV* pShadingRatePalettes + + + VkStructureType sType + void* pNext + VkBool32 shadingRateImage + VkBool32 shadingRateCoarseSampleOrder + + + VkStructureType sType + void* pNext + VkExtent2D shadingRateTexelSize + uint32_t shadingRatePaletteSize + uint32_t shadingRateMaxCoarseSamples + + + uint32_t pixelX + uint32_t pixelY + uint32_t sample + + + VkShadingRatePaletteEntryNV shadingRate + uint32_t sampleCount + uint32_t sampleLocationCount + const VkCoarseSampleLocationNV* pSampleLocations + + + VkStructureType sType + const void* pNext + VkCoarseSampleOrderTypeNV sampleOrderType + uint32_t customSampleOrderCount + const VkCoarseSampleOrderCustomNV* pCustomSampleOrders + + + VkStructureType sType + void* pNext + VkBool32 taskShader + VkBool32 meshShader + + + VkStructureType sType + void* pNext + uint32_t maxDrawMeshTasksCount + uint32_t maxTaskWorkGroupInvocations + uint32_t maxTaskWorkGroupSize[3] + uint32_t maxTaskTotalMemorySize + uint32_t maxTaskOutputCount + uint32_t maxMeshWorkGroupInvocations + uint32_t maxMeshWorkGroupSize[3] + uint32_t maxMeshTotalMemorySize + uint32_t maxMeshOutputVertices + uint32_t maxMeshOutputPrimitives + uint32_t maxMeshMultiviewViewCount + uint32_t meshOutputPerVertexGranularity + uint32_t meshOutputPerPrimitiveGranularity + + + uint32_t taskCount + uint32_t firstTask + + + VkStructureType sType + const void* pNext + VkRayTracingShaderGroupTypeKHR type + uint32_t generalShader + uint32_t closestHitShader + uint32_t anyHitShader + uint32_t intersectionShader + + + VkStructureType sType + const void* pNext + VkRayTracingShaderGroupTypeKHR type + uint32_t generalShader + uint32_t closestHitShader + uint32_t anyHitShader + uint32_t intersectionShader + const void* pShaderGroupCaptureReplayHandle + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flagsPipeline creation flags + uint32_t stageCount + const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage + uint32_t groupCount + const VkRayTracingShaderGroupCreateInfoNV* pGroups + uint32_t maxRecursionDepth + VkPipelineLayout layoutInterface layout of the pipeline + VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of + int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of + + + VkStructureType sType + const void* pNext + VkPipelineCreateFlags flagsPipeline creation flags + uint32_t stageCount + const VkPipelineShaderStageCreateInfo* pStagesOne entry for each active shader stage + uint32_t groupCount + const VkRayTracingShaderGroupCreateInfoKHR* pGroups + uint32_t maxPipelineRayRecursionDepth + const VkPipelineLibraryCreateInfoKHR* pLibraryInfo + const VkRayTracingPipelineInterfaceCreateInfoKHR* pLibraryInterface + const VkPipelineDynamicStateCreateInfo* pDynamicState + VkPipelineLayout layoutInterface layout of the pipeline + VkPipeline basePipelineHandleIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is nonzero, it specifies the handle of the base pipeline this is a derivative of + int32_t basePipelineIndexIf VK_PIPELINE_CREATE_DERIVATIVE_BIT is set and this value is not -1, it specifies an index into pCreateInfos of the base pipeline this is a derivative of + + + VkStructureType sType + const void* pNext + VkBuffer vertexData + VkDeviceSize vertexOffset + uint32_t vertexCount + VkDeviceSize vertexStride + VkFormat vertexFormat + VkBuffer indexData + VkDeviceSize indexOffset + uint32_t indexCount + VkIndexType indexType + VkBuffer transformDataOptional reference to array of floats representing a 3x4 row major affine transformation matrix. + VkDeviceSize transformOffset + + + VkStructureType sType + const void* pNext + VkBuffer aabbData + uint32_t numAABBs + uint32_t strideStride in bytes between AABBs + VkDeviceSize offsetOffset in bytes of the first AABB in aabbData + + + VkGeometryTrianglesNV triangles + VkGeometryAABBNV aabbs + + + VkStructureType sType + const void* pNext + VkGeometryTypeKHR geometryType + VkGeometryDataNV geometry + VkGeometryFlagsKHR flags + + + VkStructureType sType + const void* pNext + VkAccelerationStructureTypeNV type + VkBuildAccelerationStructureFlagsNVflags + uint32_t instanceCount + uint32_t geometryCount + const VkGeometryNV* pGeometries + + + VkStructureType sType + const void* pNext + VkDeviceSize compactedSize + VkAccelerationStructureInfoNV info + + + VkStructureType sType + const void* pNext + VkAccelerationStructureNV accelerationStructure + VkDeviceMemory memory + VkDeviceSize memoryOffset + uint32_t deviceIndexCount + const uint32_t* pDeviceIndices + + + VkStructureType sType + const void* pNext + uint32_t accelerationStructureCount + const VkAccelerationStructureKHR* pAccelerationStructures + + + VkStructureType sType + const void* pNext + uint32_t accelerationStructureCount + const VkAccelerationStructureNV* pAccelerationStructures + + + VkStructureType sType + const void* pNext + VkAccelerationStructureMemoryRequirementsTypeNV type + VkAccelerationStructureNV accelerationStructure + + + VkStructureType sType + void* pNext + VkBool32 accelerationStructure + VkBool32 accelerationStructureCaptureReplay + VkBool32 accelerationStructureIndirectBuild + VkBool32 accelerationStructureHostCommands + VkBool32 descriptorBindingAccelerationStructureUpdateAfterBind + + + VkStructureType sType + void* pNext + VkBool32 rayTracingPipeline + VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplay + VkBool32 rayTracingPipelineShaderGroupHandleCaptureReplayMixed + VkBool32 rayTracingPipelineTraceRaysIndirect + VkBool32 rayTraversalPrimitiveCulling + + + VkStructureType sType + void* pNext + VkBool32 rayQuery + + + VkStructureType sType + void* pNext + uint64_t maxGeometryCount + uint64_t maxInstanceCount + uint64_t maxPrimitiveCount + uint32_t maxPerStageDescriptorAccelerationStructures + uint32_t maxPerStageDescriptorUpdateAfterBindAccelerationStructures + uint32_t maxDescriptorSetAccelerationStructures + uint32_t maxDescriptorSetUpdateAfterBindAccelerationStructures + uint32_t minAccelerationStructureScratchOffsetAlignment + + + VkStructureType sType + void* pNext + uint32_t shaderGroupHandleSize + uint32_t maxRayRecursionDepth + uint32_t maxShaderGroupStride + uint32_t shaderGroupBaseAlignment + uint32_t shaderGroupHandleCaptureReplaySize + uint32_t maxRayDispatchInvocationCount + uint32_t shaderGroupHandleAlignment + uint32_t maxRayHitAttributeSize + + + VkStructureType sType + void* pNext + uint32_t shaderGroupHandleSize + uint32_t maxRecursionDepth + uint32_t maxShaderGroupStride + uint32_t shaderGroupBaseAlignment + uint64_t maxGeometryCount + uint64_t maxInstanceCount + uint64_t maxTriangleCount + uint32_t maxDescriptorSetAccelerationStructures + + + VkDeviceAddress deviceAddress + VkDeviceSize stride + VkDeviceSize size + + + uint32_t width + uint32_t height + uint32_t depth + + + VkStructureType sType + void* pNext + uint32_t drmFormatModifierCount + VkDrmFormatModifierPropertiesEXT* pDrmFormatModifierProperties + + + uint64_t drmFormatModifier + uint32_t drmFormatModifierPlaneCount + VkFormatFeatureFlags drmFormatModifierTilingFeatures + + + VkStructureType sType + const void* pNext + uint64_t drmFormatModifier + VkSharingMode sharingMode + uint32_t queueFamilyIndexCount + const uint32_t* pQueueFamilyIndices + + + VkStructureType sType + const void* pNext + uint32_t drmFormatModifierCount + const uint64_t* pDrmFormatModifiers + + + VkStructureType sType + const void* pNext + uint64_t drmFormatModifier + uint32_t drmFormatModifierPlaneCount + const VkSubresourceLayout* pPlaneLayouts + + + VkStructureType sType + void* pNext + uint64_t drmFormatModifier + + + VkStructureType sType + const void* pNext + VkImageUsageFlags stencilUsage + + + + VkStructureType sType + const void* pNext + VkMemoryOverallocationBehaviorAMD overallocationBehavior + + + VkStructureType sType + void* pNext + VkBool32 fragmentDensityMap + VkBool32 fragmentDensityMapDynamic + VkBool32 fragmentDensityMapNonSubsampledImages + + + VkStructureType sType + void* pNext + VkBool32 fragmentDensityMapDeferred + + + VkStructureType sType + void* pNext + VkExtent2D minFragmentDensityTexelSize + VkExtent2D maxFragmentDensityTexelSize + VkBool32 fragmentDensityInvocations + + + VkStructureType sType + void* pNext + VkBool32 subsampledLoads + VkBool32 subsampledCoarseReconstructionEarlyAccess + uint32_t maxSubsampledArrayLayers + uint32_t maxDescriptorSetSubsampledSamplers + + + VkStructureType sType + const void* pNext + VkAttachmentReference fragmentDensityMapAttachment + + + VkStructureType sType + void* pNext + VkBool32 scalarBlockLayout + + + + VkStructureType sType + const void* pNext + VkBool32 supportsProtectedRepresents if surface can be protected + + + VkStructureType sType + void* pNext + VkBool32 uniformBufferStandardLayout + + + + VkStructureType sType + void* pNext + VkBool32 depthClipEnable + + + VkStructureType sType + const void* pNext + VkPipelineRasterizationDepthClipStateCreateFlagsEXT flagsReserved + VkBool32 depthClipEnable + + + VkStructureType sType + void* pNext + VkDeviceSize heapBudget[VK_MAX_MEMORY_HEAPS] + VkDeviceSize heapUsage[VK_MAX_MEMORY_HEAPS] + + + VkStructureType sType + void* pNext + VkBool32 memoryPriority + + + VkStructureType sType + const void* pNext + float priority + + + VkStructureType sType + void* pNext + VkBool32 bufferDeviceAddress + VkBool32 bufferDeviceAddressCaptureReplay + VkBool32 bufferDeviceAddressMultiDevice + + + + VkStructureType sType + void* pNext + VkBool32 bufferDeviceAddress + VkBool32 bufferDeviceAddressCaptureReplay + VkBool32 bufferDeviceAddressMultiDevice + + + + VkStructureType sType + const void* pNext + VkBuffer buffer + + + + + VkStructureType sType + const void* pNext + uint64_t opaqueCaptureAddress + + + + VkStructureType sType + const void* pNext + VkDeviceAddress deviceAddress + + + VkStructureType sType + void* pNext + VkImageViewType imageViewType + + + VkStructureType sType + void* pNext + VkBool32 filterCubicThe combinations of format, image type (and image view type if provided) can be filtered with VK_FILTER_CUBIC_EXT + VkBool32 filterCubicMinmaxThe combination of format, image type (and image view type if provided) can be filtered with VK_FILTER_CUBIC_EXT and ReductionMode of Min or Max + + + VkStructureType sType + void* pNext + VkBool32 imagelessFramebuffer + + + + VkStructureType sType + const void* pNext + uint32_t attachmentImageInfoCount + const VkFramebufferAttachmentImageInfo* pAttachmentImageInfos + + + + VkStructureType sType + const void* pNext + VkImageCreateFlags flagsImage creation flags + VkImageUsageFlags usageImage usage flags + uint32_t width + uint32_t height + uint32_t layerCount + uint32_t viewFormatCount + const VkFormat* pViewFormats + + + + VkStructureType sType + const void* pNext + uint32_t attachmentCount + const VkImageView* pAttachments + + + + VkStructureType sType + void* pNext + VkBool32 textureCompressionASTC_HDR + + + VkStructureType sType + void* pNext + VkBool32 cooperativeMatrix + VkBool32 cooperativeMatrixRobustBufferAccess + + + VkStructureType sType + void* pNext + VkShaderStageFlags cooperativeMatrixSupportedStages + + + VkStructureType sType + void* pNext + uint32_t MSize + uint32_t NSize + uint32_t KSize + VkComponentTypeNV AType + VkComponentTypeNV BType + VkComponentTypeNV CType + VkComponentTypeNV DType + VkScopeNV scope + + + VkStructureType sType + void* pNext + VkBool32 ycbcrImageArrays + + + VkStructureType sType + const void* pNext + VkImageView imageView + VkDescriptorType descriptorType + VkSampler sampler + + + VkStructureType sType + void* pNext + VkDeviceAddress deviceAddress + VkDeviceSize size + + + VkStructureType sType + const void* pNext + GgpFrameToken frameToken + + + VkPipelineCreationFeedbackFlagsEXT flags + uint64_t duration + + + VkStructureType sType + const void* pNext + VkPipelineCreationFeedbackEXT* pPipelineCreationFeedbackOutput pipeline creation feedback. + uint32_t pipelineStageCreationFeedbackCount + VkPipelineCreationFeedbackEXT* pPipelineStageCreationFeedbacksOne entry for each shader stage specified in the parent Vk*PipelineCreateInfo struct + + + VkStructureType sType + void* pNext + VkFullScreenExclusiveEXT fullScreenExclusive + + + VkStructureType sType + const void* pNext + HMONITOR hmonitor + + + VkStructureType sType + void* pNext + VkBool32 fullScreenExclusiveSupported + + + VkStructureType sType + void* pNext + VkBool32 performanceCounterQueryPoolsperformance counters supported in query pools + VkBool32 performanceCounterMultipleQueryPoolsperformance counters from multiple query pools can be accessed in the same primary command buffer + + + VkStructureType sType + void* pNext + VkBool32 allowCommandBufferQueryCopiesFlag to specify whether performance queries are allowed to be used in vkCmdCopyQueryPoolResults + + + VkStructureType sType + const void* pNext + VkPerformanceCounterUnitKHR unit + VkPerformanceCounterScopeKHR scope + VkPerformanceCounterStorageKHR storage + uint8_t uuid[VK_UUID_SIZE] + + + VkStructureType sType + const void* pNext + VkPerformanceCounterDescriptionFlagsKHR flags + char name[VK_MAX_DESCRIPTION_SIZE] + char category[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] + + + VkStructureType sType + const void* pNext + uint32_t queueFamilyIndex + uint32_t counterIndexCount + const uint32_t* pCounterIndices + + + int32_t int32 + int64_t int64 + uint32_t uint32 + uint64_t uint64 + float float32 + double float64 + + + VkStructureType sType + const void* pNext + VkAcquireProfilingLockFlagsKHR flagsAcquire profiling lock flags + uint64_t timeout + + + VkStructureType sType + const void* pNext + uint32_t counterPassIndexIndex for which counter pass to submit + + + VkStructureType sType + const void* pNext + VkHeadlessSurfaceCreateFlagsEXT flags + + + VkStructureTypesType + void* pNext + VkBool32 coverageReductionMode + + + VkStructureType sType + const void* pNext + VkPipelineCoverageReductionStateCreateFlagsNV flags + VkCoverageReductionModeNV coverageReductionMode + + + VkStructureType sType + void* pNext + VkCoverageReductionModeNV coverageReductionMode + VkSampleCountFlagBits rasterizationSamples + VkSampleCountFlags depthStencilSamples + VkSampleCountFlags colorSamples + + + VkStructureType sType + void* pNext + VkBool32 shaderIntegerFunctions2 + + + uint32_t value32 + uint64_t value64 + float valueFloat + VkBool32 valueBool + const char* valueString + + + VkPerformanceValueTypeINTEL type + VkPerformanceValueDataINTEL data + + + VkStructureType sType + const void* pNext + void* pUserData + + + VkStructureType sType + const void* pNext + VkQueryPoolSamplingModeINTEL performanceCountersSampling + + + + VkStructureType sType + const void* pNext + uint64_t marker + + + VkStructureType sType + const void* pNext + uint32_t marker + + + VkStructureType sType + const void* pNext + VkPerformanceOverrideTypeINTEL type + VkBool32 enable + uint64_t parameter + + + VkStructureType sType + const void* pNext + VkPerformanceConfigurationTypeINTEL type + + + VkStructureType sType + void* pNext + VkBool32 shaderSubgroupClock + VkBool32 shaderDeviceClock + + + VkStructureType sType + void* pNext + VkBool32 indexTypeUint8 + + + VkStructureType sType + void* pNext + uint32_t shaderSMCount + uint32_t shaderWarpsPerSM + + + VkStructureTypesType + void* pNext + VkBool32 shaderSMBuiltins + + + VkStructureType sType + void* pNextPointer to next structure + VkBool32 fragmentShaderSampleInterlock + VkBool32 fragmentShaderPixelInterlock + VkBool32 fragmentShaderShadingRateInterlock + + + VkStructureTypesType + void* pNext + VkBool32 separateDepthStencilLayouts + + + + VkStructureTypesType + void* pNext + VkImageLayout stencilLayout + + + + VkStructureTypesType + void* pNext + VkImageLayout stencilInitialLayout + VkImageLayout stencilFinalLayout + + + + VkStructureType sType + void* pNext + VkBool32 pipelineExecutableInfo + + + VkStructureType sType + const void* pNext + VkPipeline pipeline + + + VkStructureType sType + void* pNext + VkShaderStageFlags stages + char name[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] + uint32_t subgroupSize + + + VkStructureType sType + const void* pNext + VkPipeline pipeline + uint32_t executableIndex + + + VkBool32 b32 + int64_t i64 + uint64_t u64 + double f64 + + + VkStructureType sType + void* pNext + char name[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] + VkPipelineExecutableStatisticFormatKHR format + VkPipelineExecutableStatisticValueKHR value + + + VkStructureType sType + void* pNext + char name[VK_MAX_DESCRIPTION_SIZE] + char description[VK_MAX_DESCRIPTION_SIZE] + VkBool32 isText + size_t dataSize + void* pData + + + VkStructureType sType + void* pNext + VkBool32 shaderDemoteToHelperInvocation + + + VkStructureType sType + void* pNext + VkBool32 texelBufferAlignment + + + VkStructureType sType + void* pNext + VkDeviceSize storageTexelBufferOffsetAlignmentBytes + VkBool32 storageTexelBufferOffsetSingleTexelAlignment + VkDeviceSize uniformTexelBufferOffsetAlignmentBytes + VkBool32 uniformTexelBufferOffsetSingleTexelAlignment + + + VkStructureType sType + void* pNext + VkBool32 subgroupSizeControl + VkBool32 computeFullSubgroups + + + VkStructureType sType + void* pNext + uint32_t minSubgroupSizeThe minimum subgroup size supported by this device + uint32_t maxSubgroupSizeThe maximum subgroup size supported by this device + uint32_t maxComputeWorkgroupSubgroupsThe maximum number of subgroups supported in a workgroup + VkShaderStageFlags requiredSubgroupSizeStagesThe shader stages that support specifying a subgroup size + + + VkStructureType sType + void* pNext + uint32_t requiredSubgroupSize + + + VkStructureType sType + const void* pNext + uint64_t opaqueCaptureAddress + + + + VkStructureType sType + const void* pNext + VkDeviceMemory memory + + + + VkStructureType sType + void* pNext + VkBool32 rectangularLines + VkBool32 bresenhamLines + VkBool32 smoothLines + VkBool32 stippledRectangularLines + VkBool32 stippledBresenhamLines + VkBool32 stippledSmoothLines + + + VkStructureType sType + void* pNext + uint32_t lineSubPixelPrecisionBits + + + VkStructureType sType + const void* pNext + VkLineRasterizationModeEXT lineRasterizationMode + VkBool32 stippledLineEnable + uint32_t lineStippleFactor + uint16_t lineStipplePattern + + + VkStructureType sType + void* pNext + VkBool32 pipelineCreationCacheControl + + + VkStructureTypesType + void* pNext + VkBool32 storageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock + VkBool32 uniformAndStorageBuffer16BitAccess16-bit integer/floating-point variables supported in BufferBlock and Block + VkBool32 storagePushConstant1616-bit integer/floating-point variables supported in PushConstant + VkBool32 storageInputOutput1616-bit integer/floating-point variables supported in shader inputs and outputs + VkBool32 multiviewMultiple views in a renderpass + VkBool32 multiviewGeometryShaderMultiple views in a renderpass w/ geometry shader + VkBool32 multiviewTessellationShaderMultiple views in a renderpass w/ tessellation shader + VkBool32 variablePointersStorageBuffer + VkBool32 variablePointers + VkBool32 protectedMemory + VkBool32 samplerYcbcrConversionSampler color conversion supported + VkBool32 shaderDrawParameters + + + VkStructureTypesType + void* pNext + uint8_t deviceUUID[VK_UUID_SIZE] + uint8_t driverUUID[VK_UUID_SIZE] + uint8_t deviceLUID[VK_LUID_SIZE] + uint32_t deviceNodeMask + VkBool32 deviceLUIDValid + uint32_t subgroupSizeThe size of a subgroup for this queue. + VkShaderStageFlags subgroupSupportedStagesBitfield of what shader stages support subgroup operations + VkSubgroupFeatureFlags subgroupSupportedOperationsBitfield of what subgroup operations are supported. + VkBool32 subgroupQuadOperationsInAllStagesFlag to specify whether quad operations are available in all stages. + VkPointClippingBehavior pointClippingBehavior + uint32_t maxMultiviewViewCountmax number of views in a subpass + uint32_t maxMultiviewInstanceIndexmax instance index for a draw in a multiview subpass + VkBool32 protectedNoFault + uint32_t maxPerSetDescriptors + VkDeviceSize maxMemoryAllocationSize + + + VkStructureTypesType + void* pNext + VkBool32 samplerMirrorClampToEdge + VkBool32 drawIndirectCount + VkBool32 storageBuffer8BitAccess8-bit integer variables supported in StorageBuffer + VkBool32 uniformAndStorageBuffer8BitAccess8-bit integer variables supported in StorageBuffer and Uniform + VkBool32 storagePushConstant88-bit integer variables supported in PushConstant + VkBool32 shaderBufferInt64Atomics + VkBool32 shaderSharedInt64Atomics + VkBool32 shaderFloat1616-bit floats (halfs) in shaders + VkBool32 shaderInt88-bit integers in shaders + VkBool32 descriptorIndexing + VkBool32 shaderInputAttachmentArrayDynamicIndexing + VkBool32 shaderUniformTexelBufferArrayDynamicIndexing + VkBool32 shaderStorageTexelBufferArrayDynamicIndexing + VkBool32 shaderUniformBufferArrayNonUniformIndexing + VkBool32 shaderSampledImageArrayNonUniformIndexing + VkBool32 shaderStorageBufferArrayNonUniformIndexing + VkBool32 shaderStorageImageArrayNonUniformIndexing + VkBool32 shaderInputAttachmentArrayNonUniformIndexing + VkBool32 shaderUniformTexelBufferArrayNonUniformIndexing + VkBool32 shaderStorageTexelBufferArrayNonUniformIndexing + VkBool32 descriptorBindingUniformBufferUpdateAfterBind + VkBool32 descriptorBindingSampledImageUpdateAfterBind + VkBool32 descriptorBindingStorageImageUpdateAfterBind + VkBool32 descriptorBindingStorageBufferUpdateAfterBind + VkBool32 descriptorBindingUniformTexelBufferUpdateAfterBind + VkBool32 descriptorBindingStorageTexelBufferUpdateAfterBind + VkBool32 descriptorBindingUpdateUnusedWhilePending + VkBool32 descriptorBindingPartiallyBound + VkBool32 descriptorBindingVariableDescriptorCount + VkBool32 runtimeDescriptorArray + VkBool32 samplerFilterMinmax + VkBool32 scalarBlockLayout + VkBool32 imagelessFramebuffer + VkBool32 uniformBufferStandardLayout + VkBool32 shaderSubgroupExtendedTypes + VkBool32 separateDepthStencilLayouts + VkBool32 hostQueryReset + VkBool32 timelineSemaphore + VkBool32 bufferDeviceAddress + VkBool32 bufferDeviceAddressCaptureReplay + VkBool32 bufferDeviceAddressMultiDevice + VkBool32 vulkanMemoryModel + VkBool32 vulkanMemoryModelDeviceScope + VkBool32 vulkanMemoryModelAvailabilityVisibilityChains + VkBool32 shaderOutputViewportIndex + VkBool32 shaderOutputLayer + VkBool32 subgroupBroadcastDynamicId + + + VkStructureTypesType + void* pNext + VkDriverId driverID + char driverName[VK_MAX_DRIVER_NAME_SIZE] + char driverInfo[VK_MAX_DRIVER_INFO_SIZE] + VkConformanceVersion conformanceVersion + VkShaderFloatControlsIndependencedenormBehaviorIndependence + VkShaderFloatControlsIndependenceroundingModeIndependence + VkBool32 shaderSignedZeroInfNanPreserveFloat16An implementation can preserve signed zero, nan, inf + VkBool32 shaderSignedZeroInfNanPreserveFloat32An implementation can preserve signed zero, nan, inf + VkBool32 shaderSignedZeroInfNanPreserveFloat64An implementation can preserve signed zero, nan, inf + VkBool32 shaderDenormPreserveFloat16An implementation can preserve denormals + VkBool32 shaderDenormPreserveFloat32An implementation can preserve denormals + VkBool32 shaderDenormPreserveFloat64An implementation can preserve denormals + VkBool32 shaderDenormFlushToZeroFloat16An implementation can flush to zero denormals + VkBool32 shaderDenormFlushToZeroFloat32An implementation can flush to zero denormals + VkBool32 shaderDenormFlushToZeroFloat64An implementation can flush to zero denormals + VkBool32 shaderRoundingModeRTEFloat16An implementation can support RTE + VkBool32 shaderRoundingModeRTEFloat32An implementation can support RTE + VkBool32 shaderRoundingModeRTEFloat64An implementation can support RTE + VkBool32 shaderRoundingModeRTZFloat16An implementation can support RTZ + VkBool32 shaderRoundingModeRTZFloat32An implementation can support RTZ + VkBool32 shaderRoundingModeRTZFloat64An implementation can support RTZ + uint32_t maxUpdateAfterBindDescriptorsInAllPools + VkBool32 shaderUniformBufferArrayNonUniformIndexingNative + VkBool32 shaderSampledImageArrayNonUniformIndexingNative + VkBool32 shaderStorageBufferArrayNonUniformIndexingNative + VkBool32 shaderStorageImageArrayNonUniformIndexingNative + VkBool32 shaderInputAttachmentArrayNonUniformIndexingNative + VkBool32 robustBufferAccessUpdateAfterBind + VkBool32 quadDivergentImplicitLod + uint32_t maxPerStageDescriptorUpdateAfterBindSamplers + uint32_t maxPerStageDescriptorUpdateAfterBindUniformBuffers + uint32_t maxPerStageDescriptorUpdateAfterBindStorageBuffers + uint32_t maxPerStageDescriptorUpdateAfterBindSampledImages + uint32_t maxPerStageDescriptorUpdateAfterBindStorageImages + uint32_t maxPerStageDescriptorUpdateAfterBindInputAttachments + uint32_t maxPerStageUpdateAfterBindResources + uint32_t maxDescriptorSetUpdateAfterBindSamplers + uint32_t maxDescriptorSetUpdateAfterBindUniformBuffers + uint32_t maxDescriptorSetUpdateAfterBindUniformBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindStorageBuffers + uint32_t maxDescriptorSetUpdateAfterBindStorageBuffersDynamic + uint32_t maxDescriptorSetUpdateAfterBindSampledImages + uint32_t maxDescriptorSetUpdateAfterBindStorageImages + uint32_t maxDescriptorSetUpdateAfterBindInputAttachments + VkResolveModeFlags supportedDepthResolveModessupported depth resolve modes + VkResolveModeFlags supportedStencilResolveModessupported stencil resolve modes + VkBool32 independentResolveNonedepth and stencil resolve modes can be set independently if one of them is none + VkBool32 independentResolvedepth and stencil resolve modes can be set independently + VkBool32 filterMinmaxSingleComponentFormats + VkBool32 filterMinmaxImageComponentMapping + uint64_t maxTimelineSemaphoreValueDifference + VkSampleCountFlags framebufferIntegerColorSampleCounts + + + VkStructureType sType + const void* pNext + VkPipelineCompilerControlFlagsAMD compilerControlFlags + + + VkStructureType sType + void* pNext + VkBool32 deviceCoherentMemory + + + VkStructureType sType + void* pNext + char name[VK_MAX_EXTENSION_NAME_SIZE] + char version[VK_MAX_EXTENSION_NAME_SIZE] + VkToolPurposeFlagsEXT purposes + char description[VK_MAX_DESCRIPTION_SIZE] + char layer[VK_MAX_EXTENSION_NAME_SIZE] + + + VkStructureType sType + const void* pNext + VkClearColorValue customBorderColor + VkFormat format + + + VkStructureType sType + void* pNext + uint32_t maxCustomBorderColorSamplers + + + VkStructureType sType + void* pNext + VkBool32 customBorderColors + VkBool32 customBorderColorWithoutFormat + + + VkDeviceAddress deviceAddress + void* hostAddress + + + VkDeviceAddress deviceAddress + const void* hostAddress + + + VkStructureType sType + const void* pNext + VkFormat vertexFormat + VkDeviceOrHostAddressConstKHR vertexData + VkDeviceSize vertexStride + uint32_t maxVertex + VkIndexType indexType + VkDeviceOrHostAddressConstKHR indexData + VkDeviceOrHostAddressConstKHR transformData + + + VkStructureType sType + const void* pNext + VkDeviceOrHostAddressConstKHR data + VkDeviceSize stride + + + VkStructureType sType + const void* pNext + VkBool32 arrayOfPointers + VkDeviceOrHostAddressConstKHR data + + + VkAccelerationStructureGeometryTrianglesDataKHR triangles + VkAccelerationStructureGeometryAabbsDataKHR aabbs + VkAccelerationStructureGeometryInstancesDataKHR instances + + + VkStructureType sType + const void* pNext + VkGeometryTypeKHR geometryType + VkAccelerationStructureGeometryDataKHR geometry + VkGeometryFlagsKHR flags + + + VkStructureType sType + const void* pNext + VkAccelerationStructureTypeKHR type + VkBuildAccelerationStructureFlagsKHR flags + VkBuildAccelerationStructureModeKHR mode + VkAccelerationStructureKHR srcAccelerationStructure + VkAccelerationStructureKHR dstAccelerationStructure + uint32_t geometryCount + const VkAccelerationStructureGeometryKHR* pGeometries + const VkAccelerationStructureGeometryKHR* const* ppGeometries + VkDeviceOrHostAddressKHR scratchData + + + uint32_t primitiveCount + uint32_t primitiveOffset + uint32_t firstVertex + uint32_t transformOffset + + + VkStructureType sType + const void* pNext + VkAccelerationStructureCreateFlagsKHR createFlags + VkBuffer buffer + VkDeviceSize offsetSpecified in bytes + VkDeviceSize size + VkAccelerationStructureTypeKHR type + VkDeviceAddress deviceAddress + + + float minX + float minY + float minZ + float maxX + float maxY + float maxZ + + + + float matrix[3][4] + + + + The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout. + VkTransformMatrixKHR transform + uint32_t instanceCustomIndex:24 + uint32_t mask:8 + uint32_t instanceShaderBindingTableRecordOffset:24 + VkGeometryInstanceFlagsKHR flags:8 + uint64_t accelerationStructureReference + + + + VkStructureType sType + const void* pNext + VkAccelerationStructureKHR accelerationStructure + + + VkStructureType sType + const void* pNext + const uint8_t* pVersionData + + + VkStructureType sType + const void* pNext + VkAccelerationStructureKHR src + VkAccelerationStructureKHR dst + VkCopyAccelerationStructureModeKHR mode + + + VkStructureType sType + const void* pNext + VkAccelerationStructureKHR src + VkDeviceOrHostAddressKHR dst + VkCopyAccelerationStructureModeKHR mode + + + VkStructureType sType + const void* pNext + VkDeviceOrHostAddressConstKHR src + VkAccelerationStructureKHR dst + VkCopyAccelerationStructureModeKHR mode + + + VkStructureType sType + const void* pNext + uint32_t maxPipelineRayPayloadSize + uint32_t maxPipelineRayHitAttributeSize + + + VkStructureType sType + const void* pNext + uint32_t libraryCount + const VkPipeline* pLibraries + + + VkStructureType sType + void* pNext + VkBool32 extendedDynamicState + + + VkStructureType sType + void* pNextPointer to next structure + VkSurfaceTransformFlagBitsKHR transform + + + VkStructureType sType + const void* pNext + VkSurfaceTransformFlagBitsKHR transform + + + VkStructureType sType + void* pNextPointer to next structure + VkSurfaceTransformFlagBitsKHR transform + VkRect2D renderArea + + + VkStructureTypesType + void* pNext + VkBool32 diagnosticsConfig + + + VkStructureType sType + const void* pNext + VkDeviceDiagnosticsConfigFlagsNV flags + + + VkStructureType sType + void* pNext + VkBool32 shaderZeroInitializeWorkgroupMemory + + + VkStructureType sType + void* pNext + VkBool32 robustBufferAccess2 + VkBool32 robustImageAccess2 + VkBool32 nullDescriptor + + + VkStructureType sType + void* pNext + VkDeviceSize robustStorageBufferAccessSizeAlignment + VkDeviceSize robustUniformBufferAccessSizeAlignment + + + VkStructureType sType + void* pNext + VkBool32 robustImageAccess + + + VkStructureType sType + void* pNext + VkBool32 workgroupMemoryExplicitLayout + VkBool32 workgroupMemoryExplicitLayoutScalarBlockLayout + VkBool32 workgroupMemoryExplicitLayout8BitAccess + VkBool32 workgroupMemoryExplicitLayout16BitAccess + + + VkStructureType sType + void* pNext + VkBool32 constantAlphaColorBlendFactors + VkBool32 events + VkBool32 imageViewFormatReinterpretation + VkBool32 imageViewFormatSwizzle + VkBool32 imageView2DOn3DImage + VkBool32 multisampleArrayImage + VkBool32 mutableComparisonSamplers + VkBool32 pointPolygons + VkBool32 samplerMipLodBias + VkBool32 separateStencilMaskRef + VkBool32 shaderSampleRateInterpolationFunctions + VkBool32 tessellationIsolines + VkBool32 tessellationPointMode + VkBool32 triangleFans + VkBool32 vertexAttributeAccessBeyondStride + + + VkStructureType sType + void* pNext + uint32_t minVertexInputBindingStrideAlignment + + + VkStructureType sType + void* pNext + VkBool32 formatA4R4G4B4 + VkBool32 formatA4B4G4R4 + + + VkStructureType sType + const void* pNext + VkDeviceSize srcOffsetSpecified in bytes + VkDeviceSize dstOffsetSpecified in bytes + VkDeviceSize sizeSpecified in bytes + + + VkStructureType sType + const void* pNext + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffsetSpecified in pixels for both compressed and uncompressed images + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffsetSpecified in pixels for both compressed and uncompressed images + VkExtent3D extentSpecified in pixels for both compressed and uncompressed images + + + VkStructureType sType + const void* pNext + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffsets[2]Specified in pixels for both compressed and uncompressed images + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffsets[2]Specified in pixels for both compressed and uncompressed images + + + VkStructureType sType + const void* pNext + VkDeviceSize bufferOffsetSpecified in bytes + uint32_t bufferRowLengthSpecified in texels + uint32_t bufferImageHeight + VkImageSubresourceLayers imageSubresource + VkOffset3D imageOffsetSpecified in pixels for both compressed and uncompressed images + VkExtent3D imageExtentSpecified in pixels for both compressed and uncompressed images + + + VkStructureType sType + const void* pNext + VkImageSubresourceLayers srcSubresource + VkOffset3D srcOffset + VkImageSubresourceLayers dstSubresource + VkOffset3D dstOffset + VkExtent3D extent + + + VkStructureType sType + const void* pNext + VkBuffer srcBuffer + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferCopy2KHR* pRegions + + + VkStructureType sType + const void* pNext + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageCopy2KHR* pRegions + + + VkStructureType sType + const void* pNext + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageBlit2KHR* pRegions + VkFilter filter + + + VkStructureType sType + const void* pNext + VkBuffer srcBuffer + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkBufferImageCopy2KHR* pRegions + + + VkStructureType sType + const void* pNext + VkImage srcImage + VkImageLayout srcImageLayout + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferImageCopy2KHR* pRegions + + + VkStructureType sType + const void* pNext + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageResolve2KHR* pRegions + + + VkStructureType sType + void* pNext + VkBool32 shaderImageInt64Atomics + VkBool32 sparseImageInt64Atomics + + + VkStructureType sType + const void* pNext + const VkAttachmentReference2* pFragmentShadingRateAttachment + VkExtent2D shadingRateAttachmentTexelSize + + + VkStructureType sType + const void* pNext + VkExtent2D fragmentSize + VkFragmentShadingRateCombinerOpKHR combinerOps[2] + + + VkStructureType sType + void* pNext + VkBool32 pipelineFragmentShadingRate + VkBool32 primitiveFragmentShadingRate + VkBool32 attachmentFragmentShadingRate + + + VkStructureType sType + void* pNext + VkExtent2D minFragmentShadingRateAttachmentTexelSize + VkExtent2D maxFragmentShadingRateAttachmentTexelSize + uint32_t maxFragmentShadingRateAttachmentTexelSizeAspectRatio + VkBool32 primitiveFragmentShadingRateWithMultipleViewports + VkBool32 layeredShadingRateAttachments + VkBool32 fragmentShadingRateNonTrivialCombinerOps + VkExtent2D maxFragmentSize + uint32_t maxFragmentSizeAspectRatio + uint32_t maxFragmentShadingRateCoverageSamples + VkSampleCountFlagBits maxFragmentShadingRateRasterizationSamples + VkBool32 fragmentShadingRateWithShaderDepthStencilWrites + VkBool32 fragmentShadingRateWithSampleMask + VkBool32 fragmentShadingRateWithShaderSampleMask + VkBool32 fragmentShadingRateWithConservativeRasterization + VkBool32 fragmentShadingRateWithFragmentShaderInterlock + VkBool32 fragmentShadingRateWithCustomSampleLocations + VkBool32 fragmentShadingRateStrictMultiplyCombiner + + + VkStructureType sType + void* pNext + VkSampleCountFlags sampleCounts + VkExtent2D fragmentSize + + + VkStructureTypesType + void* pNext + VkBool32 shaderTerminateInvocation + + + VkStructureType sType + void* pNext + VkBool32 fragmentShadingRateEnums + VkBool32 supersampleFragmentShadingRates + VkBool32 noInvocationFragmentShadingRates + + + VkStructureType sType + void* pNext + VkSampleCountFlagBits maxFragmentShadingRateInvocationCount + + + VkStructureType sType + const void* pNext + VkFragmentShadingRateTypeNV shadingRateType + VkFragmentShadingRateNV shadingRate + VkFragmentShadingRateCombinerOpKHR combinerOps[2] + + + VkStructureType sType + const void* pNext + VkDeviceSize accelerationStructureSize + VkDeviceSize updateScratchSize + VkDeviceSize buildScratchSize + + + VkStructureType sType + void* pNext + VkBool32 mutableDescriptorType + + + uint32_t descriptorTypeCount + const VkDescriptorType* pDescriptorTypes + + + VkStructureType sType + const void* pNext + uint32_t mutableDescriptorTypeListCount + const VkMutableDescriptorTypeListVALVE* pMutableDescriptorTypeLists + + + + Vulkan enumerant (token) definitions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Unlike OpenGL, most tokens in Vulkan are actual typed enumerants in + their own numeric namespaces. The "name" attribute is the C enum + type name, and is pulled in from a type tag definition above + (slightly clunky, but retains the type / enum distinction). "type" + attributes of "enum" or "bitmask" indicate that these values should + be generated inside an appropriate definition. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + value="4" reserved for VK_KHR_sampler_mirror_clamp_to_edge + enum VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE; do not + alias! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Return codes (positive values) + + + + + + + Error codes (negative values) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Flags + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + When VkSemaphoreCreateFlagBits is first extended, need to add a bitmask enums tag for it here + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + WSI Extensions + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Vendor IDs are now represented as enums instead of the old + <vendorids> tag, allowing them to be included in the + API headers. + + + + + + + + + + Driver IDs are now represented as enums instead of the old + <driverids> tag, allowing them to be included in the + API headers. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VkResult vkCreateInstance + const VkInstanceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkInstance* pInstance + + + void vkDestroyInstance + VkInstance instance + const VkAllocationCallbacks* pAllocator + + all sname:VkPhysicalDevice objects enumerated from pname:instance + + + + VkResult vkEnumeratePhysicalDevices + VkInstance instance + uint32_t* pPhysicalDeviceCount + VkPhysicalDevice* pPhysicalDevices + + + PFN_vkVoidFunction vkGetDeviceProcAddr + VkDevice device + const char* pName + + + PFN_vkVoidFunction vkGetInstanceProcAddr + VkInstance instance + const char* pName + + + void vkGetPhysicalDeviceProperties + VkPhysicalDevice physicalDevice + VkPhysicalDeviceProperties* pProperties + + + void vkGetPhysicalDeviceQueueFamilyProperties + VkPhysicalDevice physicalDevice + uint32_t* pQueueFamilyPropertyCount + VkQueueFamilyProperties* pQueueFamilyProperties + + + void vkGetPhysicalDeviceMemoryProperties + VkPhysicalDevice physicalDevice + VkPhysicalDeviceMemoryProperties* pMemoryProperties + + + void vkGetPhysicalDeviceFeatures + VkPhysicalDevice physicalDevice + VkPhysicalDeviceFeatures* pFeatures + + + void vkGetPhysicalDeviceFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkFormatProperties* pFormatProperties + + + VkResult vkGetPhysicalDeviceImageFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + VkImageFormatProperties* pImageFormatProperties + + + VkResult vkCreateDevice + VkPhysicalDevice physicalDevice + const VkDeviceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDevice* pDevice + + + void vkDestroyDevice + VkDevice device + const VkAllocationCallbacks* pAllocator + + all sname:VkQueue objects received from pname:device + + + + VkResult vkEnumerateInstanceVersion + uint32_t* pApiVersion + + + VkResult vkEnumerateInstanceLayerProperties + uint32_t* pPropertyCount + VkLayerProperties* pProperties + + + VkResult vkEnumerateInstanceExtensionProperties + const char* pLayerName + uint32_t* pPropertyCount + VkExtensionProperties* pProperties + + + VkResult vkEnumerateDeviceLayerProperties + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkLayerProperties* pProperties + + + VkResult vkEnumerateDeviceExtensionProperties + VkPhysicalDevice physicalDevice + const char* pLayerName + uint32_t* pPropertyCount + VkExtensionProperties* pProperties + + + void vkGetDeviceQueue + VkDevice device + uint32_t queueFamilyIndex + uint32_t queueIndex + VkQueue* pQueue + + + VkResult vkQueueSubmit + VkQueue queue + uint32_t submitCount + const VkSubmitInfo* pSubmits + VkFence fence + + + VkResult vkQueueWaitIdle + VkQueue queue + + + VkResult vkDeviceWaitIdle + VkDevice device + + all sname:VkQueue objects created from pname:device + + + + VkResult vkAllocateMemory + VkDevice device + const VkMemoryAllocateInfo* pAllocateInfo + const VkAllocationCallbacks* pAllocator + VkDeviceMemory* pMemory + + + void vkFreeMemory + VkDevice device + VkDeviceMemory memory + const VkAllocationCallbacks* pAllocator + + + VkResult vkMapMemory + VkDevice device + VkDeviceMemory memory + VkDeviceSize offset + VkDeviceSize size + VkMemoryMapFlags flags + void** ppData + + + void vkUnmapMemory + VkDevice device + VkDeviceMemory memory + + + VkResult vkFlushMappedMemoryRanges + VkDevice device + uint32_t memoryRangeCount + const VkMappedMemoryRange* pMemoryRanges + + + VkResult vkInvalidateMappedMemoryRanges + VkDevice device + uint32_t memoryRangeCount + const VkMappedMemoryRange* pMemoryRanges + + + void vkGetDeviceMemoryCommitment + VkDevice device + VkDeviceMemory memory + VkDeviceSize* pCommittedMemoryInBytes + + + void vkGetBufferMemoryRequirements + VkDevice device + VkBuffer buffer + VkMemoryRequirements* pMemoryRequirements + + + VkResult vkBindBufferMemory + VkDevice device + VkBuffer buffer + VkDeviceMemory memory + VkDeviceSize memoryOffset + + + void vkGetImageMemoryRequirements + VkDevice device + VkImage image + VkMemoryRequirements* pMemoryRequirements + + + VkResult vkBindImageMemory + VkDevice device + VkImage image + VkDeviceMemory memory + VkDeviceSize memoryOffset + + + void vkGetImageSparseMemoryRequirements + VkDevice device + VkImage image + uint32_t* pSparseMemoryRequirementCount + VkSparseImageMemoryRequirements* pSparseMemoryRequirements + + + void vkGetPhysicalDeviceSparseImageFormatProperties + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkSampleCountFlagBits samples + VkImageUsageFlags usage + VkImageTiling tiling + uint32_t* pPropertyCount + VkSparseImageFormatProperties* pProperties + + + VkResult vkQueueBindSparse + VkQueue queue + uint32_t bindInfoCount + const VkBindSparseInfo* pBindInfo + VkFence fence + + + VkResult vkCreateFence + VkDevice device + const VkFenceCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + void vkDestroyFence + VkDevice device + VkFence fence + const VkAllocationCallbacks* pAllocator + + + VkResult vkResetFences + VkDevice device + uint32_t fenceCount + const VkFence* pFences + + + VkResult vkGetFenceStatus + VkDevice device + VkFence fence + + + VkResult vkWaitForFences + VkDevice device + uint32_t fenceCount + const VkFence* pFences + VkBool32 waitAll + uint64_t timeout + + + VkResult vkCreateSemaphore + VkDevice device + const VkSemaphoreCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSemaphore* pSemaphore + + + void vkDestroySemaphore + VkDevice device + VkSemaphore semaphore + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateEvent + VkDevice device + const VkEventCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkEvent* pEvent + + + void vkDestroyEvent + VkDevice device + VkEvent event + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetEventStatus + VkDevice device + VkEvent event + + + VkResult vkSetEvent + VkDevice device + VkEvent event + + + VkResult vkResetEvent + VkDevice device + VkEvent event + + + VkResult vkCreateQueryPool + VkDevice device + const VkQueryPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkQueryPool* pQueryPool + + + void vkDestroyQueryPool + VkDevice device + VkQueryPool queryPool + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetQueryPoolResults + VkDevice device + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + size_t dataSize + void* pData + VkDeviceSize stride + VkQueryResultFlags flags + + + void vkResetQueryPool + VkDevice device + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + + + + VkResult vkCreateBuffer + VkDevice device + const VkBufferCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkBuffer* pBuffer + + + void vkDestroyBuffer + VkDevice device + VkBuffer buffer + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateBufferView + VkDevice device + const VkBufferViewCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkBufferView* pView + + + void vkDestroyBufferView + VkDevice device + VkBufferView bufferView + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateImage + VkDevice device + const VkImageCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkImage* pImage + + + void vkDestroyImage + VkDevice device + VkImage image + const VkAllocationCallbacks* pAllocator + + + void vkGetImageSubresourceLayout + VkDevice device + VkImage image + const VkImageSubresource* pSubresource + VkSubresourceLayout* pLayout + + + VkResult vkCreateImageView + VkDevice device + const VkImageViewCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkImageView* pView + + + void vkDestroyImageView + VkDevice device + VkImageView imageView + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateShaderModule + VkDevice device + const VkShaderModuleCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkShaderModule* pShaderModule + + + void vkDestroyShaderModule + VkDevice device + VkShaderModule shaderModule + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreatePipelineCache + VkDevice device + const VkPipelineCacheCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPipelineCache* pPipelineCache + + + void vkDestroyPipelineCache + VkDevice device + VkPipelineCache pipelineCache + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetPipelineCacheData + VkDevice device + VkPipelineCache pipelineCache + size_t* pDataSize + void* pData + + + VkResult vkMergePipelineCaches + VkDevice device + VkPipelineCache dstCache + uint32_t srcCacheCount + const VkPipelineCache* pSrcCaches + + + VkResult vkCreateGraphicsPipelines + VkDevice device + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkGraphicsPipelineCreateInfo* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + + VkResult vkCreateComputePipelines + VkDevice device + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkComputePipelineCreateInfo* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + + void vkDestroyPipeline + VkDevice device + VkPipeline pipeline + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreatePipelineLayout + VkDevice device + const VkPipelineLayoutCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPipelineLayout* pPipelineLayout + + + void vkDestroyPipelineLayout + VkDevice device + VkPipelineLayout pipelineLayout + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateSampler + VkDevice device + const VkSamplerCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSampler* pSampler + + + void vkDestroySampler + VkDevice device + VkSampler sampler + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateDescriptorSetLayout + VkDevice device + const VkDescriptorSetLayoutCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDescriptorSetLayout* pSetLayout + + + void vkDestroyDescriptorSetLayout + VkDevice device + VkDescriptorSetLayout descriptorSetLayout + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateDescriptorPool + VkDevice device + const VkDescriptorPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDescriptorPool* pDescriptorPool + + + void vkDestroyDescriptorPool + VkDevice device + VkDescriptorPool descriptorPool + const VkAllocationCallbacks* pAllocator + + + VkResult vkResetDescriptorPool + VkDevice device + VkDescriptorPool descriptorPool + VkDescriptorPoolResetFlags flags + + any sname:VkDescriptorSet objects allocated from pname:descriptorPool + + + + VkResult vkAllocateDescriptorSets + VkDevice device + const VkDescriptorSetAllocateInfo* pAllocateInfo + VkDescriptorSet* pDescriptorSets + + + VkResult vkFreeDescriptorSets + VkDevice device + VkDescriptorPool descriptorPool + uint32_t descriptorSetCount + const VkDescriptorSet* pDescriptorSets + + + void vkUpdateDescriptorSets + VkDevice device + uint32_t descriptorWriteCount + const VkWriteDescriptorSet* pDescriptorWrites + uint32_t descriptorCopyCount + const VkCopyDescriptorSet* pDescriptorCopies + + + VkResult vkCreateFramebuffer + VkDevice device + const VkFramebufferCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkFramebuffer* pFramebuffer + + + void vkDestroyFramebuffer + VkDevice device + VkFramebuffer framebuffer + const VkAllocationCallbacks* pAllocator + + + VkResult vkCreateRenderPass + VkDevice device + const VkRenderPassCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkRenderPass* pRenderPass + + + void vkDestroyRenderPass + VkDevice device + VkRenderPass renderPass + const VkAllocationCallbacks* pAllocator + + + void vkGetRenderAreaGranularity + VkDevice device + VkRenderPass renderPass + VkExtent2D* pGranularity + + + VkResult vkCreateCommandPool + VkDevice device + const VkCommandPoolCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkCommandPool* pCommandPool + + + void vkDestroyCommandPool + VkDevice device + VkCommandPool commandPool + const VkAllocationCallbacks* pAllocator + + + VkResult vkResetCommandPool + VkDevice device + VkCommandPool commandPool + VkCommandPoolResetFlags flags + + + VkResult vkAllocateCommandBuffers + VkDevice device + const VkCommandBufferAllocateInfo* pAllocateInfo + VkCommandBuffer* pCommandBuffers + + + void vkFreeCommandBuffers + VkDevice device + VkCommandPool commandPool + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + + + VkResult vkBeginCommandBuffer + VkCommandBuffer commandBuffer + const VkCommandBufferBeginInfo* pBeginInfo + + the sname:VkCommandPool that pname:commandBuffer was allocated from + + + + VkResult vkEndCommandBuffer + VkCommandBuffer commandBuffer + + the sname:VkCommandPool that pname:commandBuffer was allocated from + + + + VkResult vkResetCommandBuffer + VkCommandBuffer commandBuffer + VkCommandBufferResetFlags flags + + + void vkCmdBindPipeline + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipeline pipeline + + + void vkCmdSetViewport + VkCommandBuffer commandBuffer + uint32_t firstViewport + uint32_t viewportCount + const VkViewport* pViewports + + + void vkCmdSetScissor + VkCommandBuffer commandBuffer + uint32_t firstScissor + uint32_t scissorCount + const VkRect2D* pScissors + + + void vkCmdSetLineWidth + VkCommandBuffer commandBuffer + float lineWidth + + + void vkCmdSetDepthBias + VkCommandBuffer commandBuffer + float depthBiasConstantFactor + float depthBiasClamp + float depthBiasSlopeFactor + + + void vkCmdSetBlendConstants + VkCommandBuffer commandBuffer + const float blendConstants[4] + + + void vkCmdSetDepthBounds + VkCommandBuffer commandBuffer + float minDepthBounds + float maxDepthBounds + + + void vkCmdSetStencilCompareMask + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t compareMask + + + void vkCmdSetStencilWriteMask + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t writeMask + + + void vkCmdSetStencilReference + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + uint32_t reference + + + void vkCmdBindDescriptorSets + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipelineLayout layout + uint32_t firstSet + uint32_t descriptorSetCount + const VkDescriptorSet* pDescriptorSets + uint32_t dynamicOffsetCount + const uint32_t* pDynamicOffsets + + + void vkCmdBindIndexBuffer + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkIndexType indexType + + + void vkCmdBindVertexBuffers + VkCommandBuffer commandBuffer + uint32_t firstBinding + uint32_t bindingCount + const VkBuffer* pBuffers + const VkDeviceSize* pOffsets + + + void vkCmdDraw + VkCommandBuffer commandBuffer + uint32_t vertexCount + uint32_t instanceCount + uint32_t firstVertex + uint32_t firstInstance + + + void vkCmdDrawIndexed + VkCommandBuffer commandBuffer + uint32_t indexCount + uint32_t instanceCount + uint32_t firstIndex + int32_t vertexOffset + uint32_t firstInstance + + + void vkCmdDrawIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + uint32_t drawCount + uint32_t stride + + + void vkCmdDrawIndexedIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + uint32_t drawCount + uint32_t stride + + + void vkCmdDispatch + VkCommandBuffer commandBuffer + uint32_t groupCountX + uint32_t groupCountY + uint32_t groupCountZ + + + void vkCmdDispatchIndirect + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + + + void vkCmdCopyBuffer + VkCommandBuffer commandBuffer + VkBuffer srcBuffer + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferCopy* pRegions + + + void vkCmdCopyImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageCopy* pRegions + + + void vkCmdBlitImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageBlit* pRegions + VkFilter filter + + + void vkCmdCopyBufferToImage + VkCommandBuffer commandBuffer + VkBuffer srcBuffer + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkBufferImageCopy* pRegions + + + void vkCmdCopyImageToBuffer + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkBuffer dstBuffer + uint32_t regionCount + const VkBufferImageCopy* pRegions + + + void vkCmdUpdateBuffer + VkCommandBuffer commandBuffer + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize dataSize + const void* pData + + + void vkCmdFillBuffer + VkCommandBuffer commandBuffer + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize size + uint32_t data + + + void vkCmdClearColorImage + VkCommandBuffer commandBuffer + VkImage image + VkImageLayout imageLayout + const VkClearColorValue* pColor + uint32_t rangeCount + const VkImageSubresourceRange* pRanges + + + void vkCmdClearDepthStencilImage + VkCommandBuffer commandBuffer + VkImage image + VkImageLayout imageLayout + const VkClearDepthStencilValue* pDepthStencil + uint32_t rangeCount + const VkImageSubresourceRange* pRanges + + + void vkCmdClearAttachments + VkCommandBuffer commandBuffer + uint32_t attachmentCount + const VkClearAttachment* pAttachments + uint32_t rectCount + const VkClearRect* pRects + + + void vkCmdResolveImage + VkCommandBuffer commandBuffer + VkImage srcImage + VkImageLayout srcImageLayout + VkImage dstImage + VkImageLayout dstImageLayout + uint32_t regionCount + const VkImageResolve* pRegions + + + void vkCmdSetEvent + VkCommandBuffer commandBuffer + VkEvent event + VkPipelineStageFlags stageMask + + + void vkCmdResetEvent + VkCommandBuffer commandBuffer + VkEvent event + VkPipelineStageFlags stageMask + + + void vkCmdWaitEvents + VkCommandBuffer commandBuffer + uint32_t eventCount + const VkEvent* pEvents + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + uint32_t memoryBarrierCount + const VkMemoryBarrier* pMemoryBarriers + uint32_t bufferMemoryBarrierCount + const VkBufferMemoryBarrier* pBufferMemoryBarriers + uint32_t imageMemoryBarrierCount + const VkImageMemoryBarrier* pImageMemoryBarriers + + + void vkCmdPipelineBarrier + VkCommandBuffer commandBuffer + VkPipelineStageFlags srcStageMask + VkPipelineStageFlags dstStageMask + VkDependencyFlags dependencyFlags + uint32_t memoryBarrierCount + const VkMemoryBarrier* pMemoryBarriers + uint32_t bufferMemoryBarrierCount + const VkBufferMemoryBarrier* pBufferMemoryBarriers + uint32_t imageMemoryBarrierCount + const VkImageMemoryBarrier* pImageMemoryBarriers + + + void vkCmdBeginQuery + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + VkQueryControlFlags flags + + + void vkCmdEndQuery + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + + + void vkCmdBeginConditionalRenderingEXT + VkCommandBuffer commandBuffer + const VkConditionalRenderingBeginInfoEXT* pConditionalRenderingBegin + + + void vkCmdEndConditionalRenderingEXT + VkCommandBuffer commandBuffer + + + void vkCmdResetQueryPool + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + + + void vkCmdWriteTimestamp + VkCommandBuffer commandBuffer + VkPipelineStageFlagBits pipelineStage + VkQueryPool queryPool + uint32_t query + + + void vkCmdCopyQueryPoolResults + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t firstQuery + uint32_t queryCount + VkBuffer dstBuffer + VkDeviceSize dstOffset + VkDeviceSize stride + VkQueryResultFlags flags + + + void vkCmdPushConstants + VkCommandBuffer commandBuffer + VkPipelineLayout layout + VkShaderStageFlags stageFlags + uint32_t offset + uint32_t size + const void* pValues + + + void vkCmdBeginRenderPass + VkCommandBuffer commandBuffer + const VkRenderPassBeginInfo* pRenderPassBegin + VkSubpassContents contents + + + void vkCmdNextSubpass + VkCommandBuffer commandBuffer + VkSubpassContents contents + + + void vkCmdEndRenderPass + VkCommandBuffer commandBuffer + + + void vkCmdExecuteCommands + VkCommandBuffer commandBuffer + uint32_t commandBufferCount + const VkCommandBuffer* pCommandBuffers + + + VkResult vkCreateAndroidSurfaceKHR + VkInstance instance + const VkAndroidSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkGetPhysicalDeviceDisplayPropertiesKHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPropertiesKHR* pProperties + + + VkResult vkGetPhysicalDeviceDisplayPlanePropertiesKHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPlanePropertiesKHR* pProperties + + + VkResult vkGetDisplayPlaneSupportedDisplaysKHR + VkPhysicalDevice physicalDevice + uint32_t planeIndex + uint32_t* pDisplayCount + VkDisplayKHR* pDisplays + + + VkResult vkGetDisplayModePropertiesKHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + uint32_t* pPropertyCount + VkDisplayModePropertiesKHR* pProperties + + + VkResult vkCreateDisplayModeKHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + const VkDisplayModeCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDisplayModeKHR* pMode + + + VkResult vkGetDisplayPlaneCapabilitiesKHR + VkPhysicalDevice physicalDevice + VkDisplayModeKHR mode + uint32_t planeIndex + VkDisplayPlaneCapabilitiesKHR* pCapabilities + + + VkResult vkCreateDisplayPlaneSurfaceKHR + VkInstance instance + const VkDisplaySurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateSharedSwapchainsKHR + VkDevice device + uint32_t swapchainCount + const VkSwapchainCreateInfoKHR* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkSwapchainKHR* pSwapchains + + + void vkDestroySurfaceKHR + VkInstance instance + VkSurfaceKHR surface + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetPhysicalDeviceSurfaceSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + VkSurfaceKHR surface + VkBool32* pSupported + + + VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + VkSurfaceCapabilitiesKHR* pSurfaceCapabilities + + + VkResult vkGetPhysicalDeviceSurfaceFormatsKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + uint32_t* pSurfaceFormatCount + VkSurfaceFormatKHR* pSurfaceFormats + + + VkResult vkGetPhysicalDeviceSurfacePresentModesKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + uint32_t* pPresentModeCount + VkPresentModeKHR* pPresentModes + + + VkResult vkCreateSwapchainKHR + VkDevice device + const VkSwapchainCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSwapchainKHR* pSwapchain + + + void vkDestroySwapchainKHR + VkDevice device + VkSwapchainKHR swapchain + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetSwapchainImagesKHR + VkDevice device + VkSwapchainKHR swapchain + uint32_t* pSwapchainImageCount + VkImage* pSwapchainImages + + + VkResult vkAcquireNextImageKHR + VkDevice device + VkSwapchainKHR swapchain + uint64_t timeout + VkSemaphore semaphore + VkFence fence + uint32_t* pImageIndex + + + VkResult vkQueuePresentKHR + VkQueue queue + const VkPresentInfoKHR* pPresentInfo + + + VkResult vkCreateViSurfaceNN + VkInstance instance + const VkViSurfaceCreateInfoNN* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateWaylandSurfaceKHR + VkInstance instance + const VkWaylandSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceWaylandPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + struct wl_display* display + + + VkResult vkCreateWin32SurfaceKHR + VkInstance instance + const VkWin32SurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceWin32PresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + + + VkResult vkCreateXlibSurfaceKHR + VkInstance instance + const VkXlibSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceXlibPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + Display* dpy + VisualID visualID + + + VkResult vkCreateXcbSurfaceKHR + VkInstance instance + const VkXcbSurfaceCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceXcbPresentationSupportKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + xcb_connection_t* connection + xcb_visualid_t visual_id + + + VkResult vkCreateDirectFBSurfaceEXT + VkInstance instance + const VkDirectFBSurfaceCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkBool32 vkGetPhysicalDeviceDirectFBPresentationSupportEXT + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + IDirectFB* dfb + + + VkResult vkCreateImagePipeSurfaceFUCHSIA + VkInstance instance + const VkImagePipeSurfaceCreateInfoFUCHSIA* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateStreamDescriptorSurfaceGGP + VkInstance instance + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateDebugReportCallbackEXT + VkInstance instance + const VkDebugReportCallbackCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDebugReportCallbackEXT* pCallback + + + void vkDestroyDebugReportCallbackEXT + VkInstance instance + VkDebugReportCallbackEXT callback + const VkAllocationCallbacks* pAllocator + + + void vkDebugReportMessageEXT + VkInstance instance + VkDebugReportFlagsEXT flags + VkDebugReportObjectTypeEXT objectType + uint64_t object + size_t location + int32_t messageCode + const char* pLayerPrefix + const char* pMessage + + + VkResult vkDebugMarkerSetObjectNameEXT + VkDevice device + const VkDebugMarkerObjectNameInfoEXT* pNameInfo + + + VkResult vkDebugMarkerSetObjectTagEXT + VkDevice device + const VkDebugMarkerObjectTagInfoEXT* pTagInfo + + + void vkCmdDebugMarkerBeginEXT + VkCommandBuffer commandBuffer + const VkDebugMarkerMarkerInfoEXT* pMarkerInfo + + + void vkCmdDebugMarkerEndEXT + VkCommandBuffer commandBuffer + + + void vkCmdDebugMarkerInsertEXT + VkCommandBuffer commandBuffer + const VkDebugMarkerMarkerInfoEXT* pMarkerInfo + + + VkResult vkGetPhysicalDeviceExternalImageFormatPropertiesNV + VkPhysicalDevice physicalDevice + VkFormat format + VkImageType type + VkImageTiling tiling + VkImageUsageFlags usage + VkImageCreateFlags flags + VkExternalMemoryHandleTypeFlagsNV externalHandleType + VkExternalImageFormatPropertiesNV* pExternalImageFormatProperties + + + VkResult vkGetMemoryWin32HandleNV + VkDevice device + VkDeviceMemory memory + VkExternalMemoryHandleTypeFlagsNV handleType + HANDLE* pHandle + + + void vkCmdExecuteGeneratedCommandsNV + VkCommandBuffer commandBuffer + VkBool32 isPreprocessed + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo + + + void vkCmdPreprocessGeneratedCommandsNV + VkCommandBuffer commandBuffer + const VkGeneratedCommandsInfoNV* pGeneratedCommandsInfo + + + void vkCmdBindPipelineShaderGroupNV + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipeline pipeline + uint32_t groupIndex + + + void vkGetGeneratedCommandsMemoryRequirementsNV + VkDevice device + const VkGeneratedCommandsMemoryRequirementsInfoNV* pInfo + VkMemoryRequirements2* pMemoryRequirements + + + VkResult vkCreateIndirectCommandsLayoutNV + VkDevice device + const VkIndirectCommandsLayoutCreateInfoNV* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkIndirectCommandsLayoutNV* pIndirectCommandsLayout + + + void vkDestroyIndirectCommandsLayoutNV + VkDevice device + VkIndirectCommandsLayoutNV indirectCommandsLayout + const VkAllocationCallbacks* pAllocator + + + void vkGetPhysicalDeviceFeatures2 + VkPhysicalDevice physicalDevice + VkPhysicalDeviceFeatures2* pFeatures + + + + void vkGetPhysicalDeviceProperties2 + VkPhysicalDevice physicalDevice + VkPhysicalDeviceProperties2* pProperties + + + + void vkGetPhysicalDeviceFormatProperties2 + VkPhysicalDevice physicalDevice + VkFormat format + VkFormatProperties2* pFormatProperties + + + + VkResult vkGetPhysicalDeviceImageFormatProperties2 + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceImageFormatInfo2* pImageFormatInfo + VkImageFormatProperties2* pImageFormatProperties + + + + void vkGetPhysicalDeviceQueueFamilyProperties2 + VkPhysicalDevice physicalDevice + uint32_t* pQueueFamilyPropertyCount + VkQueueFamilyProperties2* pQueueFamilyProperties + + + + void vkGetPhysicalDeviceMemoryProperties2 + VkPhysicalDevice physicalDevice + VkPhysicalDeviceMemoryProperties2* pMemoryProperties + + + + void vkGetPhysicalDeviceSparseImageFormatProperties2 + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceSparseImageFormatInfo2* pFormatInfo + uint32_t* pPropertyCount + VkSparseImageFormatProperties2* pProperties + + + + void vkCmdPushDescriptorSetKHR + VkCommandBuffer commandBuffer + VkPipelineBindPoint pipelineBindPoint + VkPipelineLayout layout + uint32_t set + uint32_t descriptorWriteCount + const VkWriteDescriptorSet* pDescriptorWrites + + + void vkTrimCommandPool + VkDevice device + VkCommandPool commandPool + VkCommandPoolTrimFlags flags + + + + void vkGetPhysicalDeviceExternalBufferProperties + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceExternalBufferInfo* pExternalBufferInfo + VkExternalBufferProperties* pExternalBufferProperties + + + + VkResult vkGetMemoryWin32HandleKHR + VkDevice device + const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo + HANDLE* pHandle + + + VkResult vkGetMemoryWin32HandlePropertiesKHR + VkDevice device + VkExternalMemoryHandleTypeFlagBits handleType + HANDLE handle + VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties + + + VkResult vkGetMemoryFdKHR + VkDevice device + const VkMemoryGetFdInfoKHR* pGetFdInfo + int* pFd + + + VkResult vkGetMemoryFdPropertiesKHR + VkDevice device + VkExternalMemoryHandleTypeFlagBits handleType + int fd + VkMemoryFdPropertiesKHR* pMemoryFdProperties + + + void vkGetPhysicalDeviceExternalSemaphoreProperties + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceExternalSemaphoreInfo* pExternalSemaphoreInfo + VkExternalSemaphoreProperties* pExternalSemaphoreProperties + + + + VkResult vkGetSemaphoreWin32HandleKHR + VkDevice device + const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo + HANDLE* pHandle + + + VkResult vkImportSemaphoreWin32HandleKHR + VkDevice device + const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo + + + VkResult vkGetSemaphoreFdKHR + VkDevice device + const VkSemaphoreGetFdInfoKHR* pGetFdInfo + int* pFd + + + VkResult vkImportSemaphoreFdKHR + VkDevice device + const VkImportSemaphoreFdInfoKHR* pImportSemaphoreFdInfo + + + void vkGetPhysicalDeviceExternalFenceProperties + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceExternalFenceInfo* pExternalFenceInfo + VkExternalFenceProperties* pExternalFenceProperties + + + + VkResult vkGetFenceWin32HandleKHR + VkDevice device + const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo + HANDLE* pHandle + + + VkResult vkImportFenceWin32HandleKHR + VkDevice device + const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo + + + VkResult vkGetFenceFdKHR + VkDevice device + const VkFenceGetFdInfoKHR* pGetFdInfo + int* pFd + + + VkResult vkImportFenceFdKHR + VkDevice device + const VkImportFenceFdInfoKHR* pImportFenceFdInfo + + + VkResult vkReleaseDisplayEXT + VkPhysicalDevice physicalDevice + VkDisplayKHR display + + + VkResult vkAcquireXlibDisplayEXT + VkPhysicalDevice physicalDevice + Display* dpy + VkDisplayKHR display + + + VkResult vkGetRandROutputDisplayEXT + VkPhysicalDevice physicalDevice + Display* dpy + RROutput rrOutput + VkDisplayKHR* pDisplay + + + VkResult vkAcquireWinrtDisplayNV + VkPhysicalDevice physicalDevice + VkDisplayKHR display + + + VkResult vkGetWinrtDisplayNV + VkPhysicalDevice physicalDevice + uint32_t deviceRelativeId + VkDisplayKHR* pDisplay + + + VkResult vkDisplayPowerControlEXT + VkDevice device + VkDisplayKHR display + const VkDisplayPowerInfoEXT* pDisplayPowerInfo + + + VkResult vkRegisterDeviceEventEXT + VkDevice device + const VkDeviceEventInfoEXT* pDeviceEventInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + VkResult vkRegisterDisplayEventEXT + VkDevice device + VkDisplayKHR display + const VkDisplayEventInfoEXT* pDisplayEventInfo + const VkAllocationCallbacks* pAllocator + VkFence* pFence + + + VkResult vkGetSwapchainCounterEXT + VkDevice device + VkSwapchainKHR swapchain + VkSurfaceCounterFlagBitsEXT counter + uint64_t* pCounterValue + + + VkResult vkGetPhysicalDeviceSurfaceCapabilities2EXT + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + VkSurfaceCapabilities2EXT* pSurfaceCapabilities + + + VkResult vkEnumeratePhysicalDeviceGroups + VkInstance instance + uint32_t* pPhysicalDeviceGroupCount + VkPhysicalDeviceGroupProperties* pPhysicalDeviceGroupProperties + + + + void vkGetDeviceGroupPeerMemoryFeatures + VkDevice device + uint32_t heapIndex + uint32_t localDeviceIndex + uint32_t remoteDeviceIndex + VkPeerMemoryFeatureFlags* pPeerMemoryFeatures + + + + VkResult vkBindBufferMemory2 + VkDevice device + uint32_t bindInfoCount + const VkBindBufferMemoryInfo* pBindInfos + + + + VkResult vkBindImageMemory2 + VkDevice device + uint32_t bindInfoCount + const VkBindImageMemoryInfo* pBindInfos + + + + void vkCmdSetDeviceMask + VkCommandBuffer commandBuffer + uint32_t deviceMask + + + + VkResult vkGetDeviceGroupPresentCapabilitiesKHR + VkDevice device + VkDeviceGroupPresentCapabilitiesKHR* pDeviceGroupPresentCapabilities + + + VkResult vkGetDeviceGroupSurfacePresentModesKHR + VkDevice device + VkSurfaceKHR surface + VkDeviceGroupPresentModeFlagsKHR* pModes + + + VkResult vkAcquireNextImage2KHR + VkDevice device + const VkAcquireNextImageInfoKHR* pAcquireInfo + uint32_t* pImageIndex + + + void vkCmdDispatchBase + VkCommandBuffer commandBuffer + uint32_t baseGroupX + uint32_t baseGroupY + uint32_t baseGroupZ + uint32_t groupCountX + uint32_t groupCountY + uint32_t groupCountZ + + + + VkResult vkGetPhysicalDevicePresentRectanglesKHR + VkPhysicalDevice physicalDevice + VkSurfaceKHR surface + uint32_t* pRectCount + VkRect2D* pRects + + + VkResult vkCreateDescriptorUpdateTemplate + VkDevice device + const VkDescriptorUpdateTemplateCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDescriptorUpdateTemplate* pDescriptorUpdateTemplate + + + + void vkDestroyDescriptorUpdateTemplate + VkDevice device + VkDescriptorUpdateTemplate descriptorUpdateTemplate + const VkAllocationCallbacks* pAllocator + + + + void vkUpdateDescriptorSetWithTemplate + VkDevice device + VkDescriptorSet descriptorSet + VkDescriptorUpdateTemplate descriptorUpdateTemplate + const void* pData + + + + void vkCmdPushDescriptorSetWithTemplateKHR + VkCommandBuffer commandBuffer + VkDescriptorUpdateTemplate descriptorUpdateTemplate + VkPipelineLayout layout + uint32_t set + const void* pData + + + void vkSetHdrMetadataEXT + VkDevice device + uint32_t swapchainCount + const VkSwapchainKHR* pSwapchains + const VkHdrMetadataEXT* pMetadata + + + VkResult vkGetSwapchainStatusKHR + VkDevice device + VkSwapchainKHR swapchain + + + VkResult vkGetRefreshCycleDurationGOOGLE + VkDevice device + VkSwapchainKHR swapchain + VkRefreshCycleDurationGOOGLE* pDisplayTimingProperties + + + VkResult vkGetPastPresentationTimingGOOGLE + VkDevice device + VkSwapchainKHR swapchain + uint32_t* pPresentationTimingCount + VkPastPresentationTimingGOOGLE* pPresentationTimings + + + VkResult vkCreateIOSSurfaceMVK + VkInstance instance + const VkIOSSurfaceCreateInfoMVK* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateMacOSSurfaceMVK + VkInstance instance + const VkMacOSSurfaceCreateInfoMVK* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkCreateMetalSurfaceEXT + VkInstance instance + const VkMetalSurfaceCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + void vkCmdSetViewportWScalingNV + VkCommandBuffer commandBuffer + uint32_t firstViewport + uint32_t viewportCount + const VkViewportWScalingNV* pViewportWScalings + + + void vkCmdSetDiscardRectangleEXT + VkCommandBuffer commandBuffer + uint32_t firstDiscardRectangle + uint32_t discardRectangleCount + const VkRect2D* pDiscardRectangles + + + void vkCmdSetSampleLocationsEXT + VkCommandBuffer commandBuffer + const VkSampleLocationsInfoEXT* pSampleLocationsInfo + + + void vkGetPhysicalDeviceMultisamplePropertiesEXT + VkPhysicalDevice physicalDevice + VkSampleCountFlagBits samples + VkMultisamplePropertiesEXT* pMultisampleProperties + + + VkResult vkGetPhysicalDeviceSurfaceCapabilities2KHR + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo + VkSurfaceCapabilities2KHR* pSurfaceCapabilities + + + VkResult vkGetPhysicalDeviceSurfaceFormats2KHR + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo + uint32_t* pSurfaceFormatCount + VkSurfaceFormat2KHR* pSurfaceFormats + + + VkResult vkGetPhysicalDeviceDisplayProperties2KHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayProperties2KHR* pProperties + + + VkResult vkGetPhysicalDeviceDisplayPlaneProperties2KHR + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkDisplayPlaneProperties2KHR* pProperties + + + VkResult vkGetDisplayModeProperties2KHR + VkPhysicalDevice physicalDevice + VkDisplayKHR display + uint32_t* pPropertyCount + VkDisplayModeProperties2KHR* pProperties + + + VkResult vkGetDisplayPlaneCapabilities2KHR + VkPhysicalDevice physicalDevice + const VkDisplayPlaneInfo2KHR* pDisplayPlaneInfo + VkDisplayPlaneCapabilities2KHR* pCapabilities + + + void vkGetBufferMemoryRequirements2 + VkDevice device + const VkBufferMemoryRequirementsInfo2* pInfo + VkMemoryRequirements2* pMemoryRequirements + + + + void vkGetImageMemoryRequirements2 + VkDevice device + const VkImageMemoryRequirementsInfo2* pInfo + VkMemoryRequirements2* pMemoryRequirements + + + + void vkGetImageSparseMemoryRequirements2 + VkDevice device + const VkImageSparseMemoryRequirementsInfo2* pInfo + uint32_t* pSparseMemoryRequirementCount + VkSparseImageMemoryRequirements2* pSparseMemoryRequirements + + + + VkResult vkCreateSamplerYcbcrConversion + VkDevice device + const VkSamplerYcbcrConversionCreateInfo* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSamplerYcbcrConversion* pYcbcrConversion + + + + void vkDestroySamplerYcbcrConversion + VkDevice device + VkSamplerYcbcrConversion ycbcrConversion + const VkAllocationCallbacks* pAllocator + + + + void vkGetDeviceQueue2 + VkDevice device + const VkDeviceQueueInfo2* pQueueInfo + VkQueue* pQueue + + + VkResult vkCreateValidationCacheEXT + VkDevice device + const VkValidationCacheCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkValidationCacheEXT* pValidationCache + + + void vkDestroyValidationCacheEXT + VkDevice device + VkValidationCacheEXT validationCache + const VkAllocationCallbacks* pAllocator + + + VkResult vkGetValidationCacheDataEXT + VkDevice device + VkValidationCacheEXT validationCache + size_t* pDataSize + void* pData + + + VkResult vkMergeValidationCachesEXT + VkDevice device + VkValidationCacheEXT dstCache + uint32_t srcCacheCount + const VkValidationCacheEXT* pSrcCaches + + + void vkGetDescriptorSetLayoutSupport + VkDevice device + const VkDescriptorSetLayoutCreateInfo* pCreateInfo + VkDescriptorSetLayoutSupport* pSupport + + + + VkResult vkGetSwapchainGrallocUsageANDROID + VkDevice device + VkFormat format + VkImageUsageFlags imageUsage + int* grallocUsage + + + VkResult vkGetSwapchainGrallocUsage2ANDROID + VkDevice device + VkFormat format + VkImageUsageFlags imageUsage + VkSwapchainImageUsageFlagsANDROID swapchainImageUsage + uint64_t* grallocConsumerUsage + uint64_t* grallocProducerUsage + + + VkResult vkAcquireImageANDROID + VkDevice device + VkImage image + int nativeFenceFd + VkSemaphore semaphore + VkFence fence + + + VkResult vkQueueSignalReleaseImageANDROID + VkQueue queue + uint32_t waitSemaphoreCount + const VkSemaphore* pWaitSemaphores + VkImage image + int* pNativeFenceFd + + + VkResult vkGetShaderInfoAMD + VkDevice device + VkPipeline pipeline + VkShaderStageFlagBits shaderStage + VkShaderInfoTypeAMD infoType + size_t* pInfoSize + void* pInfo + + + void vkSetLocalDimmingAMD + VkDevice device + VkSwapchainKHR swapChain + VkBool32 localDimmingEnable + + + VkResult vkGetPhysicalDeviceCalibrateableTimeDomainsEXT + VkPhysicalDevice physicalDevice + uint32_t* pTimeDomainCount + VkTimeDomainEXT* pTimeDomains + + + VkResult vkGetCalibratedTimestampsEXT + VkDevice device + uint32_t timestampCount + const VkCalibratedTimestampInfoEXT* pTimestampInfos + uint64_t* pTimestamps + uint64_t* pMaxDeviation + + + VkResult vkSetDebugUtilsObjectNameEXT + VkDevice device + const VkDebugUtilsObjectNameInfoEXT* pNameInfo + + + VkResult vkSetDebugUtilsObjectTagEXT + VkDevice device + const VkDebugUtilsObjectTagInfoEXT* pTagInfo + + + void vkQueueBeginDebugUtilsLabelEXT + VkQueue queue + const VkDebugUtilsLabelEXT* pLabelInfo + + + void vkQueueEndDebugUtilsLabelEXT + VkQueue queue + + + void vkQueueInsertDebugUtilsLabelEXT + VkQueue queue + const VkDebugUtilsLabelEXT* pLabelInfo + + + void vkCmdBeginDebugUtilsLabelEXT + VkCommandBuffer commandBuffer + const VkDebugUtilsLabelEXT* pLabelInfo + + + void vkCmdEndDebugUtilsLabelEXT + VkCommandBuffer commandBuffer + + + void vkCmdInsertDebugUtilsLabelEXT + VkCommandBuffer commandBuffer + const VkDebugUtilsLabelEXT* pLabelInfo + + + VkResult vkCreateDebugUtilsMessengerEXT + VkInstance instance + const VkDebugUtilsMessengerCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkDebugUtilsMessengerEXT* pMessenger + + + void vkDestroyDebugUtilsMessengerEXT + VkInstance instance + VkDebugUtilsMessengerEXT messenger + const VkAllocationCallbacks* pAllocator + + + void vkSubmitDebugUtilsMessageEXT + VkInstance instance + VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity + VkDebugUtilsMessageTypeFlagsEXT messageTypes + const VkDebugUtilsMessengerCallbackDataEXT* pCallbackData + + + VkResult vkGetMemoryHostPointerPropertiesEXT + VkDevice device + VkExternalMemoryHandleTypeFlagBits handleType + const void* pHostPointer + VkMemoryHostPointerPropertiesEXT* pMemoryHostPointerProperties + + + void vkCmdWriteBufferMarkerAMD + VkCommandBuffer commandBuffer + VkPipelineStageFlagBits pipelineStage + VkBuffer dstBuffer + VkDeviceSize dstOffset + uint32_t marker + + + VkResult vkCreateRenderPass2 + VkDevice device + const VkRenderPassCreateInfo2* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkRenderPass* pRenderPass + + + + void vkCmdBeginRenderPass2 + VkCommandBuffer commandBuffer + const VkRenderPassBeginInfo* pRenderPassBegin + const VkSubpassBeginInfo* pSubpassBeginInfo + + + + void vkCmdNextSubpass2 + VkCommandBuffer commandBuffer + const VkSubpassBeginInfo* pSubpassBeginInfo + const VkSubpassEndInfo* pSubpassEndInfo + + + + void vkCmdEndRenderPass2 + VkCommandBuffer commandBuffer + const VkSubpassEndInfo* pSubpassEndInfo + + + + VkResult vkGetSemaphoreCounterValue + VkDevice device + VkSemaphore semaphore + uint64_t* pValue + + + + VkResult vkWaitSemaphores + VkDevice device + const VkSemaphoreWaitInfo* pWaitInfo + uint64_t timeout + + + + VkResult vkSignalSemaphore + VkDevice device + const VkSemaphoreSignalInfo* pSignalInfo + + + + VkResult vkGetAndroidHardwareBufferPropertiesANDROID + VkDevice device + const struct AHardwareBuffer* buffer + VkAndroidHardwareBufferPropertiesANDROID* pProperties + + + VkResult vkGetMemoryAndroidHardwareBufferANDROID + VkDevice device + const VkMemoryGetAndroidHardwareBufferInfoANDROID* pInfo + struct AHardwareBuffer** pBuffer + + + void vkCmdDrawIndirectCount + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkBuffer countBuffer + VkDeviceSize countBufferOffset + uint32_t maxDrawCount + uint32_t stride + + + + + void vkCmdDrawIndexedIndirectCount + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkBuffer countBuffer + VkDeviceSize countBufferOffset + uint32_t maxDrawCount + uint32_t stride + + + + + void vkCmdSetCheckpointNV + VkCommandBuffer commandBuffer + const void* pCheckpointMarker + + + void vkGetQueueCheckpointDataNV + VkQueue queue + uint32_t* pCheckpointDataCount + VkCheckpointDataNV* pCheckpointData + + + void vkCmdBindTransformFeedbackBuffersEXT + VkCommandBuffer commandBuffer + uint32_t firstBinding + uint32_t bindingCount + const VkBuffer* pBuffers + const VkDeviceSize* pOffsets + const VkDeviceSize* pSizes + + + void vkCmdBeginTransformFeedbackEXT + VkCommandBuffer commandBuffer + uint32_t firstCounterBuffer + uint32_t counterBufferCount + const VkBuffer* pCounterBuffers + const VkDeviceSize* pCounterBufferOffsets + + + void vkCmdEndTransformFeedbackEXT + VkCommandBuffer commandBuffer + uint32_t firstCounterBuffer + uint32_t counterBufferCount + const VkBuffer* pCounterBuffers + const VkDeviceSize* pCounterBufferOffsets + + + void vkCmdBeginQueryIndexedEXT + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + VkQueryControlFlags flags + uint32_t index + + + void vkCmdEndQueryIndexedEXT + VkCommandBuffer commandBuffer + VkQueryPool queryPool + uint32_t query + uint32_t index + + + void vkCmdDrawIndirectByteCountEXT + VkCommandBuffer commandBuffer + uint32_t instanceCount + uint32_t firstInstance + VkBuffer counterBuffer + VkDeviceSize counterBufferOffset + uint32_t counterOffset + uint32_t vertexStride + + + void vkCmdSetExclusiveScissorNV + VkCommandBuffer commandBuffer + uint32_t firstExclusiveScissor + uint32_t exclusiveScissorCount + const VkRect2D* pExclusiveScissors + + + void vkCmdBindShadingRateImageNV + VkCommandBuffer commandBuffer + VkImageView imageView + VkImageLayout imageLayout + + + void vkCmdSetViewportShadingRatePaletteNV + VkCommandBuffer commandBuffer + uint32_t firstViewport + uint32_t viewportCount + const VkShadingRatePaletteNV* pShadingRatePalettes + + + void vkCmdSetCoarseSampleOrderNV + VkCommandBuffer commandBuffer + VkCoarseSampleOrderTypeNV sampleOrderType + uint32_t customSampleOrderCount + const VkCoarseSampleOrderCustomNV* pCustomSampleOrders + + + void vkCmdDrawMeshTasksNV + VkCommandBuffer commandBuffer + uint32_t taskCount + uint32_t firstTask + + + void vkCmdDrawMeshTasksIndirectNV + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + uint32_t drawCount + uint32_t stride + + + void vkCmdDrawMeshTasksIndirectCountNV + VkCommandBuffer commandBuffer + VkBuffer buffer + VkDeviceSize offset + VkBuffer countBuffer + VkDeviceSize countBufferOffset + uint32_t maxDrawCount + uint32_t stride + + + VkResult vkCompileDeferredNV + VkDevice device + VkPipeline pipeline + uint32_t shader + + + VkResult vkCreateAccelerationStructureNV + VkDevice device + const VkAccelerationStructureCreateInfoNV* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkAccelerationStructureNV* pAccelerationStructure + + + void vkDestroyAccelerationStructureKHR + VkDevice device + VkAccelerationStructureKHR accelerationStructure + const VkAllocationCallbacks* pAllocator + + + void vkDestroyAccelerationStructureNV + VkDevice device + VkAccelerationStructureNV accelerationStructure + const VkAllocationCallbacks* pAllocator + + + void vkGetAccelerationStructureMemoryRequirementsNV + VkDevice device + const VkAccelerationStructureMemoryRequirementsInfoNV* pInfo + VkMemoryRequirements2KHR* pMemoryRequirements + + + VkResult vkBindAccelerationStructureMemoryNV + VkDevice device + uint32_t bindInfoCount + const VkBindAccelerationStructureMemoryInfoNV* pBindInfos + + + void vkCmdCopyAccelerationStructureNV + VkCommandBuffer commandBuffer + VkAccelerationStructureNV dst + VkAccelerationStructureNV src + VkCopyAccelerationStructureModeKHR mode + + + void vkCmdCopyAccelerationStructureKHR + VkCommandBuffer commandBuffer + const VkCopyAccelerationStructureInfoKHR* pInfo + + + VkResult vkCopyAccelerationStructureKHR + VkDevice device + VkDeferredOperationKHR deferredOperation + const VkCopyAccelerationStructureInfoKHR* pInfo + + + void vkCmdCopyAccelerationStructureToMemoryKHR + VkCommandBuffer commandBuffer + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo + + + VkResult vkCopyAccelerationStructureToMemoryKHR + VkDevice device + VkDeferredOperationKHR deferredOperation + const VkCopyAccelerationStructureToMemoryInfoKHR* pInfo + + + void vkCmdCopyMemoryToAccelerationStructureKHR + VkCommandBuffer commandBuffer + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo + + + VkResult vkCopyMemoryToAccelerationStructureKHR + VkDevice device + VkDeferredOperationKHR deferredOperation + const VkCopyMemoryToAccelerationStructureInfoKHR* pInfo + + + void vkCmdWriteAccelerationStructuresPropertiesKHR + VkCommandBuffer commandBuffer + uint32_t accelerationStructureCount + const VkAccelerationStructureKHR* pAccelerationStructures + VkQueryType queryType + VkQueryPool queryPool + uint32_t firstQuery + + + void vkCmdWriteAccelerationStructuresPropertiesNV + VkCommandBuffer commandBuffer + uint32_t accelerationStructureCount + const VkAccelerationStructureNV* pAccelerationStructures + VkQueryType queryType + VkQueryPool queryPool + uint32_t firstQuery + + + void vkCmdBuildAccelerationStructureNV + VkCommandBuffer commandBuffer + const VkAccelerationStructureInfoNV* pInfo + VkBuffer instanceData + VkDeviceSize instanceOffset + VkBool32 update + VkAccelerationStructureNV dst + VkAccelerationStructureNV src + VkBuffer scratch + VkDeviceSize scratchOffset + + + VkResult vkWriteAccelerationStructuresPropertiesKHR + VkDevice device + uint32_t accelerationStructureCount + const VkAccelerationStructureKHR* pAccelerationStructures + VkQueryType queryType + size_t dataSize + void* pData + size_t stride + + + void vkCmdTraceRaysKHR + VkCommandBuffer commandBuffer + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable + uint32_t width + uint32_t height + uint32_t depth + + + void vkCmdTraceRaysNV + VkCommandBuffer commandBuffer + VkBuffer raygenShaderBindingTableBuffer + VkDeviceSize raygenShaderBindingOffset + VkBuffer missShaderBindingTableBuffer + VkDeviceSize missShaderBindingOffset + VkDeviceSize missShaderBindingStride + VkBuffer hitShaderBindingTableBuffer + VkDeviceSize hitShaderBindingOffset + VkDeviceSize hitShaderBindingStride + VkBuffer callableShaderBindingTableBuffer + VkDeviceSize callableShaderBindingOffset + VkDeviceSize callableShaderBindingStride + uint32_t width + uint32_t height + uint32_t depth + + + VkResult vkGetRayTracingShaderGroupHandlesKHR + VkDevice device + VkPipeline pipeline + uint32_t firstGroup + uint32_t groupCount + size_t dataSize + void* pData + + + + VkResult vkGetRayTracingCaptureReplayShaderGroupHandlesKHR + VkDevice device + VkPipeline pipeline + uint32_t firstGroup + uint32_t groupCount + size_t dataSize + void* pData + + + VkResult vkGetAccelerationStructureHandleNV + VkDevice device + VkAccelerationStructureNV accelerationStructure + size_t dataSize + void* pData + + + VkResult vkCreateRayTracingPipelinesNV + VkDevice device + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkRayTracingPipelineCreateInfoNV* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + + VkResult vkCreateRayTracingPipelinesKHR + VkDevice device + VkDeferredOperationKHR deferredOperation + VkPipelineCache pipelineCache + uint32_t createInfoCount + const VkRayTracingPipelineCreateInfoKHR* pCreateInfos + const VkAllocationCallbacks* pAllocator + VkPipeline* pPipelines + + + VkResult vkGetPhysicalDeviceCooperativeMatrixPropertiesNV + VkPhysicalDevice physicalDevice + uint32_t* pPropertyCount + VkCooperativeMatrixPropertiesNV* pProperties + + + void vkCmdTraceRaysIndirectKHR + VkCommandBuffer commandBuffer + const VkStridedDeviceAddressRegionKHR* pRaygenShaderBindingTable + const VkStridedDeviceAddressRegionKHR* pMissShaderBindingTable + const VkStridedDeviceAddressRegionKHR* pHitShaderBindingTable + const VkStridedDeviceAddressRegionKHR* pCallableShaderBindingTable + VkDeviceAddress indirectDeviceAddress + + + void vkGetDeviceAccelerationStructureCompatibilityKHR + VkDevice device + const VkAccelerationStructureVersionInfoKHR* pVersionInfo + VkAccelerationStructureCompatibilityKHR* pCompatibility + + + VkDeviceSize vkGetRayTracingShaderGroupStackSizeKHR + VkDevice device + VkPipeline pipeline + uint32_t group + VkShaderGroupShaderKHR groupShader + + + void vkCmdSetRayTracingPipelineStackSizeKHR + VkCommandBuffer commandBuffer + uint32_t pipelineStackSize + + + uint32_t vkGetImageViewHandleNVX + VkDevice device + const VkImageViewHandleInfoNVX* pInfo + + + VkResult vkGetImageViewAddressNVX + VkDevice device + VkImageView imageView + VkImageViewAddressPropertiesNVX* pProperties + + + VkResult vkGetPhysicalDeviceSurfacePresentModes2EXT + VkPhysicalDevice physicalDevice + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo + uint32_t* pPresentModeCount + VkPresentModeKHR* pPresentModes + + + VkResult vkGetDeviceGroupSurfacePresentModes2EXT + VkDevice device + const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo + VkDeviceGroupPresentModeFlagsKHR* pModes + + + VkResult vkAcquireFullScreenExclusiveModeEXT + VkDevice device + VkSwapchainKHR swapchain + + + VkResult vkReleaseFullScreenExclusiveModeEXT + VkDevice device + VkSwapchainKHR swapchain + + + VkResult vkEnumeratePhysicalDeviceQueueFamilyPerformanceQueryCountersKHR + VkPhysicalDevice physicalDevice + uint32_t queueFamilyIndex + uint32_t* pCounterCount + VkPerformanceCounterKHR* pCounters + VkPerformanceCounterDescriptionKHR* pCounterDescriptions + + + void vkGetPhysicalDeviceQueueFamilyPerformanceQueryPassesKHR + VkPhysicalDevice physicalDevice + const VkQueryPoolPerformanceCreateInfoKHR* pPerformanceQueryCreateInfo + uint32_t* pNumPasses + + + VkResult vkAcquireProfilingLockKHR + VkDevice device + const VkAcquireProfilingLockInfoKHR* pInfo + + + void vkReleaseProfilingLockKHR + VkDevice device + + + VkResult vkGetImageDrmFormatModifierPropertiesEXT + VkDevice device + VkImage image + VkImageDrmFormatModifierPropertiesEXT* pProperties + + + uint64_t vkGetBufferOpaqueCaptureAddress + VkDevice device + const VkBufferDeviceAddressInfo* pInfo + + + + VkDeviceAddress vkGetBufferDeviceAddress + VkDevice device + const VkBufferDeviceAddressInfo* pInfo + + + + + VkResult vkCreateHeadlessSurfaceEXT + VkInstance instance + const VkHeadlessSurfaceCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkSurfaceKHR* pSurface + + + VkResult vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV + VkPhysicalDevice physicalDevice + uint32_t* pCombinationCount + VkFramebufferMixedSamplesCombinationNV* pCombinations + + + VkResult vkInitializePerformanceApiINTEL + VkDevice device + const VkInitializePerformanceApiInfoINTEL* pInitializeInfo + + + void vkUninitializePerformanceApiINTEL + VkDevice device + + + VkResult vkCmdSetPerformanceMarkerINTEL + VkCommandBuffer commandBuffer + const VkPerformanceMarkerInfoINTEL* pMarkerInfo + + + VkResult vkCmdSetPerformanceStreamMarkerINTEL + VkCommandBuffer commandBuffer + const VkPerformanceStreamMarkerInfoINTEL* pMarkerInfo + + + VkResult vkCmdSetPerformanceOverrideINTEL + VkCommandBuffer commandBuffer + const VkPerformanceOverrideInfoINTEL* pOverrideInfo + + + VkResult vkAcquirePerformanceConfigurationINTEL + VkDevice device + const VkPerformanceConfigurationAcquireInfoINTEL* pAcquireInfo + VkPerformanceConfigurationINTEL* pConfiguration + + + VkResult vkReleasePerformanceConfigurationINTEL + VkDevice device + VkPerformanceConfigurationINTEL configuration + + + VkResult vkQueueSetPerformanceConfigurationINTEL + VkQueue queue + VkPerformanceConfigurationINTEL configuration + + + VkResult vkGetPerformanceParameterINTEL + VkDevice device + VkPerformanceParameterTypeINTEL parameter + VkPerformanceValueINTEL* pValue + + + uint64_t vkGetDeviceMemoryOpaqueCaptureAddress + VkDevice device + const VkDeviceMemoryOpaqueCaptureAddressInfo* pInfo + + + + VkResult vkGetPipelineExecutablePropertiesKHR + VkDevice device + const VkPipelineInfoKHR* pPipelineInfo + uint32_t* pExecutableCount + VkPipelineExecutablePropertiesKHR* pProperties + + + VkResult vkGetPipelineExecutableStatisticsKHR + VkDevice device + const VkPipelineExecutableInfoKHR* pExecutableInfo + uint32_t* pStatisticCount + VkPipelineExecutableStatisticKHR* pStatistics + + + VkResult vkGetPipelineExecutableInternalRepresentationsKHR + VkDevice device + const VkPipelineExecutableInfoKHR* pExecutableInfo + uint32_t* pInternalRepresentationCount + VkPipelineExecutableInternalRepresentationKHR* pInternalRepresentations + + + void vkCmdSetLineStippleEXT + VkCommandBuffer commandBuffer + uint32_t lineStippleFactor + uint16_t lineStipplePattern + + + VkResult vkGetPhysicalDeviceToolPropertiesEXT + VkPhysicalDevice physicalDevice + uint32_t* pToolCount + VkPhysicalDeviceToolPropertiesEXT* pToolProperties + + + VkResult vkCreateAccelerationStructureKHR + VkDevice device + const VkAccelerationStructureCreateInfoKHR* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkAccelerationStructureKHR* pAccelerationStructure + + + void vkCmdBuildAccelerationStructuresKHR + VkCommandBuffer commandBuffer + uint32_t infoCount + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos + + + void vkCmdBuildAccelerationStructuresIndirectKHR + VkCommandBuffer commandBuffer + uint32_t infoCount + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos + const VkDeviceAddress* pIndirectDeviceAddresses + const uint32_t* pIndirectStrides + const uint32_t* const* ppMaxPrimitiveCounts + + + VkResult vkBuildAccelerationStructuresKHR + VkDevice device + VkDeferredOperationKHR deferredOperation + uint32_t infoCount + const VkAccelerationStructureBuildGeometryInfoKHR* pInfos + const VkAccelerationStructureBuildRangeInfoKHR* const* ppBuildRangeInfos + + + VkDeviceAddress vkGetAccelerationStructureDeviceAddressKHR + VkDevice device + const VkAccelerationStructureDeviceAddressInfoKHR* pInfo + + + VkResult vkCreateDeferredOperationKHR + VkDevice device + const VkAllocationCallbacks* pAllocator + VkDeferredOperationKHR* pDeferredOperation + + + void vkDestroyDeferredOperationKHR + VkDevice device + VkDeferredOperationKHR operation + const VkAllocationCallbacks* pAllocator + + + uint32_t vkGetDeferredOperationMaxConcurrencyKHR + VkDevice device + VkDeferredOperationKHR operation + + + VkResult vkGetDeferredOperationResultKHR + VkDevice device + VkDeferredOperationKHR operation + + + VkResult vkDeferredOperationJoinKHR + VkDevice device + VkDeferredOperationKHR operation + + + void vkCmdSetCullModeEXT + VkCommandBuffer commandBuffer + VkCullModeFlags cullMode + + + void vkCmdSetFrontFaceEXT + VkCommandBuffer commandBuffer + VkFrontFace frontFace + + + void vkCmdSetPrimitiveTopologyEXT + VkCommandBuffer commandBuffer + VkPrimitiveTopology primitiveTopology + + + void vkCmdSetViewportWithCountEXT + VkCommandBuffer commandBuffer + uint32_t viewportCount + const VkViewport* pViewports + + + void vkCmdSetScissorWithCountEXT + VkCommandBuffer commandBuffer + uint32_t scissorCount + const VkRect2D* pScissors + + + void vkCmdBindVertexBuffers2EXT + VkCommandBuffer commandBuffer + uint32_t firstBinding + uint32_t bindingCount + const VkBuffer* pBuffers + const VkDeviceSize* pOffsets + const VkDeviceSize* pSizes + const VkDeviceSize* pStrides + + + void vkCmdSetDepthTestEnableEXT + VkCommandBuffer commandBuffer + VkBool32 depthTestEnable + + + void vkCmdSetDepthWriteEnableEXT + VkCommandBuffer commandBuffer + VkBool32 depthWriteEnable + + + void vkCmdSetDepthCompareOpEXT + VkCommandBuffer commandBuffer + VkCompareOp depthCompareOp + + + void vkCmdSetDepthBoundsTestEnableEXT + VkCommandBuffer commandBuffer + VkBool32 depthBoundsTestEnable + + + void vkCmdSetStencilTestEnableEXT + VkCommandBuffer commandBuffer + VkBool32 stencilTestEnable + + + void vkCmdSetStencilOpEXT + VkCommandBuffer commandBuffer + VkStencilFaceFlags faceMask + VkStencilOp failOp + VkStencilOp passOp + VkStencilOp depthFailOp + VkCompareOp compareOp + + + VkResult vkCreatePrivateDataSlotEXT + VkDevice device + const VkPrivateDataSlotCreateInfoEXT* pCreateInfo + const VkAllocationCallbacks* pAllocator + VkPrivateDataSlotEXT* pPrivateDataSlot + + + void vkDestroyPrivateDataSlotEXT + VkDevice device + VkPrivateDataSlotEXT privateDataSlot + const VkAllocationCallbacks* pAllocator + + + VkResult vkSetPrivateDataEXT + VkDevice device + VkObjectType objectType + uint64_t objectHandle + VkPrivateDataSlotEXT privateDataSlot + uint64_t data + + + void vkGetPrivateDataEXT + VkDevice device + VkObjectType objectType + uint64_t objectHandle + VkPrivateDataSlotEXT privateDataSlot + uint64_t* pData + + + void vkCmdCopyBuffer2KHR + VkCommandBuffer commandBuffer + const VkCopyBufferInfo2KHR* pCopyBufferInfo + + + void vkCmdCopyImage2KHR + VkCommandBuffer commandBuffer + const VkCopyImageInfo2KHR* pCopyImageInfo + + + void vkCmdBlitImage2KHR + VkCommandBuffer commandBuffer + const VkBlitImageInfo2KHR* pBlitImageInfo + + + void vkCmdCopyBufferToImage2KHR + VkCommandBuffer commandBuffer + const VkCopyBufferToImageInfo2KHR* pCopyBufferToImageInfo + + + void vkCmdCopyImageToBuffer2KHR + VkCommandBuffer commandBuffer + const VkCopyImageToBufferInfo2KHR* pCopyImageToBufferInfo + + + void vkCmdResolveImage2KHR + VkCommandBuffer commandBuffer + const VkResolveImageInfo2KHR* pResolveImageInfo + + + void vkCmdSetFragmentShadingRateKHR + VkCommandBuffer commandBuffer + const VkExtent2D* pFragmentSize + const VkFragmentShadingRateCombinerOpKHR combinerOps[2] + + + VkResult vkGetPhysicalDeviceFragmentShadingRatesKHR + VkPhysicalDevice physicalDevice + uint32_t* pFragmentShadingRateCount + VkPhysicalDeviceFragmentShadingRateKHR* pFragmentShadingRates + + + void vkCmdSetFragmentShadingRateEnumNV + VkCommandBuffer commandBuffer + VkFragmentShadingRateNV shadingRate + const VkFragmentShadingRateCombinerOpKHR combinerOps[2] + + + void vkGetAccelerationStructureBuildSizesKHR + VkDevice device + VkAccelerationStructureBuildTypeKHR buildType + const VkAccelerationStructureBuildGeometryInfoKHR* pBuildInfo + const uint32_t* pMaxPrimitiveCounts + VkAccelerationStructureBuildSizesInfoKHR* pSizeInfo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + offset 1 reserved for the old VK_STRUCTURE_TYPE_BIND_BUFFER_MEMORY_INFO_KHX enum + offset 2 reserved for the old VK_STRUCTURE_TYPE_BIND_IMAGE_MEMORY_INFO_KHX enum + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Additional dependent types / tokens extending enumerants, not explicitly mentioned + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Additional dependent types / tokens extending enumerants, not explicitly mentioned + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This duplicates definitions in VK_KHR_device_group below + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VK_ANDROID_native_buffer is used between the Android Vulkan loader and drivers to implement the WSI extensions. It isn't exposed to applications and uses types that aren't part of Android's stable public API, so it is left disabled to keep it out of the standard Vulkan headers. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This duplicates definitions in other extensions, below + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + enum offset=0 was mistakenly used for the 1.1 core enum + VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SUBGROUP_PROPERTIES + (value=1000094000). Fortunately, no conflict resulted. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + These enums are present only to inform downstream + consumers like KTX2. There is no actual Vulkan extension + corresponding to the enums. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +