[mlir][spirv] Add implied capabilities and availability for capabilities

Certain SPIR-V capabilities are only available in certain SPIR-V versions
or extensions. Also a SPIR-V capability may implicitly declares other
capabilities.

This commit updates gen_spirv_dialect.py to support generating such
information into SPIRVBase.td. It requires us to topologically sort
all capabilities because now a capability can refer to another one.

This commits also registers a few extensions because their symbols are
used by capability availability.

Note that this commit hasn't updated SPIRVConversionTarget to take
into consideration such relationship yet. That will be done in a
following-up commit.

Differential Revision: https://reviews.llvm.org/D72760
This commit is contained in:
Lei Zhang 2019-12-26 09:31:46 -05:00
parent ad83bed241
commit 6a97013590
2 changed files with 813 additions and 206 deletions
mlir
include/mlir/Dialect/SPIRV
utils/spirv

@ -200,29 +200,48 @@ def SPV_KHR_no_integer_wrap_decoration : StrEnumAttrCase<"SPV_KHR_no_integer_w
def SPV_KHR_post_depth_coverage : StrEnumAttrCase<"SPV_KHR_post_depth_coverage">;
def SPV_KHR_shader_atomic_counter_ops : StrEnumAttrCase<"SPV_KHR_shader_atomic_counter_ops">;
def SPV_KHR_shader_ballot : StrEnumAttrCase<"SPV_KHR_shader_ballot">;
def SPV_KHR_shader_clock : StrEnumAttrCase<"SPV_KHR_shader_clock">;
def SPV_KHR_shader_draw_parameters : StrEnumAttrCase<"SPV_KHR_shader_draw_parameters">;
def SPV_KHR_storage_buffer_storage_class : StrEnumAttrCase<"SPV_KHR_storage_buffer_storage_class">;
def SPV_KHR_subgroup_vote : StrEnumAttrCase<"SPV_KHR_subgroup_vote">;
def SPV_KHR_variable_pointers : StrEnumAttrCase<"SPV_KHR_variable_pointers">;
def SPV_KHR_vulkan_memory_model : StrEnumAttrCase<"SPV_KHR_vulkan_memory_model">;
def SPV_EXT_demote_to_helper_invocation : StrEnumAttrCase<"SPV_EXT_demote_to_helper_invocation">;
def SPV_EXT_descriptor_indexing : StrEnumAttrCase<"SPV_EXT_descriptor_indexing">;
def SPV_EXT_fragment_fully_covered : StrEnumAttrCase<"SPV_EXT_fragment_fully_covered">;
def SPV_EXT_fragment_invocation_density : StrEnumAttrCase<"SPV_EXT_fragment_invocation_density">;
def SPV_EXT_fragment_shader_interlock : StrEnumAttrCase<"SPV_EXT_fragment_shader_interlock">;
def SPV_EXT_physical_storage_buffer : StrEnumAttrCase<"SPV_EXT_physical_storage_buffer">;
def SPV_EXT_shader_stencil_export : StrEnumAttrCase<"SPV_EXT_shader_stencil_export">;
def SPV_EXT_shader_viewport_index_layer : StrEnumAttrCase<"SPV_EXT_shader_viewport_index_layer">;
def SPV_AMD_gpu_shader_half_float_fetch : StrEnumAttrCase<"SPV_AMD_gpu_shader_half_float_fetch">;
def SPV_AMD_shader_ballot : StrEnumAttrCase<"SPV_AMD_shader_ballot">;
def SPV_AMD_shader_explicit_vertex_parameter : StrEnumAttrCase<"SPV_AMD_shader_explicit_vertex_parameter">;
def SPV_AMD_shader_fragment_mask : StrEnumAttrCase<"SPV_AMD_shader_fragment_mask">;
def SPV_AMD_shader_image_load_store_lod : StrEnumAttrCase<"SPV_AMD_shader_image_load_store_lod">;
def SPV_AMD_texture_gather_bias_lod : StrEnumAttrCase<"SPV_AMD_texture_gather_bias_lod">;
def SPV_GOOGLE_decorate_string : StrEnumAttrCase<"SPV_GOOGLE_decorate_string">;
def SPV_GOOGLE_hlsl_functionality1 : StrEnumAttrCase<"SPV_GOOGLE_hlsl_functionality1">;
def SPV_GOOGLE_user_type : StrEnumAttrCase<"SPV_GOOGLE_user_type">;
def SPV_INTEL_device_side_avc_motion_estimation : StrEnumAttrCase<"SPV_INTEL_device_side_avc_motion_estimation">;
def SPV_INTEL_media_block_io : StrEnumAttrCase<"SPV_INTEL_media_block_io">;
def SPV_INTEL_shader_integer_functions2 : StrEnumAttrCase<"SPV_INTEL_shader_integer_functions2">;
def SPV_INTEL_subgroups : StrEnumAttrCase<"SPV_INTEL_subgroups">;
def SPV_NV_compute_shader_derivatives : StrEnumAttrCase<"SPV_NV_compute_shader_derivatives">;
def SPV_NV_cooperative_matrix : StrEnumAttrCase<"SPV_NV_cooperative_matrix">;
def SPV_NV_fragment_shader_barycentric : StrEnumAttrCase<"SPV_NV_fragment_shader_barycentric">;
def SPV_NV_geometry_shader_passthrough : StrEnumAttrCase<"SPV_NV_geometry_shader_passthrough">;
def SPV_NV_mesh_shader : StrEnumAttrCase<"SPV_NV_mesh_shader">;
def SPV_NV_ray_tracing : StrEnumAttrCase<"SPV_NV_ray_tracing">;
def SPV_NV_sample_mask_override_coverage : StrEnumAttrCase<"SPV_NV_sample_mask_override_coverage">;
def SPV_NV_shader_image_footprint : StrEnumAttrCase<"SPV_NV_shader_image_footprint">;
def SPV_NV_shader_sm_builtins : StrEnumAttrCase<"SPV_NV_shader_sm_builtins">;
def SPV_NV_shader_subgroup_partitioned : StrEnumAttrCase<"SPV_NV_shader_subgroup_partitioned">;
def SPV_NV_shading_rate : StrEnumAttrCase<"SPV_NV_shading_rate">;
def SPV_NV_stereo_view_rendering : StrEnumAttrCase<"SPV_NV_stereo_view_rendering">;
def SPV_NV_viewport_array2 : StrEnumAttrCase<"SPV_NV_viewport_array2">;
@ -235,17 +254,26 @@ def SPV_ExtensionAttr :
SPV_KHR_float_controls, SPV_KHR_physical_storage_buffer, SPV_KHR_multiview,
SPV_KHR_no_integer_wrap_decoration, SPV_KHR_post_depth_coverage,
SPV_KHR_shader_atomic_counter_ops, SPV_KHR_shader_ballot,
SPV_KHR_shader_draw_parameters, SPV_KHR_storage_buffer_storage_class,
SPV_KHR_subgroup_vote, SPV_KHR_variable_pointers,
SPV_KHR_vulkan_memory_model, SPV_EXT_fragment_fully_covered,
SPV_EXT_fragment_invocation_density, SPV_EXT_fragment_shader_interlock,
SPV_EXT_physical_storage_buffer, SPV_EXT_shader_stencil_export,
SPV_AMD_shader_explicit_vertex_parameter, SPV_GOOGLE_user_type,
SPV_NV_compute_shader_derivatives, SPV_NV_fragment_shader_barycentric,
SPV_NV_geometry_shader_passthrough, SPV_NV_mesh_shader, SPV_NV_ray_tracing,
SPV_NV_sample_mask_override_coverage, SPV_NV_shader_sm_builtins,
SPV_NV_shading_rate, SPV_NV_stereo_view_rendering,
SPV_NV_viewport_array2, SPV_NVX_multiview_per_view_attributes,
SPV_KHR_shader_clock, SPV_KHR_shader_draw_parameters,
SPV_KHR_storage_buffer_storage_class, SPV_KHR_subgroup_vote,
SPV_KHR_variable_pointers, SPV_KHR_vulkan_memory_model,
SPV_EXT_demote_to_helper_invocation, SPV_EXT_descriptor_indexing,
SPV_EXT_fragment_fully_covered, SPV_EXT_fragment_invocation_density,
SPV_EXT_fragment_shader_interlock, SPV_EXT_physical_storage_buffer,
SPV_EXT_shader_stencil_export, SPV_EXT_shader_viewport_index_layer,
SPV_AMD_gpu_shader_half_float_fetch, SPV_AMD_shader_ballot,
SPV_AMD_shader_explicit_vertex_parameter, SPV_AMD_shader_fragment_mask,
SPV_AMD_shader_image_load_store_lod, SPV_AMD_texture_gather_bias_lod,
SPV_GOOGLE_decorate_string, SPV_GOOGLE_hlsl_functionality1, SPV_GOOGLE_user_type,
SPV_INTEL_device_side_avc_motion_estimation, SPV_INTEL_media_block_io,
SPV_INTEL_shader_integer_functions2, SPV_INTEL_subgroups,
SPV_NV_compute_shader_derivatives, SPV_NV_cooperative_matrix,
SPV_NV_fragment_shader_barycentric, SPV_NV_geometry_shader_passthrough,
SPV_NV_mesh_shader, SPV_NV_ray_tracing, SPV_NV_sample_mask_override_coverage,
SPV_NV_shader_image_footprint, SPV_NV_shader_sm_builtins,
SPV_NV_shader_subgroup_partitioned, SPV_NV_shading_rate,
SPV_NV_stereo_view_rendering, SPV_NV_viewport_array2,
SPV_NVX_multiview_per_view_attributes
]> {
let cppNamespace = "::mlir::spirv";
}
@ -257,209 +285,707 @@ def SPV_ExtensionAttr :
// Begin enum section. Generated from SPIR-V spec; DO NOT MODIFY!
def SPV_C_Matrix : I32EnumAttrCase<"Matrix", 0>;
def SPV_C_Shader : I32EnumAttrCase<"Shader", 1>;
def SPV_C_Geometry : I32EnumAttrCase<"Geometry", 2>;
def SPV_C_Tessellation : I32EnumAttrCase<"Tessellation", 3>;
def SPV_C_Addresses : I32EnumAttrCase<"Addresses", 4>;
def SPV_C_Linkage : I32EnumAttrCase<"Linkage", 5>;
def SPV_C_Kernel : I32EnumAttrCase<"Kernel", 6>;
def SPV_C_Vector16 : I32EnumAttrCase<"Vector16", 7>;
def SPV_C_Float16Buffer : I32EnumAttrCase<"Float16Buffer", 8>;
def SPV_C_Float16 : I32EnumAttrCase<"Float16", 9>;
def SPV_C_Float64 : I32EnumAttrCase<"Float64", 10>;
def SPV_C_Int64 : I32EnumAttrCase<"Int64", 11>;
def SPV_C_Int64Atomics : I32EnumAttrCase<"Int64Atomics", 12>;
def SPV_C_ImageBasic : I32EnumAttrCase<"ImageBasic", 13>;
def SPV_C_ImageReadWrite : I32EnumAttrCase<"ImageReadWrite", 14>;
def SPV_C_ImageMipmap : I32EnumAttrCase<"ImageMipmap", 15>;
def SPV_C_Pipes : I32EnumAttrCase<"Pipes", 17>;
def SPV_C_Groups : I32EnumAttrCase<"Groups", 18>;
def SPV_C_DeviceEnqueue : I32EnumAttrCase<"DeviceEnqueue", 19>;
def SPV_C_LiteralSampler : I32EnumAttrCase<"LiteralSampler", 20>;
def SPV_C_AtomicStorage : I32EnumAttrCase<"AtomicStorage", 21>;
def SPV_C_Groups : I32EnumAttrCase<"Groups", 18> {
list<Availability> availability = [
Extension<[SPV_AMD_shader_ballot]>
];
}
def SPV_C_Int16 : I32EnumAttrCase<"Int16", 22>;
def SPV_C_TessellationPointSize : I32EnumAttrCase<"TessellationPointSize", 23>;
def SPV_C_GeometryPointSize : I32EnumAttrCase<"GeometryPointSize", 24>;
def SPV_C_ImageGatherExtended : I32EnumAttrCase<"ImageGatherExtended", 25>;
def SPV_C_StorageImageMultisample : I32EnumAttrCase<"StorageImageMultisample", 27>;
def SPV_C_UniformBufferArrayDynamicIndexing : I32EnumAttrCase<"UniformBufferArrayDynamicIndexing", 28>;
def SPV_C_SampledImageArrayDynamicIndexing : I32EnumAttrCase<"SampledImageArrayDynamicIndexing", 29>;
def SPV_C_StorageBufferArrayDynamicIndexing : I32EnumAttrCase<"StorageBufferArrayDynamicIndexing", 30>;
def SPV_C_StorageImageArrayDynamicIndexing : I32EnumAttrCase<"StorageImageArrayDynamicIndexing", 31>;
def SPV_C_ClipDistance : I32EnumAttrCase<"ClipDistance", 32>;
def SPV_C_CullDistance : I32EnumAttrCase<"CullDistance", 33>;
def SPV_C_ImageCubeArray : I32EnumAttrCase<"ImageCubeArray", 34>;
def SPV_C_SampleRateShading : I32EnumAttrCase<"SampleRateShading", 35>;
def SPV_C_ImageRect : I32EnumAttrCase<"ImageRect", 36>;
def SPV_C_SampledRect : I32EnumAttrCase<"SampledRect", 37>;
def SPV_C_GenericPointer : I32EnumAttrCase<"GenericPointer", 38>;
def SPV_C_Int8 : I32EnumAttrCase<"Int8", 39>;
def SPV_C_InputAttachment : I32EnumAttrCase<"InputAttachment", 40>;
def SPV_C_SparseResidency : I32EnumAttrCase<"SparseResidency", 41>;
def SPV_C_MinLod : I32EnumAttrCase<"MinLod", 42>;
def SPV_C_Sampled1D : I32EnumAttrCase<"Sampled1D", 43>;
def SPV_C_Image1D : I32EnumAttrCase<"Image1D", 44>;
def SPV_C_SampledCubeArray : I32EnumAttrCase<"SampledCubeArray", 45>;
def SPV_C_SampledBuffer : I32EnumAttrCase<"SampledBuffer", 46>;
def SPV_C_ImageBuffer : I32EnumAttrCase<"ImageBuffer", 47>;
def SPV_C_ImageMSArray : I32EnumAttrCase<"ImageMSArray", 48>;
def SPV_C_StorageImageExtendedFormats : I32EnumAttrCase<"StorageImageExtendedFormats", 49>;
def SPV_C_ImageQuery : I32EnumAttrCase<"ImageQuery", 50>;
def SPV_C_DerivativeControl : I32EnumAttrCase<"DerivativeControl", 51>;
def SPV_C_InterpolationFunction : I32EnumAttrCase<"InterpolationFunction", 52>;
def SPV_C_TransformFeedback : I32EnumAttrCase<"TransformFeedback", 53>;
def SPV_C_GeometryStreams : I32EnumAttrCase<"GeometryStreams", 54>;
def SPV_C_StorageImageReadWithoutFormat : I32EnumAttrCase<"StorageImageReadWithoutFormat", 55>;
def SPV_C_StorageImageWriteWithoutFormat : I32EnumAttrCase<"StorageImageWriteWithoutFormat", 56>;
def SPV_C_MultiViewport : I32EnumAttrCase<"MultiViewport", 57>;
def SPV_C_SubgroupDispatch : I32EnumAttrCase<"SubgroupDispatch", 58>;
def SPV_C_NamedBarrier : I32EnumAttrCase<"NamedBarrier", 59>;
def SPV_C_PipeStorage : I32EnumAttrCase<"PipeStorage", 60>;
def SPV_C_GroupNonUniform : I32EnumAttrCase<"GroupNonUniform", 61>;
def SPV_C_GroupNonUniformVote : I32EnumAttrCase<"GroupNonUniformVote", 62>;
def SPV_C_GroupNonUniformArithmetic : I32EnumAttrCase<"GroupNonUniformArithmetic", 63>;
def SPV_C_GroupNonUniformBallot : I32EnumAttrCase<"GroupNonUniformBallot", 64>;
def SPV_C_GroupNonUniformShuffle : I32EnumAttrCase<"GroupNonUniformShuffle", 65>;
def SPV_C_GroupNonUniformShuffleRelative : I32EnumAttrCase<"GroupNonUniformShuffleRelative", 66>;
def SPV_C_GroupNonUniformClustered : I32EnumAttrCase<"GroupNonUniformClustered", 67>;
def SPV_C_GroupNonUniformQuad : I32EnumAttrCase<"GroupNonUniformQuad", 68>;
def SPV_C_ShaderLayer : I32EnumAttrCase<"ShaderLayer", 69>;
def SPV_C_ShaderViewportIndex : I32EnumAttrCase<"ShaderViewportIndex", 70>;
def SPV_C_SubgroupBallotKHR : I32EnumAttrCase<"SubgroupBallotKHR", 4423>;
def SPV_C_DrawParameters : I32EnumAttrCase<"DrawParameters", 4427>;
def SPV_C_SubgroupVoteKHR : I32EnumAttrCase<"SubgroupVoteKHR", 4431>;
def SPV_C_StorageBuffer16BitAccess : I32EnumAttrCase<"StorageBuffer16BitAccess", 4433>;
def SPV_C_StorageUniform16 : I32EnumAttrCase<"StorageUniform16", 4434>;
def SPV_C_StoragePushConstant16 : I32EnumAttrCase<"StoragePushConstant16", 4435>;
def SPV_C_StorageInputOutput16 : I32EnumAttrCase<"StorageInputOutput16", 4436>;
def SPV_C_DeviceGroup : I32EnumAttrCase<"DeviceGroup", 4437>;
def SPV_C_MultiView : I32EnumAttrCase<"MultiView", 4439>;
def SPV_C_VariablePointersStorageBuffer : I32EnumAttrCase<"VariablePointersStorageBuffer", 4441>;
def SPV_C_VariablePointers : I32EnumAttrCase<"VariablePointers", 4442>;
def SPV_C_AtomicStorageOps : I32EnumAttrCase<"AtomicStorageOps", 4445>;
def SPV_C_SampleMaskPostDepthCoverage : I32EnumAttrCase<"SampleMaskPostDepthCoverage", 4447>;
def SPV_C_StorageBuffer8BitAccess : I32EnumAttrCase<"StorageBuffer8BitAccess", 4448>;
def SPV_C_UniformAndStorageBuffer8BitAccess : I32EnumAttrCase<"UniformAndStorageBuffer8BitAccess", 4449>;
def SPV_C_StoragePushConstant8 : I32EnumAttrCase<"StoragePushConstant8", 4450>;
def SPV_C_DenormPreserve : I32EnumAttrCase<"DenormPreserve", 4464>;
def SPV_C_DenormFlushToZero : I32EnumAttrCase<"DenormFlushToZero", 4465>;
def SPV_C_SignedZeroInfNanPreserve : I32EnumAttrCase<"SignedZeroInfNanPreserve", 4466>;
def SPV_C_RoundingModeRTE : I32EnumAttrCase<"RoundingModeRTE", 4467>;
def SPV_C_RoundingModeRTZ : I32EnumAttrCase<"RoundingModeRTZ", 4468>;
def SPV_C_Float16ImageAMD : I32EnumAttrCase<"Float16ImageAMD", 5008>;
def SPV_C_ImageGatherBiasLodAMD : I32EnumAttrCase<"ImageGatherBiasLodAMD", 5009>;
def SPV_C_FragmentMaskAMD : I32EnumAttrCase<"FragmentMaskAMD", 5010>;
def SPV_C_StencilExportEXT : I32EnumAttrCase<"StencilExportEXT", 5013>;
def SPV_C_ImageReadWriteLodAMD : I32EnumAttrCase<"ImageReadWriteLodAMD", 5015>;
def SPV_C_ShaderClockKHR : I32EnumAttrCase<"ShaderClockKHR", 5055>;
def SPV_C_SampleMaskOverrideCoverageNV : I32EnumAttrCase<"SampleMaskOverrideCoverageNV", 5249>;
def SPV_C_GeometryShaderPassthroughNV : I32EnumAttrCase<"GeometryShaderPassthroughNV", 5251>;
def SPV_C_ShaderViewportIndexLayerEXT : I32EnumAttrCase<"ShaderViewportIndexLayerEXT", 5254>;
def SPV_C_ShaderViewportMaskNV : I32EnumAttrCase<"ShaderViewportMaskNV", 5255>;
def SPV_C_ShaderStereoViewNV : I32EnumAttrCase<"ShaderStereoViewNV", 5259>;
def SPV_C_PerViewAttributesNV : I32EnumAttrCase<"PerViewAttributesNV", 5260>;
def SPV_C_FragmentFullyCoveredEXT : I32EnumAttrCase<"FragmentFullyCoveredEXT", 5265>;
def SPV_C_MeshShadingNV : I32EnumAttrCase<"MeshShadingNV", 5266>;
def SPV_C_ImageFootprintNV : I32EnumAttrCase<"ImageFootprintNV", 5282>;
def SPV_C_FragmentBarycentricNV : I32EnumAttrCase<"FragmentBarycentricNV", 5284>;
def SPV_C_ComputeDerivativeGroupQuadsNV : I32EnumAttrCase<"ComputeDerivativeGroupQuadsNV", 5288>;
def SPV_C_FragmentDensityEXT : I32EnumAttrCase<"FragmentDensityEXT", 5291>;
def SPV_C_GroupNonUniformPartitionedNV : I32EnumAttrCase<"GroupNonUniformPartitionedNV", 5297>;
def SPV_C_ShaderNonUniform : I32EnumAttrCase<"ShaderNonUniform", 5301>;
def SPV_C_RuntimeDescriptorArray : I32EnumAttrCase<"RuntimeDescriptorArray", 5302>;
def SPV_C_InputAttachmentArrayDynamicIndexing : I32EnumAttrCase<"InputAttachmentArrayDynamicIndexing", 5303>;
def SPV_C_UniformTexelBufferArrayDynamicIndexing : I32EnumAttrCase<"UniformTexelBufferArrayDynamicIndexing", 5304>;
def SPV_C_StorageTexelBufferArrayDynamicIndexing : I32EnumAttrCase<"StorageTexelBufferArrayDynamicIndexing", 5305>;
def SPV_C_UniformBufferArrayNonUniformIndexing : I32EnumAttrCase<"UniformBufferArrayNonUniformIndexing", 5306>;
def SPV_C_SampledImageArrayNonUniformIndexing : I32EnumAttrCase<"SampledImageArrayNonUniformIndexing", 5307>;
def SPV_C_StorageBufferArrayNonUniformIndexing : I32EnumAttrCase<"StorageBufferArrayNonUniformIndexing", 5308>;
def SPV_C_StorageImageArrayNonUniformIndexing : I32EnumAttrCase<"StorageImageArrayNonUniformIndexing", 5309>;
def SPV_C_InputAttachmentArrayNonUniformIndexing : I32EnumAttrCase<"InputAttachmentArrayNonUniformIndexing", 5310>;
def SPV_C_UniformTexelBufferArrayNonUniformIndexing : I32EnumAttrCase<"UniformTexelBufferArrayNonUniformIndexing", 5311>;
def SPV_C_StorageTexelBufferArrayNonUniformIndexing : I32EnumAttrCase<"StorageTexelBufferArrayNonUniformIndexing", 5312>;
def SPV_C_RayTracingNV : I32EnumAttrCase<"RayTracingNV", 5340>;
def SPV_C_VulkanMemoryModel : I32EnumAttrCase<"VulkanMemoryModel", 5345>;
def SPV_C_VulkanMemoryModelDeviceScope : I32EnumAttrCase<"VulkanMemoryModelDeviceScope", 5346>;
def SPV_C_PhysicalStorageBufferAddresses : I32EnumAttrCase<"PhysicalStorageBufferAddresses", 5347>;
def SPV_C_ComputeDerivativeGroupLinearNV : I32EnumAttrCase<"ComputeDerivativeGroupLinearNV", 5350>;
def SPV_C_CooperativeMatrixNV : I32EnumAttrCase<"CooperativeMatrixNV", 5357>;
def SPV_C_FragmentShaderSampleInterlockEXT : I32EnumAttrCase<"FragmentShaderSampleInterlockEXT", 5363>;
def SPV_C_FragmentShaderShadingRateInterlockEXT : I32EnumAttrCase<"FragmentShaderShadingRateInterlockEXT", 5372>;
def SPV_C_ShaderSMBuiltinsNV : I32EnumAttrCase<"ShaderSMBuiltinsNV", 5373>;
def SPV_C_FragmentShaderPixelInterlockEXT : I32EnumAttrCase<"FragmentShaderPixelInterlockEXT", 5378>;
def SPV_C_DemoteToHelperInvocationEXT : I32EnumAttrCase<"DemoteToHelperInvocationEXT", 5379>;
def SPV_C_SubgroupShuffleINTEL : I32EnumAttrCase<"SubgroupShuffleINTEL", 5568>;
def SPV_C_SubgroupBufferBlockIOINTEL : I32EnumAttrCase<"SubgroupBufferBlockIOINTEL", 5569>;
def SPV_C_SubgroupImageBlockIOINTEL : I32EnumAttrCase<"SubgroupImageBlockIOINTEL", 5570>;
def SPV_C_SubgroupImageMediaBlockIOINTEL : I32EnumAttrCase<"SubgroupImageMediaBlockIOINTEL", 5579>;
def SPV_C_IntegerFunctions2INTEL : I32EnumAttrCase<"IntegerFunctions2INTEL", 5584>;
def SPV_C_SubgroupAvcMotionEstimationINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationINTEL", 5696>;
def SPV_C_SubgroupAvcMotionEstimationIntraINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationIntraINTEL", 5697>;
def SPV_C_SubgroupAvcMotionEstimationChromaINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationChromaINTEL", 5698>;
def SPV_C_GroupNonUniform : I32EnumAttrCase<"GroupNonUniform", 61> {
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_ShaderLayer : I32EnumAttrCase<"ShaderLayer", 69> {
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_ShaderViewportIndex : I32EnumAttrCase<"ShaderViewportIndex", 70> {
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_SubgroupBallotKHR : I32EnumAttrCase<"SubgroupBallotKHR", 4423> {
list<Availability> availability = [
Extension<[SPV_KHR_shader_ballot]>
];
}
def SPV_C_SubgroupVoteKHR : I32EnumAttrCase<"SubgroupVoteKHR", 4431> {
list<Availability> availability = [
Extension<[SPV_KHR_subgroup_vote]>
];
}
def SPV_C_StorageBuffer16BitAccess : I32EnumAttrCase<"StorageBuffer16BitAccess", 4433> {
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_16bit_storage]>
];
}
def SPV_C_StoragePushConstant16 : I32EnumAttrCase<"StoragePushConstant16", 4435> {
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_16bit_storage]>
];
}
def SPV_C_StorageInputOutput16 : I32EnumAttrCase<"StorageInputOutput16", 4436> {
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_16bit_storage]>
];
}
def SPV_C_DeviceGroup : I32EnumAttrCase<"DeviceGroup", 4437> {
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_device_group]>
];
}
def SPV_C_AtomicStorageOps : I32EnumAttrCase<"AtomicStorageOps", 4445> {
list<Availability> availability = [
Extension<[SPV_KHR_shader_atomic_counter_ops]>
];
}
def SPV_C_SampleMaskPostDepthCoverage : I32EnumAttrCase<"SampleMaskPostDepthCoverage", 4447> {
list<Availability> availability = [
Extension<[SPV_KHR_post_depth_coverage]>
];
}
def SPV_C_StorageBuffer8BitAccess : I32EnumAttrCase<"StorageBuffer8BitAccess", 4448> {
list<Availability> availability = [
MinVersion<SPV_V_1_5>,
Extension<[SPV_KHR_8bit_storage]>
];
}
def SPV_C_StoragePushConstant8 : I32EnumAttrCase<"StoragePushConstant8", 4450> {
list<Availability> availability = [
MinVersion<SPV_V_1_5>,
Extension<[SPV_KHR_8bit_storage]>
];
}
def SPV_C_DenormPreserve : I32EnumAttrCase<"DenormPreserve", 4464> {
list<Availability> availability = [
MinVersion<SPV_V_1_4>,
Extension<[SPV_KHR_float_controls]>
];
}
def SPV_C_DenormFlushToZero : I32EnumAttrCase<"DenormFlushToZero", 4465> {
list<Availability> availability = [
MinVersion<SPV_V_1_4>,
Extension<[SPV_KHR_float_controls]>
];
}
def SPV_C_SignedZeroInfNanPreserve : I32EnumAttrCase<"SignedZeroInfNanPreserve", 4466> {
list<Availability> availability = [
MinVersion<SPV_V_1_4>,
Extension<[SPV_KHR_float_controls]>
];
}
def SPV_C_RoundingModeRTE : I32EnumAttrCase<"RoundingModeRTE", 4467> {
list<Availability> availability = [
MinVersion<SPV_V_1_4>,
Extension<[SPV_KHR_float_controls]>
];
}
def SPV_C_RoundingModeRTZ : I32EnumAttrCase<"RoundingModeRTZ", 4468> {
list<Availability> availability = [
MinVersion<SPV_V_1_4>,
Extension<[SPV_KHR_float_controls]>
];
}
def SPV_C_ImageFootprintNV : I32EnumAttrCase<"ImageFootprintNV", 5282> {
list<Availability> availability = [
Extension<[SPV_NV_shader_image_footprint]>
];
}
def SPV_C_FragmentBarycentricNV : I32EnumAttrCase<"FragmentBarycentricNV", 5284> {
list<Availability> availability = [
Extension<[SPV_NV_fragment_shader_barycentric]>
];
}
def SPV_C_ComputeDerivativeGroupQuadsNV : I32EnumAttrCase<"ComputeDerivativeGroupQuadsNV", 5288> {
list<Availability> availability = [
Extension<[SPV_NV_compute_shader_derivatives]>
];
}
def SPV_C_GroupNonUniformPartitionedNV : I32EnumAttrCase<"GroupNonUniformPartitionedNV", 5297> {
list<Availability> availability = [
Extension<[SPV_NV_shader_subgroup_partitioned]>
];
}
def SPV_C_VulkanMemoryModel : I32EnumAttrCase<"VulkanMemoryModel", 5345> {
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_VulkanMemoryModelDeviceScope : I32EnumAttrCase<"VulkanMemoryModelDeviceScope", 5346> {
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_ComputeDerivativeGroupLinearNV : I32EnumAttrCase<"ComputeDerivativeGroupLinearNV", 5350> {
list<Availability> availability = [
Extension<[SPV_NV_compute_shader_derivatives]>
];
}
def SPV_C_SubgroupShuffleINTEL : I32EnumAttrCase<"SubgroupShuffleINTEL", 5568> {
list<Availability> availability = [
Extension<[SPV_INTEL_subgroups]>
];
}
def SPV_C_SubgroupBufferBlockIOINTEL : I32EnumAttrCase<"SubgroupBufferBlockIOINTEL", 5569> {
list<Availability> availability = [
Extension<[SPV_INTEL_subgroups]>
];
}
def SPV_C_SubgroupImageBlockIOINTEL : I32EnumAttrCase<"SubgroupImageBlockIOINTEL", 5570> {
list<Availability> availability = [
Extension<[SPV_INTEL_subgroups]>
];
}
def SPV_C_SubgroupImageMediaBlockIOINTEL : I32EnumAttrCase<"SubgroupImageMediaBlockIOINTEL", 5579> {
list<Availability> availability = [
Extension<[SPV_INTEL_media_block_io]>
];
}
def SPV_C_SubgroupAvcMotionEstimationINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationINTEL", 5696> {
list<Availability> availability = [
Extension<[SPV_INTEL_device_side_avc_motion_estimation]>
];
}
def SPV_C_SubgroupAvcMotionEstimationIntraINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationIntraINTEL", 5697> {
list<Availability> availability = [
Extension<[SPV_INTEL_device_side_avc_motion_estimation]>
];
}
def SPV_C_SubgroupAvcMotionEstimationChromaINTEL : I32EnumAttrCase<"SubgroupAvcMotionEstimationChromaINTEL", 5698> {
list<Availability> availability = [
Extension<[SPV_INTEL_device_side_avc_motion_estimation]>
];
}
def SPV_C_Shader : I32EnumAttrCase<"Shader", 1> {
list<I32EnumAttrCase> implies = [SPV_C_Matrix];
}
def SPV_C_Vector16 : I32EnumAttrCase<"Vector16", 7> {
list<I32EnumAttrCase> implies = [SPV_C_Kernel];
}
def SPV_C_Float16Buffer : I32EnumAttrCase<"Float16Buffer", 8> {
list<I32EnumAttrCase> implies = [SPV_C_Kernel];
}
def SPV_C_Int64Atomics : I32EnumAttrCase<"Int64Atomics", 12> {
list<I32EnumAttrCase> implies = [SPV_C_Int64];
}
def SPV_C_ImageBasic : I32EnumAttrCase<"ImageBasic", 13> {
list<I32EnumAttrCase> implies = [SPV_C_Kernel];
}
def SPV_C_Pipes : I32EnumAttrCase<"Pipes", 17> {
list<I32EnumAttrCase> implies = [SPV_C_Kernel];
}
def SPV_C_DeviceEnqueue : I32EnumAttrCase<"DeviceEnqueue", 19> {
list<I32EnumAttrCase> implies = [SPV_C_Kernel];
}
def SPV_C_LiteralSampler : I32EnumAttrCase<"LiteralSampler", 20> {
list<I32EnumAttrCase> implies = [SPV_C_Kernel];
}
def SPV_C_GenericPointer : I32EnumAttrCase<"GenericPointer", 38> {
list<I32EnumAttrCase> implies = [SPV_C_Addresses];
}
def SPV_C_Image1D : I32EnumAttrCase<"Image1D", 44> {
list<I32EnumAttrCase> implies = [SPV_C_Sampled1D];
}
def SPV_C_ImageBuffer : I32EnumAttrCase<"ImageBuffer", 47> {
list<I32EnumAttrCase> implies = [SPV_C_SampledBuffer];
}
def SPV_C_NamedBarrier : I32EnumAttrCase<"NamedBarrier", 59> {
list<I32EnumAttrCase> implies = [SPV_C_Kernel];
list<Availability> availability = [
MinVersion<SPV_V_1_1>
];
}
def SPV_C_GroupNonUniformVote : I32EnumAttrCase<"GroupNonUniformVote", 62> {
list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_GroupNonUniformArithmetic : I32EnumAttrCase<"GroupNonUniformArithmetic", 63> {
list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_GroupNonUniformBallot : I32EnumAttrCase<"GroupNonUniformBallot", 64> {
list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_GroupNonUniformShuffle : I32EnumAttrCase<"GroupNonUniformShuffle", 65> {
list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_GroupNonUniformShuffleRelative : I32EnumAttrCase<"GroupNonUniformShuffleRelative", 66> {
list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_GroupNonUniformClustered : I32EnumAttrCase<"GroupNonUniformClustered", 67> {
list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_GroupNonUniformQuad : I32EnumAttrCase<"GroupNonUniformQuad", 68> {
list<I32EnumAttrCase> implies = [SPV_C_GroupNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_3>
];
}
def SPV_C_StorageUniform16 : I32EnumAttrCase<"StorageUniform16", 4434> {
list<I32EnumAttrCase> implies = [SPV_C_StorageBuffer16BitAccess];
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_16bit_storage]>
];
}
def SPV_C_UniformAndStorageBuffer8BitAccess : I32EnumAttrCase<"UniformAndStorageBuffer8BitAccess", 4449> {
list<I32EnumAttrCase> implies = [SPV_C_StorageBuffer8BitAccess];
list<Availability> availability = [
MinVersion<SPV_V_1_5>,
Extension<[SPV_KHR_8bit_storage]>
];
}
def SPV_C_UniformTexelBufferArrayDynamicIndexing : I32EnumAttrCase<"UniformTexelBufferArrayDynamicIndexing", 5304> {
list<I32EnumAttrCase> implies = [SPV_C_SampledBuffer];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_Geometry : I32EnumAttrCase<"Geometry", 2> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_Tessellation : I32EnumAttrCase<"Tessellation", 3> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_ImageReadWrite : I32EnumAttrCase<"ImageReadWrite", 14> {
list<I32EnumAttrCase> implies = [SPV_C_ImageBasic];
}
def SPV_C_ImageMipmap : I32EnumAttrCase<"ImageMipmap", 15> {
list<I32EnumAttrCase> implies = [SPV_C_ImageBasic];
}
def SPV_C_AtomicStorage : I32EnumAttrCase<"AtomicStorage", 21> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_ImageGatherExtended : I32EnumAttrCase<"ImageGatherExtended", 25> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_StorageImageMultisample : I32EnumAttrCase<"StorageImageMultisample", 27> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_UniformBufferArrayDynamicIndexing : I32EnumAttrCase<"UniformBufferArrayDynamicIndexing", 28> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_SampledImageArrayDynamicIndexing : I32EnumAttrCase<"SampledImageArrayDynamicIndexing", 29> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_StorageBufferArrayDynamicIndexing : I32EnumAttrCase<"StorageBufferArrayDynamicIndexing", 30> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_StorageImageArrayDynamicIndexing : I32EnumAttrCase<"StorageImageArrayDynamicIndexing", 31> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_ClipDistance : I32EnumAttrCase<"ClipDistance", 32> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_CullDistance : I32EnumAttrCase<"CullDistance", 33> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_SampleRateShading : I32EnumAttrCase<"SampleRateShading", 35> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_SampledRect : I32EnumAttrCase<"SampledRect", 37> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_InputAttachment : I32EnumAttrCase<"InputAttachment", 40> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_SparseResidency : I32EnumAttrCase<"SparseResidency", 41> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_MinLod : I32EnumAttrCase<"MinLod", 42> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_SampledCubeArray : I32EnumAttrCase<"SampledCubeArray", 45> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_ImageMSArray : I32EnumAttrCase<"ImageMSArray", 48> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_StorageImageExtendedFormats : I32EnumAttrCase<"StorageImageExtendedFormats", 49> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_ImageQuery : I32EnumAttrCase<"ImageQuery", 50> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_DerivativeControl : I32EnumAttrCase<"DerivativeControl", 51> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_InterpolationFunction : I32EnumAttrCase<"InterpolationFunction", 52> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_TransformFeedback : I32EnumAttrCase<"TransformFeedback", 53> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_StorageImageReadWithoutFormat : I32EnumAttrCase<"StorageImageReadWithoutFormat", 55> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_StorageImageWriteWithoutFormat : I32EnumAttrCase<"StorageImageWriteWithoutFormat", 56> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
}
def SPV_C_SubgroupDispatch : I32EnumAttrCase<"SubgroupDispatch", 58> {
list<I32EnumAttrCase> implies = [SPV_C_DeviceEnqueue];
list<Availability> availability = [
MinVersion<SPV_V_1_1>
];
}
def SPV_C_PipeStorage : I32EnumAttrCase<"PipeStorage", 60> {
list<I32EnumAttrCase> implies = [SPV_C_Pipes];
list<Availability> availability = [
MinVersion<SPV_V_1_1>
];
}
def SPV_C_DrawParameters : I32EnumAttrCase<"DrawParameters", 4427> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_shader_draw_parameters]>
];
}
def SPV_C_MultiView : I32EnumAttrCase<"MultiView", 4439> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_multiview]>
];
}
def SPV_C_VariablePointersStorageBuffer : I32EnumAttrCase<"VariablePointersStorageBuffer", 4441> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_variable_pointers]>
];
}
def SPV_C_Float16ImageAMD : I32EnumAttrCase<"Float16ImageAMD", 5008> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_AMD_gpu_shader_half_float_fetch]>
];
}
def SPV_C_ImageGatherBiasLodAMD : I32EnumAttrCase<"ImageGatherBiasLodAMD", 5009> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_AMD_texture_gather_bias_lod]>
];
}
def SPV_C_FragmentMaskAMD : I32EnumAttrCase<"FragmentMaskAMD", 5010> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_AMD_shader_fragment_mask]>
];
}
def SPV_C_StencilExportEXT : I32EnumAttrCase<"StencilExportEXT", 5013> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_EXT_shader_stencil_export]>
];
}
def SPV_C_ImageReadWriteLodAMD : I32EnumAttrCase<"ImageReadWriteLodAMD", 5015> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_AMD_shader_image_load_store_lod]>
];
}
def SPV_C_ShaderClockKHR : I32EnumAttrCase<"ShaderClockKHR", 5055> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_KHR_shader_clock]>
];
}
def SPV_C_FragmentFullyCoveredEXT : I32EnumAttrCase<"FragmentFullyCoveredEXT", 5265> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_EXT_fragment_fully_covered]>
];
}
def SPV_C_MeshShadingNV : I32EnumAttrCase<"MeshShadingNV", 5266> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_NV_mesh_shader]>
];
}
def SPV_C_FragmentDensityEXT : I32EnumAttrCase<"FragmentDensityEXT", 5291> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_EXT_fragment_invocation_density, SPV_NV_shading_rate]>
];
}
def SPV_C_ShaderNonUniform : I32EnumAttrCase<"ShaderNonUniform", 5301> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_RuntimeDescriptorArray : I32EnumAttrCase<"RuntimeDescriptorArray", 5302> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_StorageTexelBufferArrayDynamicIndexing : I32EnumAttrCase<"StorageTexelBufferArrayDynamicIndexing", 5305> {
list<I32EnumAttrCase> implies = [SPV_C_ImageBuffer];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_RayTracingNV : I32EnumAttrCase<"RayTracingNV", 5340> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_NV_ray_tracing]>
];
}
def SPV_C_PhysicalStorageBufferAddresses : I32EnumAttrCase<"PhysicalStorageBufferAddresses", 5347> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
MinVersion<SPV_V_1_5>,
Extension<[SPV_EXT_physical_storage_buffer, SPV_KHR_physical_storage_buffer]>
];
}
def SPV_C_CooperativeMatrixNV : I32EnumAttrCase<"CooperativeMatrixNV", 5357> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_NV_cooperative_matrix]>
];
}
def SPV_C_FragmentShaderSampleInterlockEXT : I32EnumAttrCase<"FragmentShaderSampleInterlockEXT", 5363> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_EXT_fragment_shader_interlock]>
];
}
def SPV_C_FragmentShaderShadingRateInterlockEXT : I32EnumAttrCase<"FragmentShaderShadingRateInterlockEXT", 5372> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_EXT_fragment_shader_interlock]>
];
}
def SPV_C_ShaderSMBuiltinsNV : I32EnumAttrCase<"ShaderSMBuiltinsNV", 5373> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_NV_shader_sm_builtins]>
];
}
def SPV_C_FragmentShaderPixelInterlockEXT : I32EnumAttrCase<"FragmentShaderPixelInterlockEXT", 5378> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_EXT_fragment_shader_interlock]>
];
}
def SPV_C_DemoteToHelperInvocationEXT : I32EnumAttrCase<"DemoteToHelperInvocationEXT", 5379> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_EXT_demote_to_helper_invocation]>
];
}
def SPV_C_IntegerFunctions2INTEL : I32EnumAttrCase<"IntegerFunctions2INTEL", 5584> {
list<I32EnumAttrCase> implies = [SPV_C_Shader];
list<Availability> availability = [
Extension<[SPV_INTEL_shader_integer_functions2]>
];
}
def SPV_C_TessellationPointSize : I32EnumAttrCase<"TessellationPointSize", 23> {
list<I32EnumAttrCase> implies = [SPV_C_Tessellation];
}
def SPV_C_GeometryPointSize : I32EnumAttrCase<"GeometryPointSize", 24> {
list<I32EnumAttrCase> implies = [SPV_C_Geometry];
}
def SPV_C_ImageCubeArray : I32EnumAttrCase<"ImageCubeArray", 34> {
list<I32EnumAttrCase> implies = [SPV_C_SampledCubeArray];
}
def SPV_C_ImageRect : I32EnumAttrCase<"ImageRect", 36> {
list<I32EnumAttrCase> implies = [SPV_C_SampledRect];
}
def SPV_C_GeometryStreams : I32EnumAttrCase<"GeometryStreams", 54> {
list<I32EnumAttrCase> implies = [SPV_C_Geometry];
}
def SPV_C_MultiViewport : I32EnumAttrCase<"MultiViewport", 57> {
list<I32EnumAttrCase> implies = [SPV_C_Geometry];
}
def SPV_C_VariablePointers : I32EnumAttrCase<"VariablePointers", 4442> {
list<I32EnumAttrCase> implies = [SPV_C_VariablePointersStorageBuffer];
list<Availability> availability = [
MinVersion<SPV_V_1_3>,
Extension<[SPV_KHR_variable_pointers]>
];
}
def SPV_C_SampleMaskOverrideCoverageNV : I32EnumAttrCase<"SampleMaskOverrideCoverageNV", 5249> {
list<I32EnumAttrCase> implies = [SPV_C_SampleRateShading];
list<Availability> availability = [
Extension<[SPV_NV_sample_mask_override_coverage]>
];
}
def SPV_C_GeometryShaderPassthroughNV : I32EnumAttrCase<"GeometryShaderPassthroughNV", 5251> {
list<I32EnumAttrCase> implies = [SPV_C_Geometry];
list<Availability> availability = [
Extension<[SPV_NV_geometry_shader_passthrough]>
];
}
def SPV_C_PerViewAttributesNV : I32EnumAttrCase<"PerViewAttributesNV", 5260> {
list<I32EnumAttrCase> implies = [SPV_C_MultiView];
list<Availability> availability = [
Extension<[SPV_NVX_multiview_per_view_attributes]>
];
}
def SPV_C_InputAttachmentArrayDynamicIndexing : I32EnumAttrCase<"InputAttachmentArrayDynamicIndexing", 5303> {
list<I32EnumAttrCase> implies = [SPV_C_InputAttachment];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_UniformBufferArrayNonUniformIndexing : I32EnumAttrCase<"UniformBufferArrayNonUniformIndexing", 5306> {
list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_SampledImageArrayNonUniformIndexing : I32EnumAttrCase<"SampledImageArrayNonUniformIndexing", 5307> {
list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_StorageBufferArrayNonUniformIndexing : I32EnumAttrCase<"StorageBufferArrayNonUniformIndexing", 5308> {
list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_StorageImageArrayNonUniformIndexing : I32EnumAttrCase<"StorageImageArrayNonUniformIndexing", 5309> {
list<I32EnumAttrCase> implies = [SPV_C_ShaderNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_InputAttachmentArrayNonUniformIndexing : I32EnumAttrCase<"InputAttachmentArrayNonUniformIndexing", 5310> {
list<I32EnumAttrCase> implies = [SPV_C_InputAttachment, SPV_C_ShaderNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_UniformTexelBufferArrayNonUniformIndexing : I32EnumAttrCase<"UniformTexelBufferArrayNonUniformIndexing", 5311> {
list<I32EnumAttrCase> implies = [SPV_C_SampledBuffer, SPV_C_ShaderNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_StorageTexelBufferArrayNonUniformIndexing : I32EnumAttrCase<"StorageTexelBufferArrayNonUniformIndexing", 5312> {
list<I32EnumAttrCase> implies = [SPV_C_ImageBuffer, SPV_C_ShaderNonUniform];
list<Availability> availability = [
MinVersion<SPV_V_1_5>
];
}
def SPV_C_ShaderViewportIndexLayerEXT : I32EnumAttrCase<"ShaderViewportIndexLayerEXT", 5254> {
list<I32EnumAttrCase> implies = [SPV_C_MultiViewport];
list<Availability> availability = [
Extension<[SPV_EXT_shader_viewport_index_layer]>
];
}
def SPV_C_ShaderViewportMaskNV : I32EnumAttrCase<"ShaderViewportMaskNV", 5255> {
list<I32EnumAttrCase> implies = [SPV_C_ShaderViewportIndexLayerEXT];
list<Availability> availability = [
Extension<[SPV_NV_viewport_array2]>
];
}
def SPV_C_ShaderStereoViewNV : I32EnumAttrCase<"ShaderStereoViewNV", 5259> {
list<I32EnumAttrCase> implies = [SPV_C_ShaderViewportMaskNV];
list<Availability> availability = [
Extension<[SPV_NV_stereo_view_rendering]>
];
}
def SPV_CapabilityAttr :
I32EnumAttr<"Capability", "valid SPIR-V Capability", [
SPV_C_Matrix, SPV_C_Shader, SPV_C_Geometry, SPV_C_Tessellation,
SPV_C_Addresses, SPV_C_Linkage, SPV_C_Kernel, SPV_C_Vector16,
SPV_C_Float16Buffer, SPV_C_Float16, SPV_C_Float64, SPV_C_Int64,
SPV_C_Int64Atomics, SPV_C_ImageBasic, SPV_C_ImageReadWrite, SPV_C_ImageMipmap,
SPV_C_Pipes, SPV_C_Groups, SPV_C_DeviceEnqueue, SPV_C_LiteralSampler,
SPV_C_AtomicStorage, SPV_C_Int16, SPV_C_TessellationPointSize,
SPV_C_GeometryPointSize, SPV_C_ImageGatherExtended,
SPV_C_StorageImageMultisample, SPV_C_UniformBufferArrayDynamicIndexing,
SPV_C_Matrix, SPV_C_Addresses, SPV_C_Linkage, SPV_C_Kernel, SPV_C_Float16,
SPV_C_Float64, SPV_C_Int64, SPV_C_Groups, SPV_C_Int16, SPV_C_Int8,
SPV_C_Sampled1D, SPV_C_SampledBuffer, SPV_C_GroupNonUniform, SPV_C_ShaderLayer,
SPV_C_ShaderViewportIndex, SPV_C_SubgroupBallotKHR, SPV_C_SubgroupVoteKHR,
SPV_C_StorageBuffer16BitAccess, SPV_C_StoragePushConstant16,
SPV_C_StorageInputOutput16, SPV_C_DeviceGroup, SPV_C_AtomicStorageOps,
SPV_C_SampleMaskPostDepthCoverage, SPV_C_StorageBuffer8BitAccess,
SPV_C_StoragePushConstant8, SPV_C_DenormPreserve, SPV_C_DenormFlushToZero,
SPV_C_SignedZeroInfNanPreserve, SPV_C_RoundingModeRTE, SPV_C_RoundingModeRTZ,
SPV_C_ImageFootprintNV, SPV_C_FragmentBarycentricNV,
SPV_C_ComputeDerivativeGroupQuadsNV, SPV_C_GroupNonUniformPartitionedNV,
SPV_C_VulkanMemoryModel, SPV_C_VulkanMemoryModelDeviceScope,
SPV_C_ComputeDerivativeGroupLinearNV, SPV_C_SubgroupShuffleINTEL,
SPV_C_SubgroupBufferBlockIOINTEL, SPV_C_SubgroupImageBlockIOINTEL,
SPV_C_SubgroupImageMediaBlockIOINTEL, SPV_C_SubgroupAvcMotionEstimationINTEL,
SPV_C_SubgroupAvcMotionEstimationIntraINTEL,
SPV_C_SubgroupAvcMotionEstimationChromaINTEL, SPV_C_Shader, SPV_C_Vector16,
SPV_C_Float16Buffer, SPV_C_Int64Atomics, SPV_C_ImageBasic, SPV_C_Pipes,
SPV_C_DeviceEnqueue, SPV_C_LiteralSampler, SPV_C_GenericPointer, SPV_C_Image1D,
SPV_C_ImageBuffer, SPV_C_NamedBarrier, SPV_C_GroupNonUniformVote,
SPV_C_GroupNonUniformArithmetic, SPV_C_GroupNonUniformBallot,
SPV_C_GroupNonUniformShuffle, SPV_C_GroupNonUniformShuffleRelative,
SPV_C_GroupNonUniformClustered, SPV_C_GroupNonUniformQuad,
SPV_C_StorageUniform16, SPV_C_UniformAndStorageBuffer8BitAccess,
SPV_C_UniformTexelBufferArrayDynamicIndexing, SPV_C_Geometry,
SPV_C_Tessellation, SPV_C_ImageReadWrite, SPV_C_ImageMipmap,
SPV_C_AtomicStorage, SPV_C_ImageGatherExtended, SPV_C_StorageImageMultisample,
SPV_C_UniformBufferArrayDynamicIndexing,
SPV_C_SampledImageArrayDynamicIndexing,
SPV_C_StorageBufferArrayDynamicIndexing,
SPV_C_StorageImageArrayDynamicIndexing, SPV_C_ClipDistance, SPV_C_CullDistance,
SPV_C_ImageCubeArray, SPV_C_SampleRateShading, SPV_C_ImageRect,
SPV_C_SampledRect, SPV_C_GenericPointer, SPV_C_Int8, SPV_C_InputAttachment,
SPV_C_SparseResidency, SPV_C_MinLod, SPV_C_Sampled1D, SPV_C_Image1D,
SPV_C_SampledCubeArray, SPV_C_SampledBuffer, SPV_C_ImageBuffer,
SPV_C_SampleRateShading, SPV_C_SampledRect, SPV_C_InputAttachment,
SPV_C_SparseResidency, SPV_C_MinLod, SPV_C_SampledCubeArray,
SPV_C_ImageMSArray, SPV_C_StorageImageExtendedFormats, SPV_C_ImageQuery,
SPV_C_DerivativeControl, SPV_C_InterpolationFunction, SPV_C_TransformFeedback,
SPV_C_GeometryStreams, SPV_C_StorageImageReadWithoutFormat,
SPV_C_StorageImageWriteWithoutFormat, SPV_C_MultiViewport,
SPV_C_SubgroupDispatch, SPV_C_NamedBarrier, SPV_C_PipeStorage,
SPV_C_GroupNonUniform, SPV_C_GroupNonUniformVote,
SPV_C_GroupNonUniformArithmetic, SPV_C_GroupNonUniformBallot,
SPV_C_GroupNonUniformShuffle, SPV_C_GroupNonUniformShuffleRelative,
SPV_C_GroupNonUniformClustered, SPV_C_GroupNonUniformQuad, SPV_C_ShaderLayer,
SPV_C_ShaderViewportIndex, SPV_C_SubgroupBallotKHR, SPV_C_DrawParameters,
SPV_C_SubgroupVoteKHR, SPV_C_StorageBuffer16BitAccess, SPV_C_StorageUniform16,
SPV_C_StoragePushConstant16, SPV_C_StorageInputOutput16, SPV_C_DeviceGroup,
SPV_C_MultiView, SPV_C_VariablePointersStorageBuffer, SPV_C_VariablePointers,
SPV_C_AtomicStorageOps, SPV_C_SampleMaskPostDepthCoverage,
SPV_C_StorageBuffer8BitAccess, SPV_C_UniformAndStorageBuffer8BitAccess,
SPV_C_StoragePushConstant8, SPV_C_DenormPreserve, SPV_C_DenormFlushToZero,
SPV_C_SignedZeroInfNanPreserve, SPV_C_RoundingModeRTE, SPV_C_RoundingModeRTZ,
SPV_C_Float16ImageAMD, SPV_C_ImageGatherBiasLodAMD, SPV_C_FragmentMaskAMD,
SPV_C_StencilExportEXT, SPV_C_ImageReadWriteLodAMD, SPV_C_ShaderClockKHR,
SPV_C_SampleMaskOverrideCoverageNV, SPV_C_GeometryShaderPassthroughNV,
SPV_C_ShaderViewportIndexLayerEXT, SPV_C_ShaderViewportMaskNV,
SPV_C_ShaderStereoViewNV, SPV_C_PerViewAttributesNV,
SPV_C_FragmentFullyCoveredEXT, SPV_C_MeshShadingNV, SPV_C_ImageFootprintNV,
SPV_C_FragmentBarycentricNV, SPV_C_ComputeDerivativeGroupQuadsNV,
SPV_C_FragmentDensityEXT, SPV_C_GroupNonUniformPartitionedNV,
SPV_C_StorageImageReadWithoutFormat, SPV_C_StorageImageWriteWithoutFormat,
SPV_C_SubgroupDispatch, SPV_C_PipeStorage, SPV_C_DrawParameters,
SPV_C_MultiView, SPV_C_VariablePointersStorageBuffer, SPV_C_Float16ImageAMD,
SPV_C_ImageGatherBiasLodAMD, SPV_C_FragmentMaskAMD, SPV_C_StencilExportEXT,
SPV_C_ImageReadWriteLodAMD, SPV_C_ShaderClockKHR,
SPV_C_FragmentFullyCoveredEXT, SPV_C_MeshShadingNV, SPV_C_FragmentDensityEXT,
SPV_C_ShaderNonUniform, SPV_C_RuntimeDescriptorArray,
SPV_C_InputAttachmentArrayDynamicIndexing,
SPV_C_UniformTexelBufferArrayDynamicIndexing,
SPV_C_StorageTexelBufferArrayDynamicIndexing,
SPV_C_StorageTexelBufferArrayDynamicIndexing, SPV_C_RayTracingNV,
SPV_C_PhysicalStorageBufferAddresses, SPV_C_CooperativeMatrixNV,
SPV_C_FragmentShaderSampleInterlockEXT,
SPV_C_FragmentShaderShadingRateInterlockEXT, SPV_C_ShaderSMBuiltinsNV,
SPV_C_FragmentShaderPixelInterlockEXT, SPV_C_DemoteToHelperInvocationEXT,
SPV_C_IntegerFunctions2INTEL, SPV_C_TessellationPointSize,
SPV_C_GeometryPointSize, SPV_C_ImageCubeArray, SPV_C_ImageRect,
SPV_C_GeometryStreams, SPV_C_MultiViewport, SPV_C_VariablePointers,
SPV_C_SampleMaskOverrideCoverageNV, SPV_C_GeometryShaderPassthroughNV,
SPV_C_PerViewAttributesNV, SPV_C_InputAttachmentArrayDynamicIndexing,
SPV_C_UniformBufferArrayNonUniformIndexing,
SPV_C_SampledImageArrayNonUniformIndexing,
SPV_C_StorageBufferArrayNonUniformIndexing,
SPV_C_StorageImageArrayNonUniformIndexing,
SPV_C_InputAttachmentArrayNonUniformIndexing,
SPV_C_UniformTexelBufferArrayNonUniformIndexing,
SPV_C_StorageTexelBufferArrayNonUniformIndexing, SPV_C_RayTracingNV,
SPV_C_VulkanMemoryModel, SPV_C_VulkanMemoryModelDeviceScope,
SPV_C_PhysicalStorageBufferAddresses, SPV_C_ComputeDerivativeGroupLinearNV,
SPV_C_CooperativeMatrixNV, SPV_C_FragmentShaderSampleInterlockEXT,
SPV_C_FragmentShaderShadingRateInterlockEXT, SPV_C_ShaderSMBuiltinsNV,
SPV_C_FragmentShaderPixelInterlockEXT, SPV_C_DemoteToHelperInvocationEXT,
SPV_C_SubgroupShuffleINTEL, SPV_C_SubgroupBufferBlockIOINTEL,
SPV_C_SubgroupImageBlockIOINTEL, SPV_C_SubgroupImageMediaBlockIOINTEL,
SPV_C_IntegerFunctions2INTEL, SPV_C_SubgroupAvcMotionEstimationINTEL,
SPV_C_SubgroupAvcMotionEstimationIntraINTEL,
SPV_C_SubgroupAvcMotionEstimationChromaINTEL
SPV_C_StorageTexelBufferArrayNonUniformIndexing,
SPV_C_ShaderViewportIndexLayerEXT, SPV_C_ShaderViewportMaskNV,
SPV_C_ShaderStereoViewNV
]> {
let cppNamespace = "::mlir::spirv";
}

@ -138,10 +138,72 @@ def uniquify_enum_cases(lst):
return uniqued_cases, duplicated_cases
def get_capability_mapping(operand_kinds):
"""Returns the capability mapping from duplicated cases to their canonicalized
def toposort(dag, sort_fn):
"""Topologically sorts the given dag.
case.
Arguments:
- dag: a dict mapping from a node to its incoming nodes.
- sort_fn: a function for sorting nodes in the same batch.
Returns:
A list containing topologically sorted nodes.
"""
# Returns the next batch of nodes without incoming edges
def get_next_batch(dag):
while True:
no_prev_nodes = set(node for node, prev in dag.items() if not prev)
if not no_prev_nodes:
break
yield sorted(no_prev_nodes, key=sort_fn)
dag = {
node: (prev - no_prev_nodes)
for node, prev in dag.items()
if node not in no_prev_nodes
}
assert not dag, 'found cyclic dependency'
sorted_nodes = []
for batch in get_next_batch(dag):
sorted_nodes.extend(batch)
return sorted_nodes
def toposort_capabilities(all_cases, capability_mapping):
"""Returns topologically sorted capability (symbol, value) pairs.
Arguments:
- all_cases: all capability cases (containing symbol, value, and implied
capabilities).
- capability_mapping: mapping from duplicated capability symbols to the
canonicalized symbol chosen for SPIRVBase.td.
Returns:
A list containing topologically sorted capability (symbol, value) pairs.
"""
dag = {}
name_to_value = {}
for case in all_cases:
# Get the current capability.
cur = case['enumerant']
name_to_value[cur] = case['value']
# Ignore duplicated symbols.
if cur in capability_mapping:
continue
# Get capabilities implied by the current capability.
prev = case.get('capabilities', [])
uniqued_prev = set([capability_mapping.get(c, c) for c in prev])
dag[cur] = uniqued_prev
sorted_caps = toposort(dag, lambda x: name_to_value[x])
# Attach the capability's value as the second component of the pair.
return [(c, name_to_value[c]) for c in sorted_caps]
def get_capability_mapping(operand_kinds):
"""Returns the capability mapping from duplicated cases to canonicalized ones.
Arguments:
- operand_kinds: all operand kinds' grammar spec
@ -164,7 +226,7 @@ def get_capability_mapping(operand_kinds):
return capability_mapping
def get_availability_spec(enum_case, capability_mapping, for_op):
def get_availability_spec(enum_case, capability_mapping, for_op, for_cap):
"""Returns the availability specification string for the given enum case.
Arguments:
@ -174,11 +236,15 @@ def get_availability_spec(enum_case, capability_mapping, for_op):
canonicalized symbol chosen for SPIRVBase.td.
- for_op: bool value indicating whether this is the availability spec for an
op itself.
- for_cap: bool value indicating whether this is the availability spec for
capabilities themselves.
Returns:
- A `let availability = [...];` string if with availability spec or
empty string if without availability spec
"""
assert not (for_op and for_cap), 'cannot set both for_op and for_cap'
min_version = enum_case.get('version', '')
if min_version == 'None':
min_version = ''
@ -206,6 +272,7 @@ def get_availability_spec(enum_case, capability_mapping, for_op):
exts = 'Extension<[]>'
caps = enum_case.get('capabilities', [])
implies = ''
if caps:
canonicalized_caps = []
for c in caps:
@ -213,8 +280,19 @@ def get_availability_spec(enum_case, capability_mapping, for_op):
canonicalized_caps.append(capability_mapping[c])
else:
canonicalized_caps.append(c)
caps = 'Capability<[{}]>'.format(', '.join(
['SPV_C_{}'.format(c) for c in sorted(set(canonicalized_caps))]))
prefixed_caps = [
'SPV_C_{}'.format(c) for c in sorted(set(canonicalized_caps))
]
if for_cap:
# If this is generating the availability for capabilities, we need to
# put the capability "requirements" in implies field because now
# the "capabilities" field in the source grammar means so.
caps = ''
implies = 'list<I32EnumAttrCase> implies = [{}];'.format(
', '.join(prefixed_caps))
else:
caps = 'Capability<[{}]>'.format(', '.join(prefixed_caps))
implies = ''
# TODO(antiagainst): delete this once ODS can support dialect-specific content
# and we can use omission to mean no requirements.
if for_op and not caps:
@ -227,7 +305,7 @@ def get_availability_spec(enum_case, capability_mapping, for_op):
avail = '{} availability = [\n {}\n ];'.format(
'let' if for_op else 'list<Availability>', joined_spec)
return avail
return '{}{}{}'.format(implies, '\n ' if implies and avail else '', avail)
def gen_operand_kind_enum_attr(operand_kind, capability_mapping):
@ -258,9 +336,15 @@ def gen_operand_kind_enum_attr(operand_kind, capability_mapping):
for case in operand_kind['enumerants']:
name_to_case_dict[case['enumerant']] = case
kind_cases = [(case['enumerant'], case['value'])
for case in operand_kind['enumerants']]
kind_cases, _ = uniquify_enum_cases(kind_cases)
if kind_name == 'Capability':
# Special treatment for capability cases: we need to sort them topologically
# because a capability can refer to another via the 'implies' field.
kind_cases = toposort_capabilities(operand_kind['enumerants'],
capability_mapping)
else:
kind_cases = [(case['enumerant'], case['value'])
for case in operand_kind['enumerants']]
kind_cases, _ = uniquify_enum_cases(kind_cases)
max_len = max([len(symbol) for (symbol, _) in kind_cases])
# Generate the definition for each enum case
@ -268,12 +352,9 @@ def gen_operand_kind_enum_attr(operand_kind, capability_mapping):
'{category}EnumAttrCase<"{symbol}", {value}>{avail}'
case_defs = []
for case in kind_cases:
if kind_name == 'Capability':
avail = ''
else:
avail = get_availability_spec(name_to_case_dict[case[0]],
capability_mapping,
False)
avail = get_availability_spec(name_to_case_dict[case[0]],
capability_mapping,
False, kind_name == 'Capability')
case_def = fmt_str.format(
category=kind_category,
acronym=kind_acronym,
@ -558,7 +639,7 @@ def get_op_definition(instruction, doc, existing_info, capability_mapping):
operands = instruction.get('operands', [])
# Op availability
avail = get_availability_spec(instruction, capability_mapping, True)
avail = get_availability_spec(instruction, capability_mapping, True, False)
if avail:
avail = '\n\n {0}'.format(avail)