Rename Features, Properties to DeviceFeatures, DeviceProperties (#2481)

* Rename `Features`, `Properties` to `DeviceFeatures`, `DeviceProperties`

* Merge
This commit is contained in:
Rua 2024-03-04 17:24:29 +01:00 committed by GitHub
parent aeb7a3ada5
commit 6a5aed496e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
65 changed files with 843 additions and 788 deletions

View File

@ -24,7 +24,7 @@ use vulkano::{
allocator::StandardDescriptorSetAllocator, DescriptorSet, WriteDescriptorSet, allocator::StandardDescriptorSetAllocator, DescriptorSet, WriteDescriptorSet,
}, },
device::{ device::{
physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, Features, physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
QueueCreateInfo, QueueFlags, QueueCreateInfo, QueueFlags,
}, },
image::{view::ImageView, Image, ImageUsage}, image::{view::ImageView, Image, ImageUsage},
@ -139,9 +139,9 @@ fn main() -> Result<(), impl Error> {
physical_device, physical_device,
DeviceCreateInfo { DeviceCreateInfo {
enabled_extensions: device_extensions, enabled_extensions: device_extensions,
enabled_features: Features { enabled_features: DeviceFeatures {
mesh_shader: true, mesh_shader: true,
..Features::default() ..DeviceFeatures::default()
}, },
queue_create_infos: vec![QueueCreateInfo { queue_create_infos: vec![QueueCreateInfo {
queue_family_index, queue_family_index,

View File

@ -12,7 +12,7 @@ use vulkano::{
RenderPassBeginInfo, RenderPassBeginInfo,
}, },
device::{ device::{
physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, Features, physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
QueueCreateInfo, QueueFlags, QueueCreateInfo, QueueFlags,
}, },
format::Format, format::Format,
@ -63,11 +63,11 @@ fn main() {
let device_extensions = DeviceExtensions { let device_extensions = DeviceExtensions {
..DeviceExtensions::empty() ..DeviceExtensions::empty()
}; };
let features = Features { let features = DeviceFeatures {
// enabling the `multiview` feature will use the `VK_KHR_multiview` extension on Vulkan 1.0 // enabling the `multiview` feature will use the `VK_KHR_multiview` extension on Vulkan 1.0
// and the device feature on Vulkan 1.1+. // and the device feature on Vulkan 1.1+.
multiview: true, multiview: true,
..Features::empty() ..DeviceFeatures::empty()
}; };
let (physical_device, queue_family_index) = instance let (physical_device, queue_family_index) = instance
.enumerate_physical_devices() .enumerate_physical_devices()

View File

@ -10,7 +10,7 @@ use vulkano::{
WriteDescriptorSet, WriteDescriptorSet,
}, },
device::{ device::{
physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, Features, physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
QueueCreateInfo, QueueFlags, QueueCreateInfo, QueueFlags,
}, },
format::Format, format::Format,
@ -111,12 +111,12 @@ fn main() -> Result<(), impl Error> {
..Default::default() ..Default::default()
}], }],
enabled_extensions: device_extensions, enabled_extensions: device_extensions,
enabled_features: Features { enabled_features: DeviceFeatures {
descriptor_indexing: true, descriptor_indexing: true,
shader_uniform_buffer_array_non_uniform_indexing: true, shader_uniform_buffer_array_non_uniform_indexing: true,
runtime_descriptor_array: true, runtime_descriptor_array: true,
descriptor_binding_variable_descriptor_count: true, descriptor_binding_variable_descriptor_count: true,
..Features::empty() ..DeviceFeatures::empty()
}, },
..Default::default() ..Default::default()
}, },

View File

@ -20,7 +20,7 @@ use vulkano::{
CommandBufferUsage, RecordingCommandBuffer, RenderPassBeginInfo, CommandBufferUsage, RecordingCommandBuffer, RenderPassBeginInfo,
}, },
device::{ device::{
physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, Features, physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
QueueCreateInfo, QueueFlags, QueueCreateInfo, QueueFlags,
}, },
image::{view::ImageView, Image, ImageUsage}, image::{view::ImageView, Image, ImageUsage},
@ -172,10 +172,10 @@ fn main() -> Result<(), impl Error> {
khr_swapchain: true, khr_swapchain: true,
..DeviceExtensions::empty() ..DeviceExtensions::empty()
}; };
let features = Features { let features = DeviceFeatures {
tessellation_shader: true, tessellation_shader: true,
fill_mode_non_solid: true, fill_mode_non_solid: true,
..Features::empty() ..DeviceFeatures::empty()
}; };
let (physical_device, queue_family_index) = instance let (physical_device, queue_family_index) = instance
.enumerate_physical_devices() .enumerate_physical_devices()

View File

