mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[valid] add Capabilities::CUBE_ARRAY_TEXTURES
This commit is contained in:
@@ -113,14 +113,16 @@ bitflags::bitflags! {
|
||||
const MULTISAMPLED_SHADING = 0x800;
|
||||
/// Support for ray queries and acceleration structures.
|
||||
const RAY_QUERY = 0x1000;
|
||||
/// Support for generating two sources for blending from fragement shaders
|
||||
/// Support for generating two sources for blending from fragement shaders.
|
||||
const DUAL_SOURCE_BLENDING = 0x2000;
|
||||
/// Support for arrayed cube textures.
|
||||
const CUBE_ARRAY_TEXTURES = 0x4000;
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Capabilities {
|
||||
fn default() -> Self {
|
||||
Self::MULTISAMPLED_SHADING
|
||||
Self::MULTISAMPLED_SHADING | Self::CUBE_ARRAY_TEXTURES
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -559,9 +559,17 @@ impl super::Validator {
|
||||
|
||||
ti
|
||||
}
|
||||
Ti::Image { .. } | Ti::Sampler { .. } => {
|
||||
Ti::Image {
|
||||
dim,
|
||||
arrayed,
|
||||
class: _,
|
||||
} => {
|
||||
if arrayed && matches!(dim, crate::ImageDimension::Cube) {
|
||||
self.require_type_capability(Capabilities::CUBE_ARRAY_TEXTURES)?;
|
||||
}
|
||||
TypeInfo::new(TypeFlags::ARGUMENT, Alignment::ONE)
|
||||
}
|
||||
Ti::Sampler { .. } => TypeInfo::new(TypeFlags::ARGUMENT, Alignment::ONE),
|
||||
Ti::AccelerationStructure => {
|
||||
self.require_type_capability(Capabilities::RAY_QUERY)?;
|
||||
TypeInfo::new(TypeFlags::ARGUMENT, Alignment::ONE)
|
||||
|
||||
Reference in New Issue
Block a user