mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-25 00:04:15 +00:00
Adjust capability checks in vulkano-shaders
This commit is contained in:
parent
9af3aa371f
commit
87191bbb97
@ -533,5 +533,6 @@ enumeration! {
|
||||
CapabilityGeometryStreams = 54,
|
||||
CapabilityStorageImageReadWithoutFormat = 55,
|
||||
CapabilityStorageImageWriteWithoutFormat = 56,
|
||||
CapabilityMultiViewport = 57,
|
||||
} Capability;
|
||||
}
|
||||
|
@ -297,60 +297,61 @@ fn member_name_from_id(doc: &parse::Spirv, searched: u32, searched_member: u32)
|
||||
// TODO: this function is a draft, as the actual names may not be the same
|
||||
fn capability_name(cap: &enums::Capability) -> Option<&'static str> {
|
||||
match *cap {
|
||||
enums::Capability::CapabilityMatrix => Some("Matrix"),
|
||||
enums::Capability::CapabilityShader => None,
|
||||
enums::Capability::CapabilityGeometry => Some("Geometry"),
|
||||
enums::Capability::CapabilityTessellation => Some("Tessellation"),
|
||||
enums::Capability::CapabilityAddresses => Some("Addresses"),
|
||||
enums::Capability::CapabilityLinkage => Some("Linkage"),
|
||||
enums::Capability::CapabilityKernel => Some("Kernel"),
|
||||
enums::Capability::CapabilityVector16 => Some("Vector16"),
|
||||
enums::Capability::CapabilityFloat16Buffer => Some("Float16Buffer"),
|
||||
enums::Capability::CapabilityFloat16 => Some("Float16"),
|
||||
enums::Capability::CapabilityFloat64 => Some("Float64"),
|
||||
enums::Capability::CapabilityInt64 => Some("Int64"),
|
||||
enums::Capability::CapabilityInt64Atomics => Some("Int64Atomics"),
|
||||
enums::Capability::CapabilityImageBasic => Some("ImageBasic"),
|
||||
enums::Capability::CapabilityImageReadWrite => Some("ImageReadWrite"),
|
||||
enums::Capability::CapabilityImageMipmap => Some("ImageMipmap"),
|
||||
enums::Capability::CapabilityPipes => Some("Pipes"),
|
||||
enums::Capability::CapabilityGroups => Some("Groups"),
|
||||
enums::Capability::CapabilityDeviceEnqueue => Some("DeviceEnqueue"),
|
||||
enums::Capability::CapabilityLiteralSampler => Some("LiteralSampler"),
|
||||
enums::Capability::CapabilityAtomicStorage => Some("AtomicStorage"),
|
||||
enums::Capability::CapabilityInt16 => Some("Int16"),
|
||||
enums::Capability::CapabilityTessellationPointSize => Some("TessellationPointSize"),
|
||||
enums::Capability::CapabilityGeometryPointSize => Some("GeometryPointSize"),
|
||||
enums::Capability::CapabilityImageGatherExtended => Some("ImageGatherExtended"),
|
||||
enums::Capability::CapabilityStorageImageMultisample => Some("StorageImageMultisample"),
|
||||
enums::Capability::CapabilityUniformBufferArrayDynamicIndexing => Some("UniformBufferArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilitySampledImageArrayDynamicIndexing => Some("SampledImageArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilityStorageBufferArrayDynamicIndexing => Some("StorageBufferArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilityStorageImageArrayDynamicIndexing => Some("StorageImageArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilityClipDistance => Some("ClipDistance"),
|
||||
enums::Capability::CapabilityCullDistance => Some("CullDistance"),
|
||||
enums::Capability::CapabilityImageCubeArray => Some("ImageCubeArray"),
|
||||
enums::Capability::CapabilitySampleRateShading => Some("SampleRateShading"),
|
||||
enums::Capability::CapabilityImageRect => Some("ImageRect"),
|
||||
enums::Capability::CapabilitySampledRect => Some("SampledRect"),
|
||||
enums::Capability::CapabilityGenericPointer => Some("GenericPointer"),
|
||||
enums::Capability::CapabilityInt8 => Some("Int8"),
|
||||
enums::Capability::CapabilityInputAttachment => Some("InputAttachment"),
|
||||
enums::Capability::CapabilitySparseResidency => Some("SparseResidency"),
|
||||
enums::Capability::CapabilityMinLod => Some("MinLod"),
|
||||
enums::Capability::CapabilitySampled1D => Some("Sampled1D"),
|
||||
enums::Capability::CapabilityImage1D => Some("Image1D"),
|
||||
enums::Capability::CapabilitySampledCubeArray => Some("SampledCubeArray"),
|
||||
enums::Capability::CapabilitySampledBuffer => Some("SampledBuffer"),
|
||||
enums::Capability::CapabilityImageBuffer => Some("ImageBuffer"),
|
||||
enums::Capability::CapabilityImageMSArray => Some("ImageMSArray"),
|
||||
enums::Capability::CapabilityStorageImageExtendedFormats => Some("StorageImageExtendedFormats"),
|
||||
enums::Capability::CapabilityImageQuery => Some("ImageQuery"),
|
||||
enums::Capability::CapabilityDerivativeControl => Some("DerivativeControl"),
|
||||
enums::Capability::CapabilityInterpolationFunction => Some("InterpolationFunction"),
|
||||
enums::Capability::CapabilityTransformFeedback => Some("TransformFeedback"),
|
||||
enums::Capability::CapabilityGeometryStreams => Some("GeometryStreams"),
|
||||
enums::Capability::CapabilityStorageImageReadWithoutFormat => Some("StorageImageReadWithoutFormat"),
|
||||
enums::Capability::CapabilityStorageImageWriteWithoutFormat => Some("StorageImageWriteWithoutFormat"),
|
||||
enums::Capability::CapabilityMatrix => None, // always supported
|
||||
enums::Capability::CapabilityShader => None, // always supported
|
||||
enums::Capability::CapabilityGeometry => Some("geometryShader"),
|
||||
enums::Capability::CapabilityTessellation => Some("tessellationShader"),
|
||||
enums::Capability::CapabilityAddresses => panic!(), // not supported
|
||||
enums::Capability::CapabilityLinkage => panic!(), // not supported
|
||||
enums::Capability::CapabilityKernel => panic!(), // not supported
|
||||
enums::Capability::CapabilityVector16 => panic!(), // not supported
|
||||
enums::Capability::CapabilityFloat16Buffer => panic!(), // not supported
|
||||
enums::Capability::CapabilityFloat16 => panic!(), // not supported
|
||||
enums::Capability::CapabilityFloat64 => Some("shaderFloat64"),
|
||||
enums::Capability::CapabilityInt64 => Some("shaderInt64"),
|
||||
enums::Capability::CapabilityInt64Atomics => panic!(), // not supported
|
||||
enums::Capability::CapabilityImageBasic => panic!(), // not supported
|
||||
enums::Capability::CapabilityImageReadWrite => panic!(), // not supported
|
||||
enums::Capability::CapabilityImageMipmap => panic!(), // not supported
|
||||
enums::Capability::CapabilityPipes => panic!(), // not supported
|
||||
enums::Capability::CapabilityGroups => panic!(), // not supported
|
||||
enums::Capability::CapabilityDeviceEnqueue => panic!(), // not supported
|
||||
enums::Capability::CapabilityLiteralSampler => panic!(), // not supported
|
||||
enums::Capability::CapabilityAtomicStorage => panic!(), // not supported
|
||||
enums::Capability::CapabilityInt16 => Some("shaderInt16"),
|
||||
enums::Capability::CapabilityTessellationPointSize => Some("shaderTessellationAndGeometryPointSize"),
|
||||
enums::Capability::CapabilityGeometryPointSize => Some("shaderTessellationAndGeometryPointSize"),
|
||||
enums::Capability::CapabilityImageGatherExtended => Some("shaderImageGatherExtended"),
|
||||
enums::Capability::CapabilityStorageImageMultisample => Some("shaderStorageImageMultisample"),
|
||||
enums::Capability::CapabilityUniformBufferArrayDynamicIndexing => Some("shaderUniformBufferArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilitySampledImageArrayDynamicIndexing => Some("shaderSampledImageArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilityStorageBufferArrayDynamicIndexing => Some("shaderStorageBufferArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilityStorageImageArrayDynamicIndexing => Some("shaderStorageImageArrayDynamicIndexing"),
|
||||
enums::Capability::CapabilityClipDistance => Some("shaderClipDistance"),
|
||||
enums::Capability::CapabilityCullDistance => Some("shaderCullDistance"),
|
||||
enums::Capability::CapabilityImageCubeArray => Some("imageCubeArray"),
|
||||
enums::Capability::CapabilitySampleRateShading => Some("sampleRateShading"),
|
||||
enums::Capability::CapabilityImageRect => panic!(), // not supported
|
||||
enums::Capability::CapabilitySampledRect => panic!(), // not supported
|
||||
enums::Capability::CapabilityGenericPointer => panic!(), // not supported
|
||||
enums::Capability::CapabilityInt8 => panic!(), // not supported
|
||||
enums::Capability::CapabilityInputAttachment => None, // always supported
|
||||
enums::Capability::CapabilitySparseResidency => Some("shaderResourceResidency"),
|
||||
enums::Capability::CapabilityMinLod => Some("shaderResourceMinLod"),
|
||||
enums::Capability::CapabilitySampled1D => None, // always supported
|
||||
enums::Capability::CapabilityImage1D => None, // always supported
|
||||
enums::Capability::CapabilitySampledCubeArray => Some("imageCubeArray"),
|
||||
enums::Capability::CapabilitySampledBuffer => None, // always supported
|
||||
enums::Capability::CapabilityImageBuffer => None, // always supported
|
||||
enums::Capability::CapabilityImageMSArray => Some("shaderStorageImageMultisample"),
|
||||
enums::Capability::CapabilityStorageImageExtendedFormats => Some("shaderStorageImageExtendedFormats"),
|
||||
enums::Capability::CapabilityImageQuery => None, // always supported
|
||||
enums::Capability::CapabilityDerivativeControl => None, // always supported
|
||||
enums::Capability::CapabilityInterpolationFunction => Some("sampleRateShading"),
|
||||
enums::Capability::CapabilityTransformFeedback => panic!(), // not supported
|
||||
enums::Capability::CapabilityGeometryStreams => panic!(), // not supported
|
||||
enums::Capability::CapabilityStorageImageReadWithoutFormat => Some("shaderStorageImageReadWithoutFormat"),
|
||||
enums::Capability::CapabilityStorageImageWriteWithoutFormat => Some("shaderStorageImageWriteWithoutFormat"),
|
||||
enums::Capability::CapabilityMultiViewport => Some("multiViewport"),
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user