@ -20,7 +20,7 @@ use vulkano::{
CommandBufferUsage, RecordingCommandBuffer, RenderingAttachmentInfo, RenderingInfo, CommandBufferUsage, RecordingCommandBuffer, RenderingAttachmentInfo, RenderingInfo,
}, },
device::{ device::{
physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, Features, physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
QueueCreateInfo, QueueFlags, QueueCreateInfo, QueueFlags,
}, },
image::{view::ImageView, Image, ImageUsage}, image::{view::ImageView, Image, ImageUsage},
@ -202,9 +202,9 @@ fn main() -> Result<(), impl Error> {
// standard triangle example. The feature is required to be supported by the device if // standard triangle example. The feature is required to be supported by the device if
// it supports Vulkan 1.3 and higher, or if the `khr_dynamic_rendering` extension is // it supports Vulkan 1.3 and higher, or if the `khr_dynamic_rendering` extension is
// available, so we don't need to check for support. // available, so we don't need to check for support.
enabled_features: Features { enabled_features: DeviceFeatures {
dynamic_rendering: true, dynamic_rendering: true,
..Features::empty() ..DeviceFeatures::empty()
}, },
..Default::default() ..Default::default()

View File

@ -4,7 +4,8 @@ use vulkano::instance::InstanceCreateFlags;
use vulkano::{ use vulkano::{
device::{ device::{
physical::{PhysicalDevice, PhysicalDeviceType}, physical::{PhysicalDevice, PhysicalDeviceType},
Device, DeviceCreateInfo, DeviceExtensions, Features, Queue, QueueCreateInfo, QueueFlags, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures, Queue, QueueCreateInfo,
QueueFlags,
}, },
instance::{ instance::{
debug::{DebugUtilsMessenger, DebugUtilsMessengerCreateInfo}, debug::{DebugUtilsMessenger, DebugUtilsMessengerCreateInfo},
@ -33,7 +34,7 @@ pub struct VulkanoConfig {
pub device_extensions: DeviceExtensions, pub device_extensions: DeviceExtensions,
pub device_features: Features, pub device_features: DeviceFeatures,
/// Print your selected device name at start. /// Print your selected device name at start.
pub print_device_name: bool, pub print_device_name: bool,
@ -73,7 +74,7 @@ impl Default for VulkanoConfig {
}), }),
print_device_name: false, print_device_name: false,
device_extensions, device_extensions,
device_features: Features::empty(), device_features: DeviceFeatures::empty(),
} }
} }
} }
@ -195,7 +196,7 @@ impl VulkanoContext {
fn create_device( fn create_device(
physical_device: Arc<PhysicalDevice>, physical_device: Arc<PhysicalDevice>,
device_extensions: DeviceExtensions, device_extensions: DeviceExtensions,
features: Features, device_features: DeviceFeatures,
) -> (Arc<Device>, Arc<Queue>, Arc<Queue>) { ) -> (Arc<Device>, Arc<Queue>, Arc<Queue>) {
let queue_family_graphics = physical_device let queue_family_graphics = physical_device
.queue_family_properties() .queue_family_properties()
@ -241,7 +242,7 @@ impl VulkanoContext {
DeviceCreateInfo { DeviceCreateInfo {
queue_create_infos, queue_create_infos,
enabled_extensions: device_extensions, enabled_extensions: device_extensions,
enabled_features: features, enabled_features: device_features,
..Default::default() ..Default::default()
}, },
) )

View File

@ -93,7 +93,7 @@ fn device_extensions_output(members: &[ExtensionsMember]) -> TokenStream {
api_version, api_version,
device_extensions, device_extensions,
instance_extensions, instance_extensions,
features: _, device_features: _,
}| { }| {
device_extensions.is_empty() device_extensions.is_empty()
&& (api_version.is_some() || !instance_extensions.is_empty()) && (api_version.is_some() || !instance_extensions.is_empty())
@ -104,7 +104,7 @@ fn device_extensions_output(members: &[ExtensionsMember]) -> TokenStream {
api_version, api_version,
device_extensions: _, device_extensions: _,
instance_extensions, instance_extensions,
features: _, device_features: _,
}| { }| {
let condition_items = (api_version.iter().map(|version| { let condition_items = (api_version.iter().map(|version| {
let version = format_ident!("V{}_{}", version.0, version.1); let version = format_ident!("V{}_{}", version.0, version.1);
@ -188,7 +188,7 @@ fn device_extensions_output(members: &[ExtensionsMember]) -> TokenStream {
api_version: _, api_version: _,
device_extensions, device_extensions,
instance_extensions: _, instance_extensions: _,
features: _, device_features: _,
}| (!device_extensions.is_empty()), }| (!device_extensions.is_empty()),
) )
.map( .map(
@ -196,7 +196,7 @@ fn device_extensions_output(members: &[ExtensionsMember]) -> TokenStream {
api_version, api_version,
device_extensions, device_extensions,
instance_extensions: _, instance_extensions: _,
features: _, device_features: _,
}| { }| {
let condition_items = api_version let condition_items = api_version
.iter() .iter()
@ -313,7 +313,7 @@ fn instance_extensions_output(members: &[ExtensionsMember]) -> TokenStream {
api_version, api_version,
device_extensions: _, device_extensions: _,
instance_extensions, instance_extensions,
features: _, device_features: _,
}| { }| {
api_version.filter(|_| instance_extensions.is_empty()).map(|(major, minor)| { api_version.filter(|_| instance_extensions.is_empty()).map(|(major, minor)| {
let version = format_ident!("V{}_{}", major, minor); let version = format_ident!("V{}_{}", major, minor);
@ -379,7 +379,7 @@ fn instance_extensions_output(members: &[ExtensionsMember]) -> TokenStream {
api_version: _, api_version: _,
device_extensions: _, device_extensions: _,
instance_extensions, instance_extensions,
features: _, device_features: _,
}| (!instance_extensions.is_empty()), }| (!instance_extensions.is_empty()),
) )
.map( .map(
@ -387,7 +387,7 @@ fn instance_extensions_output(members: &[ExtensionsMember]) -> TokenStream {
api_version, api_version,
device_extensions: _, device_extensions: _,
instance_extensions, instance_extensions,
features: _, device_features: _,
}| { }| {
let condition_items = api_version let condition_items = api_version
.iter() .iter()

View File

@ -244,17 +244,17 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
/// # Examples /// # Examples
/// ///
/// ``` /// ```
/// use vulkano::device::Features; /// use vulkano::device::DeviceFeatures;
/// # let physical_device: vulkano::device::physical::PhysicalDevice = return; /// # let physical_device: vulkano::device::physical::PhysicalDevice = return;
/// let minimal_features = Features { /// let minimal_features = DeviceFeatures {
/// geometry_shader: true, /// geometry_shader: true,
/// ..Features::empty() /// ..DeviceFeatures::empty()
/// }; /// };
/// ///
/// let optimal_features = vulkano::device::Features { /// let optimal_features = vulkano::device::DeviceFeatures {
/// geometry_shader: true, /// geometry_shader: true,
/// tessellation_shader: true, /// tessellation_shader: true,
/// ..Features::empty() /// ..DeviceFeatures::empty()
/// }; /// };
/// ///
/// if !physical_device.supported_features().contains(&minimal_features) { /// if !physical_device.supported_features().contains(&minimal_features) {
@ -265,29 +265,29 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
/// let features_to_request = optimal_features.intersection(physical_device.supported_features()); /// let features_to_request = optimal_features.intersection(physical_device.supported_features());
/// ``` /// ```
#[derive(Copy, Clone, PartialEq, Eq, Hash)] #[derive(Copy, Clone, PartialEq, Eq, Hash)]
pub struct Features { pub struct DeviceFeatures {
#(#struct_items)* #(#struct_items)*
pub _ne: crate::NonExhaustive, pub _ne: crate::NonExhaustive,
} }
impl Default for Features { impl Default for DeviceFeatures {
#[inline] #[inline]
fn default() -> Self { fn default() -> Self {
Self::empty() Self::empty()
} }
} }
impl Features { impl DeviceFeatures {
/// Checks enabled features against the features supported by the physical device. /// Checks enabled features against the features supported by the physical device.
pub(super) fn check_requirements( pub(super) fn check_requirements(
&self, &self,
supported: &Features, supported: &DeviceFeatures,
) -> Result<(), Box<crate::ValidationError>> { ) -> Result<(), Box<crate::ValidationError>> {
#(#check_requirements_items)* #(#check_requirements_items)*
Ok(()) Ok(())
} }
/// Returns an `Features` object with none of the members set. /// Returns a `DeviceFeatures` object with none of the members set.
#[inline] #[inline]
pub const fn empty() -> Self { pub const fn empty() -> Self {
Self { Self {
@ -296,10 +296,10 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
} }
} }
/// Returns a `Features` object with all of the members set. /// Returns a `DeviceFeatures` object with all of the members set.
#[cfg(test)] #[cfg(test)]
pub(crate) const fn all() -> Features { pub(crate) const fn all() -> DeviceFeatures {
Features { Self {
#(#all_items)* #(#all_items)*
_ne: crate::NonExhaustive(()), _ne: crate::NonExhaustive(()),
} }
@ -354,8 +354,8 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
} }
} }
impl std::ops::BitAnd for Features { impl std::ops::BitAnd for DeviceFeatures {
type Output = Features; type Output = DeviceFeatures;
#[inline] #[inline]
fn bitand(self, rhs: Self) -> Self::Output { fn bitand(self, rhs: Self) -> Self::Output {
@ -363,15 +363,15 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
} }
} }
impl std::ops::BitAndAssign for Features { impl std::ops::BitAndAssign for DeviceFeatures {
#[inline] #[inline]
fn bitand_assign(&mut self, rhs: Self) { fn bitand_assign(&mut self, rhs: Self) {
*self = self.intersection(&rhs); *self = self.intersection(&rhs);
} }
} }
impl std::ops::BitOr for Features { impl std::ops::BitOr for DeviceFeatures {
type Output = Features; type Output = DeviceFeatures;
#[inline] #[inline]
fn bitor(self, rhs: Self) -> Self::Output { fn bitor(self, rhs: Self) -> Self::Output {
@ -379,15 +379,15 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
} }
} }
impl std::ops::BitOrAssign for Features { impl std::ops::BitOrAssign for DeviceFeatures {
#[inline] #[inline]
fn bitor_assign(&mut self, rhs: Self) { fn bitor_assign(&mut self, rhs: Self) {
*self = self.union(&rhs); *self = self.union(&rhs);
} }
} }
impl std::ops::BitXor for Features { impl std::ops::BitXor for DeviceFeatures {
type Output = Features; type Output = DeviceFeatures;
#[inline] #[inline]
fn bitxor(self, rhs: Self) -> Self::Output { fn bitxor(self, rhs: Self) -> Self::Output {
@ -395,15 +395,15 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
} }
} }
impl std::ops::BitXorAssign for Features { impl std::ops::BitXorAssign for DeviceFeatures {
#[inline] #[inline]
fn bitxor_assign(&mut self, rhs: Self) { fn bitxor_assign(&mut self, rhs: Self) {
*self = self.symmetric_difference(&rhs); *self = self.symmetric_difference(&rhs);
} }
} }
impl std::ops::Sub for Features { impl std::ops::Sub for DeviceFeatures {
type Output = Features; type Output = DeviceFeatures;
#[inline] #[inline]
fn sub(self, rhs: Self) -> Self::Output { fn sub(self, rhs: Self) -> Self::Output {
@ -411,14 +411,14 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
} }
} }
impl std::ops::SubAssign for Features { impl std::ops::SubAssign for DeviceFeatures {
#[inline] #[inline]
fn sub_assign(&mut self, rhs: Self) { fn sub_assign(&mut self, rhs: Self) {
*self = self.difference(&rhs); *self = self.difference(&rhs);
} }
} }
impl std::fmt::Debug for Features { impl std::fmt::Debug for DeviceFeatures {
#[allow(unused_assignments)] #[allow(unused_assignments)]
fn fmt(&self, f: &mut std::fmt:: Formatter<'_>) -> Result<(), std::fmt::Error> { fn fmt(&self, f: &mut std::fmt:: Formatter<'_>) -> Result<(), std::fmt::Error> {
write!(f, "[")?; write!(f, "[")?;
@ -430,22 +430,22 @@ fn features_output(members: &[FeaturesMember]) -> TokenStream {
} }
} }
impl FeaturesFfi { impl DeviceFeaturesFfi {
pub(crate) fn write(&mut self, features: &Features) { pub(crate) fn write(&mut self, features: &DeviceFeatures) {
#(#write_items)* #(#write_items)*
} }
} }
impl From<&FeaturesFfi> for Features { impl From<&DeviceFeaturesFfi> for DeviceFeatures {
fn from(features_ffi: &FeaturesFfi) -> Self { fn from(features_ffi: &DeviceFeaturesFfi) -> Self {
Features { DeviceFeatures {
#(#from_items)* #(#from_items)*
_ne: crate::NonExhaustive(()), _ne: crate::NonExhaustive(()),
} }
} }
} }
impl IntoIterator for Features { impl IntoIterator for DeviceFeatures {
type Item = (&'static str, bool); type Item = (&'static str, bool);
type IntoIter = std::array::IntoIter<Self::Item, #arr_len>; type IntoIter = std::array::IntoIter<Self::Item, #arr_len>;
@ -551,7 +551,7 @@ fn make_doc(feat: &mut FeaturesMember, vulkan_ty_name: &str) {
let links: Vec<_> = feat let links: Vec<_> = feat
.requires_features .requires_features
.iter() .iter()
.map(|ext| format!("[`{}`](crate::device::Features::{0})", ext)) .map(|ext| format!("[`{}`](crate::device::DeviceFeatures::{0})", ext))
.collect(); .collect();
write!( write!(
writer, writer,
@ -589,7 +589,7 @@ fn make_doc(feat: &mut FeaturesMember, vulkan_ty_name: &str) {
let links: Vec<_> = feat let links: Vec<_> = feat
.conflicts_features .conflicts_features
.iter() .iter()
.map(|ext| format!("[`{}`](crate::device::Features::{0})", ext)) .map(|ext| format!("[`{}`](crate::device::DeviceFeatures::{0})", ext))
.collect(); .collect();
write!( write!(
writer, writer,
@ -639,12 +639,12 @@ fn features_ffi_output(members: &[FeaturesFfiMember]) -> TokenStream {
quote! { quote! {
#[derive(Default)] #[derive(Default)]
pub(crate) struct FeaturesFfi { pub(crate) struct DeviceFeaturesFfi {
features_vulkan10: ash::vk::PhysicalDeviceFeatures2KHR, features_vulkan10: ash::vk::PhysicalDeviceFeatures2KHR,
#(#struct_items)* #(#struct_items)*
} }
impl FeaturesFfi { impl DeviceFeaturesFfi {
pub(crate) fn make_chain( pub(crate) fn make_chain(
&mut self, &mut self,
api_version: crate::Version, api_version: crate::Version,

View File

@ -286,7 +286,7 @@ fn formats_output(members: &[FormatMember]) -> TokenStream {
api_version, api_version,
device_extensions, device_extensions,
instance_extensions, instance_extensions,
features: _, device_features: _,
}| { }| {
let condition_items = (api_version.iter().map(|(major, minor)| { let condition_items = (api_version.iter().map(|(major, minor)| {
let version = format_ident!("V{}_{}", major, minor); let version = format_ident!("V{}_{}", major, minor);
@ -518,7 +518,7 @@ fn formats_output(members: &[FormatMember]) -> TokenStream {
pub(crate) fn validate_device_raw( pub(crate) fn validate_device_raw(
self, self,
#[allow(unused_variables)] device_api_version: crate::Version, #[allow(unused_variables)] device_api_version: crate::Version,
#[allow(unused_variables)] device_features: &crate::device::Features, #[allow(unused_variables)] device_features: &crate::device::DeviceFeatures,
#[allow(unused_variables)] device_extensions: &crate::device::DeviceExtensions, #[allow(unused_variables)] device_extensions: &crate::device::DeviceExtensions,
#[allow(unused_variables)] instance_extensions: &crate::instance::InstanceExtensions, #[allow(unused_variables)] instance_extensions: &crate::instance::InstanceExtensions,
) -> Result<(), Box<crate::ValidationError>> { ) -> Result<(), Box<crate::ValidationError>> {

View File

@ -450,7 +450,7 @@ pub struct RequiresOneOf {
pub api_version: Option<(u32, u32)>, pub api_version: Option<(u32, u32)>,
pub device_extensions: Vec<String>, pub device_extensions: Vec<String>,
pub instance_extensions: Vec<String>, pub instance_extensions: Vec<String>,
pub features: Vec<String>, pub device_features: Vec<String>,
} }
impl RequiresOneOf { impl RequiresOneOf {
@ -459,13 +459,13 @@ impl RequiresOneOf {
api_version, api_version,
device_extensions, device_extensions,
instance_extensions, instance_extensions,
features, device_features,
} = self; } = self;
api_version.is_none() api_version.is_none()
&& device_extensions.is_empty() && device_extensions.is_empty()
&& instance_extensions.is_empty() && instance_extensions.is_empty()
&& features.is_empty() && device_features.is_empty()
} }
} }
@ -489,9 +489,9 @@ impl BitOrAssign<&Self> for RequiresOneOf {
} }
} }
for rhs in &rhs.features { for rhs in &rhs.device_features {
if !self.features.contains(rhs) { if !self.device_features.contains(rhs) {
self.features.push(rhs.to_owned()); self.device_features.push(rhs.to_owned());
} }
} }
} }

View File

@ -104,23 +104,23 @@ fn properties_output(members: &[PropertiesMember]) -> TokenStream {
/// available extensions, not every property may be available. For that reason, some /// available extensions, not every property may be available. For that reason, some
/// properties are wrapped in an `Option`. /// properties are wrapped in an `Option`.
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct Properties { pub struct DeviceProperties {
#(#struct_items)* #(#struct_items)*
pub _ne: crate::NonExhaustive, pub _ne: crate::NonExhaustive,
} }
impl Default for Properties { impl Default for DeviceProperties {
fn default() -> Self { fn default() -> Self {
Properties { DeviceProperties {
#(#default_items)* #(#default_items)*
_ne: crate::NonExhaustive(()), _ne: crate::NonExhaustive(()),
} }
} }
} }
impl From<&PropertiesFfi> for Properties { impl From<&DevicePropertiesFfi> for DeviceProperties {
fn from(properties_ffi: &PropertiesFfi) -> Self { fn from(properties_ffi: &DevicePropertiesFfi) -> Self {
Properties { DeviceProperties {
#(#from_items)* #(#from_items)*
_ne: crate::NonExhaustive(()), _ne: crate::NonExhaustive(()),
} }
@ -279,12 +279,12 @@ fn properties_ffi_output(members: &[PropertiesFfiMember]) -> TokenStream {
quote! { quote! {
#[derive(Default)] #[derive(Default)]
pub(crate) struct PropertiesFfi { pub(crate) struct DevicePropertiesFfi {
properties_vulkan10: ash::vk::PhysicalDeviceProperties2KHR, properties_vulkan10: ash::vk::PhysicalDeviceProperties2KHR,
#(#struct_items)* #(#struct_items)*
} }
impl PropertiesFfi { impl DevicePropertiesFfi {
pub(crate) fn make_chain( pub(crate) fn make_chain(
&mut self, &mut self,
api_version: Version, api_version: Version,

View File

@ -92,7 +92,7 @@ fn spirv_reqs_output(members: &[SpirvReqsMember], is_extension: bool) -> TokenSt
api_version, api_version,
ref device_extensions, ref device_extensions,
instance_extensions: _, instance_extensions: _,
ref features, ref device_features,
} = requires_one_of; } = requires_one_of;
let condition_items = (api_version.iter().map(|version| { let condition_items = (api_version.iter().map(|version| {
@ -103,9 +103,9 @@ fn spirv_reqs_output(members: &[SpirvReqsMember], is_extension: bool) -> TokenSt
let ident = format_ident!("{}", name); let ident = format_ident!("{}", name);
quote! { device_extensions.#ident } quote! { device_extensions.#ident }
})) }))
.chain(features.iter().map(|name| { .chain(device_features.iter().map(|name| {
let ident = format_ident!("{}", name); let ident = format_ident!("{}", name);
quote! { features.#ident } quote! { device_features.#ident }
})); }));
let requires_one_of_items = (api_version.iter().map(|(major, minor)| { let requires_one_of_items = (api_version.iter().map(|(major, minor)| {
let version = format_ident!("V{}_{}", major, minor); let version = format_ident!("V{}_{}", major, minor);
@ -122,10 +122,10 @@ fn spirv_reqs_output(members: &[SpirvReqsMember], is_extension: bool) -> TokenSt
]), ]),
} }
})) }))
.chain(features.iter().map(|name| { .chain(device_features.iter().map(|name| {
quote! { quote! {
crate::RequiresAllOf(&[ crate::RequiresAllOf(&[
crate::Requires::Feature(#name), crate::Requires::DeviceFeature(#name),
]), ]),
} }
})); }));
@ -215,7 +215,7 @@ fn spirv_reqs_output(members: &[SpirvReqsMember], is_extension: bool) -> TokenSt
#[allow(unused_variables)] #[allow(unused_variables)]
let device_extensions = device.enabled_extensions(); let device_extensions = device.enabled_extensions();
#[allow(unused_variables)] #[allow(unused_variables)]
let features = device.enabled_features(); let device_features = device.enabled_features();
#[allow(unused_variables)] #[allow(unused_variables)]
let properties = device.physical_device().properties(); let properties = device.physical_device().properties();
@ -329,7 +329,7 @@ fn make_requires(enables: &[vk_parse::Enable]) -> (RequiresOneOf, Vec<RequiresPr
} }
vk_parse::Enable::Feature(feature) => { vk_parse::Enable::Feature(feature) => {
requires_one_of requires_one_of
.features .device_features
.push(feature.feature.to_snake_case()); .push(feature.feature.to_snake_case());
} }
vk_parse::Enable::Property(property) => { vk_parse::Enable::Property(property) => {
@ -358,8 +358,8 @@ fn make_requires(enables: &[vk_parse::Enable]) -> (RequiresOneOf, Vec<RequiresPr
requires_one_of.device_extensions.sort_unstable(); requires_one_of.device_extensions.sort_unstable();
requires_one_of.device_extensions.dedup(); requires_one_of.device_extensions.dedup();
requires_one_of.features.sort_unstable(); requires_one_of.device_features.sort_unstable();
requires_one_of.features.dedup(); requires_one_of.device_features.dedup();
(requires_one_of, requires_properties) (requires_one_of, requires_properties)
} }

View File

@ -118,7 +118,7 @@ impl AccelerationStructure {
/// - `create_info.buffer` (and any subbuffer it overlaps with) must not be accessed while it /// - `create_info.buffer` (and any subbuffer it overlaps with) must not be accessed while it
/// is bound to the acceleration structure. /// is bound to the acceleration structure.
/// ///
/// [`acceleration_structure`]: crate::device::Features::acceleration_structure /// [`acceleration_structure`]: crate::device::DeviceFeatures::acceleration_structure
#[inline] #[inline]
pub unsafe fn new( pub unsafe fn new(
device: Arc<Device>, device: Arc<Device>,
@ -144,7 +144,7 @@ impl AccelerationStructure {
if !device.enabled_features().acceleration_structure { if !device.enabled_features().acceleration_structure {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"acceleration_structure", "acceleration_structure",
)])]), )])]),
vuids: &["VUID-vkCreateAccelerationStructureKHR-accelerationStructure-03611"], vuids: &["VUID-vkCreateAccelerationStructureKHR-accelerationStructure-03611"],

View File

@ -487,7 +487,7 @@ impl Buffer {
if !device.enabled_features().buffer_device_address { if !device.enabled_features().buffer_device_address {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"buffer_device_address", "buffer_device_address",
)])]), )])]),
vuids: &["VUID-vkGetBufferDeviceAddress-bufferDeviceAddress-03324"], vuids: &["VUID-vkGetBufferDeviceAddress-bufferDeviceAddress-03324"],
@ -820,7 +820,7 @@ vulkan_bitflags! {
/// The [`sparse_binding`] feature must be enabled on the device. /// The [`sparse_binding`] feature must be enabled on the device.
/// ///
/// [`bind_memory`]: sys::RawBuffer::bind_memory /// [`bind_memory`]: sys::RawBuffer::bind_memory
/// [`sparse_binding`]: crate::device::Features::sparse_binding /// [`sparse_binding`]: crate::device::DeviceFeatures::sparse_binding
SPARSE_BINDING = SPARSE_BINDING,*/ SPARSE_BINDING = SPARSE_BINDING,*/
/* TODO: enable /* TODO: enable
@ -830,7 +830,7 @@ vulkan_bitflags! {
/// ///
/// The [`sparse_residency_buffer`] feature must be enabled on the device. /// The [`sparse_residency_buffer`] feature must be enabled on the device.
/// ///
/// [`sparse_residency_buffer`]: crate::device::Features::sparse_residency_buffer /// [`sparse_residency_buffer`]: crate::device::DeviceFeatures::sparse_residency_buffer
SPARSE_RESIDENCY = SPARSE_RESIDENCY,*/ SPARSE_RESIDENCY = SPARSE_RESIDENCY,*/
/* TODO: enable /* TODO: enable
@ -840,7 +840,7 @@ vulkan_bitflags! {
/// ///
/// The [`sparse_residency_aliased`] feature must be enabled on the device. /// The [`sparse_residency_aliased`] feature must be enabled on the device.
/// ///
/// [`sparse_residency_aliased`]: crate::device::Features::sparse_residency_aliased /// [`sparse_residency_aliased`]: crate::device::DeviceFeatures::sparse_residency_aliased
SPARSE_ALIASED = SPARSE_ALIASED,*/ SPARSE_ALIASED = SPARSE_ALIASED,*/
/* TODO: enable /* TODO: enable
@ -984,7 +984,7 @@ pub enum IndexBuffer {
/// ///
/// The [`index_type_uint8`] feature must be enabled on the device. /// The [`index_type_uint8`] feature must be enabled on the device.
/// ///
/// [`index_type_uint8`]: crate::device::Features::index_type_uint8 /// [`index_type_uint8`]: crate::device::DeviceFeatures::index_type_uint8
U8(Subbuffer<[u8]>), U8(Subbuffer<[u8]>),
/// An index buffer containing unsigned 16-bit indices. /// An index buffer containing unsigned 16-bit indices.

View File

@ -295,7 +295,7 @@ where
/// ///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT /// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`invalidate_range`]: crate::memory::ResourceMemory::invalidate_range /// [`invalidate_range`]: crate::memory::ResourceMemory::invalidate_range
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
/// [`write`]: Self::write /// [`write`]: Self::write
/// [`SubbufferAllocator`]: super::allocator::SubbufferAllocator /// [`SubbufferAllocator`]: super::allocator::SubbufferAllocator
/// [`RawBuffer::assume_bound`]: crate::buffer::sys::RawBuffer::assume_bound /// [`RawBuffer::assume_bound`]: crate::buffer::sys::RawBuffer::assume_bound
@ -388,7 +388,7 @@ where
/// ///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT /// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`flush_range`]: crate::memory::ResourceMemory::flush_range /// [`flush_range`]: crate::memory::ResourceMemory::flush_range
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
/// [`read`]: Self::read /// [`read`]: Self::read
/// [`SubbufferAllocator`]: super::allocator::SubbufferAllocator /// [`SubbufferAllocator`]: super::allocator::SubbufferAllocator
/// [`RawBuffer::assume_bound`]: crate::buffer::sys::RawBuffer::assume_bound /// [`RawBuffer::assume_bound`]: crate::buffer::sys::RawBuffer::assume_bound

View File

@ -176,8 +176,8 @@ impl RecordingCommandBuffer {
/// ///
/// [`build_acceleration_structure`]: Self::build_acceleration_structure /// [`build_acceleration_structure`]: Self::build_acceleration_structure
/// [`primitive_count`]: AccelerationStructureBuildRangeInfo::primitive_count /// [`primitive_count`]: AccelerationStructureBuildRangeInfo::primitive_count
/// [`max_instance_count`]: crate::device::Properties::max_instance_count /// [`max_instance_count`]: crate::device::DeviceProperties::max_instance_count
/// [`max_primitive_count`]: crate::device::Properties::max_primitive_count /// [`max_primitive_count`]: crate::device::DeviceProperties::max_primitive_count
/// [`primitive_offset`]: AccelerationStructureBuildRangeInfo::primitive_offset /// [`primitive_offset`]: AccelerationStructureBuildRangeInfo::primitive_offset
/// [`index_data.index_type().size()`]: AccelerationStructureGeometryTrianglesData::index_data /// [`index_data.index_type().size()`]: AccelerationStructureGeometryTrianglesData::index_data
/// [`index_data`]: AccelerationStructureGeometryTrianglesData::index_data /// [`index_data`]: AccelerationStructureGeometryTrianglesData::index_data
@ -1620,7 +1620,7 @@ impl RawRecordingCommandBuffer {
.acceleration_structure_indirect_build .acceleration_structure_indirect_build
{ {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature("acceleration_structure_indirect_build")])]), requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature("acceleration_structure_indirect_build")])]),
vuids: &["VUID-vkCmdBuildAccelerationStructuresIndirectKHR-accelerationStructureIndirectBuild-03650"], vuids: &["VUID-vkCmdBuildAccelerationStructuresIndirectKHR-accelerationStructureIndirectBuild-03650"],
..Default::default() ..Default::default()
})); }));

View File

@ -752,7 +752,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "index_buffer".into(), context: "index_buffer".into(),
problem: "is `IndexBuffer::U8`".into(), problem: "is `IndexBuffer::U8`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"index_type_uint8", "index_type_uint8",
)])]), )])]),
vuids: &["VUID-vkCmdBindIndexBuffer-indexType-02765"], vuids: &["VUID-vkCmdBindIndexBuffer-indexType-02765"],

View File

@ -1318,7 +1318,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetCullMode-None-03384"], vuids: &["VUID-vkCmdSetCullMode-None-03384"],
..Default::default() ..Default::default()
@ -1396,7 +1396,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "clamp".into(), context: "clamp".into(),
problem: "is not `0.0`".into(), problem: "is not `0.0`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"depth_bias_clamp", "depth_bias_clamp",
)])]), )])]),
vuids: &["VUID-vkCmdSetDepthBias-depthBiasClamp-00790"], vuids: &["VUID-vkCmdSetDepthBias-depthBiasClamp-00790"],
@ -1436,7 +1436,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state2")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state2")]),
]), ]),
vuids: &["VUID-vkCmdSetDepthBiasEnable-None-04872"], vuids: &["VUID-vkCmdSetDepthBiasEnable-None-04872"],
..Default::default() ..Default::default()
@ -1561,7 +1561,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetDepthBoundsTestEnable-None-03349"], vuids: &["VUID-vkCmdSetDepthBoundsTestEnable-None-03349"],
..Default::default() ..Default::default()
@ -1619,7 +1619,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetDepthCompareOp-None-03353"], vuids: &["VUID-vkCmdSetDepthCompareOp-None-03353"],
..Default::default() ..Default::default()
@ -1681,7 +1681,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetDepthTestEnable-None-03352"], vuids: &["VUID-vkCmdSetDepthTestEnable-None-03352"],
..Default::default() ..Default::default()
@ -1738,7 +1738,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetDepthWriteEnable-None-03354"], vuids: &["VUID-vkCmdSetDepthWriteEnable-None-03354"],
..Default::default() ..Default::default()
@ -1872,7 +1872,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetFrontFace-None-03383"], vuids: &["VUID-vkCmdSetFrontFace-None-03383"],
..Default::default() ..Default::default()
@ -2002,7 +2002,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "line_width".into(), context: "line_width".into(),
problem: "is not 1.0".into(), problem: "is not 1.0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"wide_lines", "wide_lines",
)])]), )])]),
vuids: &["VUID-vkCmdSetLineWidth-lineWidth-00788"], vuids: &["VUID-vkCmdSetLineWidth-lineWidth-00788"],
@ -2037,7 +2037,7 @@ impl RawRecordingCommandBuffer {
.extended_dynamic_state2_logic_op .extended_dynamic_state2_logic_op
{ {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"extended_dynamic_state2_logic_op", "extended_dynamic_state2_logic_op",
)])]), )])]),
vuids: &["VUID-vkCmdSetLogicOpEXT-None-04867"], vuids: &["VUID-vkCmdSetLogicOpEXT-None-04867"],
@ -2092,7 +2092,7 @@ impl RawRecordingCommandBuffer {
.extended_dynamic_state2_patch_control_points .extended_dynamic_state2_patch_control_points
{ {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"extended_dynamic_state2_patch_control_points", "extended_dynamic_state2_patch_control_points",
)])]), )])]),
vuids: &["VUID-vkCmdSetPatchControlPointsEXT-None-04873"], vuids: &["VUID-vkCmdSetPatchControlPointsEXT-None-04873"],
@ -2166,7 +2166,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state2")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state2")]),
]), ]),
vuids: &["VUID-vkCmdSetPrimitiveRestartEnable-None-04866"], vuids: &["VUID-vkCmdSetPrimitiveRestartEnable-None-04866"],
..Default::default() ..Default::default()
@ -2224,7 +2224,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetPrimitiveTopology-None-03347"], vuids: &["VUID-vkCmdSetPrimitiveTopology-None-03347"],
..Default::default() ..Default::default()
@ -2262,9 +2262,9 @@ impl RawRecordingCommandBuffer {
problem: "this device is a portability subset device, and `topology` \ problem: "this device is a portability subset device, and `topology` \
is `PrimitiveTopology::TriangleFan`" is `PrimitiveTopology::TriangleFan`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"triangle_fans", Requires::DeviceFeature("triangle_fans"),
)])]), ])]),
..Default::default() ..Default::default()
})); }));
} }
@ -2276,9 +2276,9 @@ impl RawRecordingCommandBuffer {
if !self.device().enabled_features().geometry_shader { if !self.device().enabled_features().geometry_shader {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`topology` is `PrimitiveTopology::*WithAdjacency`".into(), problem: "`topology` is `PrimitiveTopology::*WithAdjacency`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"geometry_shader", Requires::DeviceFeature("geometry_shader"),
)])]), ])]),
..Default::default() ..Default::default()
})); }));
} }
@ -2287,9 +2287,9 @@ impl RawRecordingCommandBuffer {
if !self.device().enabled_features().tessellation_shader { if !self.device().enabled_features().tessellation_shader {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`topology` is `PrimitiveTopology::PatchList`".into(), problem: "`topology` is `PrimitiveTopology::PatchList`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"tessellation_shader", Requires::DeviceFeature("tessellation_shader"),
)])]), ])]),
..Default::default() ..Default::default()
})); }));
} }
@ -2337,7 +2337,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state2")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state2")]),
]), ]),
vuids: &["VUID-vkCmdSetRasterizerDiscardEnable-None-04871"], vuids: &["VUID-vkCmdSetRasterizerDiscardEnable-None-04871"],
..Default::default() ..Default::default()
@ -2420,7 +2420,7 @@ impl RawRecordingCommandBuffer {
if first_scissor != 0 { if first_scissor != 0 {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`first_scissor` is not 0".into(), problem: "`first_scissor` is not 0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-vkCmdSetScissor-firstScissor-00593"], vuids: &["VUID-vkCmdSetScissor-firstScissor-00593"],
@ -2431,7 +2431,7 @@ impl RawRecordingCommandBuffer {
if scissors.len() > 1 { if scissors.len() > 1 {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`scissors.len()` is greater than 1".into(), problem: "`scissors.len()` is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-vkCmdSetScissor-scissorCount-00594"], vuids: &["VUID-vkCmdSetScissor-scissorCount-00594"],
@ -2488,7 +2488,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetScissorWithCount-None-03396"], vuids: &["VUID-vkCmdSetScissorWithCount-None-03396"],
..Default::default() ..Default::default()
@ -2522,7 +2522,7 @@ impl RawRecordingCommandBuffer {
if !self.device().enabled_features().multi_viewport && scissors.len() > 1 { if !self.device().enabled_features().multi_viewport && scissors.len() > 1 {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`scissors.len()` is greater than 1".into(), problem: "`scissors.len()` is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-vkCmdSetScissorWithCount-scissorCount-03398"], vuids: &["VUID-vkCmdSetScissorWithCount-scissorCount-03398"],
@ -2641,7 +2641,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetStencilOp-None-03351"], vuids: &["VUID-vkCmdSetStencilOp-None-03351"],
..Default::default() ..Default::default()
@ -2793,7 +2793,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetStencilTestEnable-None-03350"], vuids: &["VUID-vkCmdSetStencilTestEnable-None-03350"],
..Default::default() ..Default::default()
@ -2900,8 +2900,8 @@ impl RawRecordingCommandBuffer {
{ {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("vertex_input_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("vertex_input_dynamic_state")]),
RequiresAllOf(&[Requires::Feature("shader_object")]), RequiresAllOf(&[Requires::DeviceFeature("shader_object")]),
]), ]),
vuids: &["VUID-vkCmdSetVertexInputEXT-None-08546"], vuids: &["VUID-vkCmdSetVertexInputEXT-None-08546"],
..Default::default() ..Default::default()
@ -3041,7 +3041,7 @@ impl RawRecordingCommandBuffer {
if first_viewport != 0 { if first_viewport != 0 {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`first_viewport` is not 0".into(), problem: "`first_viewport` is not 0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-vkCmdSetViewport-firstViewport-01224"], vuids: &["VUID-vkCmdSetViewport-firstViewport-01224"],
@ -3052,7 +3052,7 @@ impl RawRecordingCommandBuffer {
if viewports.len() > 1 { if viewports.len() > 1 {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`viewports.len()` is greater than 1".into(), problem: "`viewports.len()` is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-vkCmdSetViewport-viewportCount-01225"], vuids: &["VUID-vkCmdSetViewport-viewportCount-01225"],
@ -3109,7 +3109,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]), RequiresAllOf(&[Requires::APIVersion(Version::V1_3)]),
RequiresAllOf(&[Requires::Feature("extended_dynamic_state")]), RequiresAllOf(&[Requires::DeviceFeature("extended_dynamic_state")]),
]), ]),
vuids: &["VUID-vkCmdSetViewportWithCount-None-03393"], vuids: &["VUID-vkCmdSetViewportWithCount-None-03393"],
..Default::default() ..Default::default()
@ -3143,7 +3143,7 @@ impl RawRecordingCommandBuffer {
if viewports.len() > 1 && !self.device().enabled_features().multi_viewport { if viewports.len() > 1 && !self.device().enabled_features().multi_viewport {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "`viewports.len()` is greater than 1".into(), problem: "`viewports.len()` is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-vkCmdSetViewportWithCount-viewportCount-03395"], vuids: &["VUID-vkCmdSetViewportWithCount-viewportCount-03395"],

View File

@ -1,5 +1,5 @@
#[cfg(doc)] #[cfg(doc)]
use crate::device::{Features, Properties}; use crate::device::{DeviceFeatures, DeviceProperties};
use crate::{ use crate::{
acceleration_structure::AccelerationStructure, acceleration_structure::AccelerationStructure,
buffer::{view::BufferView, BufferUsage, Subbuffer}, buffer::{view::BufferView, BufferUsage, Subbuffer},
@ -398,9 +398,9 @@ impl RecordingCommandBuffer {
/// ///
/// One draw is performed for each [`DrawIndirectCommand`] struct in `indirect_buffer`. /// One draw is performed for each [`DrawIndirectCommand`] struct in `indirect_buffer`.
/// The maximum number of draw commands in the buffer is limited by the /// The maximum number of draw commands in the buffer is limited by the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) limit.
/// This limit is 1 unless the /// This limit is 1 unless the
/// [`multi_draw_indirect`](Features::multi_draw_indirect) feature has been /// [`multi_draw_indirect`](DeviceFeatures::multi_draw_indirect) feature has been
/// enabled. /// enabled.
/// ///
/// A primitive shading graphics pipeline must have been bound using /// A primitive shading graphics pipeline must have been bound using
@ -508,7 +508,7 @@ impl RecordingCommandBuffer {
/// `indirect_buffer`. The number of draws to perform is read from `count_buffer`, or /// `indirect_buffer`. The number of draws to perform is read from `count_buffer`, or
/// specified by `max_draw_count`, whichever is lower. /// specified by `max_draw_count`, whichever is lower.
/// This number is limited by the /// This number is limited by the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) limit.
/// ///
/// A primitive shading graphics pipeline must have been bound using /// A primitive shading graphics pipeline must have been bound using
/// [`bind_pipeline_graphics`](Self::bind_pipeline_graphics). Any resources used by the /// [`bind_pipeline_graphics`](Self::bind_pipeline_graphics). Any resources used by the
@ -522,7 +522,7 @@ impl RecordingCommandBuffer {
/// - The general [shader safety requirements](crate::shader#safety) apply. /// - The general [shader safety requirements](crate::shader#safety) apply.
/// - The [safety requirements for `DrawIndirectCommand`](DrawIndirectCommand#safety) apply. /// - The [safety requirements for `DrawIndirectCommand`](DrawIndirectCommand#safety) apply.
/// - The count stored in `count_buffer` must not be greater than the /// - The count stored in `count_buffer` must not be greater than the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) device limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) device limit.
/// - The count stored in `count_buffer` must fall within the range of `indirect_buffer`. /// - The count stored in `count_buffer` must fall within the range of `indirect_buffer`.
pub unsafe fn draw_indirect_count( pub unsafe fn draw_indirect_count(
&mut self, &mut self,
@ -663,7 +663,8 @@ impl RecordingCommandBuffer {
/// the bound vertex-rate vertex buffers. /// the bound vertex-rate vertex buffers.
/// - Every vertex number that is retrieved from the index buffer, if it is not the special /// - Every vertex number that is retrieved from the index buffer, if it is not the special
/// primitive restart value, must be no greater than the /// primitive restart value, must be no greater than the
/// [`max_draw_indexed_index_value`](Properties::max_draw_indexed_index_value) device limit. /// [`max_draw_indexed_index_value`](DeviceProperties::max_draw_indexed_index_value) device
/// limit.
pub unsafe fn draw_indexed( pub unsafe fn draw_indexed(
&mut self, &mut self,
index_count: u32, index_count: u32,
@ -755,7 +756,7 @@ impl RecordingCommandBuffer {
multiplied by the size of the indices in the bound index buffer, \ multiplied by the size of the indices in the bound index buffer, \
is greater than the size of the bound index buffer" is greater than the size of the bound index buffer"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"robust_buffer_access2", "robust_buffer_access2",
)])]), )])]),
vuids: &["VUID-vkCmdDrawIndexed-robustBufferAccess2-07825"], vuids: &["VUID-vkCmdDrawIndexed-robustBufferAccess2-07825"],
@ -878,9 +879,9 @@ impl RecordingCommandBuffer {
/// ///
/// One draw is performed for each [`DrawIndexedIndirectCommand`] struct in `indirect_buffer`. /// One draw is performed for each [`DrawIndexedIndirectCommand`] struct in `indirect_buffer`.
/// The maximum number of draw commands in the buffer is limited by the /// The maximum number of draw commands in the buffer is limited by the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) limit.
/// This limit is 1 unless the /// This limit is 1 unless the
/// [`multi_draw_indirect`](Features::multi_draw_indirect) feature has been /// [`multi_draw_indirect`](DeviceFeatures::multi_draw_indirect) feature has been
/// enabled. /// enabled.
/// ///
/// An index buffer must have been bound using /// An index buffer must have been bound using
@ -1003,7 +1004,7 @@ impl RecordingCommandBuffer {
/// `indirect_buffer`. The number of draws to perform is read from `count_buffer`, or /// `indirect_buffer`. The number of draws to perform is read from `count_buffer`, or
/// specified by `max_draw_count`, whichever is lower. /// specified by `max_draw_count`, whichever is lower.
/// This number is limited by the /// This number is limited by the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) limit.
/// ///
/// An index buffer must have been bound using /// An index buffer must have been bound using
/// [`bind_index_buffer`](Self::bind_index_buffer), and the index ranges of each /// [`bind_index_buffer`](Self::bind_index_buffer), and the index ranges of each
@ -1023,7 +1024,7 @@ impl RecordingCommandBuffer {
/// - The [safety requirements for /// - The [safety requirements for
/// `DrawIndexedIndirectCommand`](DrawIndexedIndirectCommand#safety) apply. /// `DrawIndexedIndirectCommand`](DrawIndexedIndirectCommand#safety) apply.
/// - The count stored in `count_buffer` must not be greater than the /// - The count stored in `count_buffer` must not be greater than the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) device limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) device limit.
/// - The count stored in `count_buffer` must fall within the range of `indirect_buffer`. /// - The count stored in `count_buffer` must fall within the range of `indirect_buffer`.
pub unsafe fn draw_indexed_indirect_count( pub unsafe fn draw_indexed_indirect_count(
&mut self, &mut self,
@ -1337,9 +1338,9 @@ impl RecordingCommandBuffer {
/// ///
/// One draw is performed for each [`DrawMeshTasksIndirectCommand`] struct in /// One draw is performed for each [`DrawMeshTasksIndirectCommand`] struct in
/// `indirect_buffer`. The maximum number of draw commands in the buffer is limited by the /// `indirect_buffer`. The maximum number of draw commands in the buffer is limited by the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) limit.
/// This limit is 1 unless the /// This limit is 1 unless the
/// [`multi_draw_indirect`](Features::multi_draw_indirect) feature has been /// [`multi_draw_indirect`](DeviceFeatures::multi_draw_indirect) feature has been
/// enabled. /// enabled.
/// ///
/// A mesh shading graphics pipeline must have been bound using /// A mesh shading graphics pipeline must have been bound using
@ -1455,7 +1456,7 @@ impl RecordingCommandBuffer {
/// `indirect_buffer`. The number of draws to perform is read from `count_buffer`, or /// `indirect_buffer`. The number of draws to perform is read from `count_buffer`, or
/// specified by `max_draw_count`, whichever is lower. /// specified by `max_draw_count`, whichever is lower.
/// This number is limited by the /// This number is limited by the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) limit.
/// ///
/// A mesh shading graphics pipeline must have been bound using /// A mesh shading graphics pipeline must have been bound using
/// [`bind_pipeline_graphics`](Self::bind_pipeline_graphics). Any resources used by the /// [`bind_pipeline_graphics`](Self::bind_pipeline_graphics). Any resources used by the
@ -1468,7 +1469,7 @@ impl RecordingCommandBuffer {
/// - The [safety requirements for /// - The [safety requirements for
/// `DrawMeshTasksIndirectCommand`](DrawMeshTasksIndirectCommand#safety) apply. /// `DrawMeshTasksIndirectCommand`](DrawMeshTasksIndirectCommand#safety) apply.
/// - The count stored in `count_buffer` must not be greater than the /// - The count stored in `count_buffer` must not be greater than the
/// [`max_draw_indirect_count`](Properties::max_draw_indirect_count) device limit. /// [`max_draw_indirect_count`](DeviceProperties::max_draw_indirect_count) device limit.
/// - The count stored in `count_buffer` must fall within the range of `indirect_buffer`. /// - The count stored in `count_buffer` must fall within the range of `indirect_buffer`.
pub unsafe fn draw_mesh_tasks_indirect_count( pub unsafe fn draw_mesh_tasks_indirect_count(
&mut self, &mut self,
@ -2750,7 +2751,9 @@ impl RecordingCommandBuffer {
`PrimitiveTopology::*List`" `PrimitiveTopology::*List`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("primitive_topology_list_restart"), Requires::DeviceFeature(
"primitive_topology_list_restart",
),
])]), ])]),
// vuids? // vuids?
..Default::default() ..Default::default()
@ -2769,7 +2772,7 @@ impl RecordingCommandBuffer {
`PrimitiveTopology::PatchList`" `PrimitiveTopology::PatchList`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature( Requires::DeviceFeature(
"primitive_topology_patch_list_restart", "primitive_topology_patch_list_restart",
), ),
])]), ])]),
@ -3890,7 +3893,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "draw_count".into(), context: "draw_count".into(),
problem: "is greater than 1".into(), problem: "is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_draw_indirect", "multi_draw_indirect",
)])]), )])]),
vuids: &["VUID-vkCmdDrawIndirect-drawCount-02718"], vuids: &["VUID-vkCmdDrawIndirect-drawCount-02718"],
@ -4007,7 +4010,7 @@ impl RawRecordingCommandBuffer {
) -> Result<(), Box<ValidationError>> { ) -> Result<(), Box<ValidationError>> {
if !self.device().enabled_features().draw_indirect_count { if !self.device().enabled_features().draw_indirect_count {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"draw_indirect_count", "draw_indirect_count",
)])]), )])]),
vuids: &["VUID-vkCmdDrawIndirectCount-None-04445"], vuids: &["VUID-vkCmdDrawIndirectCount-None-04445"],
@ -4261,7 +4264,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "draw_count".into(), context: "draw_count".into(),
problem: "is greater than 1".into(), problem: "is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_draw_indirect", "multi_draw_indirect",
)])]), )])]),
vuids: &["VUID-vkCmdDrawIndexedIndirect-drawCount-02718"], vuids: &["VUID-vkCmdDrawIndexedIndirect-drawCount-02718"],
@ -4378,7 +4381,7 @@ impl RawRecordingCommandBuffer {
) -> Result<(), Box<ValidationError>> { ) -> Result<(), Box<ValidationError>> {
if !self.device().enabled_features().draw_indirect_count { if !self.device().enabled_features().draw_indirect_count {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"draw_indirect_count", "draw_indirect_count",
)])]), )])]),
vuids: &["VUID-vkCmdDrawIndexedIndirectCount-None-04445"], vuids: &["VUID-vkCmdDrawIndexedIndirectCount-None-04445"],
@ -4636,7 +4639,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "draw_count".into(), context: "draw_count".into(),
problem: "is greater than 1".into(), problem: "is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_draw_indirect", "multi_draw_indirect",
)])]), )])]),
vuids: &["VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-02718"], vuids: &["VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-02718"],
@ -4762,7 +4765,7 @@ impl RawRecordingCommandBuffer {
if !self.device().enabled_features().draw_indirect_count { if !self.device().enabled_features().draw_indirect_count {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"draw_indirect_count", "draw_indirect_count",
)])]), )])]),
vuids: &["VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-04445"], vuids: &["VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-04445"],

View File

@ -541,7 +541,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "flags".into(), context: "flags".into(),
problem: "contains `QueryControlFlags::PRECISE`".into(), problem: "contains `QueryControlFlags::PRECISE`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"occlusion_query_precise", "occlusion_query_precise",
)])]), )])]),
vuids: &["VUID-vkCmdBeginQuery-queryType-00800"], vuids: &["VUID-vkCmdBeginQuery-queryType-00800"],
@ -681,7 +681,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is a stage flag from `VkPipelineStageFlagBits2`".into(), problem: "is a stage flag from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -706,9 +706,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::GeometryShader`".into(), problem: "is `PipelineStage::GeometryShader`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"geometry_shadere", Requires::DeviceFeature("geometry_shadere"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-03929"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-03929"],
})); }));
} }
@ -721,9 +721,9 @@ impl RawRecordingCommandBuffer {
problem: "is `PipelineStage::TessellationControlShader` or \ problem: "is `PipelineStage::TessellationControlShader` or \
`PipelineStage::TessellationEvaluationShader`" `PipelineStage::TessellationEvaluationShader`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"tessellation_shader", Requires::DeviceFeature("tessellation_shader"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-03930"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-03930"],
})); }));
} }
@ -733,9 +733,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::ConditionalRendering`".into(), problem: "is `PipelineStage::ConditionalRendering`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"conditional_rendering", Requires::DeviceFeature("conditional_rendering"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-03931"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-03931"],
})); }));
} }
@ -745,9 +745,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::FragmentDensityProcess`".into(), problem: "is `PipelineStage::FragmentDensityProcess`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"fragment_density_map", Requires::DeviceFeature("fragment_density_map"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-03932"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-03932"],
})); }));
} }
@ -757,9 +757,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::TransformFeedback`".into(), problem: "is `PipelineStage::TransformFeedback`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"transform_feedback", Requires::DeviceFeature("transform_feedback"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-03933"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-03933"],
})); }));
} }
@ -769,9 +769,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::MeshShader`".into(), problem: "is `PipelineStage::MeshShader`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"mesh_shader", Requires::DeviceFeature("mesh_shader"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-03934"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-03934"],
})); }));
} }
@ -781,9 +781,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::TaskShader`".into(), problem: "is `PipelineStage::TaskShader`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"task_shader", Requires::DeviceFeature("task_shader"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-03935"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-03935"],
})); }));
} }
@ -796,8 +796,10 @@ impl RawRecordingCommandBuffer {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::FragmentShadingRateAttachment`".into(), problem: "is `PipelineStage::FragmentShadingRateAttachment`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-vkCmdWriteTimestamp2-shadingRateImage-07316"], vuids: &["VUID-vkCmdWriteTimestamp2-shadingRateImage-07316"],
})); }));
@ -808,9 +810,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::SubpassShading`".into(), problem: "is `PipelineStage::SubpassShading`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"subpass_shading", Requires::DeviceFeature("subpass_shading"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-04957"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-04957"],
})); }));
} }
@ -820,9 +822,9 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stage".into(), context: "stage".into(),
problem: "is `PipelineStage::InvocationMask`".into(), problem: "is `PipelineStage::InvocationMask`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"invocation_mask", Requires::DeviceFeature("invocation_mask"),
)])]), ])]),
vuids: &["VUID-vkCmdWriteTimestamp2-stage-04995"], vuids: &["VUID-vkCmdWriteTimestamp2-stage-04995"],
})); }));
} }

View File

@ -1497,7 +1497,7 @@ impl RawRecordingCommandBuffer {
if !device.enabled_features().dynamic_rendering { if !device.enabled_features().dynamic_rendering {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dynamic_rendering", "dynamic_rendering",
)])]), )])]),
vuids: &["VUID-vkCmdBeginRendering-dynamicRendering-06446"], vuids: &["VUID-vkCmdBeginRendering-dynamicRendering-06446"],
@ -2086,8 +2086,8 @@ pub struct RenderingInfo {
/// to. The value is a bitmask, so that that for example `0b11` will draw to the first two /// to. The value is a bitmask, so that that for example `0b11` will draw to the first two
/// views and `0b101` will draw to the first and third view. /// views and `0b101` will draw to the first and third view.
/// ///
/// If set to a nonzero value, the [`multiview`](crate::device::Features::multiview) feature /// If set to a nonzero value, the [`multiview`](crate::device::DeviceFeatures::multiview)
/// must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `0`. /// The default value is `0`.
pub view_mask: u32, pub view_mask: u32,
@ -2095,8 +2095,8 @@ pub struct RenderingInfo {
/// The color attachments to use for rendering. /// The color attachments to use for rendering.
/// ///
/// The number of color attachments must be less than the /// The number of color attachments must be less than the
/// [`max_color_attachments`](crate::device::Properties::max_color_attachments) limit of the /// [`max_color_attachments`](crate::device::DeviceProperties::max_color_attachments) limit of
/// physical device. All color attachments must have the same `samples` value. /// the physical device. All color attachments must have the same `samples` value.
/// ///
/// The default value is empty. /// The default value is empty.
pub color_attachments: Vec<Option<RenderingAttachmentInfo>>, pub color_attachments: Vec<Option<RenderingAttachmentInfo>>,
@ -2291,7 +2291,9 @@ impl RenderingInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "view_mask".into(), context: "view_mask".into(),
problem: "is not 0".into(), problem: "is not 0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature("multiview")])]), requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multiview",
)])]),
vuids: &["VUID-VkRenderingInfo-multiview-06127"], vuids: &["VUID-VkRenderingInfo-multiview-06127"],
})); }));
} }
@ -2743,7 +2745,7 @@ impl RenderingInfo {
`depth_attachment.image_layout` does not equal \ `depth_attachment.image_layout` does not equal \
`stencil_attachment.attachment_ref.layout`" `stencil_attachment.attachment_ref.layout`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
..Default::default() ..Default::default()
@ -2780,9 +2782,9 @@ impl RenderingInfo {
`depth_attachment.resolve_info.image_layout` does not equal \ `depth_attachment.resolve_info.image_layout` does not equal \
`stencil_attachment.resolve_info.image_layout`" `stencil_attachment.resolve_info.image_layout`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"separate_depth_stencil_layouts", Requires::DeviceFeature("separate_depth_stencil_layouts"),
)])]), ])]),
..Default::default() ..Default::default()
})); }));
} }

View File

@ -80,7 +80,7 @@ impl RecordingCommandBuffer {
{ {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "a query is active".into(), problem: "a query is active".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"inherited_queries", "inherited_queries",
)])]), )])]),
vuids: &["VUID-vkCmdExecuteCommands-commandBuffer-00101"], vuids: &["VUID-vkCmdExecuteCommands-commandBuffer-00101"],

View File

@ -1361,7 +1361,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -1374,7 +1374,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-03929"], vuids: &["VUID-vkCmdResetEvent2-stageMask-03929"],
@ -1392,7 +1392,7 @@ impl RawRecordingCommandBuffer {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-03930"], vuids: &["VUID-vkCmdResetEvent2-stageMask-03930"],
@ -1405,7 +1405,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-03931"], vuids: &["VUID-vkCmdResetEvent2-stageMask-03931"],
@ -1418,7 +1418,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-03932"], vuids: &["VUID-vkCmdResetEvent2-stageMask-03932"],
@ -1431,7 +1431,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-03933"], vuids: &["VUID-vkCmdResetEvent2-stageMask-03933"],
@ -1444,7 +1444,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-03934"], vuids: &["VUID-vkCmdResetEvent2-stageMask-03934"],
@ -1457,7 +1457,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-03935"], vuids: &["VUID-vkCmdResetEvent2-stageMask-03935"],
@ -1473,8 +1473,10 @@ impl RawRecordingCommandBuffer {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkImageMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkImageMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -1486,7 +1488,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-04957"], vuids: &["VUID-vkCmdResetEvent2-stageMask-04957"],
@ -1499,7 +1501,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-04995"], vuids: &["VUID-vkCmdResetEvent2-stageMask-04995"],
@ -1514,7 +1516,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-vkCmdResetEvent2-stageMask-07946"], vuids: &["VUID-vkCmdResetEvent2-stageMask-07946"],

View File

@ -121,7 +121,7 @@ use crate::{
}; };
#[cfg(doc)] #[cfg(doc)]
use crate::{ use crate::{
device::{Features, Properties}, device::{DeviceFeatures, DeviceProperties},
pipeline::graphics::vertex_input::VertexInputRate, pipeline::graphics::vertex_input::VertexInputRate,
}; };
use ahash::HashMap; use ahash::HashMap;
@ -141,7 +141,7 @@ mod traits;
/// # Safety /// # Safety
/// ///
/// - The `x`, `y` and `z` values must not be greater than the respective elements of the /// - The `x`, `y` and `z` values must not be greater than the respective elements of the
/// [`max_compute_work_group_count`](Properties::max_compute_work_group_count) device limit. /// [`max_compute_work_group_count`](DeviceProperties::max_compute_work_group_count) device limit.
#[repr(C)] #[repr(C)]
#[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)] #[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)]
pub struct DispatchIndirectCommand { pub struct DispatchIndirectCommand {
@ -159,11 +159,11 @@ pub struct DispatchIndirectCommand {
/// vertex-rate vertex buffers. /// vertex-rate vertex buffers.
/// - Every instance number within the specified range must fall within the range of the bound /// - Every instance number within the specified range must fall within the range of the bound
/// instance-rate vertex buffers. /// instance-rate vertex buffers.
/// - If the [`draw_indirect_first_instance`](Features::draw_indirect_first_instance) feature is /// - If the [`draw_indirect_first_instance`](DeviceFeatures::draw_indirect_first_instance) feature
/// not enabled, then `first_instance` must be `0`. /// is not enabled, then `first_instance` must be `0`.
/// - If an [instance divisor](VertexInputRate::Instance) other than 1 is used, and the /// - If an [instance divisor](VertexInputRate::Instance) other than 1 is used, and the
/// [`supports_non_zero_first_instance`](Properties::supports_non_zero_first_instance) device /// [`supports_non_zero_first_instance`](DeviceProperties::supports_non_zero_first_instance)
/// property is `false`, then `first_instance` must be `0`. /// device property is `false`, then `first_instance` must be `0`.
#[repr(C)] #[repr(C)]
#[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)] #[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)]
pub struct DrawIndirectCommand { pub struct DrawIndirectCommand {
@ -180,15 +180,15 @@ pub struct DrawIndirectCommand {
/// ///
/// - If the graphics pipeline **does not** include a task shader, then the `group_count_x`, /// - If the graphics pipeline **does not** include a task shader, then the `group_count_x`,
/// `group_count_y` and `group_count_z` values must not be greater than the respective elements /// `group_count_y` and `group_count_z` values must not be greater than the respective elements
/// of the [`max_mesh_work_group_count`](Properties::max_mesh_work_group_count) device limit, and /// of the [`max_mesh_work_group_count`](DeviceProperties::max_mesh_work_group_count) device
/// the product of these three values must not be greater than the /// limit, and the product of these three values must not be greater than the
/// [`max_mesh_work_group_total_count`](Properties::max_mesh_work_group_total_count) device /// [`max_mesh_work_group_total_count`](DeviceProperties::max_mesh_work_group_total_count) device
/// limit. /// limit.
/// - If the graphics pipeline **does** include a task shader, then the `group_count_x`, /// - If the graphics pipeline **does** include a task shader, then the `group_count_x`,
/// `group_count_y` and `group_count_z` values must not be greater than the respective elements /// `group_count_y` and `group_count_z` values must not be greater than the respective elements
/// of the [`max_task_work_group_count`](Properties::max_task_work_group_count) device limit, and /// of the [`max_task_work_group_count`](DeviceProperties::max_task_work_group_count) device
/// the product of these three values must not be greater than the /// limit, and the product of these three values must not be greater than the
/// [`max_task_work_group_total_count`](Properties::max_task_work_group_total_count) device /// [`max_task_work_group_total_count`](DeviceProperties::max_task_work_group_total_count) device
/// limit. /// limit.
#[repr(C)] #[repr(C)]
#[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)] #[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)]
@ -208,14 +208,15 @@ pub struct DrawMeshTasksIndirectCommand {
/// bound vertex-rate vertex buffers. /// bound vertex-rate vertex buffers.
/// - Every vertex number that is retrieved from the index buffer, if it is not the special /// - Every vertex number that is retrieved from the index buffer, if it is not the special
/// primitive restart value, must be no greater than the /// primitive restart value, must be no greater than the
/// [`max_draw_indexed_index_value`](Properties::max_draw_indexed_index_value) device limit. /// [`max_draw_indexed_index_value`](DeviceProperties::max_draw_indexed_index_value) device
/// limit.
/// - Every instance number within the specified range must fall within the range of the bound /// - Every instance number within the specified range must fall within the range of the bound
/// instance-rate vertex buffers. /// instance-rate vertex buffers.
/// - If the [`draw_indirect_first_instance`](Features::draw_indirect_first_instance) feature is /// - If the [`draw_indirect_first_instance`](DeviceFeatures::draw_indirect_first_instance) feature
/// not enabled, then `first_instance` must be `0`. /// is not enabled, then `first_instance` must be `0`.
/// - If an [instance divisor](VertexInputRate::Instance) other than 1 is used, and the /// - If an [instance divisor](VertexInputRate::Instance) other than 1 is used, and the
/// [`supports_non_zero_first_instance`](Properties::supports_non_zero_first_instance) device /// [`supports_non_zero_first_instance`](DeviceProperties::supports_non_zero_first_instance)
/// property is `false`, then `first_instance` must be `0`. /// device property is `false`, then `first_instance` must be `0`.
#[repr(C)] #[repr(C)]
#[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)] #[derive(Clone, Copy, Debug, Default, Zeroable, Pod, PartialEq, Eq)]
pub struct DrawIndexedIndirectCommand { pub struct DrawIndexedIndirectCommand {
@ -293,7 +294,7 @@ pub struct CommandBufferInheritanceInfo {
/// ///
/// The default value is [`QueryPipelineStatisticFlags::empty()`]. /// The default value is [`QueryPipelineStatisticFlags::empty()`].
/// ///
/// [`pipeline_statistics_query`]: crate::device::Features::pipeline_statistics_query /// [`pipeline_statistics_query`]: crate::device::DeviceFeatures::pipeline_statistics_query
pub pipeline_statistics: QueryPipelineStatisticFlags, pub pipeline_statistics: QueryPipelineStatisticFlags,
pub _ne: crate::NonExhaustive, pub _ne: crate::NonExhaustive,
@ -349,7 +350,7 @@ impl CommandBufferInheritanceInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "occlusion_query".into(), context: "occlusion_query".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"inherited_queries", "inherited_queries",
)])]), )])]),
vuids: &["VUID-VkCommandBufferInheritanceInfo-occlusionQueryEnable-00056"], vuids: &["VUID-VkCommandBufferInheritanceInfo-occlusionQueryEnable-00056"],
@ -362,7 +363,7 @@ impl CommandBufferInheritanceInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "occlusion_query".into(), context: "occlusion_query".into(),
problem: "contains `QueryControlFlags::PRECISE`".into(), problem: "contains `QueryControlFlags::PRECISE`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"occlusion_query_precise", "occlusion_query_precise",
)])]), )])]),
vuids: &["VUID-vkBeginCommandBuffer-commandBuffer-00052"], vuids: &["VUID-vkBeginCommandBuffer-commandBuffer-00052"],
@ -379,7 +380,7 @@ impl CommandBufferInheritanceInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "pipeline_statistics".into(), context: "pipeline_statistics".into(),
problem: "is not empty".into(), problem: "is not empty".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"pipeline_statistics_query", "pipeline_statistics_query",
)])]), )])]),
vuids: &["VUID-VkCommandBufferInheritanceInfo-pipelineStatistics-00058"], vuids: &["VUID-VkCommandBufferInheritanceInfo-pipelineStatistics-00058"],
@ -501,7 +502,7 @@ pub struct CommandBufferInheritanceRenderingInfo {
/// ///
/// The default value is `0`. /// The default value is `0`.
/// ///
/// [`multiview`]: crate::device::Features::multiview /// [`multiview`]: crate::device::DeviceFeatures::multiview
pub view_mask: u32, pub view_mask: u32,
/// The formats of the color attachments that will be used during rendering. /// The formats of the color attachments that will be used during rendering.
@ -560,7 +561,9 @@ impl CommandBufferInheritanceRenderingInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "view_mask".into(), context: "view_mask".into(),
problem: "is not zero".into(), problem: "is not zero".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature("multiview")])]), requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multiview",
)])]),
vuids: &["VUID-VkCommandBufferInheritanceRenderingInfo-multiview-06008"], vuids: &["VUID-VkCommandBufferInheritanceRenderingInfo-multiview-06008"],
})); }));
} }
@ -838,7 +841,7 @@ impl SubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: format!("signal_semaphores[{}].stages", index).into(), context: format!("signal_semaphores[{}].stages", index).into(),
problem: "is not `PipelineStages::ALL_COMMANDS`".into(), problem: "is not `PipelineStages::ALL_COMMANDS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
vuids: &["VUID-vkQueueSubmit2-synchronization2-03866"], vuids: &["VUID-vkQueueSubmit2-synchronization2-03866"],
@ -931,7 +934,7 @@ pub struct SemaphoreSubmitInfo {
/// The default value is [`ALL_COMMANDS`]. /// The default value is [`ALL_COMMANDS`].
/// ///
/// [`ALL_COMMANDS`]: PipelineStages::ALL_COMMANDS /// [`ALL_COMMANDS`]: PipelineStages::ALL_COMMANDS
/// [`synchronization2`]: crate::device::Features::synchronization2 /// [`synchronization2`]: crate::device::DeviceFeatures::synchronization2
pub stages: PipelineStages, pub stages: PipelineStages,
pub _ne: crate::NonExhaustive, pub _ne: crate::NonExhaustive,
@ -983,7 +986,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -996,7 +999,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03929"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03929"],
@ -1014,7 +1017,7 @@ impl SemaphoreSubmitInfo {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03930"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03930"],
@ -1027,7 +1030,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03931"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03931"],
@ -1040,7 +1043,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03932"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03932"],
@ -1053,7 +1056,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03933"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03933"],
@ -1065,7 +1068,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03934"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03934"],
@ -1077,7 +1080,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03935"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-03935"],
@ -1092,8 +1095,8 @@ impl SemaphoreSubmitInfo {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature("attachment_fragment_shading_rate")]),
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -1105,7 +1108,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-04957"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-04957"],
@ -1118,7 +1121,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-04995"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-04995"],
@ -1132,7 +1135,7 @@ impl SemaphoreSubmitInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stages".into(), context: "stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-07946"], vuids: &["VUID-VkSemaphoreSubmitInfo-stageMask-07946"],

View File

@ -524,7 +524,7 @@ vulkan_bitflags! {
/// [`DescriptorType::StorageBufferDynamic`] or [`DescriptorType::InlineUniformBlock`]. /// [`DescriptorType::StorageBufferDynamic`] or [`DescriptorType::InlineUniformBlock`].
/// - There must be no bindings with `variable_descriptor_count` enabled. /// - There must be no bindings with `variable_descriptor_count` enabled.
/// - The total number of descriptors across all bindings must be less than the /// - The total number of descriptors across all bindings must be less than the
/// [`max_push_descriptors`](crate::device::Properties::max_push_descriptors) limit. /// [`max_push_descriptors`](crate::device::DeviceProperties::max_push_descriptors) limit.
PUSH_DESCRIPTOR = PUSH_DESCRIPTOR_KHR PUSH_DESCRIPTOR = PUSH_DESCRIPTOR_KHR
RequiresOneOf([ RequiresOneOf([
RequiresAllOf([DeviceExtension(khr_push_descriptor)]), RequiresAllOf([DeviceExtension(khr_push_descriptor)]),
@ -686,7 +686,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "descriptor_type".into(), context: "descriptor_type".into(),
problem: "`DescriptorType::InlineUniformBlock`".into(), problem: "`DescriptorType::InlineUniformBlock`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"inline_uniform_block", "inline_uniform_block",
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBinding-descriptorType-04604"], vuids: &["VUID-VkDescriptorSetLayoutBinding-descriptorType-04604"],
@ -797,7 +797,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \ problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \ `DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`descriptor_type` is `DescriptorType::UniformBuffer`".into(), `descriptor_type` is `DescriptorType::UniformBuffer`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_uniform_buffer_update_after_bind" "descriptor_binding_uniform_buffer_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformBufferUpdateAfterBind-03005"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformBufferUpdateAfterBind-03005"],
@ -818,7 +818,7 @@ impl DescriptorSetLayoutBinding {
`descriptor_type` is `DescriptorType::Sampler`, \ `descriptor_type` is `DescriptorType::Sampler`, \
`DescriptorType::CombinedImageSampler` or \ `DescriptorType::CombinedImageSampler` or \
`DescriptorType::SampledImage`".into(), `DescriptorType::SampledImage`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_sampled_image_update_after_bind" "descriptor_binding_sampled_image_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingSampledImageUpdateAfterBind-03006"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingSampledImageUpdateAfterBind-03006"],
@ -835,7 +835,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \ problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \ `DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`descriptor_type` is `DescriptorType::StorageImage`".into(), `descriptor_type` is `DescriptorType::StorageImage`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_storage_image_update_after_bind" "descriptor_binding_storage_image_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageImageUpdateAfterBind-03007"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageImageUpdateAfterBind-03007"],
@ -852,7 +852,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \ problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \ `DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`descriptor_type` is `DescriptorType::StorageBuffer`".into(), `descriptor_type` is `DescriptorType::StorageBuffer`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_storage_buffer_update_after_bind" "descriptor_binding_storage_buffer_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008"],
@ -869,7 +869,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \ problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \ `DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`descriptor_type` is `DescriptorType::UniformTexelBuffer`".into(), `descriptor_type` is `DescriptorType::UniformTexelBuffer`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_uniform_texel_buffer_update_after_bind" "descriptor_binding_uniform_texel_buffer_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformTexelBufferUpdateAfterBind-03009"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformTexelBufferUpdateAfterBind-03009"],
@ -886,7 +886,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \ problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \ `DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`descriptor_type` is `DescriptorType::StorageTexelBuffer`".into(), `descriptor_type` is `DescriptorType::StorageTexelBuffer`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_storage_texel_buffer_update_after_bind" "descriptor_binding_storage_texel_buffer_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageTexelBufferUpdateAfterBind-03010"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageTexelBufferUpdateAfterBind-03010"],
@ -903,7 +903,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \ problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \ `DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`descriptor_type` is `DescriptorType::InlineUniformBlock`".into(), `descriptor_type` is `DescriptorType::InlineUniformBlock`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_inline_uniform_block_update_after_bind" "descriptor_binding_inline_uniform_block_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingInlineUniformBlockUpdateAfterBind-02211"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingInlineUniformBlockUpdateAfterBind-02211"],
@ -920,7 +920,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \ problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \ `DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`descriptor_type` is `DescriptorType::AccelerationStructure`".into(), `descriptor_type` is `DescriptorType::AccelerationStructure`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_acceleration_structure_update_after_bind" "descriptor_binding_acceleration_structure_update_after_bind"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingAccelerationStructureUpdateAfterBind-03570"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingAccelerationStructureUpdateAfterBind-03570"],
@ -953,7 +953,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "binding_flags".into(), context: "binding_flags".into(),
problem: "contains `DescriptorBindingFlags::UPDATE_UNUSED_WHILE_PENDING`".into(), problem: "contains `DescriptorBindingFlags::UPDATE_UNUSED_WHILE_PENDING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_update_unused_while_pending" "descriptor_binding_update_unused_while_pending"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUpdateUnusedWhilePending-03012"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUpdateUnusedWhilePending-03012"],
@ -966,7 +966,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "binding_flags".into(), context: "binding_flags".into(),
problem: "contains `DescriptorBindingFlags::PARTIALLY_BOUND`".into(), problem: "contains `DescriptorBindingFlags::PARTIALLY_BOUND`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_partially_bound" "descriptor_binding_partially_bound"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingPartiallyBound-03013"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingPartiallyBound-03013"],
@ -981,7 +981,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "binding_flags".into(), context: "binding_flags".into(),
problem: "contains `DescriptorBindingFlags::VARIABLE_DESCRIPTOR_COUNT`".into(), problem: "contains `DescriptorBindingFlags::VARIABLE_DESCRIPTOR_COUNT`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_variable_descriptor_count" "descriptor_binding_variable_descriptor_count"
)])]), )])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingVariableDescriptorCount-03014"], vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingVariableDescriptorCount-03014"],
@ -1062,7 +1062,7 @@ vulkan_bitflags! {
/// flag is also set. If it is set, then only *dynamic use* by a shader invocation counts as /// flag is also set. If it is set, then only *dynamic use* by a shader invocation counts as
/// being used, otherwise all *static use* by a shader invocation is considered used. /// being used, otherwise all *static use* by a shader invocation is considered used.
/// ///
/// [`descriptor_binding_update_unused_while_pending`]: crate::device::Features::descriptor_binding_update_unused_while_pending /// [`descriptor_binding_update_unused_while_pending`]: crate::device::DeviceFeatures::descriptor_binding_update_unused_while_pending
UPDATE_UNUSED_WHILE_PENDING = UPDATE_UNUSED_WHILE_PENDING UPDATE_UNUSED_WHILE_PENDING = UPDATE_UNUSED_WHILE_PENDING
RequiresOneOf([ RequiresOneOf([
RequiresAllOf([APIVersion(V1_2)]), RequiresAllOf([APIVersion(V1_2)]),
@ -1077,7 +1077,7 @@ vulkan_bitflags! {
/// ///
/// The [`descriptor_binding_partially_bound`] feature must be enabled on the device. /// The [`descriptor_binding_partially_bound`] feature must be enabled on the device.
/// ///
/// [`descriptor_binding_partially_bound`]: crate::device::Features::descriptor_binding_partially_bound /// [`descriptor_binding_partially_bound`]: crate::device::DeviceFeatures::descriptor_binding_partially_bound
PARTIALLY_BOUND = PARTIALLY_BOUND PARTIALLY_BOUND = PARTIALLY_BOUND
RequiresOneOf([ RequiresOneOf([
RequiresAllOf([APIVersion(V1_2)]), RequiresAllOf([APIVersion(V1_2)]),
@ -1094,7 +1094,7 @@ vulkan_bitflags! {
/// binding with the highest binding number. The `descriptor_type` must not be /// binding with the highest binding number. The `descriptor_type` must not be
/// [`DescriptorType::UniformBufferDynamic`] or [`DescriptorType::StorageBufferDynamic`]. /// [`DescriptorType::UniformBufferDynamic`] or [`DescriptorType::StorageBufferDynamic`].
/// ///
/// [`descriptor_binding_variable_descriptor_count`]: crate::device::Features::descriptor_binding_variable_descriptor_count /// [`descriptor_binding_variable_descriptor_count`]: crate::device::DeviceFeatures::descriptor_binding_variable_descriptor_count
VARIABLE_DESCRIPTOR_COUNT = VARIABLE_DESCRIPTOR_COUNT VARIABLE_DESCRIPTOR_COUNT = VARIABLE_DESCRIPTOR_COUNT
RequiresOneOf([ RequiresOneOf([
RequiresAllOf([APIVersion(V1_2)]), RequiresAllOf([APIVersion(V1_2)]),
@ -1248,7 +1248,7 @@ pub struct DescriptorSetLayoutSupport {
/// [`descriptor_binding_variable_descriptor_count`] feature isn't enabled on the device, this /// [`descriptor_binding_variable_descriptor_count`] feature isn't enabled on the device, this
/// will be 0. /// will be 0.
/// ///
/// [`descriptor_binding_variable_descriptor_count`]: crate::device::Features::descriptor_binding_variable_descriptor_count /// [`descriptor_binding_variable_descriptor_count`]: crate::device::DeviceFeatures::descriptor_binding_variable_descriptor_count
pub max_variable_descriptor_count: u32, pub max_variable_descriptor_count: u32,
} }

View File

@ -450,7 +450,7 @@ impl WriteDescriptorSet {
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("image2_d_view_of3_d"), Requires::DeviceFeature("image2_d_view_of3_d"),
])]), ])]),
vuids: &["VUID-VkDescriptorImageInfo-descriptorType-06713"], vuids: &["VUID-VkDescriptorImageInfo-descriptorType-06713"],
})); }));
@ -468,7 +468,7 @@ impl WriteDescriptorSet {
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("sampler2_d_view_of3_d"), Requires::DeviceFeature("sampler2_d_view_of3_d"),
])]), ])]),
vuids: &["VUID-VkDescriptorImageInfo-descriptorType-06714"], vuids: &["VUID-VkDescriptorImageInfo-descriptorType-06714"],
})); }));
@ -557,7 +557,7 @@ impl WriteDescriptorSet {
the sampler has depth comparison enabled" the sampler has depth comparison enabled"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("mutable_comparison_samplers"), Requires::DeviceFeature("mutable_comparison_samplers"),
])]), ])]),
vuids: &[ vuids: &[
"VUID-VkDescriptorImageInfo-mutableComparisonSamplers-04450", "VUID-VkDescriptorImageInfo-mutableComparisonSamplers-04450",
@ -678,7 +678,7 @@ impl WriteDescriptorSet {
the sampler has depth comparison enabled" the sampler has depth comparison enabled"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("mutable_comparison_samplers"), Requires::DeviceFeature("mutable_comparison_samplers"),
])]), ])]),
vuids: &[ vuids: &[
"VUID-VkDescriptorImageInfo-mutableComparisonSamplers-04450", "VUID-VkDescriptorImageInfo-mutableComparisonSamplers-04450",

View File

@ -8,7 +8,7 @@
//! ```no_run //! ```no_run
//! use vulkano::{ //! use vulkano::{
//! device::{ //! device::{
//! physical::PhysicalDevice, Device, DeviceCreateInfo, DeviceExtensions, Features, //! physical::PhysicalDevice, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
//! QueueCreateInfo, //! QueueCreateInfo,
//! }, //! },
//! instance::{Instance, InstanceExtensions}, //! instance::{Instance, InstanceExtensions},
@ -31,7 +31,7 @@
//! //!
//! // Here is the device-creating code. //! // Here is the device-creating code.
//! let device = { //! let device = {
//! let features = Features::empty(); //! let features = DeviceFeatures::empty();
//! let extensions = DeviceExtensions::empty(); //! let extensions = DeviceExtensions::empty();
//! //!
//! match Device::new( //! match Device::new(
@ -96,10 +96,10 @@
//! //!
//! TODO: write //! TODO: write
pub(crate) use self::properties::PropertiesFfi; pub(crate) use self::properties::DevicePropertiesFfi;
use self::{physical::PhysicalDevice, queue::DeviceQueueInfo}; use self::{physical::PhysicalDevice, queue::DeviceQueueInfo};
pub use self::{ pub use self::{
properties::Properties, properties::DeviceProperties,
queue::{Queue, QueueFamilyProperties, QueueFlags, QueueGuard}, queue::{Queue, QueueFamilyProperties, QueueFlags, QueueGuard},
}; };
pub use crate::fns::DeviceFunctions; pub use crate::fns::DeviceFunctions;
@ -154,7 +154,7 @@ pub struct Device {
id: NonZeroU64, id: NonZeroU64,
enabled_extensions: DeviceExtensions, enabled_extensions: DeviceExtensions,
enabled_features: Features, enabled_features: DeviceFeatures,
physical_devices: SmallVec<[InstanceOwnedDebugWrapper<Arc<PhysicalDevice>>; 2]>, physical_devices: SmallVec<[InstanceOwnedDebugWrapper<Arc<PhysicalDevice>>; 2]>,
// The highest version that is supported for this device. // The highest version that is supported for this device.
@ -245,9 +245,9 @@ impl Device {
if create_info.enabled_extensions.$extension { if create_info.enabled_extensions.$extension {
assert!( assert!(
physical_device.supported_features().$feature_to_enable, physical_device.supported_features().$feature_to_enable,
"The device extension `{}` is enabled, and it requires the `{}` feature \ "The device extension `{}` is enabled, and it requires the `{}` device \
to be also enabled, but the device does not support the required feature. \ feature to be also enabled, but the device does not support the required \
This is a bug in the Vulkan driver for this device.", feature. This is a bug in the Vulkan driver for this device.",
stringify!($extension), stringify!($extension),
stringify!($feature_to_enable), stringify!($feature_to_enable),
); );
@ -369,7 +369,7 @@ impl Device {
.map(|extension| extension.as_ptr()) .map(|extension| extension.as_ptr())
.collect::<SmallVec<[_; 16]>>(); .collect::<SmallVec<[_; 16]>>();
let mut features_ffi = FeaturesFfi::default(); let mut features_ffi = DeviceFeaturesFfi::default();
features_ffi.make_chain( features_ffi.make_chain(
physical_device.api_version(), physical_device.api_version(),
enabled_extensions, enabled_extensions,
@ -610,7 +610,7 @@ impl Device {
/// This includes both the features specified in [`DeviceCreateInfo::enabled_features`], /// This includes both the features specified in [`DeviceCreateInfo::enabled_features`],
/// and any features that are required by the enabled extensions. /// and any features that are required by the enabled extensions.
#[inline] #[inline]
pub fn enabled_features(&self) -> &Features { pub fn enabled_features(&self) -> &DeviceFeatures {
&self.enabled_features &self.enabled_features
} }
@ -676,7 +676,7 @@ impl Device {
if !self.enabled_features().acceleration_structure { if !self.enabled_features().acceleration_structure {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"acceleration_structure", "acceleration_structure",
)])]), )])]),
vuids: &[ vuids: &[
@ -829,7 +829,7 @@ impl Device {
if !self.enabled_features().acceleration_structure { if !self.enabled_features().acceleration_structure {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("acceleration_structure")]), RequiresAllOf(&[Requires::DeviceFeature("acceleration_structure")]),
]), ]),
vuids: &["VUID-vkGetDeviceAccelerationStructureCompatibilityKHR-accelerationStructure-08928"], vuids: &["VUID-vkGetDeviceAccelerationStructureCompatibilityKHR-accelerationStructure-08928"],
..Default::default() ..Default::default()
@ -872,7 +872,7 @@ impl Device {
/// The device API version must be at least 1.1, or the [`khr_maintenance3`] extension must /// The device API version must be at least 1.1, or the [`khr_maintenance3`] extension must
/// be enabled on the device. /// be enabled on the device.
/// ///
/// [`max_per_set_descriptors`]: crate::device::Properties::max_per_set_descriptors /// [`max_per_set_descriptors`]: crate::device::DeviceProperties::max_per_set_descriptors
/// [`khr_maintenance3`]: crate::device::DeviceExtensions::khr_maintenance3 /// [`khr_maintenance3`]: crate::device::DeviceExtensions::khr_maintenance3
#[inline] #[inline]
pub fn descriptor_set_layout_support( pub fn descriptor_set_layout_support(
@ -1711,8 +1711,8 @@ pub struct DeviceCreateInfo {
/// You only need to enable the features that you need. If the extensions you specified /// You only need to enable the features that you need. If the extensions you specified
/// require certain features to be enabled, they will be automatically enabled as well. /// require certain features to be enabled, they will be automatically enabled as well.
/// ///
/// The default value is [`Features::empty()`]. /// The default value is [`DeviceFeatures::empty()`].
pub enabled_features: Features, pub enabled_features: DeviceFeatures,
/// A list of physical devices to create this device from, to act together as a single /// A list of physical devices to create this device from, to act together as a single
/// logical device. The physical devices must all belong to the same device group, as returned /// logical device. The physical devices must all belong to the same device group, as returned
@ -1763,7 +1763,7 @@ impl Default for DeviceCreateInfo {
Self { Self {
queue_create_infos: Vec::new(), queue_create_infos: Vec::new(),
enabled_extensions: DeviceExtensions::empty(), enabled_extensions: DeviceExtensions::empty(),
enabled_features: Features::empty(), enabled_features: DeviceFeatures::empty(),
physical_devices: SmallVec::new(), physical_devices: SmallVec::new(),
private_data_slot_request_count: 0, private_data_slot_request_count: 0,
_ne: crate::NonExhaustive(()), _ne: crate::NonExhaustive(()),
@ -2135,7 +2135,7 @@ impl QueueCreateInfo {
&self, &self,
physical_device: &PhysicalDevice, physical_device: &PhysicalDevice,
device_extensions: &DeviceExtensions, device_extensions: &DeviceExtensions,
device_features: &Features, device_features: &DeviceFeatures,
) -> Result<(), Box<ValidationError>> { ) -> Result<(), Box<ValidationError>> {
let &Self { let &Self {
flags, flags,
@ -2298,7 +2298,9 @@ pub struct MemoryFdProperties {
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::device::{Device, DeviceCreateInfo, DeviceExtensions, Features, QueueCreateInfo}; use crate::device::{
Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures, QueueCreateInfo,
};
use std::{ffi::CString, sync::Arc}; use std::{ffi::CString, sync::Arc};
#[test] #[test]
@ -2324,9 +2326,9 @@ mod tests {
#[test] #[test]
fn features_into_iter() { fn features_into_iter() {
let features = Features { let features = DeviceFeatures {
tessellation_shader: true, tessellation_shader: true,
..Features::empty() ..DeviceFeatures::empty()
}; };
for (name, enabled) in features { for (name, enabled) in features {
if name == "tessellationShader" { if name == "tessellationShader" {
@ -2383,7 +2385,7 @@ mod tests {
None => return, None => return,
}; };
let features = Features::all(); let features = DeviceFeatures::all();
// In the unlikely situation where the device supports everything, we ignore the test. // In the unlikely situation where the device supports everything, we ignore the test.
if physical_device.supported_features().contains(&features) { if physical_device.supported_features().contains(&features) {
return; return;

View File

@ -2,7 +2,10 @@ use super::QueueFamilyProperties;
use crate::{ use crate::{
buffer::{ExternalBufferInfo, ExternalBufferProperties}, buffer::{ExternalBufferInfo, ExternalBufferProperties},
cache::{OnceCache, WeakArcOnceCache}, cache::{OnceCache, WeakArcOnceCache},
device::{properties::Properties, DeviceExtensions, Features, FeaturesFfi, PropertiesFfi}, device::{
properties::DeviceProperties, DeviceExtensions, DeviceFeatures, DeviceFeaturesFfi,
DevicePropertiesFfi,
},
display::{Display, DisplayPlaneProperties, DisplayPlanePropertiesRaw, DisplayProperties}, display::{Display, DisplayPlaneProperties, DisplayPlanePropertiesRaw, DisplayProperties},
format::{DrmFormatModifierProperties, Format, FormatProperties}, format::{DrmFormatModifierProperties, Format, FormatProperties},
image::{ image::{
@ -64,8 +67,8 @@ pub struct PhysicalDevice {
// Data queried at `PhysicalDevice` creation. // Data queried at `PhysicalDevice` creation.
api_version: Version, api_version: Version,
supported_extensions: DeviceExtensions, supported_extensions: DeviceExtensions,
supported_features: Features, supported_features: DeviceFeatures,
properties: Properties, properties: DeviceProperties,
extension_properties: Vec<ExtensionProperties>, extension_properties: Vec<ExtensionProperties>,
memory_properties: MemoryProperties, memory_properties: MemoryProperties,
queue_family_properties: Vec<QueueFamilyProperties>, queue_family_properties: Vec<QueueFamilyProperties>,
@ -193,13 +196,13 @@ impl PhysicalDevice {
} }
} }
unsafe fn get_features(handle: ash::vk::PhysicalDevice, instance: &Instance) -> Features { unsafe fn get_features(handle: ash::vk::PhysicalDevice, instance: &Instance) -> DeviceFeatures {
let mut output = FeaturesFfi::default(); let mut output = DeviceFeaturesFfi::default();
let fns = instance.fns(); let fns = instance.fns();
(fns.v1_0.get_physical_device_features)(handle, &mut output.head_as_mut().features); (fns.v1_0.get_physical_device_features)(handle, &mut output.head_as_mut().features);
Features::from(&output) DeviceFeatures::from(&output)
} }
unsafe fn get_features2( unsafe fn get_features2(
@ -207,8 +210,8 @@ impl PhysicalDevice {
instance: &Instance, instance: &Instance,
api_version: Version, api_version: Version,
supported_extensions: &DeviceExtensions, supported_extensions: &DeviceExtensions,
) -> Features { ) -> DeviceFeatures {
let mut output = FeaturesFfi::default(); let mut output = DeviceFeaturesFfi::default();
output.make_chain( output.make_chain(
api_version, api_version,
supported_extensions, supported_extensions,
@ -224,7 +227,7 @@ impl PhysicalDevice {
.get_physical_device_features2_khr)(handle, output.head_as_mut()); .get_physical_device_features2_khr)(handle, output.head_as_mut());
} }
Features::from(&output) DeviceFeatures::from(&output)
} }
unsafe fn get_properties( unsafe fn get_properties(
@ -232,8 +235,8 @@ impl PhysicalDevice {
instance: &Instance, instance: &Instance,
api_version: Version, api_version: Version,
supported_extensions: &DeviceExtensions, supported_extensions: &DeviceExtensions,
) -> Properties { ) -> DeviceProperties {
let mut output = PropertiesFfi::default(); let mut output = DevicePropertiesFfi::default();
output.make_chain( output.make_chain(
api_version, api_version,
supported_extensions, supported_extensions,
@ -243,7 +246,7 @@ impl PhysicalDevice {
let fns = instance.fns(); let fns = instance.fns();
(fns.v1_0.get_physical_device_properties)(handle, &mut output.head_as_mut().properties); (fns.v1_0.get_physical_device_properties)(handle, &mut output.head_as_mut().properties);
Properties::from(&output) DeviceProperties::from(&output)
} }
unsafe fn get_properties2( unsafe fn get_properties2(
@ -251,8 +254,8 @@ impl PhysicalDevice {
instance: &Instance, instance: &Instance,
api_version: Version, api_version: Version,
supported_extensions: &DeviceExtensions, supported_extensions: &DeviceExtensions,
) -> Properties { ) -> DeviceProperties {
let mut output = PropertiesFfi::default(); let mut output = DevicePropertiesFfi::default();
output.make_chain( output.make_chain(
api_version, api_version,
supported_extensions, supported_extensions,
@ -268,7 +271,7 @@ impl PhysicalDevice {
.get_physical_device_properties2_khr)(handle, output.head_as_mut()); .get_physical_device_properties2_khr)(handle, output.head_as_mut());
} }
Properties::from(&output) DeviceProperties::from(&output)
} }
unsafe fn get_memory_properties( unsafe fn get_memory_properties(
@ -384,7 +387,7 @@ impl PhysicalDevice {
/// Returns the properties reported by the physical device. /// Returns the properties reported by the physical device.
#[inline] #[inline]
pub fn properties(&self) -> &Properties { pub fn properties(&self) -> &DeviceProperties {
&self.properties &self.properties
} }
@ -402,7 +405,7 @@ impl PhysicalDevice {
/// Returns the features that are supported by the physical device. /// Returns the features that are supported by the physical device.
#[inline] #[inline]
pub fn supported_features(&self) -> &Features { pub fn supported_features(&self) -> &DeviceFeatures {
&self.supported_features &self.supported_features
} }

View File

@ -49,7 +49,7 @@ impl PrivateDataSlot {
) -> Result<(), Box<ValidationError>> { ) -> Result<(), Box<ValidationError>> {
if !device.enabled_features().private_data { if !device.enabled_features().private_data {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"private_data", "private_data",
)])]), )])]),
vuids: &["VUID-vkCreatePrivateDataSlot-privateData-04564"], vuids: &["VUID-vkCreatePrivateDataSlot-privateData-04564"],

View File

@ -98,9 +98,9 @@ include!(concat!(env!("OUT_DIR"), "/formats.rs"));
impl Format { impl Format {
/// Returns whether the format can be used with a storage image, without specifying /// Returns whether the format can be used with a storage image, without specifying
/// the format in the shader, if the /// the format in the shader, if the
/// [`shader_storage_image_read_without_format`](crate::device::Features::shader_storage_image_read_without_format) /// [`shader_storage_image_read_without_format`](crate::device::DeviceFeatures::shader_storage_image_read_without_format)
/// and/or /// and/or
/// [`shader_storage_image_write_without_format`](crate::device::Features::shader_storage_image_write_without_format) /// [`shader_storage_image_write_without_format`](crate::device::DeviceFeatures::shader_storage_image_write_without_format)
/// features are enabled on the device. /// features are enabled on the device.
#[inline] #[inline]
pub fn shader_storage_image_without_format(self) -> bool { pub fn shader_storage_image_without_format(self) -> bool {

View File

@ -989,7 +989,7 @@ vulkan_bitflags! {
/// The [`sparse_binding`] feature must be enabled on the device. /// The [`sparse_binding`] feature must be enabled on the device.
/// ///
/// [`bind_memory`]: sys::RawImage::bind_memory /// [`bind_memory`]: sys::RawImage::bind_memory
/// [`sparse_binding`]: crate::device::Features::sparse_binding /// [`sparse_binding`]: crate::device::DeviceFeatures::sparse_binding
SPARSE_BINDING = SPARSE_BINDING,*/ SPARSE_BINDING = SPARSE_BINDING,*/
/* TODO: enable /* TODO: enable
@ -1004,13 +1004,13 @@ vulkan_bitflags! {
/// [`sparse_residency16_samples`], corresponding to the sample count of the image, must /// [`sparse_residency16_samples`], corresponding to the sample count of the image, must
/// be enabled on the device. /// be enabled on the device.
/// ///
/// [`sparse_binding`]: crate::device::Features::sparse_binding /// [`sparse_binding`]: crate::device::DeviceFeatures::sparse_binding
/// [`sparse_residency_image2_d`]: crate::device::Features::sparse_residency_image2_d /// [`sparse_residency_image2_d`]: crate::device::DeviceFeatures::sparse_residency_image2_d
/// [`sparse_residency_image2_3`]: crate::device::Features::sparse_residency_image3_d /// [`sparse_residency_image2_3`]: crate::device::DeviceFeatures::sparse_residency_image3_d
/// [`sparse_residency2_samples`]: crate::device::Features::sparse_residency2_samples /// [`sparse_residency2_samples`]: crate::device::DeviceFeatures::sparse_residency2_samples
/// [`sparse_residency4_samples`]: crate::device::Features::sparse_residency4_samples /// [`sparse_residency4_samples`]: crate::device::DeviceFeatures::sparse_residency4_samples
/// [`sparse_residency8_samples`]: crate::device::Features::sparse_residency8_samples /// [`sparse_residency8_samples`]: crate::device::DeviceFeatures::sparse_residency8_samples
/// [`sparse_residency16_samples`]: crate::device::Features::sparse_residency16_samples /// [`sparse_residency16_samples`]: crate::device::DeviceFeatures::sparse_residency16_samples
SPARSE_RESIDENCY = SPARSE_RESIDENCY,*/ SPARSE_RESIDENCY = SPARSE_RESIDENCY,*/
/* TODO: enable /* TODO: enable
@ -1020,7 +1020,7 @@ vulkan_bitflags! {
/// ///
/// The [`sparse_residency_aliased`] feature must be enabled on the device. /// The [`sparse_residency_aliased`] feature must be enabled on the device.
/// ///
/// [`sparse_residency_aliased`]: crate::device::Features::sparse_residency_aliased /// [`sparse_residency_aliased`]: crate::device::DeviceFeatures::sparse_residency_aliased
SPARSE_ALIASED = SPARSE_ALIASED,*/ SPARSE_ALIASED = SPARSE_ALIASED,*/
/// For non-multi-planar formats, whether an image view wrapping the image can have a /// For non-multi-planar formats, whether an image view wrapping the image can have a
@ -1067,7 +1067,7 @@ vulkan_bitflags! {
/// [`ImageViewType::Dim2dArray`]: crate::image::view::ImageViewType::Dim2dArray /// [`ImageViewType::Dim2dArray`]: crate::image::view::ImageViewType::Dim2dArray
/// [`DIM2D_VIEW_COMPATIBLE`]: ImageCreateFlags::DIM2D_VIEW_COMPATIBLE /// [`DIM2D_VIEW_COMPATIBLE`]: ImageCreateFlags::DIM2D_VIEW_COMPATIBLE
/// [portability subset]: crate::instance#portability-subset-devices-and-the-enumerate_portability-flag /// [portability subset]: crate::instance#portability-subset-devices-and-the-enumerate_portability-flag
/// [`image_view2_d_on3_d_image`]: crate::device::Features::image_view2_d_on3_d_image /// [`image_view2_d_on3_d_image`]: crate::device::DeviceFeatures::image_view2_d_on3_d_image
DIM2D_ARRAY_COMPATIBLE = TYPE_2D_ARRAY_COMPATIBLE DIM2D_ARRAY_COMPATIBLE = TYPE_2D_ARRAY_COMPATIBLE
RequiresOneOf([ RequiresOneOf([
RequiresAllOf([APIVersion(V1_1)]), RequiresAllOf([APIVersion(V1_1)]),
@ -1148,8 +1148,8 @@ vulkan_bitflags! {
/// ///
/// [`ImageViewType::Dim2d`]: crate::image::view::ImageViewType::Dim2d /// [`ImageViewType::Dim2d`]: crate::image::view::ImageViewType::Dim2d
/// [`DIM2D_ARRAY_COMPATIBLE`]: ImageCreateFlags::DIM2D_ARRAY_COMPATIBLE /// [`DIM2D_ARRAY_COMPATIBLE`]: ImageCreateFlags::DIM2D_ARRAY_COMPATIBLE
/// [`image2_d_view_of3_d`]: crate::device::Features::image2_d_view_of3_d /// [`image2_d_view_of3_d`]: crate::device::DeviceFeatures::image2_d_view_of3_d
/// [`sampler2_d_view_of3_d`]: crate::device::Features::sampler2_d_view_of3_d /// [`sampler2_d_view_of3_d`]: crate::device::DeviceFeatures::sampler2_d_view_of3_d
DIM2D_VIEW_COMPATIBLE = TYPE_2D_VIEW_COMPATIBLE_EXT DIM2D_VIEW_COMPATIBLE = TYPE_2D_VIEW_COMPATIBLE_EXT
RequiresOneOf([ RequiresOneOf([
RequiresAllOf([DeviceExtension(ext_image_2d_view_of_3d)]), RequiresAllOf([DeviceExtension(ext_image_2d_view_of_3d)]),

View File

@ -632,13 +632,13 @@ pub struct SamplerCreateInfo {
/// The bias value to be added to the base LOD before clamping. /// The bias value to be added to the base LOD before clamping.
/// ///
/// The absolute value of the provided value must not exceed the /// The absolute value of the provided value must not exceed the
/// [`max_sampler_lod_bias`](crate::device::Properties::max_sampler_lod_bias) limit of the /// [`max_sampler_lod_bias`](crate::device::DeviceProperties::max_sampler_lod_bias) limit of
/// device. /// the device.
/// ///
/// On [portability /// On [portability
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if `mip_lod_bias` is not `0.0`, the /// devices, if `mip_lod_bias` is not `0.0`, the
/// [`sampler_mip_lod_bias`](crate::device::Features::sampler_mip_lod_bias) /// [`sampler_mip_lod_bias`](crate::device::DeviceFeatures::sampler_mip_lod_bias)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `0.0`. /// The default value is `0.0`.
@ -650,10 +650,11 @@ pub struct SamplerCreateInfo {
/// Anisotropic filtering is a special filtering mode that takes into account the differences /// Anisotropic filtering is a special filtering mode that takes into account the differences
/// in scaling between the horizontal and vertical framebuffer axes. /// in scaling between the horizontal and vertical framebuffer axes.
/// ///
/// If set to `Some`, the [`sampler_anisotropy`](crate::device::Features::sampler_anisotropy) /// If set to `Some`, the
/// feature must be enabled on the device, the provided maximum value must not exceed the /// [`sampler_anisotropy`](crate::device::DeviceFeatures::sampler_anisotropy) feature must
/// [`max_sampler_anisotropy`](crate::device::Properties::max_sampler_anisotropy) limit, and /// be enabled on the device, the provided maximum value must not exceed the
/// the [`Cubic`](Filter::Cubic) filter must not be used. /// [`max_sampler_anisotropy`](crate::device::DeviceProperties::max_sampler_anisotropy) limit,
/// and the [`Cubic`](Filter::Cubic) filter must not be used.
/// ///
/// The default value is `None`. /// The default value is `None`.
pub anisotropy: Option<f32>, pub anisotropy: Option<f32>,
@ -674,7 +675,7 @@ pub struct SamplerCreateInfo {
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if the sampler is going to be used as a mutable sampler (written to descriptor /// devices, if the sampler is going to be used as a mutable sampler (written to descriptor
/// sets rather than being an immutable part of a descriptor set layout), the /// sets rather than being an immutable part of a descriptor set layout), the
/// [`mutable_comparison_samplers`](crate::device::Features::mutable_comparison_samplers) /// [`mutable_comparison_samplers`](crate::device::DeviceFeatures::mutable_comparison_samplers)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `None`. /// The default value is `None`.
@ -859,7 +860,7 @@ impl SamplerCreateInfo {
context: "address_mode".into(), context: "address_mode".into(),
problem: "contains `SamplerAddressMode::MirrorClampToEdge`".into(), problem: "contains `SamplerAddressMode::MirrorClampToEdge`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("sampler_mirror_clamp_to_edge")]), RequiresAllOf(&[Requires::DeviceFeature("sampler_mirror_clamp_to_edge")]),
RequiresAllOf(&[Requires::DeviceExtension( RequiresAllOf(&[Requires::DeviceExtension(
"khr_sampler_mirror_clamp_to_edge", "khr_sampler_mirror_clamp_to_edge",
)]), )]),
@ -896,7 +897,7 @@ impl SamplerCreateInfo {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
`mip_lod_bias` is not zero" `mip_lod_bias` is not zero"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sampler_mip_lod_bias", "sampler_mip_lod_bias",
)])]), )])]),
vuids: &["VUID-VkSamplerCreateInfo-samplerMipLodBias-04467"], vuids: &["VUID-VkSamplerCreateInfo-samplerMipLodBias-04467"],
@ -909,7 +910,7 @@ impl SamplerCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "anisotropy".into(), context: "anisotropy".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sampler_anisotropy", "sampler_anisotropy",
)])]), )])]),
vuids: &["VUID-VkSamplerCreateInfo-anisotropyEnable-01070"], vuids: &["VUID-VkSamplerCreateInfo-anisotropyEnable-01070"],
@ -1035,7 +1036,7 @@ impl SamplerCreateInfo {
context: "reduction_mode".into(), context: "reduction_mode".into(),
problem: "is not `SamplerReductionMode::WeightedAverage`".into(), problem: "is not `SamplerReductionMode::WeightedAverage`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("sampler_filter_minmax")]), RequiresAllOf(&[Requires::DeviceFeature("sampler_filter_minmax")]),
RequiresAllOf(&[Requires::DeviceExtension("ext_sampler_filter_minmax")]), RequiresAllOf(&[Requires::DeviceExtension("ext_sampler_filter_minmax")]),
]), ]),
..Default::default() ..Default::default()
@ -1376,7 +1377,7 @@ vulkan_enum! {
/// Similar to `MirroredRepeat`, except that coordinates are clamped to the range /// Similar to `MirroredRepeat`, except that coordinates are clamped to the range
/// `[-1.0, 1.0]`. /// `[-1.0, 1.0]`.
/// ///
/// The [`sampler_mirror_clamp_to_edge`](crate::device::Features::sampler_mirror_clamp_to_edge) /// The [`sampler_mirror_clamp_to_edge`](crate::device::DeviceFeatures::sampler_mirror_clamp_to_edge)
/// feature or the /// feature or the
/// [`khr_sampler_mirror_clamp_to_edge`](crate::device::DeviceExtensions::khr_sampler_mirror_clamp_to_edge) /// [`khr_sampler_mirror_clamp_to_edge`](crate::device::DeviceExtensions::khr_sampler_mirror_clamp_to_edge)
/// extension must be enabled on the device. /// extension must be enabled on the device.
@ -1444,7 +1445,7 @@ vulkan_enum! {
/// Calculates the minimum of the selected pixels. /// Calculates the minimum of the selected pixels.
/// ///
/// The [`sampler_filter_minmax`](crate::device::Features::sampler_filter_minmax) /// The [`sampler_filter_minmax`](crate::device::DeviceFeatures::sampler_filter_minmax)
/// feature or the /// feature or the
/// [`ext_sampler_filter_minmax`](crate::device::DeviceExtensions::ext_sampler_filter_minmax) /// [`ext_sampler_filter_minmax`](crate::device::DeviceExtensions::ext_sampler_filter_minmax)
/// extension must be enabled on the device. /// extension must be enabled on the device.
@ -1452,7 +1453,7 @@ vulkan_enum! {
/// Calculates the maximum of the selected pixels. /// Calculates the maximum of the selected pixels.
/// ///
/// The [`sampler_filter_minmax`](crate::device::Features::sampler_filter_minmax) /// The [`sampler_filter_minmax`](crate::device::DeviceFeatures::sampler_filter_minmax)
/// feature or the /// feature or the
/// [`ext_sampler_filter_minmax`](crate::device::DeviceExtensions::ext_sampler_filter_minmax) /// [`ext_sampler_filter_minmax`](crate::device::DeviceExtensions::ext_sampler_filter_minmax)
/// extension must be enabled on the device. /// extension must be enabled on the device.
@ -1673,7 +1674,9 @@ mod tests {
*err, *err,
ValidationError { ValidationError {
requires_one_of: RequiresOneOf([ requires_one_of: RequiresOneOf([
RequiresAllOf([Requires::Feature("sampler_mirror_clamp_to_edge")]), RequiresAllOf([Requires::DeviceFeature(
"sampler_mirror_clamp_to_edge"
)]),
RequiresAllOf([Requires::DeviceExtension( RequiresAllOf([Requires::DeviceExtension(
"khr_sampler_mirror_clamp_to_edge" "khr_sampler_mirror_clamp_to_edge"
)],) )],)
@ -1705,7 +1708,7 @@ mod tests {
*err, *err,
ValidationError { ValidationError {
requires_one_of: RequiresOneOf([ requires_one_of: RequiresOneOf([
RequiresAllOf([Requires::Feature("sampler_filter_minmax")]), RequiresAllOf([Requires::DeviceFeature("sampler_filter_minmax")]),
RequiresAllOf([Requires::DeviceExtension("ext_sampler_filter_minmax")]) RequiresAllOf([Requires::DeviceExtension("ext_sampler_filter_minmax")])
],), ],),
.. ..

View File

@ -138,7 +138,7 @@ pub struct SamplerYcbcrConversion {
impl SamplerYcbcrConversion { impl SamplerYcbcrConversion {
/// Creates a new `SamplerYcbcrConversion`. /// Creates a new `SamplerYcbcrConversion`.
/// ///
/// The [`sampler_ycbcr_conversion`](crate::device::Features::sampler_ycbcr_conversion) /// The [`sampler_ycbcr_conversion`](crate::device::DeviceFeatures::sampler_ycbcr_conversion)
/// feature must be enabled on the device. /// feature must be enabled on the device.
#[inline] #[inline]
pub fn new( pub fn new(
@ -156,7 +156,7 @@ impl SamplerYcbcrConversion {
) -> Result<(), Box<ValidationError>> { ) -> Result<(), Box<ValidationError>> {
if !device.enabled_features().sampler_ycbcr_conversion { if !device.enabled_features().sampler_ycbcr_conversion {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sampler_ycbcr_conversion", "sampler_ycbcr_conversion",
)])]), )])]),
vuids: &["VUID-vkCreateSamplerYcbcrConversion-None-01648"], vuids: &["VUID-vkCreateSamplerYcbcrConversion-None-01648"],
@ -909,7 +909,7 @@ mod tests {
if matches!( if matches!(
*err, *err,
ValidationError { ValidationError {
requires_one_of: RequiresOneOf([RequiresAllOf([Requires::Feature( requires_one_of: RequiresOneOf([RequiresAllOf([Requires::DeviceFeature(
"sampler_ycbcr_conversion" "sampler_ycbcr_conversion"
)])]), )])]),
.. ..

View File

@ -1759,7 +1759,7 @@ pub struct ImageCreateInfo {
/// On [portability /// On [portability
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if `samples` is not [`SampleCount::Sample1`] and `array_layers` is not 1, /// devices, if `samples` is not [`SampleCount::Sample1`] and `array_layers` is not 1,
/// the [`multisample_array_image`](crate::device::Features::multisample_array_image) /// the [`multisample_array_image`](crate::device::DeviceFeatures::multisample_array_image)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `1`. /// The default value is `1`.
@ -1775,7 +1775,7 @@ pub struct ImageCreateInfo {
/// On [portability /// On [portability
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if `samples` is not [`SampleCount::Sample1`] and `array_layers` is not 1, /// devices, if `samples` is not [`SampleCount::Sample1`] and `array_layers` is not 1,
/// the [`multisample_array_image`](crate::device::Features::multisample_array_image) /// the [`multisample_array_image`](crate::device::DeviceFeatures::multisample_array_image)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is [`SampleCount::Sample1`]. /// The default value is [`SampleCount::Sample1`].
@ -2212,7 +2212,7 @@ impl ImageCreateInfo {
`samples` is not `SampleCount::Sample1`, and \ `samples` is not `SampleCount::Sample1`, and \
`array_layers` is greater than 1" `array_layers` is greater than 1"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multisample_array_image", "multisample_array_image",
)])]), )])]),
vuids: &["VUID-VkImageCreateInfo-multisampleArrayImage-04460"], vuids: &["VUID-VkImageCreateInfo-multisampleArrayImage-04460"],
@ -2258,7 +2258,7 @@ impl ImageCreateInfo {
problem: "`format` is is a YCbCr format, and \ problem: "`format` is is a YCbCr format, and \
`array_layers` is greater than 1" `array_layers` is greater than 1"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ycbcr_image_arrays", "ycbcr_image_arrays",
)])]), )])]),
vuids: &["VUID-VkImageCreateInfo-format-06413"], vuids: &["VUID-VkImageCreateInfo-format-06413"],
@ -2310,7 +2310,7 @@ impl ImageCreateInfo {
problem: "`usage` contains `ImageUsage::STORAGE`, but \ problem: "`usage` contains `ImageUsage::STORAGE`, but \
`samples` is not `SampleCount::Sample1`" `samples` is not `SampleCount::Sample1`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"shader_storage_image_multisample", "shader_storage_image_multisample",
)])]), )])]),
vuids: &["VUID-VkImageCreateInfo-usage-00968"], vuids: &["VUID-VkImageCreateInfo-usage-00968"],
@ -2530,9 +2530,9 @@ impl ImageCreateInfo {
problem: "`stencil_usage` contains `ImageUsage::STORAGE`, but \ problem: "`stencil_usage` contains `ImageUsage::STORAGE`, but \
`samples` is not `SampleCount::Sample1`" `samples` is not `SampleCount::Sample1`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_storage_image_multisample", Requires::DeviceFeature("shader_storage_image_multisample"),
)])]), ])]),
vuids: &["VUID-VkImageCreateInfo-format-02538"], vuids: &["VUID-VkImageCreateInfo-format-02538"],
..Default::default() ..Default::default()
})); }));
@ -2592,7 +2592,7 @@ impl ImageCreateInfo {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
`flags` contains `ImageCreateFlags::DIM2D_ARRAY_COMPATIBLE`" `flags` contains `ImageCreateFlags::DIM2D_ARRAY_COMPATIBLE`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"image_view2_d_on3_d_image", "image_view2_d_on3_d_image",
)])]), )])]),
vuids: &["VUID-VkImageCreateInfo-imageView2DOn3DImage-04459"], vuids: &["VUID-VkImageCreateInfo-imageView2DOn3DImage-04459"],
@ -3118,7 +3118,7 @@ mod tests {
if matches!( if matches!(
*err, *err,
ValidationError { ValidationError {
requires_one_of: RequiresOneOf([RequiresAllOf([Requires::Feature( requires_one_of: RequiresOneOf([RequiresAllOf([Requires::DeviceFeature(
"shader_storage_image_multisample" "shader_storage_image_multisample"
)])],), )])],),
.. ..

View File

@ -504,7 +504,7 @@ impl ImageView {
`create_info.format` does not have the same components and \ `create_info.format` does not have the same components and \
number of bits per component as `image.format()`" number of bits per component as `image.format()`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"image_view_format_reinterpretation", "image_view_format_reinterpretation",
)])]), )])]),
vuids: &["VUID-VkImageViewCreateInfo-imageViewFormatReinterpretation-04466"], vuids: &["VUID-VkImageViewCreateInfo-imageViewFormatReinterpretation-04466"],
@ -822,7 +822,7 @@ pub struct ImageViewCreateInfo {
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if `format` does not have the same number of components and bits per component as /// devices, if `format` does not have the same number of components and bits per component as
/// the parent image's format, the /// the parent image's format, the
/// [`image_view_format_reinterpretation`](crate::device::Features::image_view_format_reinterpretation) /// [`image_view_format_reinterpretation`](crate::device::DeviceFeatures::image_view_format_reinterpretation)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `Format::UNDEFINED`. /// The default value is `Format::UNDEFINED`.
@ -833,7 +833,7 @@ pub struct ImageViewCreateInfo {
/// On [portability /// On [portability
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if `component_mapping` is not the identity mapping, the /// devices, if `component_mapping` is not the identity mapping, the
/// [`image_view_format_swizzle`](crate::device::Features::image_view_format_swizzle) /// [`image_view_format_swizzle`](crate::device::DeviceFeatures::image_view_format_swizzle)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is [`ComponentMapping::identity()`]. /// The default value is [`ComponentMapping::identity()`].
@ -987,9 +987,9 @@ impl ImageViewCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "view_type".into(), context: "view_type".into(),
problem: "is `ImageViewType::CubeArray`".into(), problem: "is `ImageViewType::CubeArray`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"image_cube_array", Requires::DeviceFeature("image_cube_array"),
)])]), ])]),
vuids: &["VUID-VkImageViewCreateInfo-viewType-01004"], vuids: &["VUID-VkImageViewCreateInfo-viewType-01004"],
})); }));
} }
@ -1032,7 +1032,7 @@ impl ImageViewCreateInfo {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
`component_mapping` is not the identity mapping" `component_mapping` is not the identity mapping"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"image_view_format_swizzle", "image_view_format_swizzle",
)])]), )])]),
vuids: &["VUID-VkImageViewCreateInfo-imageViewFormatSwizzle-04465"], vuids: &["VUID-VkImageViewCreateInfo-imageViewFormatSwizzle-04465"],

