blob: dba229d51aa0eafe01db312306bb44d224dae4e5 [file] [log] [blame]
/*
* MVKDeviceFeatureStructs.def
*
* Copyright (c) 2015-2022 The Brenwill Workshop Ltd. (http://www.brenwill.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// To use this file, define the macro MVK_DEVICE_FEATURE and optionally
// MVK_DEVICE_FEATURE_EXTN if needed, then #include this file.
// To add a new device feature struct, simply add a line below.
// The order is the typical approach of alphabetical but separated
// into sections based on Vulkan extensions.
#ifndef MVK_DEVICE_FEATURE
#error MVK_DEVICE_FEATURE must be defined before including this file
#endif
#ifndef MVK_DEVICE_FEATURE_EXTN
#define MVK_DEVICE_FEATURE_EXTN(structName, enumName, extnSfx, flagCount) MVK_DEVICE_FEATURE(structName, enumName, flagCount)
#endif
// INTEL is a common macro defined elsewhere in the system.
// We need to temporarily undefine it so that it doesn't expand when used in a macro below.
#pragma push_macro("INTEL")
#undef INTEL
MVK_DEVICE_FEATURE(16BitStorage, 16BIT_STORAGE, 4)
MVK_DEVICE_FEATURE(8BitStorage, 8BIT_STORAGE, 3)
MVK_DEVICE_FEATURE(BufferDeviceAddress, BUFFER_DEVICE_ADDRESS, 3)
MVK_DEVICE_FEATURE(DescriptorIndexing, DESCRIPTOR_INDEXING, 20)
MVK_DEVICE_FEATURE(DynamicRendering, DYNAMIC_RENDERING, 1)
MVK_DEVICE_FEATURE(HostQueryReset, HOST_QUERY_RESET, 1)
MVK_DEVICE_FEATURE(ImagelessFramebuffer, IMAGELESS_FRAMEBUFFER, 1)
MVK_DEVICE_FEATURE(ImageRobustness, IMAGE_ROBUSTNESS, 1)
MVK_DEVICE_FEATURE(InlineUniformBlock, INLINE_UNIFORM_BLOCK, 2)
MVK_DEVICE_FEATURE(Multiview, MULTIVIEW, 3)
MVK_DEVICE_FEATURE(PrivateData, PRIVATE_DATA, 1)
MVK_DEVICE_FEATURE(ProtectedMemory, PROTECTED_MEMORY, 1)
MVK_DEVICE_FEATURE(SamplerYcbcrConversion, SAMPLER_YCBCR_CONVERSION, 1)
MVK_DEVICE_FEATURE(ScalarBlockLayout, SCALAR_BLOCK_LAYOUT, 1)
MVK_DEVICE_FEATURE(SeparateDepthStencilLayouts, SEPARATE_DEPTH_STENCIL_LAYOUTS, 1)
MVK_DEVICE_FEATURE(ShaderDrawParameters, SHADER_DRAW_PARAMETERS, 1)
MVK_DEVICE_FEATURE(ShaderFloat16Int8, SHADER_FLOAT16_INT8, 2)
MVK_DEVICE_FEATURE(ShaderSubgroupExtendedTypes, SHADER_SUBGROUP_EXTENDED_TYPES, 1)
MVK_DEVICE_FEATURE(SubgroupSizeControl, SUBGROUP_SIZE_CONTROL, 2)
MVK_DEVICE_FEATURE(TextureCompressionASTCHDR, TEXTURE_COMPRESSION_ASTC_HDR, 1)
MVK_DEVICE_FEATURE(TimelineSemaphore, TIMELINE_SEMAPHORE, 1)
MVK_DEVICE_FEATURE(UniformBufferStandardLayout, UNIFORM_BUFFER_STANDARD_LAYOUT, 1)
MVK_DEVICE_FEATURE(VariablePointer, VARIABLE_POINTER, 2)
MVK_DEVICE_FEATURE_EXTN(FragmentShaderBarycentric, FRAGMENT_SHADER_BARYCENTRIC, KHR, 1)
MVK_DEVICE_FEATURE_EXTN(PortabilitySubset, PORTABILITY_SUBSET, KHR, 15)
MVK_DEVICE_FEATURE_EXTN(FragmentShaderInterlock, FRAGMENT_SHADER_INTERLOCK, EXT, 3)
MVK_DEVICE_FEATURE_EXTN(Robustness2, ROBUSTNESS_2, EXT, 3)
MVK_DEVICE_FEATURE_EXTN(TexelBufferAlignment, TEXEL_BUFFER_ALIGNMENT, EXT, 1)
MVK_DEVICE_FEATURE_EXTN(VertexAttributeDivisor, VERTEX_ATTRIBUTE_DIVISOR, EXT, 2)
MVK_DEVICE_FEATURE_EXTN(ShaderIntegerFunctions2, SHADER_INTEGER_FUNCTIONS_2, INTEL, 1)
#pragma pop_macro("INTEL")
#undef MVK_DEVICE_FEATURE_EXTN
#undef MVK_DEVICE_FEATURE