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

View File

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

View File

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

View File

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

View File

@ -20,7 +20,7 @@ use vulkano::{
CommandBufferUsage, RecordingCommandBuffer, RenderingAttachmentInfo, RenderingInfo,
},
device::{
physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, Features,
physical::PhysicalDeviceType, Device, DeviceCreateInfo, DeviceExtensions, DeviceFeatures,
QueueCreateInfo, QueueFlags,
},
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
// 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.
enabled_features: Features {
enabled_features: DeviceFeatures {
dynamic_rendering: true,
..Features::empty()
..DeviceFeatures::empty()
},
..Default::default()

View File

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

View File

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

View File

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

View File

@ -286,7 +286,7 @@ fn formats_output(members: &[FormatMember]) -> TokenStream {
api_version,
device_extensions,
instance_extensions,
features: _,
device_features: _,
}| {
let condition_items = (api_version.iter().map(|(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(
self,
#[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)] instance_extensions: &crate::instance::InstanceExtensions,
) -> Result<(), Box<crate::ValidationError>> {

View File

@ -450,7 +450,7 @@ pub struct RequiresOneOf {
pub api_version: Option<(u32, u32)>,
pub device_extensions: Vec<String>,
pub instance_extensions: Vec<String>,
pub features: Vec<String>,
pub device_features: Vec<String>,
}
impl RequiresOneOf {
@ -459,13 +459,13 @@ impl RequiresOneOf {
api_version,
device_extensions,
instance_extensions,
features,
device_features,
} = self;
api_version.is_none()
&& device_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 {
if !self.features.contains(rhs) {
self.features.push(rhs.to_owned());
for rhs in &rhs.device_features {
if !self.device_features.contains(rhs) {
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
/// properties are wrapped in an `Option`.
#[derive(Clone, Debug)]
pub struct Properties {
pub struct DeviceProperties {
#(#struct_items)*
pub _ne: crate::NonExhaustive,
}
impl Default for Properties {
impl Default for DeviceProperties {
fn default() -> Self {
Properties {
DeviceProperties {
#(#default_items)*
_ne: crate::NonExhaustive(()),
}
}
}
impl From<&PropertiesFfi> for Properties {
fn from(properties_ffi: &PropertiesFfi) -> Self {
Properties {
impl From<&DevicePropertiesFfi> for DeviceProperties {
fn from(properties_ffi: &DevicePropertiesFfi) -> Self {
DeviceProperties {
#(#from_items)*
_ne: crate::NonExhaustive(()),
}
@ -279,12 +279,12 @@ fn properties_ffi_output(members: &[PropertiesFfiMember]) -> TokenStream {
quote! {
#[derive(Default)]
pub(crate) struct PropertiesFfi {
pub(crate) struct DevicePropertiesFfi {
properties_vulkan10: ash::vk::PhysicalDeviceProperties2KHR,
#(#struct_items)*
}
impl PropertiesFfi {
impl DevicePropertiesFfi {
pub(crate) fn make_chain(
&mut self,
api_version: Version,

View File

@ -92,7 +92,7 @@ fn spirv_reqs_output(members: &[SpirvReqsMember], is_extension: bool) -> TokenSt
api_version,
ref device_extensions,
instance_extensions: _,
ref features,
ref device_features,
} = requires_one_of;
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);
quote! { device_extensions.#ident }
}))
.chain(features.iter().map(|name| {
.chain(device_features.iter().map(|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 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! {
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)]
let device_extensions = device.enabled_extensions();
#[allow(unused_variables)]
let features = device.enabled_features();
let device_features = device.enabled_features();
#[allow(unused_variables)]
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) => {
requires_one_of
.features
.device_features
.push(feature.feature.to_snake_case());
}
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.dedup();
requires_one_of.features.sort_unstable();
requires_one_of.features.dedup();
requires_one_of.device_features.sort_unstable();
requires_one_of.device_features.dedup();
(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
/// is bound to the acceleration structure.
///
/// [`acceleration_structure`]: crate::device::Features::acceleration_structure
/// [`acceleration_structure`]: crate::device::DeviceFeatures::acceleration_structure
#[inline]
pub unsafe fn new(
device: Arc<Device>,
@ -144,7 +144,7 @@ impl AccelerationStructure {
if !device.enabled_features().acceleration_structure {
return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"acceleration_structure",
)])]),
vuids: &["VUID-vkCreateAccelerationStructureKHR-accelerationStructure-03611"],

View File

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

View File

@ -295,7 +295,7 @@ where
///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`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
/// [`SubbufferAllocator`]: super::allocator::SubbufferAllocator
/// [`RawBuffer::assume_bound`]: crate::buffer::sys::RawBuffer::assume_bound
@ -388,7 +388,7 @@ where
///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`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
/// [`SubbufferAllocator`]: super::allocator::SubbufferAllocator
/// [`RawBuffer::assume_bound`]: crate::buffer::sys::RawBuffer::assume_bound

View File

@ -176,8 +176,8 @@ impl RecordingCommandBuffer {
///
/// [`build_acceleration_structure`]: Self::build_acceleration_structure
/// [`primitive_count`]: AccelerationStructureBuildRangeInfo::primitive_count
/// [`max_instance_count`]: crate::device::Properties::max_instance_count
/// [`max_primitive_count`]: crate::device::Properties::max_primitive_count
/// [`max_instance_count`]: crate::device::DeviceProperties::max_instance_count
/// [`max_primitive_count`]: crate::device::DeviceProperties::max_primitive_count
/// [`primitive_offset`]: AccelerationStructureBuildRangeInfo::primitive_offset
/// [`index_data.index_type().size()`]: AccelerationStructureGeometryTrianglesData::index_data
/// [`index_data`]: AccelerationStructureGeometryTrianglesData::index_data
@ -1620,7 +1620,7 @@ impl RawRecordingCommandBuffer {
.acceleration_structure_indirect_build
{
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"],
..Default::default()
}));

View File

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

View File

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

View File

@ -1,5 +1,5 @@
#[cfg(doc)]
use crate::device::{Features, Properties};
use crate::device::{DeviceFeatures, DeviceProperties};
use crate::{
acceleration_structure::AccelerationStructure,
buffer::{view::BufferView, BufferUsage, Subbuffer},
@ -398,9 +398,9 @@ impl RecordingCommandBuffer {
///
/// One draw is performed for each [`DrawIndirectCommand`] struct in `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
/// [`multi_draw_indirect`](Features::multi_draw_indirect) feature has been
/// [`multi_draw_indirect`](DeviceFeatures::multi_draw_indirect) feature has been
/// enabled.
///
/// 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
/// specified by `max_draw_count`, whichever is lower.
/// 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
/// [`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 [safety requirements for `DrawIndirectCommand`](DrawIndirectCommand#safety) apply.
/// - 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`.
pub unsafe fn draw_indirect_count(
&mut self,
@ -663,7 +663,8 @@ impl RecordingCommandBuffer {
/// the bound vertex-rate vertex buffers.
/// - 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
/// [`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(
&mut self,
index_count: u32,
@ -755,7 +756,7 @@ impl RecordingCommandBuffer {
multiplied by the size of the indices in the bound index buffer, \
is greater than the size of the bound index buffer"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"robust_buffer_access2",
)])]),
vuids: &["VUID-vkCmdDrawIndexed-robustBufferAccess2-07825"],
@ -878,9 +879,9 @@ impl RecordingCommandBuffer {
///
/// One draw is performed for each [`DrawIndexedIndirectCommand`] struct in `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
/// [`multi_draw_indirect`](Features::multi_draw_indirect) feature has been
/// [`multi_draw_indirect`](DeviceFeatures::multi_draw_indirect) feature has been
/// enabled.
///
/// 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
/// specified by `max_draw_count`, whichever is lower.
/// 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
/// [`bind_index_buffer`](Self::bind_index_buffer), and the index ranges of each
@ -1023,7 +1024,7 @@ impl RecordingCommandBuffer {
/// - The [safety requirements for
/// `DrawIndexedIndirectCommand`](DrawIndexedIndirectCommand#safety) apply.
/// - 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`.
pub unsafe fn draw_indexed_indirect_count(
&mut self,
@ -1337,9 +1338,9 @@ impl RecordingCommandBuffer {
///
/// One draw is performed for each [`DrawMeshTasksIndirectCommand`] struct in
/// `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
/// [`multi_draw_indirect`](Features::multi_draw_indirect) feature has been
/// [`multi_draw_indirect`](DeviceFeatures::multi_draw_indirect) feature has been
/// enabled.
///
/// 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
/// specified by `max_draw_count`, whichever is lower.
/// 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
/// [`bind_pipeline_graphics`](Self::bind_pipeline_graphics). Any resources used by the
@ -1468,7 +1469,7 @@ impl RecordingCommandBuffer {
/// - The [safety requirements for
/// `DrawMeshTasksIndirectCommand`](DrawMeshTasksIndirectCommand#safety) apply.
/// - 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`.
pub unsafe fn draw_mesh_tasks_indirect_count(
&mut self,
@ -2750,7 +2751,9 @@ impl RecordingCommandBuffer {
`PrimitiveTopology::*List`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature("primitive_topology_list_restart"),
Requires::DeviceFeature(
"primitive_topology_list_restart",
),
])]),
// vuids?
..Default::default()
@ -2769,7 +2772,7 @@ impl RecordingCommandBuffer {
`PrimitiveTopology::PatchList`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::Feature(
Requires::DeviceFeature(
"primitive_topology_patch_list_restart",
),
])]),
@ -3890,7 +3893,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError {
context: "draw_count".into(),
problem: "is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_draw_indirect",
)])]),
vuids: &["VUID-vkCmdDrawIndirect-drawCount-02718"],
@ -4007,7 +4010,7 @@ impl RawRecordingCommandBuffer {
) -> Result<(), Box<ValidationError>> {
if !self.device().enabled_features().draw_indirect_count {
return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"draw_indirect_count",
)])]),
vuids: &["VUID-vkCmdDrawIndirectCount-None-04445"],
@ -4261,7 +4264,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError {
context: "draw_count".into(),
problem: "is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_draw_indirect",
)])]),
vuids: &["VUID-vkCmdDrawIndexedIndirect-drawCount-02718"],
@ -4378,7 +4381,7 @@ impl RawRecordingCommandBuffer {
) -> Result<(), Box<ValidationError>> {
if !self.device().enabled_features().draw_indirect_count {
return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"draw_indirect_count",
)])]),
vuids: &["VUID-vkCmdDrawIndexedIndirectCount-None-04445"],
@ -4636,7 +4639,7 @@ impl RawRecordingCommandBuffer {
return Err(Box::new(ValidationError {
context: "draw_count".into(),
problem: "is greater than 1".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"multi_draw_indirect",
)])]),
vuids: &["VUID-vkCmdDrawMeshTasksIndirectEXT-drawCount-02718"],
@ -4762,7 +4765,7 @@ impl RawRecordingCommandBuffer {
if !self.device().enabled_features().draw_indirect_count {
return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"draw_indirect_count",
)])]),
vuids: &["VUID-vkCmdDrawMeshTasksIndirectCountEXT-None-04445"],

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -524,7 +524,7 @@ vulkan_bitflags! {
/// [`DescriptorType::StorageBufferDynamic`] or [`DescriptorType::InlineUniformBlock`].
/// - There must be no bindings with `variable_descriptor_count` enabled.
/// - 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
RequiresOneOf([
RequiresAllOf([DeviceExtension(khr_push_descriptor)]),
@ -686,7 +686,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError {
context: "descriptor_type".into(),
problem: "`DescriptorType::InlineUniformBlock`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"inline_uniform_block",
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBinding-descriptorType-04604"],
@ -797,7 +797,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformBufferUpdateAfterBind-03005"],
@ -818,7 +818,7 @@ impl DescriptorSetLayoutBinding {
`descriptor_type` is `DescriptorType::Sampler`, \
`DescriptorType::CombinedImageSampler` or \
`DescriptorType::SampledImage`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"descriptor_binding_sampled_image_update_after_bind"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingSampledImageUpdateAfterBind-03006"],
@ -835,7 +835,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageImageUpdateAfterBind-03007"],
@ -852,7 +852,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageBufferUpdateAfterBind-03008"],
@ -869,7 +869,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUniformTexelBufferUpdateAfterBind-03009"],
@ -886,7 +886,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingStorageTexelBufferUpdateAfterBind-03010"],
@ -903,7 +903,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingInlineUniformBlockUpdateAfterBind-02211"],
@ -920,7 +920,7 @@ impl DescriptorSetLayoutBinding {
problem: "`binding_flags` contains \
`DescriptorBindingFlags::UPDATE_AFTER_BIND`, and \
`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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingAccelerationStructureUpdateAfterBind-03570"],
@ -953,7 +953,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError {
context: "binding_flags".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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingUpdateUnusedWhilePending-03012"],
@ -966,7 +966,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError {
context: "binding_flags".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"
)])]),
vuids: &["VUID-VkDescriptorSetLayoutBindingFlagsCreateInfo-descriptorBindingPartiallyBound-03013"],
@ -981,7 +981,7 @@ impl DescriptorSetLayoutBinding {
return Err(Box::new(ValidationError {
context: "binding_flags".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"
)])]),
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
/// 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
RequiresOneOf([
RequiresAllOf([APIVersion(V1_2)]),
@ -1077,7 +1077,7 @@ vulkan_bitflags! {
///
/// 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
RequiresOneOf([
RequiresAllOf([APIVersion(V1_2)]),
@ -1094,7 +1094,7 @@ vulkan_bitflags! {
/// binding with the highest binding number. The `descriptor_type` must not be
/// [`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
RequiresOneOf([
RequiresAllOf([APIVersion(V1_2)]),
@ -1248,7 +1248,7 @@ pub struct DescriptorSetLayoutSupport {
/// [`descriptor_binding_variable_descriptor_count`] feature isn't enabled on the device, this
/// 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,
}

View File

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

View File

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

View File

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

View File

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

View File

@ -98,9 +98,9 @@ include!(concat!(env!("OUT_DIR"), "/formats.rs"));
impl Format {
/// Returns whether the format can be used with a storage image, without specifying
/// 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
/// [`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.
#[inline]
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.
///
/// [`bind_memory`]: sys::RawImage::bind_memory
/// [`sparse_binding`]: crate::device::Features::sparse_binding
/// [`sparse_binding`]: crate::device::DeviceFeatures::sparse_binding
SPARSE_BINDING = SPARSE_BINDING,*/
/* TODO: enable
@ -1004,13 +1004,13 @@ vulkan_bitflags! {
/// [`sparse_residency16_samples`], corresponding to the sample count of the image, must
/// be enabled on the device.
///
/// [`sparse_binding`]: crate::device::Features::sparse_binding
/// [`sparse_residency_image2_d`]: crate::device::Features::sparse_residency_image2_d
/// [`sparse_residency_image2_3`]: crate::device::Features::sparse_residency_image3_d
/// [`sparse_residency2_samples`]: crate::device::Features::sparse_residency2_samples
/// [`sparse_residency4_samples`]: crate::device::Features::sparse_residency4_samples
/// [`sparse_residency8_samples`]: crate::device::Features::sparse_residency8_samples
/// [`sparse_residency16_samples`]: crate::device::Features::sparse_residency16_samples
/// [`sparse_binding`]: crate::device::DeviceFeatures::sparse_binding
/// [`sparse_residency_image2_d`]: crate::device::DeviceFeatures::sparse_residency_image2_d
/// [`sparse_residency_image2_3`]: crate::device::DeviceFeatures::sparse_residency_image3_d
/// [`sparse_residency2_samples`]: crate::device::DeviceFeatures::sparse_residency2_samples
/// [`sparse_residency4_samples`]: crate::device::DeviceFeatures::sparse_residency4_samples
/// [`sparse_residency8_samples`]: crate::device::DeviceFeatures::sparse_residency8_samples
/// [`sparse_residency16_samples`]: crate::device::DeviceFeatures::sparse_residency16_samples
SPARSE_RESIDENCY = SPARSE_RESIDENCY,*/
/* TODO: enable
@ -1020,7 +1020,7 @@ vulkan_bitflags! {
///
/// 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,*/
/// 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
/// [`DIM2D_VIEW_COMPATIBLE`]: ImageCreateFlags::DIM2D_VIEW_COMPATIBLE
/// [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
RequiresOneOf([
RequiresAllOf([APIVersion(V1_1)]),
@ -1148,8 +1148,8 @@ vulkan_bitflags! {
///
/// [`ImageViewType::Dim2d`]: crate::image::view::ImageViewType::Dim2d
/// [`DIM2D_ARRAY_COMPATIBLE`]: ImageCreateFlags::DIM2D_ARRAY_COMPATIBLE
/// [`image2_d_view_of3_d`]: crate::device::Features::image2_d_view_of3_d
/// [`sampler2_d_view_of3_d`]: crate::device::Features::sampler2_d_view_of3_d
/// [`image2_d_view_of3_d`]: crate::device::DeviceFeatures::image2_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
RequiresOneOf([
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 absolute value of the provided value must not exceed the
/// [`max_sampler_lod_bias`](crate::device::Properties::max_sampler_lod_bias) limit of the
/// device.
/// [`max_sampler_lod_bias`](crate::device::DeviceProperties::max_sampler_lod_bias) limit of
/// the device.
///
/// On [portability
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// 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.
///
/// 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
/// in scaling between the horizontal and vertical framebuffer axes.
///
/// If set to `Some`, the [`sampler_anisotropy`](crate::device::Features::sampler_anisotropy)
/// feature must be enabled on the device, the provided maximum value must not exceed the
/// [`max_sampler_anisotropy`](crate::device::Properties::max_sampler_anisotropy) limit, and
/// the [`Cubic`](Filter::Cubic) filter must not be used.
/// If set to `Some`, the
/// [`sampler_anisotropy`](crate::device::DeviceFeatures::sampler_anisotropy) feature must
/// be enabled on the device, the provided maximum value must not exceed the
/// [`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`.
pub anisotropy: Option<f32>,
@ -674,7 +675,7 @@ pub struct SamplerCreateInfo {
/// 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
/// 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.
///
/// The default value is `None`.
@ -859,7 +860,7 @@ impl SamplerCreateInfo {
context: "address_mode".into(),
problem: "contains `SamplerAddressMode::MirrorClampToEdge`".into(),
requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("sampler_mirror_clamp_to_edge")]),
RequiresAllOf(&[Requires::DeviceFeature("sampler_mirror_clamp_to_edge")]),
RequiresAllOf(&[Requires::DeviceExtension(
"khr_sampler_mirror_clamp_to_edge",
)]),
@ -896,7 +897,7 @@ impl SamplerCreateInfo {
problem: "this device is a portability subset device, and \
`mip_lod_bias` is not zero"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sampler_mip_lod_bias",
)])]),
vuids: &["VUID-VkSamplerCreateInfo-samplerMipLodBias-04467"],
@ -909,7 +910,7 @@ impl SamplerCreateInfo {
return Err(Box::new(ValidationError {
context: "anisotropy".into(),
problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sampler_anisotropy",
)])]),
vuids: &["VUID-VkSamplerCreateInfo-anisotropyEnable-01070"],
@ -1035,7 +1036,7 @@ impl SamplerCreateInfo {
context: "reduction_mode".into(),
problem: "is not `SamplerReductionMode::WeightedAverage`".into(),
requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[Requires::Feature("sampler_filter_minmax")]),
RequiresAllOf(&[Requires::DeviceFeature("sampler_filter_minmax")]),
RequiresAllOf(&[Requires::DeviceExtension("ext_sampler_filter_minmax")]),
]),
..Default::default()
@ -1376,7 +1377,7 @@ vulkan_enum! {
/// Similar to `MirroredRepeat`, except that coordinates are clamped to the range
/// `[-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
/// [`khr_sampler_mirror_clamp_to_edge`](crate::device::DeviceExtensions::khr_sampler_mirror_clamp_to_edge)
/// extension must be enabled on the device.
@ -1444,7 +1445,7 @@ vulkan_enum! {
/// 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
/// [`ext_sampler_filter_minmax`](crate::device::DeviceExtensions::ext_sampler_filter_minmax)
/// extension must be enabled on the device.
@ -1452,7 +1453,7 @@ vulkan_enum! {
/// 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
/// [`ext_sampler_filter_minmax`](crate::device::DeviceExtensions::ext_sampler_filter_minmax)
/// extension must be enabled on the device.
@ -1673,7 +1674,9 @@ mod tests {
*err,
ValidationError {
requires_one_of: RequiresOneOf([
RequiresAllOf([Requires::Feature("sampler_mirror_clamp_to_edge")]),
RequiresAllOf([Requires::DeviceFeature(
"sampler_mirror_clamp_to_edge"
)]),
RequiresAllOf([Requires::DeviceExtension(
"khr_sampler_mirror_clamp_to_edge"
)],)
@ -1705,7 +1708,7 @@ mod tests {
*err,
ValidationError {
requires_one_of: RequiresOneOf([
RequiresAllOf([Requires::Feature("sampler_filter_minmax")]),
RequiresAllOf([Requires::DeviceFeature("sampler_filter_minmax")]),
RequiresAllOf([Requires::DeviceExtension("ext_sampler_filter_minmax")])
],),
..

View File

@ -138,7 +138,7 @@ pub struct SamplerYcbcrConversion {
impl 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.
#[inline]
pub fn new(
@ -156,7 +156,7 @@ impl SamplerYcbcrConversion {
) -> Result<(), Box<ValidationError>> {
if !device.enabled_features().sampler_ycbcr_conversion {
return Err(Box::new(ValidationError {
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sampler_ycbcr_conversion",
)])]),
vuids: &["VUID-vkCreateSamplerYcbcrConversion-None-01648"],
@ -909,7 +909,7 @@ mod tests {
if matches!(
*err,
ValidationError {
requires_one_of: RequiresOneOf([RequiresAllOf([Requires::Feature(
requires_one_of: RequiresOneOf([RequiresAllOf([Requires::DeviceFeature(
"sampler_ycbcr_conversion"
)])]),
..

View File

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

View File

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

View File

@ -666,7 +666,7 @@ impl Display for RequiresAllOf {
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum Requires {
APIVersion(Version),
Feature(&'static str),
DeviceFeature(&'static str),
DeviceExtension(&'static str),
InstanceExtension(&'static str),
}
@ -677,7 +677,9 @@ impl Display for Requires {
Requires::APIVersion(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) => {
write!(f, "device extension `{}`", device_extension)
}

View File

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

View File

@ -201,7 +201,7 @@
//!
//! [suballocators]: Suballocator
//! [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
//! [`Rc`]: std::rc::Rc
//! [`mem::forget`]: std::mem::forget
@ -267,7 +267,7 @@ use std::{
/// [buffer-image granularity]: self#buffer-image-granularity
/// [host-visible]: MemoryPropertyFlags::HOST_VISIBLE
/// [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 {
/// 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
@ -1676,7 +1676,7 @@ pub struct GenericMemoryAllocatorCreateInfo<'a> {
///
/// [`DEVICE_ADDRESS`]: MemoryAllocateFlags::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
/// [`khr_device_group`]: crate::device::DeviceExtensions::khr_device_group
pub device_address: bool,

View File

@ -591,7 +591,7 @@ impl DeviceMemory {
///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`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]
pub unsafe fn invalidate_range(
&self,
@ -646,7 +646,7 @@ impl DeviceMemory {
///
/// [host-coherent]: crate::memory::MemoryPropertyFlags::HOST_COHERENT
/// [`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]
pub unsafe fn flush_range(
&self,
@ -965,7 +965,7 @@ impl<'d> MemoryAllocateInfo<'d> {
problem: "refers to a memory type where `property_flags` contains \
`MemoryPropertyFlags::PROTECTED`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"protected_memory",
)])]),
vuids: &["VUID-VkMemoryAllocateInfo-memoryTypeIndex-01872"],
@ -982,7 +982,7 @@ impl<'d> MemoryAllocateInfo<'d> {
problem: "refers to a memory type where `property_flags` contains \
`MemoryPropertyFlags::DEVICE_COHERENT`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"device_coherent_memory",
)])]),
vuids: &["VUID-vkAllocateMemory-deviceCoherentMemory-02790"],
@ -1096,11 +1096,11 @@ impl<'d> MemoryAllocateInfo<'d> {
requires_one_of: RequiresOneOf(&[
RequiresAllOf(&[
Requires::APIVersion(Version::V1_2),
Requires::Feature("buffer_device_address"),
Requires::DeviceFeature("buffer_device_address"),
]),
RequiresAllOf(&[
Requires::DeviceExtension("khr_buffer_device_address"),
Requires::Feature("buffer_device_address"),
Requires::DeviceFeature("buffer_device_address"),
]),
]),
vuids: &["VUID-VkMemoryAllocateInfo-flags-03331"],
@ -1352,7 +1352,7 @@ vulkan_bitflags! {
/// the device.
///
/// [`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
DEVICE_ADDRESS = DEVICE_ADDRESS,
@ -1372,7 +1372,7 @@ pub struct MemoryMapInfo {
/// The default value is `0`.
///
/// [`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,
/// The size (in bytes) of the mapping.
@ -1385,7 +1385,7 @@ pub struct MemoryMapInfo {
/// The default value is `0`, which must be overridden.
///
/// [`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 _ne: crate::NonExhaustive,
@ -1584,7 +1584,7 @@ pub struct MappedMemoryRange {
///
/// 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,
/// The size (in bytes) of the range.
@ -1594,7 +1594,7 @@ pub struct MappedMemoryRange {
///
/// 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 _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
/// 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
/// [`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`.
///
/// # Panics
@ -1888,7 +1888,7 @@ impl MappedDeviceMemory {
/// `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
/// 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`.
///
/// # Safety
@ -1943,7 +1943,7 @@ impl MappedDeviceMemory {
/// `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
/// 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`.
///
/// # Safety
@ -1993,7 +1993,7 @@ impl MappedDeviceMemory {
/// `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
/// 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`.
///
/// # Safety
@ -2027,7 +2027,7 @@ impl MappedDeviceMemory {
/// `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
/// 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`.
///
/// # Safety

View File

@ -307,7 +307,7 @@ impl ResourceMemory {
/// `memory_range`.
///
/// [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]
pub unsafe fn invalidate_range(
&self,
@ -341,7 +341,7 @@ impl ResourceMemory {
/// portion of the specified `memory_range`.
///
/// [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]
pub unsafe fn flush_range(
&self,

View File

@ -158,7 +158,7 @@ use std::{
/// You may also want to consider using [the `uniform_buffer_standard_layout` feature].
///
/// [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)]
pub struct Padded<T, const N: usize> {
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
/// 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.
///
/// The default value is `None`.
@ -45,8 +45,9 @@ pub struct ColorBlendState {
/// match the number of color attachments in the subpass.
///
/// 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)
/// feature must be enabled on the device.
/// element differ, then the
/// [`independent_blend`](crate::device::DeviceFeatures::independent_blend) feature must be
/// enabled on the device.
///
/// The default value is empty,
/// which must be overridden if the subpass has color attachments.
@ -178,7 +179,7 @@ impl ColorBlendState {
return Err(Box::new(ValidationError {
context: "logic_op".into(),
problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"logic_op",
)])]),
vuids: &["VUID-VkPipelineColorBlendStateCreateInfo-logicOpEnable-00606"],
@ -210,9 +211,9 @@ impl ColorBlendState {
index
)
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"independent_blend",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("independent_blend"),
])]),
vuids: &["VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605"],
..Default::default()
}));
@ -565,8 +566,8 @@ pub struct ColorBlendAttachmentState {
/// and nothing is written.
///
/// If set to anything other than `Fixed(true)`, the
/// [`color_write_enable`](crate::device::Features::color_write_enable) feature must be enabled
/// on the device.
/// [`color_write_enable`](crate::device::DeviceFeatures::color_write_enable) feature must be
/// enabled on the device.
///
/// The default value is `true`.
pub color_write_enable: bool,
@ -601,7 +602,7 @@ impl ColorBlendAttachmentState {
return Err(Box::new(ValidationError {
context: "color_write_enable".into(),
problem: "is `false`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"color_write_enable",
)])]),
vuids: &["VUID-VkPipelineColorWriteCreateInfoEXT-pAttachments-04801"],
@ -768,7 +769,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError {
context: "src_color_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend",
)])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-srcColorBlendFactor-00608"],
@ -785,7 +786,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError {
context: "dst_color_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend",
)])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-dstColorBlendFactor-00609"],
@ -802,7 +803,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError {
context: "src_alpha_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend",
)])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-srcAlphaBlendFactor-00610"],
@ -819,7 +820,7 @@ impl AttachmentBlend {
return Err(Box::new(ValidationError {
context: "dst_alpha_blend_factor".into(),
problem: "is `BlendFactor::Src1*`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"dual_src_blend",
)])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-dstAlphaBlendFactor-00611"],
@ -838,7 +839,7 @@ impl AttachmentBlend {
problem: "this device is a portability subset device, and \
`src_color_blend_factor` is `BlendFactor::ConstantAlpha` or \
`BlendFactor::OneMinusConstantAlpha`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"constant_alpha_color_blend_factors",
)])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04454"],
@ -854,7 +855,7 @@ impl AttachmentBlend {
problem: "this device is a portability subset device, and \
`dst_color_blend_factor` is `BlendFactor::ConstantAlpha` or \
`BlendFactor::OneMinusConstantAlpha`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"constant_alpha_color_blend_factors",
)])]),
vuids: &["VUID-VkPipelineColorBlendAttachmentState-constantAlphaColorBlendFactors-04455"],
@ -891,7 +892,7 @@ vulkan_enum! {
/// and produces new inputs to be fed to `BlendOp`.
///
/// 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.
BlendFactor = BlendFactor(i32);
@ -936,7 +937,7 @@ vulkan_enum! {
/// 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,
/// 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.
ConstantAlpha = CONSTANT_ALPHA,
@ -945,7 +946,7 @@ vulkan_enum! {
/// 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,
/// 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.
OneMinusConstantAlpha = ONE_MINUS_CONSTANT_ALPHA,

View File

@ -114,7 +114,7 @@ impl DepthStencilState {
return Err(Box::new(ValidationError {
context: "depth_bounds".into(),
problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"depth_bounds",
)])]),
vuids: &[
@ -314,7 +314,7 @@ pub struct StencilOpState {
/// 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
/// 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.
///
/// The default value is [`u32::MAX`].

View File

@ -18,7 +18,7 @@ pub struct InputAssemblyState {
/// The default value is [`PrimitiveTopology::TriangleList`].
///
/// [`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,
/// 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 \
`topology` is `PrimitiveTopology::TriangleFan`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"triangle_fans",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("triangle_fans"),
])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-triangleFans-04452"],
..Default::default()
}));
@ -114,9 +114,9 @@ impl InputAssemblyState {
return Err(Box::new(ValidationError {
context: "topology".into(),
problem: "is `PrimitiveTopology::*WithAdjacency`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"geometry_shader",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("geometry_shader"),
])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00429"],
}));
}
@ -126,9 +126,9 @@ impl InputAssemblyState {
return Err(Box::new(ValidationError {
context: "topology".into(),
problem: "is `PrimitiveTopology::PatchList`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"tessellation_shader",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("tessellation_shader"),
])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-00430"],
}));
}
@ -148,9 +148,9 @@ impl InputAssemblyState {
problem: "`topology` is `PrimitiveTopology::*List`, and \
`primitive_restart_enable` is `true`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"primitive_topology_list_restart",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("primitive_topology_list_restart"),
])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06252"],
..Default::default()
}));
@ -165,9 +165,9 @@ impl InputAssemblyState {
problem: "`topology` is `PrimitiveTopology::PatchList`, and \
`primitive_restart_enable` is `true`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"primitive_topology_patch_list_restart",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("primitive_topology_patch_list_restart"),
])]),
vuids: &["VUID-VkPipelineInputAssemblyStateCreateInfo-topology-06253"],
..Default::default()
}));
@ -195,14 +195,14 @@ vulkan_enum! {
/// When enabling primitive restart, "list" topologies require a feature to be enabled on the
/// device:
/// - 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.
/// - 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.
///
/// [`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);
/// 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).
///
/// 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.
///
/// Topology class: Triangle
TriangleFan = TRIANGLE_FAN,
/// 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
LineListWithAdjacency = LINE_LIST_WITH_ADJACENCY,
/// 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
LineStripWithAdjacency = LINE_STRIP_WITH_ADJACENCY,
/// 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
TriangleListWithAdjacency = TRIANGLE_LIST_WITH_ADJACENCY,
/// 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
TriangleStripWithAdjacency = TRIANGLE_STRIP_WITH_ADJACENCY,
/// 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
PatchList = PATCH_LIST,

View File

@ -2124,9 +2124,9 @@ impl GraphicsPipelineCreateInfo {
return Err(Box::new(ValidationError {
context: "subpass".into(),
problem: "is `PipelineRenderPassType::BeginRendering`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"dynamic_rendering",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("dynamic_rendering"),
])]),
vuids: &["VUID-VkGraphicsPipelineCreateInfo-dynamicRendering-06576"],
}));
}
@ -2309,7 +2309,7 @@ impl GraphicsPipelineCreateInfo {
return Err(Box::new(ValidationError {
context: "rasterization_state.line_width".into(),
problem: "is not 1.0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"wide_lines",
)])]),
vuids: &["VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00749"],
@ -2330,9 +2330,9 @@ impl GraphicsPipelineCreateInfo {
return Err(Box::new(ValidationError {
context: "rasterization_state.depth_bias.clamp".into(),
problem: "is not 0.0".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"depth_bias_clamp",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("depth_bias_clamp"),
])]),
vuids: &["VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-00754"],
}));
}
@ -2561,7 +2561,7 @@ impl GraphicsPipelineCreateInfo {
`rasterization_state.cull_mode` is `CullMode::None`, and \
`depth_stencil_state.stencil.front.reference` does not equal \
`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",
)])]),
vuids: &["VUID-VkPipelineDepthStencilStateCreateInfo-separateStencilMaskRef-04453"],
@ -2713,9 +2713,9 @@ impl GraphicsPipelineCreateInfo {
problem: "`stages` contains tessellation shaders, and \
`subpass` has a non-zero `view_mask`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"multiview_tessellation_shader",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("multiview_tessellation_shader"),
])]),
vuids: &[
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06047",
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06057",
@ -2731,9 +2731,9 @@ impl GraphicsPipelineCreateInfo {
problem: "`stages` contains a geometry shader, and \
`subpass` has a non-zero `view_mask`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"multiview_geometry_shader",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("multiview_geometry_shader"),
])]),
vuids: &[
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06048",
"VUID-VkGraphicsPipelineCreateInfo-renderPass-06058",
@ -2749,9 +2749,9 @@ impl GraphicsPipelineCreateInfo {
problem: "`stages` contains a mesh shader, and \
`subpass` has a non-zero `view_mask`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
"multiview_mesh_shader",
)])]),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[
Requires::DeviceFeature("multiview_mesh_shader"),
])]),
vuids: &[
"VUID-VkGraphicsPipelineCreateInfo-renderPass-07064",
"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
/// 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.
///
/// 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
/// 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.
///
/// The default value is `false`.
@ -103,7 +104,7 @@ impl MultisampleState {
return Err(Box::new(ValidationError {
context: "min_sample_shading".into(),
problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"sample_rate_shading",
)])]),
vuids: &["VUID-VkPipelineMultisampleStateCreateInfo-sampleShadingEnable-00784"],
@ -124,7 +125,7 @@ impl MultisampleState {
return Err(Box::new(ValidationError {
context: "alpha_to_one_enable".into(),
problem: "is `true`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"alpha_to_one",
)])]),
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
/// 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.
///
/// The default value is `false`.
@ -27,7 +27,7 @@ pub struct RasterizationState {
/// into points.
///
/// 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.
///
/// The default value is [`PolygonMode::Fill`].
@ -54,7 +54,7 @@ pub struct RasterizationState {
/// Width, in pixels, of lines when drawing lines.
///
/// 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 default value is `1.0`.
@ -162,7 +162,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError {
context: "depth_clamp_enable".into(),
problem: "is `true`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"depth_clamp",
)])]),
vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-depthClampEnable-00782"],
@ -173,7 +173,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError {
context: "polygon_mode".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",
)])]),
vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-polygonMode-01507"],
@ -190,7 +190,7 @@ impl RasterizationState {
`rasterizer_discard_enable` is `false`, and \
`polygon_mode` is `PolygonMode::Point`"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"point_polygons",
)])]),
vuids: &["VUID-VkPipelineRasterizationStateCreateInfo-pointPolygons-04458"],
@ -227,7 +227,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError {
context: "line_rasterization_mode".into(),
problem: "is `LineRasterizationMode::Rectangular`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"rectangular_lines",
)])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02768"],
@ -239,7 +239,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError {
context: "line_rasterization_mode".into(),
problem: "is `LineRasterizationMode::Bresenham`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"bresenham_lines",
)])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02769"],
@ -251,7 +251,7 @@ impl RasterizationState {
return Err(Box::new(ValidationError {
context: "line_rasterization_mode".into(),
problem: "is `LineRasterizationMode::RectangularSmooth`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"smooth_lines",
)])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-lineRasterizationMode-02770"],
@ -280,7 +280,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \
`LineRasterizationMode::Default`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_rectangular_lines",
)])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02774"],
@ -305,7 +305,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \
`LineRasterizationMode::Rectangular`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_rectangular_lines",
)])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02771"],
@ -319,7 +319,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \
`LineRasterizationMode::Bresenham`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_bresenham_lines",
)])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02772"],
@ -333,7 +333,7 @@ impl RasterizationState {
problem: "`line_stipple` is `Some`, and \
`line_rasterization_mode` is \
`LineRasterizationMode::RectangularSmooth`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"stippled_smooth_lines",
)])]),
vuids: &["VUID-VkPipelineRasterizationLineStateCreateInfoEXT-stippledLineEnable-02773"],
@ -359,8 +359,8 @@ pub struct DepthBiasState {
/// The maximum (or minimum) depth bias of a fragment.
///
/// 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
/// the device.
/// [`depth_bias_clamp`](crate::device::DeviceFeatures::depth_bias_clamp) feature to be enabled
/// on the device.
///
/// The default value is `0.0`.
pub clamp: f32,
@ -450,7 +450,7 @@ vulkan_enum! {
// TODO: document further
/// On [portability subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// 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.
Point = POINT,
@ -475,36 +475,36 @@ vulkan_enum! {
/// The rasterization mode to use for lines.
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.
///
/// If [`RasterizationState::line_stipple`] is `Some`, then the
/// [`strict_lines`](crate::device::Properties::strict_lines) property must be `true` and the
/// [`stippled_rectangular_lines`](crate::device::Features::stippled_rectangular_lines) feature
/// [`strict_lines`](crate::device::DeviceProperties::strict_lines) property must be `true` and the
/// [`stippled_rectangular_lines`](crate::device::DeviceFeatures::stippled_rectangular_lines) feature
/// must be enabled on the device.
Default = DEFAULT,
/// 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
/// [`stippled_rectangular_lines`](crate::device::Features::stippled_rectangular_lines) must
/// [`stippled_rectangular_lines`](crate::device::DeviceFeatures::stippled_rectangular_lines) must
/// also be enabled.
Rectangular = RECTANGULAR,
/// 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
/// [`stippled_bresenham_lines`](crate::device::Features::stippled_bresenham_lines) must
/// [`stippled_bresenham_lines`](crate::device::DeviceFeatures::stippled_bresenham_lines) must
/// also be enabled.
Bresenham = BRESENHAM,
/// 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
/// [`stippled_smooth_lines`](crate::device::Features::stippled_smooth_lines) must
/// [`stippled_smooth_lines`](crate::device::DeviceFeatures::stippled_smooth_lines) must
/// also be enabled.
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
/// 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
/// must be enabled on the device.
/// If set to a nonzero value, the [`multiview`](crate::device::DeviceFeatures::multiview)
/// feature must be enabled on the device.
///
/// The default value is `0`.
pub view_mask: u32,
@ -151,7 +151,9 @@ impl PipelineRenderingCreateInfo {
return Err(Box::new(ValidationError {
context: "view_mask".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"],
}));
}

View File

@ -42,8 +42,8 @@ impl BuffersDefinition {
/// `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.
///
/// [`vertex_attribute_instance_rate_divisor`]: crate::device::Features::vertex_attribute_instance_rate_divisor
/// [`vertex_attribute_instance_rate_zero_divisor`]: crate::device::Features::vertex_attribute_instance_rate_zero_divisor
/// [`vertex_attribute_instance_rate_divisor`]: crate::device::DeviceFeatures::vertex_attribute_instance_rate_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 {
self.0.push(V::per_instance_with_divisor(divisor));
self

View File

@ -288,7 +288,7 @@ impl VertexInputState {
location,
)
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"vertex_attribute_access_beyond_stride",
)])]),
vuids: &[
@ -538,7 +538,7 @@ impl VertexInputBindingDescription {
context: "input_rate".into(),
problem: "is `VertexInputRate::Instance`, and \
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",
)])]),
vuids: &[
@ -557,7 +557,7 @@ impl VertexInputBindingDescription {
context: "input_rate".into(),
problem: "is `VertexInputRate::Instance`, and \
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",
)])]),
vuids: &[
@ -607,7 +607,7 @@ pub struct VertexInputAttributeDescription {
/// 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
/// `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.
///
/// 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
/// 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_zero_divisor`]: crate::device::Features::vertex_attribute_instance_rate_zero_divisor
/// [`vertex_attribute_instance_rate_divisor`]: crate::device::DeviceFeatures::vertex_attribute_instance_rate_divisor
/// [`vertex_attribute_instance_rate_zero_divisor`]: crate::device::DeviceFeatures::vertex_attribute_instance_rate_zero_divisor
Instance { divisor: u32 },
}

View File

@ -185,7 +185,7 @@ impl ViewportState {
return Err(Box::new(ValidationError {
context: "viewports".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",
)])]),
vuids: &["VUID-VkPipelineViewportStateCreateInfo-viewportCount-01216"],
@ -196,7 +196,7 @@ impl ViewportState {
return Err(Box::new(ValidationError {
context: "scissors".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",
)])]),
vuids: &["VUID-VkPipelineViewportStateCreateInfo-scissorCount-01217"],

View File

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

View File

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

View File

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

View File

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

View File

@ -424,8 +424,9 @@ pub struct FramebufferCreateInfo {
/// must be specified in that case.
///
/// The extent, whether automatically calculated or specified explicitly, must not be larger
/// than the [`max_framebuffer_width`](crate::device::Properties::max_framebuffer_width) and
/// [`max_framebuffer_height`](crate::device::Properties::max_framebuffer_height) limits.
/// than the [`max_framebuffer_width`](crate::device::DeviceProperties::max_framebuffer_width)
/// and [`max_framebuffer_height`](crate::device::DeviceProperties::max_framebuffer_height)
/// limits.
///
/// The default value is `[0, 0]`.
pub extent: [u32; 2],
@ -439,7 +440,7 @@ pub struct FramebufferCreateInfo {
///
/// The number of layers, whether automatically calculated or specified explicitly, must not be
/// 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
/// must be 0 or 1.

View File

@ -1646,7 +1646,7 @@ pub struct AttachmentDescription {
/// or both `Some`.
///
/// 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.
///
/// The default value is `None`.
@ -1658,7 +1658,7 @@ pub struct AttachmentDescription {
/// or both `Some`.
///
/// 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.
///
/// The default value is `None`.
@ -1764,7 +1764,7 @@ impl AttachmentDescription {
problem: "specifies a layout for only the depth aspect or only the \
stencil aspect"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts",
)])]),
vuids: &["VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03284"],
@ -1783,7 +1783,7 @@ impl AttachmentDescription {
problem: "specifies a layout for only the depth aspect or only the \
stencil aspect"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts",
)])]),
vuids: &["VUID-VkAttachmentDescription2-separateDepthStencilLayouts-03285"],
@ -1819,7 +1819,7 @@ impl AttachmentDescription {
return Err(Box::new(ValidationError {
context: "stencil_initial_layout".into(),
problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts",
)])]),
..Default::default()
@ -1860,7 +1860,7 @@ impl AttachmentDescription {
return Err(Box::new(ValidationError {
context: "stencil_final_layout".into(),
problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts",
)])]),
..Default::default()
@ -2164,7 +2164,8 @@ pub struct SubpassDescription {
/// 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
/// [`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`.
pub view_mask: u32,
@ -2183,8 +2184,8 @@ pub struct SubpassDescription {
/// subpass.
///
/// The number of color attachments must be less than the
/// [`max_color_attachments`](crate::device::Properties::max_color_attachments) limit of the
/// physical device. All color attachments must have the same `samples` value.
/// [`max_color_attachments`](crate::device::DeviceProperties::max_color_attachments) limit of
/// the physical device. All color attachments must have the same `samples` value.
///
/// The default value is empty.
pub color_attachments: Vec<Option<AttachmentReference>>,
@ -2934,7 +2935,9 @@ impl SubpassDescription {
return Err(Box::new(ValidationError {
context: "view_mask".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"],
}));
}
@ -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).
///
/// 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.
///
/// The default value is `None`.
@ -3114,7 +3117,7 @@ impl AttachmentReference {
context: "layout".into(),
problem: "specifies a layout for only the depth aspect or only the stencil aspect"
.into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts",
)])]),
vuids: &["VUID-VkAttachmentReference2-separateDepthStencilLayouts-03313"],
@ -3126,7 +3129,7 @@ impl AttachmentReference {
return Err(Box::new(ValidationError {
context: "stencil_layout".into(),
problem: "is `Some`".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"separate_depth_stencil_layouts",
)])]),
..Default::default()
@ -3380,7 +3383,7 @@ impl SubpassDependency {
return Err(Box::new(ValidationError {
context: "src_stages".into(),
problem: "is empty".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2",
)])]),
vuids: &["VUID-VkSubpassDependency2-srcStageMask-03937"],
@ -3391,7 +3394,7 @@ impl SubpassDependency {
return Err(Box::new(ValidationError {
context: "dst_stages".into(),
problem: "is empty".into(),
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::Feature(
requires_one_of: RequiresOneOf(&[RequiresAllOf(&[Requires::DeviceFeature(
"synchronization2",
)])]),
vuids: &["VUID-VkSubpassDependency2-dstStageMask-03937"],

View File

@ -140,8 +140,8 @@
//!
//! ## Buffers and memory accesses
//!
//! - If the [`robust_buffer_access`](Features::robust_buffer_access) feature is not enabled on the
//! device, then the shader must not access any values outside the range of the buffer, as
//! - If the [`robust_buffer_access`](DeviceFeatures::robust_buffer_access) feature is not enabled
//! 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>
//! - If any `PhysicalStorageBuffer` pointers to device memory are dereferenced in the shader,
//! then:
@ -317,8 +317,8 @@
//!
//! [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
//! [`scalar_block_layout`]: Features::scalar_block_layout
//! [`uniform_buffer_standard_layout`]: Features::uniform_buffer_standard_layout
//! [`scalar_block_layout`]: DeviceFeatures::scalar_block_layout
//! [`uniform_buffer_standard_layout`]: DeviceFeatures::uniform_buffer_standard_layout
//! [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
//! [\[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::{
acceleration_structure::BuildAccelerationStructureFlags,
descriptor_set::layout::DescriptorBindingFlags,
device::{physical::PhysicalDevice, Features, Properties},
device::{physical::PhysicalDevice, DeviceFeatures, DeviceProperties},
format::FormatFeatures,
image::{
sampler::{Filter, Sampler, SamplerCreateInfo, SamplerMipmapMode, SamplerReductionMode},

View File

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

View File

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

View File

@ -45,7 +45,7 @@ impl Event {
/// On [portability
/// subset](crate::instance#portability-subset-devices-and-the-enumerate_portability-flag)
/// devices, the
/// [`events`](crate::device::Features::events)
/// [`events`](crate::device::DeviceFeatures::events)
/// feature must be enabled on the device.
#[inline]
pub fn new(
@ -64,7 +64,9 @@ impl Event {
if device.enabled_extensions().khr_portability_subset && !device.enabled_features().events {
return Err(Box::new(ValidationError {
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"],
..Default::default()
}));

View File

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

View File

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