View File

@ -545,7 +545,7 @@ vulkan_enum! {
/// The validation layer will reserve and use one descriptor set slot for its own use. /// The validation layer will reserve and use one descriptor set slot for its own use.
/// The limit reported by /// The limit reported by
/// [`max_bound_descriptor_sets`](crate::device::Properties::max_bound_descriptor_sets) /// [`max_bound_descriptor_sets`](crate::device::DeviceProperties::max_bound_descriptor_sets)
/// will be reduced by 1. /// will be reduced by 1.
/// ///
/// `GpuAssisted` must also be enabled. /// `GpuAssisted` must also be enabled.

View File

@ -666,7 +666,7 @@ impl Display for RequiresAllOf {
#[derive(Clone, Copy, Debug, PartialEq, Eq)] #[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Requires { pub enum Requires {
APIVersion(Version), APIVersion(Version),
Feature(&'static str), DeviceFeature(&'static str),
DeviceExtension(&'static str), DeviceExtension(&'static str),
InstanceExtension(&'static str), InstanceExtension(&'static str),
} }
@ -677,7 +677,9 @@ impl Display for Requires {
Requires::APIVersion(Version { major, minor, .. }) => { Requires::APIVersion(Version { major, minor, .. }) => {
write!(f, "Vulkan API version {}.{}", major, minor) write!(f, "Vulkan API version {}.{}", major, minor)
} }
Requires::Feature(feature) => write!(f, "feature `{}`", feature), Requires::DeviceFeature(device_feature) => {
write!(f, "device feature `{}`", device_feature)
}
Requires::DeviceExtension(device_extension) => { Requires::DeviceExtension(device_extension) => {
write!(f, "device extension `{}`", device_extension) write!(f, "device extension `{}`", device_extension)
} }

View File

@ -229,7 +229,7 @@ macro_rules! vulkan_bitflags {
$(RequiresOneOf([ $(RequiresOneOf([
$(RequiresAllOf([ $(RequiresAllOf([
$(APIVersion($api_version:ident) $(,)?)? $(APIVersion($api_version:ident) $(,)?)?
$($(Feature($feature:ident)),+ $(,)?)? $($(DeviceFeature($device_feature:ident)),+ $(,)?)?
$($(DeviceExtension($device_extension:ident)),+ $(,)?)? $($(DeviceExtension($device_extension:ident)),+ $(,)?)?
$($(InstanceExtension($instance_extension:ident)),+ $(,)?)? $($(InstanceExtension($instance_extension:ident)),+ $(,)?)?
])),+ $(,)? ])),+ $(,)?
@ -340,7 +340,7 @@ macro_rules! vulkan_bitflags {
pub(crate) fn validate_device_raw( pub(crate) fn validate_device_raw(
self, self,
#[allow(unused_variables)] device_api_version: crate::Version, #[allow(unused_variables)] device_api_version: crate::Version,
#[allow(unused_variables)] device_features: &crate::device::Features, #[allow(unused_variables)] device_features: &crate::device::DeviceFeatures,
#[allow(unused_variables)] device_extensions: &crate::device::DeviceExtensions, #[allow(unused_variables)] device_extensions: &crate::device::DeviceExtensions,
#[allow(unused_variables)] instance_extensions: &crate::instance::InstanceExtensions, #[allow(unused_variables)] instance_extensions: &crate::instance::InstanceExtensions,
) -> Result<(), Box<crate::ValidationError>> { ) -> Result<(), Box<crate::ValidationError>> {
@ -352,7 +352,7 @@ macro_rules! vulkan_bitflags {
device_api_version >= crate::Version::$api_version, device_api_version >= crate::Version::$api_version,
)? )?
$($( $($(
device_features.$feature, device_features.$device_feature,
)+)? )+)?
$($( $($(
device_extensions.$device_extension, device_extensions.$device_extension,
@ -370,7 +370,7 @@ macro_rules! vulkan_bitflags {
crate::Requires::APIVersion(crate::Version::$api_version), crate::Requires::APIVersion(crate::Version::$api_version),
)? )?
$($( $($(
crate::Requires::Feature(stringify!($feature)), crate::Requires::DeviceFeature(stringify!($device_feature)),
)+)? )+)?
$($( $($(
crate::Requires::DeviceExtension(stringify!($device_extension)), crate::Requires::DeviceExtension(stringify!($device_extension)),
@ -623,7 +623,7 @@ macro_rules! vulkan_enum {
$(RequiresOneOf([ $(RequiresOneOf([
$(RequiresAllOf([ $(RequiresAllOf([
$(APIVersion($api_version:ident) $(,)?)? $(APIVersion($api_version:ident) $(,)?)?
$($(Feature($feature:ident)),+ $(,)?)? $($(DeviceFeature($device_feature:ident)),+ $(,)?)?
$($(DeviceExtension($device_extension:ident)),+ $(,)?)? $($(DeviceExtension($device_extension:ident)),+ $(,)?)?
$($(InstanceExtension($instance_extension:ident)),+ $(,)?)? $($(InstanceExtension($instance_extension:ident)),+ $(,)?)?
])),+ $(,)? ])),+ $(,)?
@ -680,7 +680,7 @@ macro_rules! vulkan_enum {
pub(crate) fn validate_device_raw( pub(crate) fn validate_device_raw(
self, self,
#[allow(unused_variables)] device_api_version: crate::Version, #[allow(unused_variables)] device_api_version: crate::Version,
#[allow(unused_variables)] device_features: &crate::device::Features, #[allow(unused_variables)] device_features: &crate::device::DeviceFeatures,
#[allow(unused_variables)] device_extensions: &crate::device::DeviceExtensions, #[allow(unused_variables)] device_extensions: &crate::device::DeviceExtensions,
#[allow(unused_variables)] instance_extensions: &crate::instance::InstanceExtensions, #[allow(unused_variables)] instance_extensions: &crate::instance::InstanceExtensions,
) -> Result<(), Box<crate::ValidationError>> { ) -> Result<(), Box<crate::ValidationError>> {
@ -694,7 +694,7 @@ macro_rules! vulkan_enum {
device_api_version >= crate::Version::$api_version, device_api_version >= crate::Version::$api_version,
)? )?
$($( $($(
device_features.$feature, device_features.$device_feature,
)+)? )+)?
$($( $($(
device_extensions.$device_extension, device_extensions.$device_extension,
@ -712,7 +712,7 @@ macro_rules! vulkan_enum {
crate::Requires::APIVersion(crate::Version::$api_version), crate::Requires::APIVersion(crate::Version::$api_version),
)? )?
$($( $($(
crate::Requires::Feature(stringify!($feature)), crate::Requires::DeviceFeature(stringify!($device_feature)),
)+)? )+)?
$($( $($(
crate::Requires::DeviceExtension(stringify!($device_extension)), crate::Requires::DeviceExtension(stringify!($device_extension)),
@ -840,7 +840,7 @@ macro_rules! vulkan_bitflags_enum {
$(RequiresOneOf([ $(RequiresOneOf([
$(RequiresAllOf([ $(RequiresAllOf([
$(APIVersion($api_version:ident) $(,)?)? $(APIVersion($api_version:ident) $(,)?)?
$($(Feature($feature:ident)),+ $(,)?)? $($(DeviceFeature($device_feature:ident)),+ $(,)?)?
$($(DeviceExtension($device_extension:ident)),+ $(,)?)? $($(DeviceExtension($device_extension:ident)),+ $(,)?)?
$($(InstanceExtension($instance_extension:ident)),+ $(,)?)? $($(InstanceExtension($instance_extension:ident)),+ $(,)?)?
])),+ $(,)? ])),+ $(,)?
@ -870,7 +870,7 @@ macro_rules! vulkan_bitflags_enum {
$(RequiresOneOf([ $(RequiresOneOf([
$(RequiresAllOf([ $(RequiresAllOf([
$(APIVersion($api_version) ,)? $(APIVersion($api_version) ,)?
$($(Feature($feature)),+ ,)? $($(DeviceFeature($device_feature)),+ ,)?
$($(DeviceExtension($device_extension)),+ ,)? $($(DeviceExtension($device_extension)),+ ,)?
$($(InstanceExtension($instance_extension)),+ ,)? $($(InstanceExtension($instance_extension)),+ ,)?
])),+ , ])),+ ,
@ -893,7 +893,7 @@ macro_rules! vulkan_bitflags_enum {
$(RequiresOneOf([ $(RequiresOneOf([
$(RequiresAllOf([ $(RequiresAllOf([
$(APIVersion($api_version) ,)? $(APIVersion($api_version) ,)?
$($(Feature($feature)),+ ,)? $($(DeviceFeature($device_feature)),+ ,)?
$($(DeviceExtension($device_extension)),+ ,)? $($(DeviceExtension($device_extension)),+ ,)?
$($(InstanceExtension($instance_extension)),+ ,)? $($(InstanceExtension($instance_extension)),+ ,)?
])),+ , ])),+ ,

View File

@ -201,7 +201,7 @@
//! //!
//! [suballocators]: Suballocator //! [suballocators]: Suballocator
//! [hierarchy]: Suballocator#memory-hierarchies //! [hierarchy]: Suballocator#memory-hierarchies
//! [buffer-image granularity]: crate::device::Properties::buffer_image_granularity //! [buffer-image granularity]: crate::device::DeviceProperties::buffer_image_granularity
//! [cyclic references]: Arc#breaking-cycles-with-weak //! [cyclic references]: Arc#breaking-cycles-with-weak
//! [`Rc`]: std::rc::Rc //! [`Rc`]: std::rc::Rc
//! [`mem::forget`]: std::mem::forget //! [`mem::forget`]: std::mem::forget
@ -267,7 +267,7 @@ use std::{
/// [buffer-image granularity]: self#buffer-image-granularity /// [buffer-image granularity]: self#buffer-image-granularity
/// [host-visible]: MemoryPropertyFlags::HOST_VISIBLE /// [host-visible]: MemoryPropertyFlags::HOST_VISIBLE
/// [host-coherent]: MemoryPropertyFlags::HOST_COHERENT /// [host-coherent]: MemoryPropertyFlags::HOST_COHERENT
/// [non-coherent atom size]: crate::device::Properties::non_coherent_atom_size /// [non-coherent atom size]: crate::device::DeviceProperties::non_coherent_atom_size
pub unsafe trait MemoryAllocator: DeviceOwned + Send + Sync + 'static { pub unsafe trait MemoryAllocator: DeviceOwned + Send + Sync + 'static {
/// Finds the most suitable memory type index in `memory_type_bits` using the given `filter`. /// Finds the most suitable memory type index in `memory_type_bits` using the given `filter`.
/// Returns [`None`] if the requirements are too strict and no memory type is able to satisfy /// Returns [`None`] if the requirements are too strict and no memory type is able to satisfy
@ -1676,7 +1676,7 @@ pub struct GenericMemoryAllocatorCreateInfo<'a> {
/// ///
/// [`DEVICE_ADDRESS`]: MemoryAllocateFlags::DEVICE_ADDRESS /// [`DEVICE_ADDRESS`]: MemoryAllocateFlags::DEVICE_ADDRESS
/// [`SHADER_DEVICE_ADDRESS`]: crate::buffer::BufferUsage::SHADER_DEVICE_ADDRESS /// [`SHADER_DEVICE_ADDRESS`]: crate::buffer::BufferUsage::SHADER_DEVICE_ADDRESS
/// [`buffer_device_address`]: crate::device::Features::buffer_device_address /// [`buffer_device_address`]: crate::device::DeviceFeatures::buffer_device_address
/// [`ext_buffer_device_address`]: crate::device::DeviceExtensions::ext_buffer_device_address /// [`ext_buffer_device_address`]: crate::device::DeviceExtensions::ext_buffer_device_address
/// [`khr_device_group`]: crate::device::DeviceExtensions::khr_device_group /// [`khr_device_group`]: crate::device::DeviceExtensions::khr_device_group
pub device_address: bool, pub device_address: bool,

View File

@ -591,7 +591,7 @@ impl DeviceMemory {
/// ///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT /// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`map`]: Self::map /// [`map`]: Self::map
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
#[inline] #[inline]
pub unsafe fn invalidate_range( pub unsafe fn invalidate_range(
&self, &self,
@ -646,7 +646,7 @@ impl DeviceMemory {
/// ///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT /// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`map`]: Self::map /// [`map`]: Self::map
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
#[inline] #[inline]
pub unsafe fn flush_range( pub unsafe fn flush_range(
&self, &self,
@ -965,7 +965,7 @@ impl<'d> MemoryAllocateInfo<'d> {
problem: "refers to a memory type where `property_flags` contains \ problem: "refers to a memory type where `property_flags` contains \
`MemoryPropertyFlags::PROTECTED`" `MemoryPropertyFlags::PROTECTED`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"protected_memory", "protected_memory",
)])]), )])]),
vuids: &["VUID-VkMemoryAllocateInfo-memoryTypeIndex-01872"], vuids: &["VUID-VkMemoryAllocateInfo-memoryTypeIndex-01872"],
@ -982,7 +982,7 @@ impl<'d> MemoryAllocateInfo<'d> {
problem: "refers to a memory type where `property_flags` contains \ problem: "refers to a memory type where `property_flags` contains \
`MemoryPropertyFlags::DEVICE_COHERENT`" `MemoryPropertyFlags::DEVICE_COHERENT`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"device_coherent_memory", "device_coherent_memory",
)])]), )])]),
vuids: &["VUID-vkAllocateMemory-deviceCoherentMemory-02790"], vuids: &["VUID-vkAllocateMemory-deviceCoherentMemory-02790"],
@ -1096,11 +1096,11 @@ impl<'d> MemoryAllocateInfo<'d> {
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[ RequiresAllOf(&[
Requires::APIVersion(Version::V1_2), Requires::APIVersion(Version::V1_2),
Requires::Feature("buffer_device_address"), Requires::DeviceFeature("buffer_device_address"),
]), ]),
RequiresAllOf(&[ RequiresAllOf(&[
Requires::DeviceExtension("khr_buffer_device_address"), Requires::DeviceExtension("khr_buffer_device_address"),
Requires::Feature("buffer_device_address"), Requires::DeviceFeature("buffer_device_address"),
]), ]),
]), ]),
vuids: &["VUID-VkMemoryAllocateInfo-flags-03331"], vuids: &["VUID-VkMemoryAllocateInfo-flags-03331"],
@ -1352,7 +1352,7 @@ vulkan_bitflags! {
/// the device. /// the device.
/// ///
/// [`SHADER_DEVICE_ADDRESS`]: crate::buffer::BufferUsage::SHADER_DEVICE_ADDRESS /// [`SHADER_DEVICE_ADDRESS`]: crate::buffer::BufferUsage::SHADER_DEVICE_ADDRESS
/// [`buffer_device_address`]: crate::device::Features::buffer_device_address /// [`buffer_device_address`]: crate::device::DeviceFeatures::buffer_device_address
/// [`ext_buffer_device_address`]: crate::device::DeviceExtensions::ext_buffer_device_address /// [`ext_buffer_device_address`]: crate::device::DeviceExtensions::ext_buffer_device_address
DEVICE_ADDRESS = DEVICE_ADDRESS, DEVICE_ADDRESS = DEVICE_ADDRESS,
@ -1372,7 +1372,7 @@ pub struct MemoryMapInfo {
/// The default value is `0`. /// The default value is `0`.
/// ///
/// [`allocation_size`]: DeviceMemory::allocation_size /// [`allocation_size`]: DeviceMemory::allocation_size
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
pub offset: DeviceSize, pub offset: DeviceSize,
/// The size (in bytes) of the mapping. /// The size (in bytes) of the mapping.
@ -1385,7 +1385,7 @@ pub struct MemoryMapInfo {
/// The default value is `0`, which must be overridden. /// The default value is `0`, which must be overridden.
/// ///
/// [`allocation_size`]: DeviceMemory::allocation_size /// [`allocation_size`]: DeviceMemory::allocation_size
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
pub size: DeviceSize, pub size: DeviceSize,
pub _ne: crate::NonExhaustive, pub _ne: crate::NonExhaustive,
@ -1584,7 +1584,7 @@ pub struct MappedMemoryRange {
/// ///
/// The default value is `0`. /// The default value is `0`.
/// ///
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
pub offset: DeviceSize, pub offset: DeviceSize,
/// The size (in bytes) of the range. /// The size (in bytes) of the range.
@ -1594,7 +1594,7 @@ pub struct MappedMemoryRange {
/// ///
/// The default value is `0`. /// The default value is `0`.
/// ///
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
pub size: DeviceSize, pub size: DeviceSize,
pub _ne: crate::NonExhaustive, pub _ne: crate::NonExhaustive,
@ -1734,7 +1734,7 @@ impl MappedDeviceMemory {
/// `range` is specified in bytes relative to the start of the memory allocation, and must fall /// `range` is specified in bytes relative to the start of the memory allocation, and must fall
/// within the range of the allocation (`0..allocation_size`). If `memory` was not allocated /// within the range of the allocation (`0..allocation_size`). If `memory` was not allocated
/// from host-coherent memory, then the start and end of `range` must be a multiple of the /// from host-coherent memory, then the start and end of `range` must be a multiple of the
/// [`non_coherent_atom_size`](crate::device::Properties::non_coherent_atom_size) device /// [`non_coherent_atom_size`](crate::device::DeviceProperties::non_coherent_atom_size) device
/// property, but `range.end` can also the memory's `allocation_size`. /// property, but `range.end` can also the memory's `allocation_size`.
/// ///
/// # Panics /// # Panics
@ -1888,7 +1888,7 @@ impl MappedDeviceMemory {
/// `range` is specified in bytes relative to the start of the memory allocation, and must fall /// `range` is specified in bytes relative to the start of the memory allocation, and must fall
/// within the range of the memory mapping given to `new`. If the memory was not allocated /// within the range of the memory mapping given to `new`. If the memory was not allocated
/// from host-coherent memory, then the start and end of `range` must be a multiple of the /// from host-coherent memory, then the start and end of `range` must be a multiple of the
/// [`non_coherent_atom_size`](crate::device::Properties::non_coherent_atom_size) device /// [`non_coherent_atom_size`](crate::device::DeviceProperties::non_coherent_atom_size) device
/// property, but `range.end` can also equal the memory's `allocation_size`. /// property, but `range.end` can also equal the memory's `allocation_size`.
/// ///
/// # Safety /// # Safety
@ -1943,7 +1943,7 @@ impl MappedDeviceMemory {
/// `range` is specified in bytes relative to the start of the memory allocation, and must fall /// `range` is specified in bytes relative to the start of the memory allocation, and must fall
/// within the range of the memory mapping given to `map`. If the memory was not allocated /// within the range of the memory mapping given to `map`. If the memory was not allocated
/// from host-coherent memory, then the start and end of `range` must be a multiple of the /// from host-coherent memory, then the start and end of `range` must be a multiple of the
/// [`non_coherent_atom_size`](crate::device::Properties::non_coherent_atom_size) device /// [`non_coherent_atom_size`](crate::device::DeviceProperties::non_coherent_atom_size) device
/// property, but `range.end` can also equal the memory's `allocation_size`. /// property, but `range.end` can also equal the memory's `allocation_size`.
/// ///
/// # Safety /// # Safety
@ -1993,7 +1993,7 @@ impl MappedDeviceMemory {
/// `range` is specified in bytes relative to the start of the memory allocation, and must fall /// `range` is specified in bytes relative to the start of the memory allocation, and must fall
/// within the range of the memory mapping given to `map`. If the memory was not allocated /// within the range of the memory mapping given to `map`. If the memory was not allocated
/// from host-coherent memory, then the start and end of `range` must be a multiple of the /// from host-coherent memory, then the start and end of `range` must be a multiple of the
/// [`non_coherent_atom_size`](crate::device::Properties::non_coherent_atom_size) device /// [`non_coherent_atom_size`](crate::device::DeviceProperties::non_coherent_atom_size) device
/// property, but `range.end` can also equal the memory's `allocation_size`. /// property, but `range.end` can also equal the memory's `allocation_size`.
/// ///
/// # Safety /// # Safety
@ -2027,7 +2027,7 @@ impl MappedDeviceMemory {
/// `range` is specified in bytes relative to the start of the memory allocation, and must fall /// `range` is specified in bytes relative to the start of the memory allocation, and must fall
/// within the range of the memory mapping given to `map`. If the memory was not allocated /// within the range of the memory mapping given to `map`. If the memory was not allocated
/// from host-coherent memory, then the start and end of `range` must be a multiple of the /// from host-coherent memory, then the start and end of `range` must be a multiple of the
/// [`non_coherent_atom_size`](crate::device::Properties::non_coherent_atom_size) device /// [`non_coherent_atom_size`](crate::device::DeviceProperties::non_coherent_atom_size) device
/// property, but `range.end` can also equal the memory's `allocation_size`. /// property, but `range.end` can also equal the memory's `allocation_size`.
/// ///
/// # Safety /// # Safety

View File

@ -307,7 +307,7 @@ impl ResourceMemory {
/// `memory_range`. /// `memory_range`.
/// ///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT /// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
#[inline] #[inline]
pub unsafe fn invalidate_range( pub unsafe fn invalidate_range(
&self, &self,
@ -341,7 +341,7 @@ impl ResourceMemory {
/// portion of the specified `memory_range`. /// portion of the specified `memory_range`.
/// ///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT /// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`non_coherent_atom_size`]: crate::device::Properties::non_coherent_atom_size /// [`non_coherent_atom_size`]: crate::device::DeviceProperties::non_coherent_atom_size
#[inline] #[inline]
pub unsafe fn flush_range( pub unsafe fn flush_range(
&self, &self,

View File

@ -158,7 +158,7 @@ use std::{
/// You may also want to consider using [the `uniform_buffer_standard_layout` feature]. /// You may also want to consider using [the `uniform_buffer_standard_layout` feature].
/// ///
/// [the `shader` module documentation]: crate::shader /// [the `shader` module documentation]: crate::shader
/// [the `uniform_buffer_standard_layout` feature]: crate::device::Features::uniform_buffer_standard_layout /// [the `uniform_buffer_standard_layout` feature]: crate::device::DeviceFeatures::uniform_buffer_standard_layout
#[repr(C)] #[repr(C)]
pub struct Padded<T, const N: usize> { pub struct Padded<T, const N: usize> {
value: T, value: T,

View File

@ -35,7 +35,7 @@ pub struct ColorBlendState {
/// Sets the logical operation to perform between the incoming fragment color and the existing /// Sets the logical operation to perform between the incoming fragment color and the existing
/// fragment in the framebuffer attachment. /// fragment in the framebuffer attachment.
/// ///
/// If set to `Some`, the [`logic_op`](crate::device::Features::logic_op) feature must be /// If set to `Some`, the [`logic_op`](crate::device::DeviceFeatures::logic_op) feature must be
/// enabled on the device. /// enabled on the device.
/// ///
/// The default value is `None`. /// The default value is `None`.
@ -45,8 +45,9 @@ pub struct ColorBlendState {
/// match the number of color attachments in the subpass. /// match the number of color attachments in the subpass.
/// ///
/// If there are multiple elements, and the `blend` and `color_write_mask` members of each /// If there are multiple elements, and the `blend` and `color_write_mask` members of each
/// element differ, then the [`independent_blend`](crate::device::Features::independent_blend) /// element differ, then the
/// feature must be enabled on the device. /// [`independent_blend`](crate::device::DeviceFeatures::independent_blend) feature must be
/// enabled on the device.
/// ///
/// The default value is empty, /// The default value is empty,
/// which must be overridden if the subpass has color attachments. /// which must be overridden if the subpass has color attachments.
@ -178,7 +179,7 @@ impl ColorBlendState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "logic_op".into(), context: "logic_op".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"logic_op", "logic_op",
)])]), )])]),
vuids: &["VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00606"], vuids: &["VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00606"],
@ -210,9 +211,9 @@ impl ColorBlendState {
index index
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"independent_blend", Requires::DeviceFeature("independent_blend"),
)])]), ])]),
vuids: &["VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605"], vuids: &["VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605"],
..Default::default() ..Default::default()
})); }));
@ -565,8 +566,8 @@ pub struct ColorBlendAttachmentState {
/// and nothing is written. /// and nothing is written.
/// ///
/// If set to anything other than `Fixed(true)`, the /// If set to anything other than `Fixed(true)`, the
/// [`color_write_enable`](crate::device::Features::color_write_enable) feature must be enabled /// [`color_write_enable`](crate::device::DeviceFeatures::color_write_enable) feature must be
/// on the device. /// enabled on the device.
/// ///
/// The default value is `true`. /// The default value is `true`.
pub color_write_enable: bool, pub color_write_enable: bool,
@ -601,7 +602,7 @@ impl ColorBlendAttachmentState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "color_write_enable".into(), context: "color_write_enable".into(),
problem: "is `false`".into(), problem: "is `false`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"color_write_enable", "color_write_enable",
)])]), )])]),
vuids: &["VUID-VkPipelineColorWriteCreateInfoEXT-pAttachments-04801"], vuids: &["VUID-VkPipelineColorWriteCreateInfoEXT-pAttachments-04801"],
@ -768,7 +769,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_color_blend_factor".into(), context: "src_color_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(), problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend", "dual_src_blend",
)])]), )])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-00608"], vuids: &["VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-00608"],
@ -785,7 +786,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_color_blend_factor".into(), context: "dst_color_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(), problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend", "dual_src_blend",
)])]), )])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-00609"], vuids: &["VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-00609"],
@ -802,7 +803,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_alpha_blend_factor".into(), context: "src_alpha_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(), problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend", "dual_src_blend",
)])]), )])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-00610"], vuids: &["VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-00610"],
@ -819,7 +820,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_alpha_blend_factor".into(), context: "dst_alpha_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(), problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend", "dual_src_blend",
)])]), )])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611"], vuids: &["VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611"],
@ -838,7 +839,7 @@ impl AttachmentBlend {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
`src_color_blend_factor` is `BlendFactor::ConstantAlpha` or \ `src_color_blend_factor` is `BlendFactor::ConstantAlpha` or \
`BlendFactor::OneMinusConstantAlpha`".into(), `BlendFactor::OneMinusConstantAlpha`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"constant_alpha_color_blend_factors", "constant_alpha_color_blend_factors",
)])]), )])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04454"], vuids: &["VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04454"],
@ -854,7 +855,7 @@ impl AttachmentBlend {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
`dst_color_blend_factor` is `BlendFactor::ConstantAlpha` or \ `dst_color_blend_factor` is `BlendFactor::ConstantAlpha` or \
`BlendFactor::OneMinusConstantAlpha`".into(), `BlendFactor::OneMinusConstantAlpha`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"constant_alpha_color_blend_factors", "constant_alpha_color_blend_factors",
)])]), )])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04455"], vuids: &["VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04455"],
@ -891,7 +892,7 @@ vulkan_enum! {
/// and produces new inputs to be fed to `BlendOp`. /// and produces new inputs to be fed to `BlendOp`.
/// ///
/// Some operations take `source1` as an input, representing the second source value. The /// Some operations take `source1` as an input, representing the second source value. The
/// [`dual_src_blend`](crate::device::Features::dual_src_blend) feature must be enabled on the /// [`dual_src_blend`](crate::device::DeviceFeatures::dual_src_blend) feature must be enabled on the
/// device when these are used. /// device when these are used.
BlendFactor = BlendFactor(i32); BlendFactor = BlendFactor(i32);
@ -936,7 +937,7 @@ vulkan_enum! {
/// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if this value is used for the `color_source` or `color_destination` blend factors, /// devices, if this value is used for the `color_source` or `color_destination` blend factors,
/// then the /// then the
/// [`constant_alpha_color_blend_factors`](crate::device::Features::constant_alpha_color_blend_factors) /// [`constant_alpha_color_blend_factors`](crate::device::DeviceFeatures::constant_alpha_color_blend_factors)
/// feature must be enabled on the device. /// feature must be enabled on the device.
ConstantAlpha = CONSTANT_ALPHA, ConstantAlpha = CONSTANT_ALPHA,
@ -945,7 +946,7 @@ vulkan_enum! {
/// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if this value is used for the `color_source` or `color_destination` blend factors, /// devices, if this value is used for the `color_source` or `color_destination` blend factors,
/// then the /// then the
/// [`constant_alpha_color_blend_factors`](crate::device::Features::constant_alpha_color_blend_factors) /// [`constant_alpha_color_blend_factors`](crate::device::DeviceFeatures::constant_alpha_color_blend_factors)
/// feature must be enabled on the device. /// feature must be enabled on the device.
OneMinusConstantAlpha = ONE_MINUS_CONSTANT_ALPHA, OneMinusConstantAlpha = ONE_MINUS_CONSTANT_ALPHA,

View File

@ -114,7 +114,7 @@ impl DepthStencilState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "depth_bounds".into(), context: "depth_bounds".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"depth_bounds", "depth_bounds",
)])]), )])]),
vuids: &[ vuids: &[
@ -314,7 +314,7 @@ pub struct StencilOpState {
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if culling is disabled, and the `reference` values of the front and back face /// devices, if culling is disabled, and the `reference` values of the front and back face
/// are not equal, then the /// are not equal, then the
/// [`separate_stencil_mask_ref`](crate::device::Features::separate_stencil_mask_ref) /// [`separate_stencil_mask_ref`](crate::device::DeviceFeatures::separate_stencil_mask_ref)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is [`u32::MAX`]. /// The default value is [`u32::MAX`].

View File

@ -18,7 +18,7 @@ pub struct InputAssemblyState {
/// The default value is [`PrimitiveTopology::TriangleList`]. /// The default value is [`PrimitiveTopology::TriangleList`].
/// ///
/// [`DynamicState::PrimitiveTopology`]: crate::pipeline::DynamicState::PrimitiveTopology /// [`DynamicState::PrimitiveTopology`]: crate::pipeline::DynamicState::PrimitiveTopology
/// [`dynamic_primitive_topology_unrestricted`]: crate::device::Properties::dynamic_primitive_topology_unrestricted /// [`dynamic_primitive_topology_unrestricted`]: crate::device::DeviceProperties::dynamic_primitive_topology_unrestricted
pub topology: PrimitiveTopology, pub topology: PrimitiveTopology,
/// If true, then when drawing with an index buffer, the special index value consisting of the /// If true, then when drawing with an index buffer, the special index value consisting of the
@ -98,9 +98,9 @@ impl InputAssemblyState {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
`topology` is `PrimitiveTopology::TriangleFan`" `topology` is `PrimitiveTopology::TriangleFan`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"triangle_fans", Requires::DeviceFeature("triangle_fans"),
)])]), ])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-triangleFans-04452"], vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-triangleFans-04452"],
..Default::default() ..Default::default()
})); }));
@ -114,9 +114,9 @@ impl InputAssemblyState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "topology".into(), context: "topology".into(),
problem: "is `PrimitiveTopology::*WithAdjacency`".into(), problem: "is `PrimitiveTopology::*WithAdjacency`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"geometry_shader", Requires::DeviceFeature("geometry_shader"),
)])]), ])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00429"], vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00429"],
})); }));
} }
@ -126,9 +126,9 @@ impl InputAssemblyState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "topology".into(), context: "topology".into(),
problem: "is `PrimitiveTopology::PatchList`".into(), problem: "is `PrimitiveTopology::PatchList`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"tessellation_shader", Requires::DeviceFeature("tessellation_shader"),
)])]), ])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00430"], vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00430"],
})); }));
} }
@ -148,9 +148,9 @@ impl InputAssemblyState {
problem: "`topology` is `PrimitiveTopology::*List`, and \ problem: "`topology` is `PrimitiveTopology::*List`, and \
`primitive_restart_enable` is `true`" `primitive_restart_enable` is `true`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"primitive_topology_list_restart", Requires::DeviceFeature("primitive_topology_list_restart"),
)])]), ])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06252"], vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06252"],
..Default::default() ..Default::default()
})); }));
@ -165,9 +165,9 @@ impl InputAssemblyState {
problem: "`topology` is `PrimitiveTopology::PatchList`, and \ problem: "`topology` is `PrimitiveTopology::PatchList`, and \
`primitive_restart_enable` is `true`" `primitive_restart_enable` is `true`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"primitive_topology_patch_list_restart", Requires::DeviceFeature("primitive_topology_patch_list_restart"),
)])]), ])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06253"], vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06253"],
..Default::default() ..Default::default()
})); }));
@ -195,14 +195,14 @@ vulkan_enum! {
/// When enabling primitive restart, "list" topologies require a feature to be enabled on the /// When enabling primitive restart, "list" topologies require a feature to be enabled on the
/// device: /// device:
/// - The `PatchList` topology requires the /// - The `PatchList` topology requires the
/// [`primitive_topology_patch_list_restart`](crate::device::Features::primitive_topology_patch_list_restart) /// [`primitive_topology_patch_list_restart`](crate::device::DeviceFeatures::primitive_topology_patch_list_restart)
/// feature. /// feature.
/// - All other "list" topologies require the /// - All other "list" topologies require the
/// [`primitive_topology_list_restart`](crate::device::Features::primitive_topology_list_restart) /// [`primitive_topology_list_restart`](crate::device::DeviceFeatures::primitive_topology_list_restart)
/// feature. /// feature.
/// ///
/// [`DynamicState::PrimitiveTopology`]: crate::pipeline::DynamicState::PrimitiveTopology /// [`DynamicState::PrimitiveTopology`]: crate::pipeline::DynamicState::PrimitiveTopology
/// [`dynamic_primitive_topology_unrestricted`]: crate::device::Properties::dynamic_primitive_topology_unrestricted /// [`dynamic_primitive_topology_unrestricted`]: crate::device::DeviceProperties::dynamic_primitive_topology_unrestricted
PrimitiveTopology = PrimitiveTopology(i32); PrimitiveTopology = PrimitiveTopology(i32);
/// A series of separate point primitives. /// A series of separate point primitives.
@ -233,38 +233,38 @@ vulkan_enum! {
/// A series of consecutive triangle primitives, with all triangles sharing a common vertex (the first). /// A series of consecutive triangle primitives, with all triangles sharing a common vertex (the first).
/// ///
/// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, the [`triangle_fans`](crate::device::Features::triangle_fans) /// devices, the [`triangle_fans`](crate::device::DeviceFeatures::triangle_fans)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// Topology class: Triangle /// Topology class: Triangle
TriangleFan = TRIANGLE_FAN, TriangleFan = TRIANGLE_FAN,
/// As `LineList, but with adjacency, used in combination with geometry shaders. Requires the /// As `LineList, but with adjacency, used in combination with geometry shaders. Requires the
/// [`geometry_shader`](crate::device::Features::geometry_shader) feature. /// [`geometry_shader`](crate::device::DeviceFeatures::geometry_shader) feature.
/// ///
/// Topology class: Line /// Topology class: Line
LineListWithAdjacency = LINE_LIST_WITH_ADJACENCY, LineListWithAdjacency = LINE_LIST_WITH_ADJACENCY,
/// As `LineStrip`, but with adjacency, used in combination with geometry shaders. Requires the /// As `LineStrip`, but with adjacency, used in combination with geometry shaders. Requires the
/// [`geometry_shader`](crate::device::Features::geometry_shader) feature. /// [`geometry_shader`](crate::device::DeviceFeatures::geometry_shader) feature.
/// ///
/// Topology class: Line /// Topology class: Line
LineStripWithAdjacency = LINE_STRIP_WITH_ADJACENCY, LineStripWithAdjacency = LINE_STRIP_WITH_ADJACENCY,
/// As `TriangleList`, but with adjacency, used in combination with geometry shaders. Requires /// As `TriangleList`, but with adjacency, used in combination with geometry shaders. Requires
/// the [`geometry_shader`](crate::device::Features::geometry_shader) feature. /// the [`geometry_shader`](crate::device::DeviceFeatures::geometry_shader) feature.
/// ///
/// Topology class: Triangle /// Topology class: Triangle
TriangleListWithAdjacency = TRIANGLE_LIST_WITH_ADJACENCY, TriangleListWithAdjacency = TRIANGLE_LIST_WITH_ADJACENCY,
/// As `TriangleStrip`, but with adjacency, used in combination with geometry shaders. Requires /// As `TriangleStrip`, but with adjacency, used in combination with geometry shaders. Requires
/// the [`geometry_shader`](crate::device::Features::geometry_shader) feature. /// the [`geometry_shader`](crate::device::DeviceFeatures::geometry_shader) feature.
/// ///
/// Topology class: Triangle /// Topology class: Triangle
TriangleStripWithAdjacency = TRIANGLE_STRIP_WITH_ADJACENCY, TriangleStripWithAdjacency = TRIANGLE_STRIP_WITH_ADJACENCY,
/// Separate patch primitives, used in combination with tessellation shaders. Requires the /// Separate patch primitives, used in combination with tessellation shaders. Requires the
/// [`tessellation_shader`](crate::device::Features::tessellation_shader) feature. /// [`tessellation_shader`](crate::device::DeviceFeatures::tessellation_shader) feature.
/// ///
/// Topology class: Patch /// Topology class: Patch
PatchList = PATCH_LIST, PatchList = PATCH_LIST,

View File

@ -2124,9 +2124,9 @@ impl GraphicsPipelineCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "subpass".into(), context: "subpass".into(),
problem: "is `PipelineRenderPassType::BeginRendering`".into(), problem: "is `PipelineRenderPassType::BeginRendering`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"dynamic_rendering", Requires::DeviceFeature("dynamic_rendering"),
)])]), ])]),
vuids: &["VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576"], vuids: &["VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576"],
})); }));
} }
@ -2309,7 +2309,7 @@ impl GraphicsPipelineCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "rasterization_state.line_width".into(), context: "rasterization_state.line_width".into(),
problem: "is not 1.0".into(), problem: "is not 1.0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"wide_lines", "wide_lines",
)])]), )])]),
vuids: &["VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749"], vuids: &["VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749"],
@ -2330,9 +2330,9 @@ impl GraphicsPipelineCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "rasterization_state.depth_bias.clamp".into(), context: "rasterization_state.depth_bias.clamp".into(),
problem: "is not 0.0".into(), problem: "is not 0.0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"depth_bias_clamp", Requires::DeviceFeature("depth_bias_clamp"),
)])]), ])]),
vuids: &["VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754"], vuids: &["VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754"],
})); }));
} }
@ -2561,7 +2561,7 @@ impl GraphicsPipelineCreateInfo {
`rasterization_state.cull_mode` is `CullMode::None`, and \ `rasterization_state.cull_mode` is `CullMode::None`, and \
`depth_stencil_state.stencil.front.reference` does not equal \ `depth_stencil_state.stencil.front.reference` does not equal \
`depth_stencil_state.stencil.back.reference`".into(), `depth_stencil_state.stencil.back.reference`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_stencil_mask_ref", "separate_stencil_mask_ref",
)])]), )])]),
vuids: &["VUID-VkPipelineDepthStencilStateCreateInfo-separateStencilMaskRef-04453"], vuids: &["VUID-VkPipelineDepthStencilStateCreateInfo-separateStencilMaskRef-04453"],
@ -2713,9 +2713,9 @@ impl GraphicsPipelineCreateInfo {
problem: "`stages` contains tessellation shaders, and \ problem: "`stages` contains tessellation shaders, and \
`subpass` has a non-zero `view_mask`" `subpass` has a non-zero `view_mask`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"multiview_tessellation_shader", Requires::DeviceFeature("multiview_tessellation_shader"),
)])]), ])]),
vuids: &[ vuids: &[
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06047", "VUID-VkGraphicsPipelineCreateInfo-renderPass-06047",
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06057", "VUID-VkGraphicsPipelineCreateInfo-renderPass-06057",
@ -2731,9 +2731,9 @@ impl GraphicsPipelineCreateInfo {
problem: "`stages` contains a geometry shader, and \ problem: "`stages` contains a geometry shader, and \
`subpass` has a non-zero `view_mask`" `subpass` has a non-zero `view_mask`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"multiview_geometry_shader", Requires::DeviceFeature("multiview_geometry_shader"),
)])]), ])]),
vuids: &[ vuids: &[
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06048", "VUID-VkGraphicsPipelineCreateInfo-renderPass-06048",
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06058", "VUID-VkGraphicsPipelineCreateInfo-renderPass-06058",
@ -2749,9 +2749,9 @@ impl GraphicsPipelineCreateInfo {
problem: "`stages` contains a mesh shader, and \ problem: "`stages` contains a mesh shader, and \
`subpass` has a non-zero `view_mask`" `subpass` has a non-zero `view_mask`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"multiview_mesh_shader", Requires::DeviceFeature("multiview_mesh_shader"),
)])]), ])]),
vuids: &[ vuids: &[
"VUID-VkGraphicsPipelineCreateInfo-renderPass-07064", "VUID-VkGraphicsPipelineCreateInfo-renderPass-07064",
"VUID-VkGraphicsPipelineCreateInfo-renderPass-07720", "VUID-VkGraphicsPipelineCreateInfo-renderPass-07720",

View File

@ -25,7 +25,8 @@ pub struct MultisampleState {
/// samples will run through the shader and the other half will get their values from the /// samples will run through the shader and the other half will get their values from the
/// ones which went through the shader. /// ones which went through the shader.
/// ///
/// If set to `Some`, the [`sample_rate_shading`](crate::device::Features::sample_rate_shading) /// If set to `Some`, the
/// [`sample_rate_shading`](crate::device::DeviceFeatures::sample_rate_shading)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `None`. /// The default value is `None`.
@ -49,7 +50,7 @@ pub struct MultisampleState {
/// Controls whether the alpha value of all the samples will be forced to 1.0 (or the /// Controls whether the alpha value of all the samples will be forced to 1.0 (or the
/// maximum possible value) after the effects of `alpha_to_coverage` have been applied. /// maximum possible value) after the effects of `alpha_to_coverage` have been applied.
/// ///
/// If set to `true`, the [`alpha_to_one`](crate::device::Features::alpha_to_one) /// If set to `true`, the [`alpha_to_one`](crate::device::DeviceFeatures::alpha_to_one)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `false`. /// The default value is `false`.
@ -103,7 +104,7 @@ impl MultisampleState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "min_sample_shading".into(), context: "min_sample_shading".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sample_rate_shading", "sample_rate_shading",
)])]), )])]),
vuids: &["VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784"], vuids: &["VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784"],
@ -124,7 +125,7 @@ impl MultisampleState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "alpha_to_one_enable".into(), context: "alpha_to_one_enable".into(),
problem: "is `true`".into(), problem: "is `true`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"alpha_to_one", "alpha_to_one",
)])]), )])]),
vuids: &["VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785"], vuids: &["VUID-VkPipelineMultisampleStateCreateInfo-alphaToOneEnable-00785"],

View File

@ -10,7 +10,7 @@ pub struct RasterizationState {
/// If true, then the depth value of the vertices will be clamped to the range [0.0, 1.0]. If /// If true, then the depth value of the vertices will be clamped to the range [0.0, 1.0]. If
/// false, fragments whose depth is outside of this range will be discarded. /// false, fragments whose depth is outside of this range will be discarded.
/// ///
/// If enabled, the [`depth_clamp`](crate::device::Features::depth_clamp) feature must be /// If enabled, the [`depth_clamp`](crate::device::DeviceFeatures::depth_clamp) feature must be
/// enabled on the device. /// enabled on the device.
/// ///
/// The default value is `false`. /// The default value is `false`.
@ -27,7 +27,7 @@ pub struct RasterizationState {
/// into points. /// into points.
/// ///
/// If set to a value other than `Fill`, the /// If set to a value other than `Fill`, the
/// [`fill_mode_non_solid`](crate::device::Features::fill_mode_non_solid) feature must be /// [`fill_mode_non_solid`](crate::device::DeviceFeatures::fill_mode_non_solid) feature must be
/// enabled on the device. /// enabled on the device.
/// ///
/// The default value is [`PolygonMode::Fill`]. /// The default value is [`PolygonMode::Fill`].
@ -54,7 +54,7 @@ pub struct RasterizationState {
/// Width, in pixels, of lines when drawing lines. /// Width, in pixels, of lines when drawing lines.
/// ///
/// Setting this to a value other than 1.0 requires the /// Setting this to a value other than 1.0 requires the
/// [`wide_lines`](crate::device::Features::wide_lines) feature to be enabled on /// [`wide_lines`](crate::device::DeviceFeatures::wide_lines) feature to be enabled on
/// the device. /// the device.
/// ///
/// The default value is `1.0`. /// The default value is `1.0`.
@ -162,7 +162,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "depth_clamp_enable".into(), context: "depth_clamp_enable".into(),
problem: "is `true`".into(), problem: "is `true`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"depth_clamp", "depth_clamp",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782"], vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782"],
@ -173,7 +173,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "polygon_mode".into(), context: "polygon_mode".into(),
problem: "is not `PolygonMode::Fill`".into(), problem: "is not `PolygonMode::Fill`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fill_mode_non_solid", "fill_mode_non_solid",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01507"], vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01507"],
@ -190,7 +190,7 @@ impl RasterizationState {
`rasterizer_discard_enable` is `false`, and \ `rasterizer_discard_enable` is `false`, and \
`polygon_mode` is `PolygonMode::Point`" `polygon_mode` is `PolygonMode::Point`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"point_polygons", "point_polygons",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-pointPolygons-04458"], vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-pointPolygons-04458"],
@ -227,7 +227,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "line_rasterization_mode".into(), context: "line_rasterization_mode".into(),
problem: "is `LineRasterizationMode::Rectangular`".into(), problem: "is `LineRasterizationMode::Rectangular`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"rectangular_lines", "rectangular_lines",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02768"], vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02768"],
@ -239,7 +239,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "line_rasterization_mode".into(), context: "line_rasterization_mode".into(),
problem: "is `LineRasterizationMode::Bresenham`".into(), problem: "is `LineRasterizationMode::Bresenham`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"bresenham_lines", "bresenham_lines",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02769"], vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02769"],
@ -251,7 +251,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "line_rasterization_mode".into(), context: "line_rasterization_mode".into(),
problem: "is `LineRasterizationMode::RectangularSmooth`".into(), problem: "is `LineRasterizationMode::RectangularSmooth`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"smooth_lines", "smooth_lines",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02770"], vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02770"],
@ -280,7 +280,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \ problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \ `line_rasterization_mode` is \
`LineRasterizationMode::Default`".into(), `LineRasterizationMode::Default`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_rectangular_lines", "stippled_rectangular_lines",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02774"], vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02774"],
@ -305,7 +305,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \ problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \ `line_rasterization_mode` is \
`LineRasterizationMode::Rectangular`".into(), `LineRasterizationMode::Rectangular`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_rectangular_lines", "stippled_rectangular_lines",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02771"], vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02771"],
@ -319,7 +319,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \ problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \ `line_rasterization_mode` is \
`LineRasterizationMode::Bresenham`".into(), `LineRasterizationMode::Bresenham`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_bresenham_lines", "stippled_bresenham_lines",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02772"], vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02772"],
@ -333,7 +333,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \ problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \ `line_rasterization_mode` is \
`LineRasterizationMode::RectangularSmooth`".into(), `LineRasterizationMode::RectangularSmooth`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_smooth_lines", "stippled_smooth_lines",
)])]), )])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02773"], vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02773"],
@ -359,8 +359,8 @@ pub struct DepthBiasState {
/// The maximum (or minimum) depth bias of a fragment. /// The maximum (or minimum) depth bias of a fragment.
/// ///
/// Setting this to a value other than 0.0 requires the /// Setting this to a value other than 0.0 requires the
/// [`depth_bias_clamp`](crate::device::Features::depth_bias_clamp) feature to be enabled on /// [`depth_bias_clamp`](crate::device::DeviceFeatures::depth_bias_clamp) feature to be enabled
/// the device. /// on the device.
/// ///
/// The default value is `0.0`. /// The default value is `0.0`.
pub clamp: f32, pub clamp: f32,
@ -450,7 +450,7 @@ vulkan_enum! {
// TODO: document further // TODO: document further
/// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, unless `rasterizer_discard_enable` is active, the /// devices, unless `rasterizer_discard_enable` is active, the
/// [`point_polygons`](crate::device::Features::point_polygons) /// [`point_polygons`](crate::device::DeviceFeatures::point_polygons)
/// feature must be enabled on the device. /// feature must be enabled on the device.
Point = POINT, Point = POINT,
@ -475,36 +475,36 @@ vulkan_enum! {
/// The rasterization mode to use for lines. /// The rasterization mode to use for lines.
LineRasterizationMode = LineRasterizationModeEXT(i32); LineRasterizationMode = LineRasterizationModeEXT(i32);
/// If the [`strict_lines`](crate::device::Properties::strict_lines) device property is `true`, /// If the [`strict_lines`](crate::device::DeviceProperties::strict_lines) device property is `true`,
/// then this is the same as `Rectangular`. Otherwise, lines are drawn as parallelograms. /// then this is the same as `Rectangular`. Otherwise, lines are drawn as parallelograms.
/// ///
/// If [`RasterizationState::line_stipple`] is `Some`, then the /// If [`RasterizationState::line_stipple`] is `Some`, then the
/// [`strict_lines`](crate::device::Properties::strict_lines) property must be `true` and the /// [`strict_lines`](crate::device::DeviceProperties::strict_lines) property must be `true` and the
/// [`stippled_rectangular_lines`](crate::device::Features::stippled_rectangular_lines) feature /// [`stippled_rectangular_lines`](crate::device::DeviceFeatures::stippled_rectangular_lines) feature
/// must be enabled on the device. /// must be enabled on the device.
Default = DEFAULT, Default = DEFAULT,
/// Lines are drawn as if they were rectangles extruded from the line. /// Lines are drawn as if they were rectangles extruded from the line.
/// ///
/// The [`rectangular_lines`](crate::device::Features::rectangular_lines) feature must be /// The [`rectangular_lines`](crate::device::DeviceFeatures::rectangular_lines) feature must be
/// enabled on the device. If [`RasterizationState::line_stipple`] is `Some`, then the /// enabled on the device. If [`RasterizationState::line_stipple`] is `Some`, then the
/// [`stippled_rectangular_lines`](crate::device::Features::stippled_rectangular_lines) must /// [`stippled_rectangular_lines`](crate::device::DeviceFeatures::stippled_rectangular_lines) must
/// also be enabled. /// also be enabled.
Rectangular = RECTANGULAR, Rectangular = RECTANGULAR,
/// Lines are drawn by determining which pixel diamonds the line intersects and exits. /// Lines are drawn by determining which pixel diamonds the line intersects and exits.
/// ///
/// The [`bresenham_lines`](crate::device::Features::bresenham_lines) feature must be /// The [`bresenham_lines`](crate::device::DeviceFeatures::bresenham_lines) feature must be
/// enabled on the device. If [`RasterizationState::line_stipple`] is `Some`, then the /// enabled on the device. If [`RasterizationState::line_stipple`] is `Some`, then the
/// [`stippled_bresenham_lines`](crate::device::Features::stippled_bresenham_lines) must /// [`stippled_bresenham_lines`](crate::device::DeviceFeatures::stippled_bresenham_lines) must
/// also be enabled. /// also be enabled.
Bresenham = BRESENHAM, Bresenham = BRESENHAM,
/// As `Rectangular`, but with alpha falloff. /// As `Rectangular`, but with alpha falloff.
/// ///
/// The [`smooth_lines`](crate::device::Features::smooth_lines) feature must be /// The [`smooth_lines`](crate::device::DeviceFeatures::smooth_lines) feature must be
/// enabled on the device. If [`RasterizationState::line_stipple`] is `Some`, then the /// enabled on the device. If [`RasterizationState::line_stipple`] is `Some`, then the
/// [`stippled_smooth_lines`](crate::device::Features::stippled_smooth_lines) must /// [`stippled_smooth_lines`](crate::device::DeviceFeatures::stippled_smooth_lines) must
/// also be enabled. /// also be enabled.
RectangularSmooth = RECTANGULAR_SMOOTH, RectangularSmooth = RECTANGULAR_SMOOTH,
} }

View File

@ -35,8 +35,8 @@ pub struct PipelineRenderingCreateInfo {
/// indices that are rendered to. The value is a bitmask, so that that for example `0b11` will /// indices that are rendered to. The value is a bitmask, so that that for example `0b11` will
/// draw to the first two views and `0b101` will draw to the first and third view. /// draw to the first two views and `0b101` will draw to the first and third view.
/// ///
/// If set to a nonzero value, the [`multiview`](crate::device::Features::multiview) feature /// If set to a nonzero value, the [`multiview`](crate::device::DeviceFeatures::multiview)
/// must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `0`. /// The default value is `0`.
pub view_mask: u32, pub view_mask: u32,
@ -151,7 +151,9 @@ impl PipelineRenderingCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "view_mask".into(), context: "view_mask".into(),
problem: "is not zero".into(), problem: "is not zero".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature("multiview")])]), requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multiview",
)])]),
vuids: &["VUID-VkGraphicsPipelineCreateInfo-multiview-06577"], vuids: &["VUID-VkGraphicsPipelineCreateInfo-multiview-06577"],
})); }));
} }

View File

@ -42,8 +42,8 @@ impl BuffersDefinition {
/// `divisor` can be 0 if the [`vertex_attribute_instance_rate_zero_divisor`] feature is also /// `divisor` can be 0 if the [`vertex_attribute_instance_rate_zero_divisor`] feature is also
/// enabled. This means that every vertex will use the same vertex and instance data. /// enabled. This means that every vertex will use the same vertex and instance data.
/// ///
/// [`vertex_attribute_instance_rate_divisor`]: crate::device::Features::vertex_attribute_instance_rate_divisor /// [`vertex_attribute_instance_rate_divisor`]: crate::device::DeviceFeatures::vertex_attribute_instance_rate_divisor
/// [`vertex_attribute_instance_rate_zero_divisor`]: crate::device::Features::vertex_attribute_instance_rate_zero_divisor /// [`vertex_attribute_instance_rate_zero_divisor`]: crate::device::DeviceFeatures::vertex_attribute_instance_rate_zero_divisor
pub fn instance_with_divisor<V: Vertex>(mut self, divisor: u32) -> Self { pub fn instance_with_divisor<V: Vertex>(mut self, divisor: u32) -> Self {
self.0.push(V::per_instance_with_divisor(divisor)); self.0.push(V::per_instance_with_divisor(divisor));
self self

View File

@ -288,7 +288,7 @@ impl VertexInputState {
location, location,
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"vertex_attribute_access_beyond_stride", "vertex_attribute_access_beyond_stride",
)])]), )])]),
vuids: &[ vuids: &[
@ -538,7 +538,7 @@ impl VertexInputBindingDescription {
context: "input_rate".into(), context: "input_rate".into(),
problem: "is `VertexInputRate::Instance`, and \ problem: "is `VertexInputRate::Instance`, and \
its `divisor` value is not 1".into(), its `divisor` value is not 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"vertex_attribute_instance_rate_divisor", "vertex_attribute_instance_rate_divisor",
)])]), )])]),
vuids: &[ vuids: &[
@ -557,7 +557,7 @@ impl VertexInputBindingDescription {
context: "input_rate".into(), context: "input_rate".into(),
problem: "is `VertexInputRate::Instance`, and \ problem: "is `VertexInputRate::Instance`, and \
its `divisor` value is 0".into(), its `divisor` value is 0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"vertex_attribute_instance_rate_zero_divisor", "vertex_attribute_instance_rate_zero_divisor",
)])]), )])]),
vuids: &[ vuids: &[
@ -607,7 +607,7 @@ pub struct VertexInputAttributeDescription {
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, if the sum of `offset + format.block_size()` is greater than the `stride` of /// devices, if the sum of `offset + format.block_size()` is greater than the `stride` of
/// `binding`, the /// `binding`, the
/// [`vertex_attribute_access_beyond_stride`](crate::device::Features::vertex_attribute_access_beyond_stride) /// [`vertex_attribute_access_beyond_stride`](crate::device::DeviceFeatures::vertex_attribute_access_beyond_stride)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `0`. /// The default value is `0`.
@ -709,8 +709,8 @@ pub enum VertexInputRate {
/// `divisor` can be 0 if the [`vertex_attribute_instance_rate_zero_divisor`] feature is also /// `divisor` can be 0 if the [`vertex_attribute_instance_rate_zero_divisor`] feature is also
/// enabled. This means that every vertex will use the same vertex and instance data. /// enabled. This means that every vertex will use the same vertex and instance data.
/// ///
/// [`vertex_attribute_instance_rate_divisor`]: crate::device::Features::vertex_attribute_instance_rate_divisor /// [`vertex_attribute_instance_rate_divisor`]: crate::device::DeviceFeatures::vertex_attribute_instance_rate_divisor
/// [`vertex_attribute_instance_rate_zero_divisor`]: crate::device::Features::vertex_attribute_instance_rate_zero_divisor /// [`vertex_attribute_instance_rate_zero_divisor`]: crate::device::DeviceFeatures::vertex_attribute_instance_rate_zero_divisor
Instance { divisor: u32 }, Instance { divisor: u32 },
} }

View File

@ -185,7 +185,7 @@ impl ViewportState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "viewports".into(), context: "viewports".into(),
problem: "the length is greater than 1".into(), problem: "the length is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216"], vuids: &["VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216"],
@ -196,7 +196,7 @@ impl ViewportState {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "scissors".into(), context: "scissors".into(),
problem: "the length is greater than 1".into(), problem: "the length is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_viewport", "multi_viewport",
)])]), )])]),
vuids: &["VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217"], vuids: &["VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217"],

View File

@ -61,7 +61,7 @@ use crate::{
DescriptorSetLayout, DescriptorSetLayoutBinding, DescriptorSetLayoutCreateFlags, DescriptorSetLayout, DescriptorSetLayoutBinding, DescriptorSetLayoutCreateFlags,
DescriptorSetLayoutCreateInfo, DescriptorType, DescriptorSetLayoutCreateInfo, DescriptorType,
}, },
device::{Device, DeviceOwned, DeviceOwnedDebugWrapper, Properties}, device::{Device, DeviceOwned, DeviceOwnedDebugWrapper, DeviceProperties},
instance::InstanceOwnedDebugWrapper, instance::InstanceOwnedDebugWrapper,
macros::{impl_id_counter, vulkan_bitflags}, macros::{impl_id_counter, vulkan_bitflags},
shader::{DescriptorBindingRequirements, ShaderStage, ShaderStages}, shader::{DescriptorBindingRequirements, ShaderStage, ShaderStages},
@ -465,10 +465,10 @@ impl PipelineLayoutCreateInfo {
struct DescriptorLimit { struct DescriptorLimit {
descriptor_types: &'static [DescriptorType], descriptor_types: &'static [DescriptorType],
get_limit_all: fn(&Properties) -> Option<u32>, get_limit_all: fn(&DeviceProperties) -> Option<u32>,
limit_name_all: &'static str, limit_name_all: &'static str,
vuids_all: &'static [&'static str], vuids_all: &'static [&'static str],
get_limit_not_uab: fn(&Properties) -> u32, get_limit_not_uab: fn(&DeviceProperties) -> u32,
limit_name_not_uab: &'static str, limit_name_not_uab: &'static str,
vuids_not_uab: &'static [&'static str], vuids_not_uab: &'static [&'static str],
} }

View File

@ -26,12 +26,12 @@ pub struct PipelineShaderStageCreateInfo {
/// The required subgroup size. /// The required subgroup size.
/// ///
/// Requires [`subgroup_size_control`](crate::device::Features::subgroup_size_control). The /// Requires [`subgroup_size_control`](crate::device::DeviceFeatures::subgroup_size_control).
/// shader stage must be included in /// The shader stage must be included in
/// [`required_subgroup_size_stages`](crate::device::Properties::required_subgroup_size_stages). /// [`required_subgroup_size_stages`](crate::device::DeviceProperties::required_subgroup_size_stages).
/// Subgroup size must be power of 2 and within /// Subgroup size must be power of 2 and within
/// [`min_subgroup_size`](crate::device::Properties::min_subgroup_size) /// [`min_subgroup_size`](crate::device::DeviceProperties::min_subgroup_size)
/// and [`max_subgroup_size`](crate::device::Properties::max_subgroup_size). /// and [`max_subgroup_size`](crate::device::DeviceProperties::max_subgroup_size).
/// ///
/// For compute shaders, `max_compute_workgroup_subgroups * required_subgroup_size` must be /// For compute shaders, `max_compute_workgroup_subgroups * required_subgroup_size` must be
/// greater than or equal to `workgroup_size.x * workgroup_size.y * workgroup_size.z`. /// greater than or equal to `workgroup_size.x * workgroup_size.y * workgroup_size.z`.
@ -104,9 +104,9 @@ impl PipelineShaderStageCreateInfo {
problem: "specifies a `ShaderStage::TessellationControl` or \ problem: "specifies a `ShaderStage::TessellationControl` or \
`ShaderStage::TessellationEvaluation` entry point" `ShaderStage::TessellationEvaluation` entry point"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"tessellation_shader", Requires::DeviceFeature("tessellation_shader"),
)])]), ])]),
vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-00705"], vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-00705"],
})); }));
} }
@ -119,9 +119,9 @@ impl PipelineShaderStageCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "entry_point".into(), context: "entry_point".into(),
problem: "specifies a `ShaderStage::Geometry` entry point".into(), problem: "specifies a `ShaderStage::Geometry` entry point".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"geometry_shader", Requires::DeviceFeature("geometry_shader"),
)])]), ])]),
vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-00704"], vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-00704"],
})); }));
} }
@ -148,9 +148,9 @@ impl PipelineShaderStageCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "entry_point".into(), context: "entry_point".into(),
problem: "specifies a `ShaderStage::Mesh` entry point".into(), problem: "specifies a `ShaderStage::Mesh` entry point".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"mesh_shader", Requires::DeviceFeature("mesh_shader"),
)])]), ])]),
vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-02091"], vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-02091"],
})); }));
} }
@ -160,9 +160,9 @@ impl PipelineShaderStageCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "entry_point".into(), context: "entry_point".into(),
problem: "specifies a `ShaderStage::Task` entry point".into(), problem: "specifies a `ShaderStage::Task` entry point".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"task_shader", Requires::DeviceFeature("task_shader"),
)])]), ])]),
vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-02092"], vuids: &["VUID-VkPipelineShaderStageCreateInfo-stage-02092"],
})); }));
} }
@ -415,7 +415,7 @@ impl PipelineShaderStageCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "required_subgroup_size".into(), context: "required_subgroup_size".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subgroup_size_control", "subgroup_size_control",
)])]), )])]),
vuids: &["VUID-VkPipelineShaderStageCreateInfo-pNext-02755"], vuids: &["VUID-VkPipelineShaderStageCreateInfo-pNext-02755"],

View File

@ -1,6 +1,6 @@
use crate::{ use crate::{
descriptor_set::layout::DescriptorType, descriptor_set::layout::DescriptorType,
device::{physical::ShaderFloatControlsIndependence, Device, Features}, device::{physical::ShaderFloatControlsIndependence, Device, DeviceFeatures},
pipeline::inout_interface::{ pipeline::inout_interface::{
input_output_map, shader_interface_analyze_type, InputOutputData, InputOutputKey, input_output_map, shader_interface_analyze_type, InputOutputData, InputOutputKey,
}, },
@ -481,9 +481,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
the entry point has an `IsoLines` execution mode" the entry point has an `IsoLines` execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"tessellation_isolines", Requires::DeviceFeature("tessellation_isolines"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-tessellationShader-06326"], vuids: &["VUID-RuntimeSpirv-tessellationShader-06326"],
..Default::default() ..Default::default()
})); }));
@ -498,9 +498,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "this device is a portability subset device, and \ problem: "this device is a portability subset device, and \
the entry point has an `PointMode` execution mode" the entry point has an `PointMode` execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"tessellation_point_mode", Requires::DeviceFeature("tessellation_point_mode"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-tessellationShader-06327"], vuids: &["VUID-RuntimeSpirv-tessellationShader-06327"],
..Default::default() ..Default::default()
})); }));
@ -523,7 +523,7 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `LocalSizeId` execution mode" problem: "the entry point has a `LocalSizeId` execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("maintenance4"), Requires::DeviceFeature("maintenance4"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-LocalSizeId-06434"], vuids: &["VUID-RuntimeSpirv-LocalSizeId-06434"],
..Default::default() ..Default::default()
@ -734,9 +734,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `SubgroupUniformControlFlowKHR` \ problem: "the entry point has a `SubgroupUniformControlFlowKHR` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_subgroup_uniform_control_flow", Requires::DeviceFeature("shader_subgroup_uniform_control_flow"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-SubgroupUniformControlFlowKHR-06379"], vuids: &["VUID-RuntimeSpirv-SubgroupUniformControlFlowKHR-06379"],
..Default::default() ..Default::default()
})); }));
@ -767,9 +767,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `EarlyAndLateFragmentTestsAMD` \ problem: "the entry point has a `EarlyAndLateFragmentTestsAMD` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_early_and_late_fragment_tests", Requires::DeviceFeature("shader_early_and_late_fragment_tests"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06767"], vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06767"],
..Default::default() ..Default::default()
})); }));
@ -785,9 +785,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `StencilRefUnchangedFrontAMD` \ problem: "the entry point has a `StencilRefUnchangedFrontAMD` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_early_and_late_fragment_tests", Requires::DeviceFeature("shader_early_and_late_fragment_tests"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06768"], vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06768"],
..Default::default() ..Default::default()
})); }));
@ -803,9 +803,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `StencilRefUnchangedBackAMD` \ problem: "the entry point has a `StencilRefUnchangedBackAMD` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_early_and_late_fragment_tests", Requires::DeviceFeature("shader_early_and_late_fragment_tests"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06769"], vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06769"],
..Default::default() ..Default::default()
})); }));
@ -821,9 +821,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `StencilRefGreaterFrontAMD` \ problem: "the entry point has a `StencilRefGreaterFrontAMD` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_early_and_late_fragment_tests", Requires::DeviceFeature("shader_early_and_late_fragment_tests"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06770"], vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06770"],
..Default::default() ..Default::default()
})); }));
@ -839,9 +839,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `StencilRefGreaterBackAMD` \ problem: "the entry point has a `StencilRefGreaterBackAMD` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_early_and_late_fragment_tests", Requires::DeviceFeature("shader_early_and_late_fragment_tests"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06771"], vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06771"],
..Default::default() ..Default::default()
})); }));
@ -857,9 +857,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `StencilRefLessFrontAMD` \ problem: "the entry point has a `StencilRefLessFrontAMD` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_early_and_late_fragment_tests", Requires::DeviceFeature("shader_early_and_late_fragment_tests"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06772"], vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06772"],
..Default::default() ..Default::default()
})); }));
@ -875,9 +875,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "the entry point has a `StencilRefLessBackAMD` \ problem: "the entry point has a `StencilRefLessBackAMD` \
execution mode" execution mode"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_early_and_late_fragment_tests", Requires::DeviceFeature("shader_early_and_late_fragment_tests"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06773"], vuids: &["VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06773"],
..Default::default() ..Default::default()
})); }));
@ -1170,9 +1170,9 @@ impl<'a> RuntimeValidator<'a> {
result_id, result_id,
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_zero_initialize_workgroup_memory", Requires::DeviceFeature("shader_zero_initialize_workgroup_memory"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderZeroInitializeWorkgroupMemory-06372"], vuids: &["VUID-RuntimeSpirv-shaderZeroInitializeWorkgroupMemory-06372"],
..Default::default() ..Default::default()
})); }));
@ -1203,9 +1203,9 @@ impl<'a> RuntimeValidator<'a> {
result_id, result_id,
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"storage_buffer8_bit_access", Requires::DeviceFeature("storage_buffer8_bit_access"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-storageBuffer8BitAccess-06328"], vuids: &["VUID-RuntimeSpirv-storageBuffer8BitAccess-06328"],
..Default::default() ..Default::default()
})); }));
@ -1221,9 +1221,9 @@ impl<'a> RuntimeValidator<'a> {
result_id, result_id,
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"storage_buffer16_bit_access", Requires::DeviceFeature("storage_buffer16_bit_access"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-storageBuffer16BitAccess-06331"], vuids: &["VUID-RuntimeSpirv-storageBuffer16BitAccess-06331"],
..Default::default() ..Default::default()
})); }));
@ -1247,7 +1247,9 @@ impl<'a> RuntimeValidator<'a> {
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("uniform_and_storage_buffer8_bit_access"), Requires::DeviceFeature(
"uniform_and_storage_buffer8_bit_access",
),
])]), ])]),
vuids: &[ vuids: &[
"VUID-RuntimeSpirv-uniformAndStorageBuffer8BitAccess-06329", "VUID-RuntimeSpirv-uniformAndStorageBuffer8BitAccess-06329",
@ -1271,7 +1273,9 @@ impl<'a> RuntimeValidator<'a> {
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("uniform_and_storage_buffer16_bit_access"), Requires::DeviceFeature(
"uniform_and_storage_buffer16_bit_access",
),
])]), ])]),
vuids: &[ vuids: &[
"VUID-RuntimeSpirv-uniformAndStorageBuffer16BitAccess-06332", "VUID-RuntimeSpirv-uniformAndStorageBuffer16BitAccess-06332",
@ -1291,9 +1295,9 @@ impl<'a> RuntimeValidator<'a> {
result_id, result_id,
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"storage_push_constant8", Requires::DeviceFeature("storage_push_constant8"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-storagePushConstant8-06330"], vuids: &["VUID-RuntimeSpirv-storagePushConstant8-06330"],
..Default::default() ..Default::default()
})); }));
@ -1307,9 +1311,9 @@ impl<'a> RuntimeValidator<'a> {
result_id, result_id,
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"storage_push_constant16", Requires::DeviceFeature("storage_push_constant16"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-storagePushConstant16-06333"], vuids: &["VUID-RuntimeSpirv-storagePushConstant16-06333"],
..Default::default() ..Default::default()
})); }));
@ -1326,9 +1330,9 @@ impl<'a> RuntimeValidator<'a> {
result_id, result_id,
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"storage_input_output16", Requires::DeviceFeature("storage_input_output16"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-storageInputOutput16-06334"], vuids: &["VUID-RuntimeSpirv-storageInputOutput16-06334"],
..Default::default() ..Default::default()
})); }));
@ -1529,7 +1533,7 @@ impl<'a> RuntimeValidator<'a> {
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("fragment_stores_and_atomics"), Requires::DeviceFeature("fragment_stores_and_atomics"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-NonWritable-06340"], vuids: &["VUID-RuntimeSpirv-NonWritable-06340"],
..Default::default() ..Default::default()
@ -1556,7 +1560,7 @@ impl<'a> RuntimeValidator<'a> {
) )
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("vertex_pipeline_stores_and_atomics"), Requires::DeviceFeature("vertex_pipeline_stores_and_atomics"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-NonWritable-06341"], vuids: &["VUID-RuntimeSpirv-NonWritable-06341"],
..Default::default() ..Default::default()
@ -1606,7 +1610,7 @@ impl<'a> RuntimeValidator<'a> {
RequiresAllOf(&[Requires::DeviceExtension( RequiresAllOf(&[Requires::DeviceExtension(
"khr_format_feature_flags2", "khr_format_feature_flags2",
)]), )]),
RequiresAllOf(&[Requires::Feature("storage_input_output16")]), RequiresAllOf(&[Requires::DeviceFeature("storage_input_output16")]),
]), ]),
vuids: &["VUID-RuntimeSpirv-apiVersion-07954"], vuids: &["VUID-RuntimeSpirv-apiVersion-07954"],
..Default::default() ..Default::default()
@ -1632,7 +1636,7 @@ impl<'a> RuntimeValidator<'a> {
RequiresAllOf(&[Requires::DeviceExtension( RequiresAllOf(&[Requires::DeviceExtension(
"khr_format_feature_flags2", "khr_format_feature_flags2",
)]), )]),
RequiresAllOf(&[Requires::Feature("storage_input_output16")]), RequiresAllOf(&[Requires::DeviceFeature("storage_input_output16")]),
]), ]),
vuids: &["VUID-RuntimeSpirv-apiVersion-07955"], vuids: &["VUID-RuntimeSpirv-apiVersion-07955"],
..Default::default() ..Default::default()
@ -1957,7 +1961,7 @@ impl<'a> RuntimeValidator<'a> {
`StorageClass::StorageBuffer` or `StorageClass::Uniform`" `StorageClass::StorageBuffer` or `StorageClass::Uniform`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_buffer_int64_atomics"), Requires::DeviceFeature("shader_buffer_int64_atomics"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-None-06278"], vuids: &["VUID-RuntimeSpirv-None-06278"],
..Default::default() ..Default::default()
@ -1972,7 +1976,7 @@ impl<'a> RuntimeValidator<'a> {
`StorageClass::Workgroup`" `StorageClass::Workgroup`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_shared_int64_atomics"), Requires::DeviceFeature("shader_shared_int64_atomics"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-None-06279"], vuids: &["VUID-RuntimeSpirv-None-06279"],
..Default::default() ..Default::default()
@ -1987,7 +1991,7 @@ impl<'a> RuntimeValidator<'a> {
`StorageClass::Image`" `StorageClass::Image`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_image_int64_atomics"), Requires::DeviceFeature("shader_image_int64_atomics"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-None-06288"], vuids: &["VUID-RuntimeSpirv-None-06288"],
..Default::default() ..Default::default()
@ -1999,36 +2003,36 @@ impl<'a> RuntimeValidator<'a> {
Instruction::TypeFloat { width, .. } => { Instruction::TypeFloat { width, .. } => {
match width { match width {
16 => { 16 => {
if !self.device.enabled_features().intersects(&Features { if !self.device.enabled_features().intersects(&DeviceFeatures {
shader_buffer_float16_atomics: true, shader_buffer_float16_atomics: true,
shader_buffer_float16_atomic_add: true, shader_buffer_float16_atomic_add: true,
shader_buffer_float16_atomic_min_max: true, shader_buffer_float16_atomic_min_max: true,
shader_shared_float16_atomics: true, shader_shared_float16_atomics: true,
shader_shared_float16_atomic_add: true, shader_shared_float16_atomic_add: true,
shader_shared_float16_atomic_min_max: true, shader_shared_float16_atomic_min_max: true,
..Features::empty() ..DeviceFeatures::empty()
}) { }) {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an atomic operation is performed on a \ problem: "an atomic operation is performed on a \
16-bit floating point value" 16-bit floating point value"
.into(), .into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float16_atomics", "shader_buffer_float16_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float16_atomic_add", "shader_buffer_float16_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float16_atomic_min_max", "shader_buffer_float16_atomic_min_max",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float16_atomics", "shader_shared_float16_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float16_atomic_add", "shader_shared_float16_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float16_atomic_min_max", "shader_shared_float16_atomic_min_max",
)]), )]),
]), ]),
@ -2038,36 +2042,36 @@ impl<'a> RuntimeValidator<'a> {
} }
} }
32 => { 32 => {
if !self.device.enabled_features().intersects(&Features { if !self.device.enabled_features().intersects(&DeviceFeatures {
shader_buffer_float32_atomics: true, shader_buffer_float32_atomics: true,
shader_buffer_float32_atomic_add: true, shader_buffer_float32_atomic_add: true,
shader_buffer_float32_atomic_min_max: true, shader_buffer_float32_atomic_min_max: true,
shader_shared_float32_atomics: true, shader_shared_float32_atomics: true,
shader_shared_float32_atomic_add: true, shader_shared_float32_atomic_add: true,
shader_shared_float32_atomic_min_max: true, shader_shared_float32_atomic_min_max: true,
..Features::empty() ..DeviceFeatures::empty()
}) { }) {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an atomic operation is performed on a \ problem: "an atomic operation is performed on a \
32-bit floating point value" 32-bit floating point value"
.into(), .into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float32_atomics", "shader_buffer_float32_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float32_atomic_add", "shader_buffer_float32_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float32_atomic_min_max", "shader_buffer_float32_atomic_min_max",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float32_atomics", "shader_shared_float32_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float32_atomic_add", "shader_shared_float32_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float32_atomic_min_max", "shader_shared_float32_atomic_min_max",
)]), )]),
]), ]),
@ -2077,36 +2081,36 @@ impl<'a> RuntimeValidator<'a> {
} }
} }
64 => { 64 => {
if !self.device.enabled_features().intersects(&Features { if !self.device.enabled_features().intersects(&DeviceFeatures {
shader_buffer_float64_atomics: true, shader_buffer_float64_atomics: true,
shader_buffer_float64_atomic_add: true, shader_buffer_float64_atomic_add: true,
shader_buffer_float64_atomic_min_max: true, shader_buffer_float64_atomic_min_max: true,
shader_shared_float64_atomics: true, shader_shared_float64_atomics: true,
shader_shared_float64_atomic_add: true, shader_shared_float64_atomic_add: true,
shader_shared_float64_atomic_min_max: true, shader_shared_float64_atomic_min_max: true,
..Features::empty() ..DeviceFeatures::empty()
}) { }) {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an atomic operation is performed on a \ problem: "an atomic operation is performed on a \
64-bit floating point value" 64-bit floating point value"
.into(), .into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float64_atomics", "shader_buffer_float64_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float64_atomic_add", "shader_buffer_float64_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float64_atomic_min_max", "shader_buffer_float64_atomic_min_max",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float64_atomics", "shader_shared_float64_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float64_atomic_add", "shader_shared_float64_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float64_atomic_min_max", "shader_shared_float64_atomic_min_max",
)]), )]),
]), ]),
@ -2120,7 +2124,7 @@ impl<'a> RuntimeValidator<'a> {
match storage_class { match storage_class {
StorageClass::StorageBuffer => { StorageClass::StorageBuffer => {
if !self.device.enabled_features().intersects(&Features { if !self.device.enabled_features().intersects(&DeviceFeatures {
shader_buffer_float16_atomics: true, shader_buffer_float16_atomics: true,
shader_buffer_float16_atomic_add: true, shader_buffer_float16_atomic_add: true,
shader_buffer_float16_atomic_min_max: true, shader_buffer_float16_atomic_min_max: true,
@ -2130,7 +2134,7 @@ impl<'a> RuntimeValidator<'a> {
shader_buffer_float64_atomics: true, shader_buffer_float64_atomics: true,
shader_buffer_float64_atomic_add: true, shader_buffer_float64_atomic_add: true,
shader_buffer_float64_atomic_min_max: true, shader_buffer_float64_atomic_min_max: true,
..Features::empty() ..DeviceFeatures::empty()
}) { }) {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an atomic operation is performed on a \ problem: "an atomic operation is performed on a \
@ -2138,31 +2142,31 @@ impl<'a> RuntimeValidator<'a> {
`StorageClass::StorageBuffer`" `StorageClass::StorageBuffer`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float16_atomics", "shader_buffer_float16_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float16_atomic_add", "shader_buffer_float16_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float16_atomic_min_max", "shader_buffer_float16_atomic_min_max",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float32_atomics", "shader_buffer_float32_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float32_atomic_add", "shader_buffer_float32_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float32_atomic_min_max", "shader_buffer_float32_atomic_min_max",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float64_atomics", "shader_buffer_float64_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float64_atomic_add", "shader_buffer_float64_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_buffer_float64_atomic_min_max", "shader_buffer_float64_atomic_min_max",
)]), )]),
]), ]),
@ -2172,7 +2176,7 @@ impl<'a> RuntimeValidator<'a> {
} }
} }
StorageClass::Workgroup => { StorageClass::Workgroup => {
if !self.device.enabled_features().intersects(&Features { if !self.device.enabled_features().intersects(&DeviceFeatures {
shader_shared_float16_atomics: true, shader_shared_float16_atomics: true,
shader_shared_float16_atomic_add: true, shader_shared_float16_atomic_add: true,
shader_shared_float16_atomic_min_max: true, shader_shared_float16_atomic_min_max: true,
@ -2182,7 +2186,7 @@ impl<'a> RuntimeValidator<'a> {
shader_shared_float64_atomics: true, shader_shared_float64_atomics: true,
shader_shared_float64_atomic_add: true, shader_shared_float64_atomic_add: true,
shader_shared_float64_atomic_min_max: true, shader_shared_float64_atomic_min_max: true,
..Features::empty() ..DeviceFeatures::empty()
}) { }) {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an atomic operation is performed on a \ problem: "an atomic operation is performed on a \
@ -2190,31 +2194,31 @@ impl<'a> RuntimeValidator<'a> {
`StorageClass::Workgroup`" `StorageClass::Workgroup`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float16_atomics", "shader_shared_float16_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float16_atomic_add", "shader_shared_float16_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float16_atomic_min_max", "shader_shared_float16_atomic_min_max",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float32_atomics", "shader_shared_float32_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float32_atomic_add", "shader_shared_float32_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float32_atomic_min_max", "shader_shared_float32_atomic_min_max",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float64_atomics", "shader_shared_float64_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float64_atomic_add", "shader_shared_float64_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_shared_float64_atomic_min_max", "shader_shared_float64_atomic_min_max",
)]), )]),
]), ]),
@ -2225,11 +2229,11 @@ impl<'a> RuntimeValidator<'a> {
} }
StorageClass::Image => { StorageClass::Image => {
if width == 32 if width == 32
&& !self.device.enabled_features().intersects(&Features { && !self.device.enabled_features().intersects(&DeviceFeatures {
shader_image_float32_atomics: true, shader_image_float32_atomics: true,
shader_image_float32_atomic_add: true, shader_image_float32_atomic_add: true,
shader_image_float32_atomic_min_max: true, shader_image_float32_atomic_min_max: true,
..Features::empty() ..DeviceFeatures::empty()
}) })
{ {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
@ -2238,13 +2242,13 @@ impl<'a> RuntimeValidator<'a> {
class of `StorageClass::Image`" class of `StorageClass::Image`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_image_float32_atomics", "shader_image_float32_atomics",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_image_float32_atomic_add", "shader_image_float32_atomic_add",
)]), )]),
RequiresAllOf(&[Requires::Feature( RequiresAllOf(&[Requires::DeviceFeature(
"shader_image_float32_atomic_min_max", "shader_image_float32_atomic_min_max",
)]), )]),
]), ]),
@ -2301,7 +2305,7 @@ impl<'a> RuntimeValidator<'a> {
the `vulkan_memory_model` feature is enabled" the `vulkan_memory_model` feature is enabled"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("vulkan_memory_model_device_scope"), Requires::DeviceFeature("vulkan_memory_model_device_scope"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-vulkanMemoryModel-06265"], vuids: &["VUID-RuntimeSpirv-vulkanMemoryModel-06265"],
..Default::default() ..Default::default()
@ -2314,7 +2318,7 @@ impl<'a> RuntimeValidator<'a> {
problem: "an instruction uses `QueueFamily` as the memory scope" problem: "an instruction uses `QueueFamily` as the memory scope"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("vulkan_memory_model"), Requires::DeviceFeature("vulkan_memory_model"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-vulkanMemoryModel-06266"], vuids: &["VUID-RuntimeSpirv-vulkanMemoryModel-06266"],
..Default::default() ..Default::default()
@ -2381,7 +2385,9 @@ impl<'a> RuntimeValidator<'a> {
on an 8-bit integer or vector" on an 8-bit integer or vector"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_subgroup_extended_types"), Requires::DeviceFeature(
"shader_subgroup_extended_types",
),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-None-06275"], vuids: &["VUID-RuntimeSpirv-None-06275"],
..Default::default() ..Default::default()
@ -2393,7 +2399,9 @@ impl<'a> RuntimeValidator<'a> {
on a 16-bit integer or vector" on a 16-bit integer or vector"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_subgroup_extended_types"), Requires::DeviceFeature(
"shader_subgroup_extended_types",
),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-None-06275"], vuids: &["VUID-RuntimeSpirv-None-06275"],
..Default::default() ..Default::default()
@ -2405,7 +2413,9 @@ impl<'a> RuntimeValidator<'a> {
on an 64-bit integer or vector" on an 64-bit integer or vector"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_subgroup_extended_types"), Requires::DeviceFeature(
"shader_subgroup_extended_types",
),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-None-06275"], vuids: &["VUID-RuntimeSpirv-None-06275"],
..Default::default() ..Default::default()
@ -2419,7 +2429,7 @@ impl<'a> RuntimeValidator<'a> {
on an 16-bit floating point scalar or vector" on an 16-bit floating point scalar or vector"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_subgroup_extended_types"), Requires::DeviceFeature("shader_subgroup_extended_types"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-None-06275"], vuids: &["VUID-RuntimeSpirv-None-06275"],
..Default::default() ..Default::default()
@ -2561,7 +2571,7 @@ impl<'a> RuntimeValidator<'a> {
with a scope of `Scope::Subgroup`" with a scope of `Scope::Subgroup`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_subgroup_clock"), Requires::DeviceFeature("shader_subgroup_clock"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderSubgroupClock-06267"], vuids: &["VUID-RuntimeSpirv-shaderSubgroupClock-06267"],
..Default::default() ..Default::default()
@ -2575,7 +2585,7 @@ impl<'a> RuntimeValidator<'a> {
with a scope of `Scope::Device`" with a scope of `Scope::Device`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[ requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("shader_device_clock"), Requires::DeviceFeature("shader_device_clock"),
])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderDeviceClock-06268"], vuids: &["VUID-RuntimeSpirv-shaderDeviceClock-06268"],
..Default::default() ..Default::default()
@ -2597,9 +2607,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "an `OpGroupNonUniformQuadBroadcast` instruction is \ problem: "an `OpGroupNonUniformQuadBroadcast` instruction is \
performed, and its `index` operand is not a constant" performed, and its `index` operand is not a constant"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"subgroup_broadcast_dynamic_id", Requires::DeviceFeature("subgroup_broadcast_dynamic_id"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-subgroupBroadcastDynamicId-06276"], vuids: &["VUID-RuntimeSpirv-subgroupBroadcastDynamicId-06276"],
..Default::default() ..Default::default()
})); }));
@ -2616,9 +2626,9 @@ impl<'a> RuntimeValidator<'a> {
problem: "an `OpGroupNonUniformBroadcast` instruction is \ problem: "an `OpGroupNonUniformBroadcast` instruction is \
performed, and its `id` operand is not a constant" performed, and its `id` operand is not a constant"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"subgroup_broadcast_dynamic_id", Requires::DeviceFeature("subgroup_broadcast_dynamic_id"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-subgroupBroadcastDynamicId-06277"], vuids: &["VUID-RuntimeSpirv-subgroupBroadcastDynamicId-06277"],
..Default::default() ..Default::default()
})); }));
@ -2807,9 +2817,9 @@ impl<'a> RuntimeValidator<'a> {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an `OpColorAttachmentReadEXT` instruction is performed" problem: "an `OpColorAttachmentReadEXT` instruction is performed"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_tile_image_color_read_access", Requires::DeviceFeature("shader_tile_image_color_read_access"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderTileImageColorReadAccess-08728"], vuids: &["VUID-RuntimeSpirv-shaderTileImageColorReadAccess-08728"],
..Default::default() ..Default::default()
})); }));
@ -2824,9 +2834,9 @@ impl<'a> RuntimeValidator<'a> {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an `OpDepthAttachmentReadEXT` instruction is performed" problem: "an `OpDepthAttachmentReadEXT` instruction is performed"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_tile_image_depth_read_access", Requires::DeviceFeature("shader_tile_image_depth_read_access"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderTileImageDepthReadAccess-08729"], vuids: &["VUID-RuntimeSpirv-shaderTileImageDepthReadAccess-08729"],
..Default::default() ..Default::default()
})); }));
@ -2841,9 +2851,9 @@ impl<'a> RuntimeValidator<'a> {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "an `OpStencilAttachmentReadEXT` instruction is performed" problem: "an `OpStencilAttachmentReadEXT` instruction is performed"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"shader_tile_image_stencil_read_access", Requires::DeviceFeature("shader_tile_image_stencil_read_access"),
)])]), ])]),
vuids: &["VUID-RuntimeSpirv-shaderTileImageStencilReadAccess-08730"], vuids: &["VUID-RuntimeSpirv-shaderTileImageStencilReadAccess-08730"],
..Default::default() ..Default::default()
})); }));

View File

@ -390,7 +390,7 @@ impl QueryPoolCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "query_type".into(), context: "query_type".into(),
problem: "is `QueryType::PipelineStatistics`".into(), problem: "is `QueryType::PipelineStatistics`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"pipeline_statistics_query", "pipeline_statistics_query",
)])]), )])]),
vuids: &["VUID-VkQueryPoolCreateInfo-queryType-00791"], vuids: &["VUID-VkQueryPoolCreateInfo-queryType-00791"],
@ -412,7 +412,7 @@ impl QueryPoolCreateInfo {
problem: "contains `TASK_SHADER_INVOCATIONS` or \ problem: "contains `TASK_SHADER_INVOCATIONS` or \
`MESH_SHADER_INVOCATIONS`" `MESH_SHADER_INVOCATIONS`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader_queries", "mesh_shader_queries",
)])]), )])]),
vuids: &["VUID-VkQueryPoolCreateInfo-meshShaderQueries-07069"], vuids: &["VUID-VkQueryPoolCreateInfo-meshShaderQueries-07069"],
@ -433,7 +433,7 @@ impl QueryPoolCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "query_type".into(), context: "query_type".into(),
problem: "is `QueryType::MeshPrimitivesGenerated`".into(), problem: "is `QueryType::MeshPrimitivesGenerated`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader_queries", "mesh_shader_queries",
)])]), )])]),
vuids: &["VUID-VkQueryPoolCreateInfo-meshShaderQueries-07068"], vuids: &["VUID-VkQueryPoolCreateInfo-meshShaderQueries-07068"],

View File

@ -424,8 +424,9 @@ pub struct FramebufferCreateInfo {
/// must be specified in that case. /// must be specified in that case.
/// ///
/// The extent, whether automatically calculated or specified explicitly, must not be larger /// The extent, whether automatically calculated or specified explicitly, must not be larger
/// than the [`max_framebuffer_width`](crate::device::Properties::max_framebuffer_width) and /// than the [`max_framebuffer_width`](crate::device::DeviceProperties::max_framebuffer_width)
/// [`max_framebuffer_height`](crate::device::Properties::max_framebuffer_height) limits. /// and [`max_framebuffer_height`](crate::device::DeviceProperties::max_framebuffer_height)
/// limits.
/// ///
/// The default value is `[0, 0]`. /// The default value is `[0, 0]`.
pub extent: [u32; 2], pub extent: [u32; 2],
@ -439,7 +440,7 @@ pub struct FramebufferCreateInfo {
/// ///
/// The number of layers, whether automatically calculated or specified explicitly, must not be /// The number of layers, whether automatically calculated or specified explicitly, must not be
/// larger than the /// larger than the
/// [`max_framebuffer_layers`](crate::device::Properties::max_framebuffer_layers) limit. /// [`max_framebuffer_layers`](crate::device::DeviceProperties::max_framebuffer_layers) limit.
/// ///
/// If the render pass has multiview enabled (`views_used` does not return 0), then this value /// If the render pass has multiview enabled (`views_used` does not return 0), then this value
/// must be 0 or 1. /// must be 0 or 1.

View File

@ -1646,7 +1646,7 @@ pub struct AttachmentDescription {
/// or both `Some`. /// or both `Some`.
/// ///
/// If this is `Some`, then the /// If this is `Some`, then the
/// [`separate_depth_stencil_layouts`](crate::device::Features::separate_depth_stencil_layouts) /// [`separate_depth_stencil_layouts`](crate::device::DeviceFeatures::separate_depth_stencil_layouts)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `None`. /// The default value is `None`.
@ -1658,7 +1658,7 @@ pub struct AttachmentDescription {
/// or both `Some`. /// or both `Some`.
/// ///
/// If this is `Some`, then the /// If this is `Some`, then the
/// [`separate_depth_stencil_layouts`](crate::device::Features::separate_depth_stencil_layouts) /// [`separate_depth_stencil_layouts`](crate::device::DeviceFeatures::separate_depth_stencil_layouts)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `None`. /// The default value is `None`.
@ -1764,7 +1764,7 @@ impl AttachmentDescription {
problem: "specifies a layout for only the depth aspect or only the \ problem: "specifies a layout for only the depth aspect or only the \
stencil aspect" stencil aspect"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
vuids: &["VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03284"], vuids: &["VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03284"],
@ -1783,7 +1783,7 @@ impl AttachmentDescription {
problem: "specifies a layout for only the depth aspect or only the \ problem: "specifies a layout for only the depth aspect or only the \
stencil aspect" stencil aspect"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
vuids: &["VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03285"], vuids: &["VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03285"],
@ -1819,7 +1819,7 @@ impl AttachmentDescription {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stencil_initial_layout".into(), context: "stencil_initial_layout".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
..Default::default() ..Default::default()
@ -1860,7 +1860,7 @@ impl AttachmentDescription {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stencil_final_layout".into(), context: "stencil_final_layout".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
..Default::default() ..Default::default()
@ -2164,7 +2164,8 @@ pub struct SubpassDescription {
/// to the first two views and `0b101` will draw to the first and third view. /// to the first two views and `0b101` will draw to the first and third view.
/// ///
/// If set to a nonzero value, it must be nonzero for all subpasses in the render pass, and the /// If set to a nonzero value, it must be nonzero for all subpasses in the render pass, and the
/// [`multiview`](crate::device::Features::multiview) feature must be enabled on the device. /// [`multiview`](crate::device::DeviceFeatures::multiview) feature must be enabled on the
/// device.
/// ///
/// The default value is `0`. /// The default value is `0`.
pub view_mask: u32, pub view_mask: u32,
@ -2183,8 +2184,8 @@ pub struct SubpassDescription {
/// subpass. /// subpass.
/// ///
/// The number of color attachments must be less than the /// The number of color attachments must be less than the
/// [`max_color_attachments`](crate::device::Properties::max_color_attachments) limit of the /// [`max_color_attachments`](crate::device::DeviceProperties::max_color_attachments) limit of
/// physical device. All color attachments must have the same `samples` value. /// the physical device. All color attachments must have the same `samples` value.
/// ///
/// The default value is empty. /// The default value is empty.
pub color_attachments: Vec<Option<AttachmentReference>>, pub color_attachments: Vec<Option<AttachmentReference>>,
@ -2934,7 +2935,9 @@ impl SubpassDescription {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "view_mask".into(), context: "view_mask".into(),
problem: "is not 0".into(), problem: "is not 0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature("multiview")])]), requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multiview",
)])]),
vuids: &["VUID-VkSubpassDescription2-multiview-06558"], vuids: &["VUID-VkSubpassDescription2-multiview-06558"],
})); }));
} }
@ -3035,7 +3038,7 @@ pub struct AttachmentReference {
/// [the Vulkan specification](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap8.html#attachment-type-imagelayout). /// [the Vulkan specification](https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap8.html#attachment-type-imagelayout).
/// ///
/// If this is `Some`, then the /// If this is `Some`, then the
/// [`separate_depth_stencil_layouts`](crate::device::Features::separate_depth_stencil_layouts) /// [`separate_depth_stencil_layouts`](crate::device::DeviceFeatures::separate_depth_stencil_layouts)
/// feature must be enabled on the device. /// feature must be enabled on the device.
/// ///
/// The default value is `None`. /// The default value is `None`.
@ -3114,7 +3117,7 @@ impl AttachmentReference {
context: "layout".into(), context: "layout".into(),
problem: "specifies a layout for only the depth aspect or only the stencil aspect" problem: "specifies a layout for only the depth aspect or only the stencil aspect"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
vuids: &["VUID-VkAttachmentReference2-separateDepthStencilLayouts-03313"], vuids: &["VUID-VkAttachmentReference2-separateDepthStencilLayouts-03313"],
@ -3126,7 +3129,7 @@ impl AttachmentReference {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "stencil_layout".into(), context: "stencil_layout".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
..Default::default() ..Default::default()
@ -3380,7 +3383,7 @@ impl SubpassDependency {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "is empty".into(), problem: "is empty".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
vuids: &["VUID-VkSubpassDependency2-srcStageMask-03937"], vuids: &["VUID-VkSubpassDependency2-srcStageMask-03937"],
@ -3391,7 +3394,7 @@ impl SubpassDependency {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "is empty".into(), problem: "is empty".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
vuids: &["VUID-VkSubpassDependency2-dstStageMask-03937"], vuids: &["VUID-VkSubpassDependency2-dstStageMask-03937"],

View File

@ -140,8 +140,8 @@
//! //!
//! ## Buffers and memory accesses //! ## Buffers and memory accesses
//! //!
//! - If the [`robust_buffer_access`](Features::robust_buffer_access) feature is not enabled on the //! - If the [`robust_buffer_access`](DeviceFeatures::robust_buffer_access) feature is not enabled
//! device, then the shader must not access any values outside the range of the buffer, as //! on the device, then the shader must not access any values outside the range of the buffer, as
//! specified when writing the descriptor set. <sup>[\[06935\]] [\[06936\]]</sup> //! specified when writing the descriptor set. <sup>[\[06935\]] [\[06936\]]</sup>
//! - If any `PhysicalStorageBuffer` pointers to device memory are dereferenced in the shader, //! - If any `PhysicalStorageBuffer` pointers to device memory are dereferenced in the shader,
//! then: //! then:
@ -317,8 +317,8 @@
//! //!
//! [alignment rules]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap15.html#interfaces-resources-layout //! [alignment rules]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/chap15.html#interfaces-resources-layout
//! [`GL_EXT_scalar_block_layout`]: https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_scalar_block_layout.txt //! [`GL_EXT_scalar_block_layout`]: https://github.com/KhronosGroup/GLSL/blob/master/extensions/ext/GL_EXT_scalar_block_layout.txt
//! [`scalar_block_layout`]: Features::scalar_block_layout //! [`scalar_block_layout`]: DeviceFeatures::scalar_block_layout
//! [`uniform_buffer_standard_layout`]: Features::uniform_buffer_standard_layout //! [`uniform_buffer_standard_layout`]: DeviceFeatures::uniform_buffer_standard_layout
//! [dynamically uniform]: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_uniformity //! [dynamically uniform]: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_uniformity
//! [\[02691\]]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDispatch-None-02691 //! [\[02691\]]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDispatch-None-02691
//! [\[02692\]]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDispatch-None-02692 //! [\[02692\]]: https://registry.khronos.org/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-vkCmdDispatch-None-02692
@ -406,7 +406,7 @@ use self::spirv::{Id, Instruction};
use crate::{ use crate::{
acceleration_structure::BuildAccelerationStructureFlags, acceleration_structure::BuildAccelerationStructureFlags,
descriptor_set::layout::DescriptorBindingFlags, descriptor_set::layout::DescriptorBindingFlags,
device::{physical::PhysicalDevice, Features, Properties}, device::{physical::PhysicalDevice, DeviceFeatures, DeviceProperties},
format::FormatFeatures, format::FormatFeatures,
image::{ image::{
sampler::{Filter, Sampler, SamplerCreateInfo, SamplerMipmapMode, SamplerReductionMode}, sampler::{Filter, Sampler, SamplerCreateInfo, SamplerMipmapMode, SamplerReductionMode},

View File

@ -528,9 +528,9 @@ pub struct SwapchainPresentInfo {
*/ */
/// An id used to identify this present operation. /// An id used to identify this present operation.
/// ///
/// If `present_id` is `Some`, the [`present_id`](crate::device::Features::present_id) feature /// If `present_id` is `Some`, the [`present_id`](crate::device::DeviceFeatures::present_id)
/// must be enabled on the device. The id must be greater than any id previously used for /// feature must be enabled on the device. The id must be greater than any id previously
/// `swapchain`. If a swapchain is recreated, this resets. /// used for `swapchain`. If a swapchain is recreated, this resets.
/// ///
/// The default value is `None`. /// The default value is `None`.
pub present_id: Option<NonZeroU64>, pub present_id: Option<NonZeroU64>,
@ -604,7 +604,7 @@ impl SwapchainPresentInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "present_id".into(), context: "present_id".into(),
problem: "is `Some`".into(), problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"present_id", "present_id",
)])]), )])]),
vuids: &["VUID-VkPresentInfoKHR-pNext-06235"], vuids: &["VUID-VkPresentInfoKHR-pNext-06235"],

View File

@ -1552,7 +1552,7 @@ impl Swapchain {
) -> Result<(), Box<ValidationError>> { ) -> Result<(), Box<ValidationError>> {
if !self.device.enabled_features().present_wait { if !self.device.enabled_features().present_wait {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"present_wait", "present_wait",
)])]), )])]),
vuids: &["VUID-vkWaitForPresentKHR-presentWait-06234"], vuids: &["VUID-vkWaitForPresentKHR-presentWait-06234"],

View File

@ -45,7 +45,7 @@ impl Event {
/// On [portability /// On [portability
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag) /// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, the /// devices, the
/// [`events`](crate::device::Features::events) /// [`events`](crate::device::DeviceFeatures::events)
/// feature must be enabled on the device. /// feature must be enabled on the device.
#[inline] #[inline]
pub fn new( pub fn new(
@ -64,7 +64,9 @@ impl Event {
if device.enabled_extensions().khr_portability_subset && !device.enabled_features().events { if device.enabled_extensions().khr_portability_subset && !device.enabled_features().events {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
problem: "this device is a portability subset device".into(), problem: "this device is a portability subset device".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature("events")])]), requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"events",
)])]),
vuids: &["VUID-vkCreateEvent-events-04468"], vuids: &["VUID-vkCreateEvent-events-04468"],
..Default::default() ..Default::default()
})); }));

View File

@ -1923,7 +1923,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -1934,7 +1934,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -1945,7 +1945,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_access".into(), context: "src_access".into(),
problem: "contains flags from `VkAccessFlagBits2`".into(), problem: "contains flags from `VkAccessFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -1956,7 +1956,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_access".into(), context: "dst_access".into(),
problem: "contains flags from `VkAccessFlagBits2`".into(), problem: "contains flags from `VkAccessFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -1969,7 +1969,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03929"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03929"],
@ -1980,7 +1980,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03929"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03929"],
@ -1998,7 +1998,7 @@ impl MemoryBarrier {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03930"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03930"],
@ -2014,7 +2014,7 @@ impl MemoryBarrier {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03930"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03930"],
@ -2027,7 +2027,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03931"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03931"],
@ -2038,7 +2038,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03931"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03931"],
@ -2051,7 +2051,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03932"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03932"],
@ -2062,7 +2062,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03932"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03932"],
@ -2075,7 +2075,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03933"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03933"],
@ -2086,7 +2086,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03933"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03933"],
@ -2099,7 +2099,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03934"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03934"],
@ -2110,7 +2110,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03934"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03934"],
@ -2123,7 +2123,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03935"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-03935"],
@ -2134,7 +2134,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03935"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-03935"],
@ -2150,8 +2150,10 @@ impl MemoryBarrier {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -2162,8 +2164,10 @@ impl MemoryBarrier {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -2175,7 +2179,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-04957"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-04957"],
@ -2186,7 +2190,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-04957"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-04957"],
@ -2199,7 +2203,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-04995"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-04995"],
@ -2210,7 +2214,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-04995"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-04995"],
@ -2225,7 +2229,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-srcStageMask-07946"], vuids: &["VUID-VkMemoryBarrier2-srcStageMask-07946"],
@ -2236,7 +2240,7 @@ impl MemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-VkMemoryBarrier2-dstStageMask-07946"], vuids: &["VUID-VkMemoryBarrier2-dstStageMask-07946"],
@ -2439,7 +2443,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -2450,7 +2454,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -2461,7 +2465,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_access".into(), context: "src_access".into(),
problem: "contains flags from `VkAccessFlagBits2`".into(), problem: "contains flags from `VkAccessFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -2472,7 +2476,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_access".into(), context: "dst_access".into(),
problem: "contains flags from `VkAccessFlagBits2`".into(), problem: "contains flags from `VkAccessFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -2485,7 +2489,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03929"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03929"],
@ -2496,7 +2500,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03929"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03929"],
@ -2514,7 +2518,7 @@ impl BufferMemoryBarrier {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03930"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03930"],
@ -2530,7 +2534,7 @@ impl BufferMemoryBarrier {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03930"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03930"],
@ -2543,7 +2547,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03931"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03931"],
@ -2554,7 +2558,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03931"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03931"],
@ -2567,7 +2571,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03932"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03932"],
@ -2578,7 +2582,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03932"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03932"],
@ -2591,7 +2595,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03933"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03933"],
@ -2602,7 +2606,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03933"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03933"],
@ -2615,7 +2619,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03934"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03934"],
@ -2626,7 +2630,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03934"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03934"],
@ -2639,7 +2643,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03935"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-03935"],
@ -2650,7 +2654,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03935"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-03935"],
@ -2666,8 +2670,10 @@ impl BufferMemoryBarrier {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkBufferMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkBufferMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -2678,8 +2684,10 @@ impl BufferMemoryBarrier {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkBufferMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkBufferMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -2691,7 +2699,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-04957"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-04957"],
@ -2702,7 +2710,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-04957"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-04957"],
@ -2715,7 +2723,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-04995"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-04995"],
@ -2726,7 +2734,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-04995"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-04995"],
@ -2741,7 +2749,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-07946"], vuids: &["VUID-VkBufferMemoryBarrier2-srcStageMask-07946"],
@ -2752,7 +2760,7 @@ impl BufferMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-07946"], vuids: &["VUID-VkBufferMemoryBarrier2-dstStageMask-07946"],
@ -3113,7 +3121,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -3124,7 +3132,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains flags from `VkPipelineStageFlagBits2`".into(), problem: "contains flags from `VkPipelineStageFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -3135,7 +3143,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_access".into(), context: "src_access".into(),
problem: "contains flags from `VkAccessFlagBits2`".into(), problem: "contains flags from `VkAccessFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -3146,7 +3154,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_access".into(), context: "dst_access".into(),
problem: "contains flags from `VkAccessFlagBits2`".into(), problem: "contains flags from `VkAccessFlagBits2`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2", "synchronization2",
)])]), )])]),
..Default::default() ..Default::default()
@ -3159,7 +3167,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03929"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03929"],
@ -3170,7 +3178,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(), problem: "contains `PipelineStages::GEOMETRY_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"geometry_shader", "geometry_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03929"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03929"],
@ -3188,7 +3196,7 @@ impl ImageMemoryBarrier {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03930"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03930"],
@ -3204,7 +3212,7 @@ impl ImageMemoryBarrier {
problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \ problem: "contains `PipelineStages::TESSELLATION_CONTROL_SHADER` or \
`PipelineStages::TESSELLATION_EVALUATION_SHADER`" `PipelineStages::TESSELLATION_EVALUATION_SHADER`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"tessellation_shader", "tessellation_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03930"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03930"],
@ -3217,7 +3225,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03931"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03931"],
@ -3228,7 +3236,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(), problem: "contains `PipelineStages::CONDITIONAL_RENDERING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"conditional_rendering", "conditional_rendering",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03931"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03931"],
@ -3241,7 +3249,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03932"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03932"],
@ -3252,7 +3260,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(), problem: "contains `PipelineStages::FRAGMENT_DENSITY_PROCESS`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"fragment_density_map", "fragment_density_map",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03932"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03932"],
@ -3265,7 +3273,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03933"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03933"],
@ -3276,7 +3284,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(), problem: "contains `PipelineStages::TRANSFORM_FEEDBACK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"transform_feedback", "transform_feedback",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03933"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03933"],
@ -3289,7 +3297,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03934"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03934"],
@ -3300,7 +3308,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::MESH_SHADER`".into(), problem: "contains `PipelineStages::MESH_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"mesh_shader", "mesh_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03934"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03934"],
@ -3313,7 +3321,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03935"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-03935"],
@ -3324,7 +3332,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::TASK_SHADER`".into(), problem: "contains `PipelineStages::TASK_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"task_shader", "task_shader",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03935"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-03935"],
@ -3340,8 +3348,10 @@ impl ImageMemoryBarrier {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkImageMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkImageMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -3352,8 +3362,10 @@ impl ImageMemoryBarrier {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(), problem: "contains `PipelineStages::FRAGMENT_SHADING_RATE_ATTACHMENT`".into(),
requires_one_of: RequiresOneOf(&[ requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("attachment_fragment_shading_rate")]), RequiresAllOf(&[Requires::DeviceFeature(
RequiresAllOf(&[Requires::Feature("shading_rate_image")]), "attachment_fragment_shading_rate",
)]),
RequiresAllOf(&[Requires::DeviceFeature("shading_rate_image")]),
]), ]),
vuids: &["VUID-VkImageMemoryBarrier2-shadingRateImage-07316"], vuids: &["VUID-VkImageMemoryBarrier2-shadingRateImage-07316"],
})); }));
@ -3365,7 +3377,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-04957"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-04957"],
@ -3376,7 +3388,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::SUBPASS_SHADING`".into(), problem: "contains `PipelineStages::SUBPASS_SHADING`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"subpass_shading", "subpass_shading",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-04957"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-04957"],
@ -3389,7 +3401,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-04995"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-04995"],
@ -3400,7 +3412,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::INVOCATION_MASK`".into(), problem: "contains `PipelineStages::INVOCATION_MASK`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"invocation_mask", "invocation_mask",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-04995"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-04995"],
@ -3415,7 +3427,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "src_stages".into(), context: "src_stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-07946"], vuids: &["VUID-VkImageMemoryBarrier2-srcStageMask-07946"],
@ -3426,7 +3438,7 @@ impl ImageMemoryBarrier {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "dst_stages".into(), context: "dst_stages".into(),
problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(), problem: "contains `PipelineStages::RAY_TRACING_SHADER`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"ray_tracing_pipeline", "ray_tracing_pipeline",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-07946"], vuids: &["VUID-VkImageMemoryBarrier2-dstStageMask-07946"],
@ -3620,7 +3632,7 @@ impl ImageMemoryBarrier {
`subresource_range.aspects` does not contain both \ `subresource_range.aspects` does not contain both \
`ImageAspects::DEPTH` and `ImageAspects::STENCIL`" `ImageAspects::DEPTH` and `ImageAspects::STENCIL`"
.into(), .into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts", "separate_depth_stencil_layouts",
)])]), )])]),
vuids: &["VUID-VkImageMemoryBarrier2-image-03320"], vuids: &["VUID-VkImageMemoryBarrier2-image-03320"],
@ -4071,8 +4083,8 @@ impl ImageMemoryBarrier {
/// ///
/// [`Instance`]: crate::instance::Instance /// [`Instance`]: crate::instance::Instance
/// [`Device`]: crate::device::Device /// [`Device`]: crate::device::Device
/// [`device_uuid`]: crate::device::Properties::device_uuid /// [`device_uuid`]: crate::device::DeviceProperties::device_uuid
/// [`driver_uuid`]: crate::device::Properties::driver_uuid /// [`driver_uuid`]: crate::device::DeviceProperties::driver_uuid
#[derive(Clone, Copy, Debug)] #[derive(Clone, Copy, Debug)]
pub enum QueueFamilyOwnershipTransfer { pub enum QueueFamilyOwnershipTransfer {
/// For a resource with [`Sharing::Exclusive`], transfers ownership between two local queues. /// For a resource with [`Sharing::Exclusive`], transfers ownership between two local queues.

View File

@ -62,7 +62,7 @@
//! [`max_timeline_semaphore_value_difference`] device limit. //! [`max_timeline_semaphore_value_difference`] device limit.
//! //!
//! [fence]: crate::sync::fence //! [fence]: crate::sync::fence
//! [`max_timeline_semaphore_value_difference`]: crate::device::Properties::max_timeline_semaphore_value_difference //! [`max_timeline_semaphore_value_difference`]: crate::device::DeviceProperties::max_timeline_semaphore_value_difference
use crate::{ use crate::{
device::{physical::PhysicalDevice, Device, DeviceOwned}, device::{physical::PhysicalDevice, Device, DeviceOwned},
@ -1221,9 +1221,9 @@ impl SemaphoreCreateInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "semaphore_type".into(), context: "semaphore_type".into(),
problem: "is `SemaphoreType::Timeline`".into(), problem: "is `SemaphoreType::Timeline`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"timeline_semaphore", Requires::DeviceFeature("timeline_semaphore"),
)])]), ])]),
vuids: &["VUID-VkSemaphoreTypeCreateInfo-timelineSemaphore-03252"], vuids: &["VUID-VkSemaphoreTypeCreateInfo-timelineSemaphore-03252"],
})); }));
} }
@ -1918,9 +1918,9 @@ impl ExternalSemaphoreInfo {
return Err(Box::new(ValidationError { return Err(Box::new(ValidationError {
context: "semaphore_type".into(), context: "semaphore_type".into(),
problem: "is `SemaphoreType::Timeline`".into(), problem: "is `SemaphoreType::Timeline`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature( requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
"timeline_semaphore", Requires::DeviceFeature("timeline_semaphore"),
)])]), ])]),
vuids: &["VUID-VkSemaphoreTypeCreateInfo-timelineSemaphore-03252"], vuids: &["VUID-VkSemaphoreTypeCreateInfo-timelineSemaphore-03252"],
})); }));
} }

View File

@ -22,15 +22,15 @@ macro_rules! gfx_dev_and_queue {
($($feature:ident),*) => ({ ($($feature:ident),*) => ({
use crate::device::physical::PhysicalDeviceType; use crate::device::physical::PhysicalDeviceType;
use crate::device::{Device, DeviceCreateInfo, DeviceExtensions, QueueCreateInfo}; use crate::device::{Device, DeviceCreateInfo, DeviceExtensions, QueueCreateInfo};
use crate::device::Features; use crate::device::DeviceFeatures;
let instance = instance!(); let instance = instance!();
let enabled_extensions = DeviceExtensions::empty(); let enabled_extensions = DeviceExtensions::empty();
let enabled_features = Features { let enabled_features = DeviceFeatures {
$( $(
$feature: true, $feature: true,
)* )*
.. Features::empty() .. DeviceFeatures::empty()
}; };
let select = match instance.enumerate_physical_devices() { let select = match instance.enumerate_physical_devices() {