Vulkan Environment for SPIR-V

Shaders for Vulkan are defined by the Khronos SPIR-V Specification as well as the Khronos SPIR-V Extended Instructions for GLSL Specification. This appendix defines additional SPIR-V requirements applying to Vulkan shaders.

Versions and Formats

A Vulkan 1.4 implementation must support the 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, and 1.6 versions of SPIR-V and the 1.0 version of the SPIR-V Extended Instructions for GLSL.

A SPIR-V module passed into vkCreateShaderModule is interpreted as a series of 32-bit words in host endianness, with literal strings packed as described in section 2.2 of the SPIR-V Specification. The first few words of the SPIR-V module must be a magic number and a SPIR-V version number, as described in section 2.3 of the SPIR-V Specification.

Capabilities

The table below lists the set of SPIR-V capabilities that may be supported in Vulkan implementations. The application must not use any of these capabilities in SPIR-V passed to vkCreateShaderModule unless one of the following conditions is met for the VkDevice specified in the device parameter of vkCreateShaderModule:

  • The corresponding field in the table is blank.

  • Any corresponding Vulkan feature is enabled.

  • Any corresponding Vulkan extension is enabled.

  • Any corresponding Vulkan property is supported.

  • The corresponding core version is supported (as returned by VkPhysicalDeviceProperties::apiVersion).

Table 1. List of SPIR-V Capabilities and Corresponding Vulkan Features, Extensions, or Core Version
SPIR-V OpCapability
                Vulkan feature, extension, or core version

Matrix
                VK_VERSION_1_0

Shader
                VK_VERSION_1_0

InputAttachment
                VK_VERSION_1_0

Sampled1D
                VK_VERSION_1_0

Image1D
                VK_VERSION_1_0

SampledBuffer
                VK_VERSION_1_0

ImageBuffer
                VK_VERSION_1_0

ImageQuery
                VK_VERSION_1_0

DerivativeControl
                VK_VERSION_1_0

Geometry
                VkPhysicalDeviceFeatures::geometryShader

Tessellation
                VkPhysicalDeviceFeatures::tessellationShader

Float64
                VkPhysicalDeviceFeatures::shaderFloat64

Int64
                VkPhysicalDeviceFeatures::shaderInt64

Int64Atomics
                VkPhysicalDeviceVulkan12Features::shaderBufferInt64Atomics
                VkPhysicalDeviceVulkan12Features::shaderSharedInt64Atomics
                VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT::shaderImageInt64Atomics

AtomicFloat16AddEXT
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderBufferFloat16AtomicAdd
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderSharedFloat16AtomicAdd

AtomicFloat32AddEXT
                VkPhysicalDeviceShaderAtomicFloatFeaturesEXT::shaderBufferFloat32AtomicAdd
                VkPhysicalDeviceShaderAtomicFloatFeaturesEXT::shaderSharedFloat32AtomicAdd
                VkPhysicalDeviceShaderAtomicFloatFeaturesEXT::shaderImageFloat32AtomicAdd

AtomicFloat64AddEXT
                VkPhysicalDeviceShaderAtomicFloatFeaturesEXT::shaderBufferFloat64AtomicAdd
                VkPhysicalDeviceShaderAtomicFloatFeaturesEXT::shaderSharedFloat64AtomicAdd

AtomicFloat16MinMaxEXT
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderBufferFloat16AtomicMinMax
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderSharedFloat16AtomicMinMax

AtomicFloat32MinMaxEXT
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderBufferFloat32AtomicMinMax
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderSharedFloat32AtomicMinMax
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderImageFloat32AtomicMinMax

AtomicFloat64MinMaxEXT
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderBufferFloat64AtomicMinMax
                VkPhysicalDeviceShaderAtomicFloat2FeaturesEXT::shaderSharedFloat64AtomicMinMax

AtomicFloat16VectorNV
                VkPhysicalDeviceShaderAtomicFloat16VectorFeaturesNV::shaderFloat16VectorAtomics

Int64ImageEXT
                VkPhysicalDeviceShaderImageAtomicInt64FeaturesEXT::shaderImageInt64Atomics

Int16
                VkPhysicalDeviceFeatures::shaderInt16

TessellationPointSize
                VkPhysicalDeviceFeatures::shaderTessellationAndGeometryPointSize

GeometryPointSize
                VkPhysicalDeviceFeatures::shaderTessellationAndGeometryPointSize

ImageGatherExtended
                VkPhysicalDeviceFeatures::shaderImageGatherExtended

StorageImageMultisample
                VkPhysicalDeviceFeatures::shaderStorageImageMultisample

UniformBufferArrayDynamicIndexing
                VkPhysicalDeviceFeatures::shaderUniformBufferArrayDynamicIndexing

SampledImageArrayDynamicIndexing
                VkPhysicalDeviceFeatures::shaderSampledImageArrayDynamicIndexing

StorageBufferArrayDynamicIndexing
                VkPhysicalDeviceFeatures::shaderStorageBufferArrayDynamicIndexing

StorageImageArrayDynamicIndexing
                VkPhysicalDeviceFeatures::shaderStorageImageArrayDynamicIndexing

ClipDistance
                VkPhysicalDeviceFeatures::shaderClipDistance

CullDistance
                VkPhysicalDeviceFeatures::shaderCullDistance

ImageCubeArray
                VkPhysicalDeviceFeatures::imageCubeArray

SampleRateShading
                VkPhysicalDeviceFeatures::sampleRateShading

SparseResidency
                VkPhysicalDeviceFeatures::shaderResourceResidency

MinLod
                VkPhysicalDeviceFeatures::shaderResourceMinLod

SampledCubeArray
                VkPhysicalDeviceFeatures::imageCubeArray

ImageMSArray
                VkPhysicalDeviceFeatures::shaderStorageImageMultisample

StorageImageExtendedFormats
                VK_VERSION_1_0

InterpolationFunction
                VkPhysicalDeviceFeatures::sampleRateShading

StorageImageReadWithoutFormat
                VkPhysicalDeviceFeatures::shaderStorageImageReadWithoutFormat
                VK_VERSION_1_3
                VK_KHR_format_feature_flags2

StorageImageWriteWithoutFormat
                VkPhysicalDeviceFeatures::shaderStorageImageWriteWithoutFormat
                VK_VERSION_1_3
                VK_KHR_format_feature_flags2

MultiViewport
                VkPhysicalDeviceFeatures::multiViewport

DrawParameters
                VkPhysicalDeviceVulkan11Features::shaderDrawParameters
                VkPhysicalDeviceShaderDrawParametersFeatures::shaderDrawParameters
                VK_KHR_shader_draw_parameters

MultiView
                VkPhysicalDeviceVulkan11Features::multiview
                VkPhysicalDeviceMultiviewFeatures::multiview

DeviceGroup
                VK_VERSION_1_1
                VK_KHR_device_group

VariablePointersStorageBuffer
                VkPhysicalDeviceVulkan11Features::variablePointersStorageBuffer
                VkPhysicalDeviceVariablePointersFeatures::variablePointersStorageBuffer

VariablePointers
                VkPhysicalDeviceVulkan11Features::variablePointers
                VkPhysicalDeviceVariablePointersFeatures::variablePointers

ShaderClockKHR
                VK_KHR_shader_clock

StencilExportEXT
                VK_EXT_shader_stencil_export

SubgroupBallotKHR
                VK_EXT_shader_subgroup_ballot

SubgroupVoteKHR
                VK_EXT_shader_subgroup_vote

ImageReadWriteLodAMD
                VK_AMD_shader_image_load_store_lod

ImageGatherBiasLodAMD
                VK_AMD_texture_gather_bias_lod

FragmentMaskAMD
                VK_AMD_shader_fragment_mask

SampleMaskOverrideCoverageNV
                VK_NV_sample_mask_override_coverage

GeometryShaderPassthroughNV
                VK_NV_geometry_shader_passthrough

ShaderViewportIndex
                VkPhysicalDeviceVulkan12Features::shaderOutputViewportIndex

ShaderLayer
                VkPhysicalDeviceVulkan12Features::shaderOutputLayer

ShaderViewportIndexLayerEXT
                VK_EXT_shader_viewport_index_layer
                VK_NV_viewport_array2

ShaderViewportMaskNV
                VK_NV_viewport_array2

PerViewAttributesNV
                VK_NVX_multiview_per_view_attributes

StorageBuffer16BitAccess
                VkPhysicalDeviceVulkan11Features::storageBuffer16BitAccess
                VkPhysicalDevice16BitStorageFeatures::storageBuffer16BitAccess

UniformAndStorageBuffer16BitAccess
                VkPhysicalDeviceVulkan11Features::uniformAndStorageBuffer16BitAccess
                VkPhysicalDevice16BitStorageFeatures::uniformAndStorageBuffer16BitAccess

StoragePushConstant16
                VkPhysicalDeviceVulkan11Features::storagePushConstant16
                VkPhysicalDevice16BitStorageFeatures::storagePushConstant16

StorageInputOutput16
                VkPhysicalDeviceVulkan11Features::storageInputOutput16
                VkPhysicalDevice16BitStorageFeatures::storageInputOutput16

GroupNonUniform
                VK_SUBGROUP_FEATURE_BASIC_BIT

GroupNonUniformVote
                VK_SUBGROUP_FEATURE_VOTE_BIT

GroupNonUniformArithmetic
                VK_SUBGROUP_FEATURE_ARITHMETIC_BIT

GroupNonUniformBallot
                VK_SUBGROUP_FEATURE_BALLOT_BIT

GroupNonUniformShuffle
                VK_SUBGROUP_FEATURE_SHUFFLE_BIT

GroupNonUniformShuffleRelative
                VK_SUBGROUP_FEATURE_SHUFFLE_RELATIVE_BIT

GroupNonUniformClustered
                VK_SUBGROUP_FEATURE_CLUSTERED_BIT

GroupNonUniformQuad
                VK_SUBGROUP_FEATURE_QUAD_BIT

GroupNonUniformPartitionedNV
                VK_SUBGROUP_FEATURE_PARTITIONED_BIT_NV

SampleMaskPostDepthCoverage
                VK_EXT_post_depth_coverage

ShaderNonUniform
                VK_VERSION_1_2
                VK_EXT_descriptor_indexing

RuntimeDescriptorArray
                VkPhysicalDeviceVulkan12Features::runtimeDescriptorArray

InputAttachmentArrayDynamicIndexing
                VkPhysicalDeviceVulkan12Features::shaderInputAttachmentArrayDynamicIndexing

UniformTexelBufferArrayDynamicIndexing
                VkPhysicalDeviceVulkan12Features::shaderUniformTexelBufferArrayDynamicIndexing

StorageTexelBufferArrayDynamicIndexing
                VkPhysicalDeviceVulkan12Features::shaderStorageTexelBufferArrayDynamicIndexing

UniformBufferArrayNonUniformIndexing
                VkPhysicalDeviceVulkan12Features::shaderUniformBufferArrayNonUniformIndexing

SampledImageArrayNonUniformIndexing
                VkPhysicalDeviceVulkan12Features::shaderSampledImageArrayNonUniformIndexing

StorageBufferArrayNonUniformIndexing
                VkPhysicalDeviceVulkan12Features::shaderStorageBufferArrayNonUniformIndexing

StorageImageArrayNonUniformIndexing
                VkPhysicalDeviceVulkan12Features::shaderStorageImageArrayNonUniformIndexing

InputAttachmentArrayNonUniformIndexing
                VkPhysicalDeviceVulkan12Features::shaderInputAttachmentArrayNonUniformIndexing

UniformTexelBufferArrayNonUniformIndexing
                VkPhysicalDeviceVulkan12Features::shaderUniformTexelBufferArrayNonUniformIndexing

StorageTexelBufferArrayNonUniformIndexing
                VkPhysicalDeviceVulkan12Features::shaderStorageTexelBufferArrayNonUniformIndexing

FragmentFullyCoveredEXT
                VK_EXT_conservative_rasterization

Float16
                VkPhysicalDeviceVulkan12Features::shaderFloat16
                VK_AMD_gpu_shader_half_float

Int8
                VkPhysicalDeviceVulkan12Features::shaderInt8

StorageBuffer8BitAccess
                VkPhysicalDeviceVulkan12Features::storageBuffer8BitAccess

UniformAndStorageBuffer8BitAccess
                VkPhysicalDeviceVulkan12Features::uniformAndStorageBuffer8BitAccess

StoragePushConstant8
                VkPhysicalDeviceVulkan12Features::storagePushConstant8

VulkanMemoryModel
                VkPhysicalDeviceVulkan12Features::vulkanMemoryModel

VulkanMemoryModelDeviceScope
                VkPhysicalDeviceVulkan12Features::vulkanMemoryModelDeviceScope

DenormPreserve
                VkPhysicalDeviceVulkan12Properties::shaderDenormPreserveFloat16
                VkPhysicalDeviceVulkan12Properties::shaderDenormPreserveFloat32
                VkPhysicalDeviceVulkan12Properties::shaderDenormPreserveFloat64

DenormFlushToZero
                VkPhysicalDeviceVulkan12Properties::shaderDenormFlushToZeroFloat16
                VkPhysicalDeviceVulkan12Properties::shaderDenormFlushToZeroFloat32
                VkPhysicalDeviceVulkan12Properties::shaderDenormFlushToZeroFloat64

SignedZeroInfNanPreserve
                VkPhysicalDeviceVulkan12Properties::shaderSignedZeroInfNanPreserveFloat16
                VkPhysicalDeviceVulkan12Properties::shaderSignedZeroInfNanPreserveFloat32
                VkPhysicalDeviceVulkan12Properties::shaderSignedZeroInfNanPreserveFloat64

RoundingModeRTE
                VkPhysicalDeviceVulkan12Properties::shaderRoundingModeRTEFloat16
                VkPhysicalDeviceVulkan12Properties::shaderRoundingModeRTEFloat32
                VkPhysicalDeviceVulkan12Properties::shaderRoundingModeRTEFloat64

RoundingModeRTZ
                VkPhysicalDeviceVulkan12Properties::shaderRoundingModeRTZFloat16
                VkPhysicalDeviceVulkan12Properties::shaderRoundingModeRTZFloat32
                VkPhysicalDeviceVulkan12Properties::shaderRoundingModeRTZFloat64

ComputeDerivativeGroupQuadsKHR
                VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::computeDerivativeGroupQuads
                VkPhysicalDeviceComputeShaderDerivativesFeaturesNV::computeDerivativeGroupQuads

ComputeDerivativeGroupLinearKHR
                VkPhysicalDeviceComputeShaderDerivativesFeaturesKHR::computeDerivativeGroupLinear
                VkPhysicalDeviceComputeShaderDerivativesFeaturesNV::computeDerivativeGroupLinear

ImageFootprintNV
                VkPhysicalDeviceShaderImageFootprintFeaturesNV::imageFootprint

MeshShadingNV
                VK_NV_mesh_shader

RayTracingKHR
                VkPhysicalDeviceRayTracingPipelineFeaturesKHR::rayTracingPipeline

RayQueryKHR
                VkPhysicalDeviceRayQueryFeaturesKHR::rayQuery

RayTraversalPrimitiveCullingKHR
                VkPhysicalDeviceRayTracingPipelineFeaturesKHR::rayTraversalPrimitiveCulling
                VkPhysicalDeviceRayQueryFeaturesKHR::rayQuery

RayCullMaskKHR
                VkPhysicalDeviceRayTracingMaintenance1FeaturesKHR::rayTracingMaintenance1

RayTracingNV
                VK_NV_ray_tracing

RayTracingMotionBlurNV
                VkPhysicalDeviceRayTracingMotionBlurFeaturesNV::rayTracingMotionBlur

TransformFeedback
                VkPhysicalDeviceTransformFeedbackFeaturesEXT::transformFeedback

GeometryStreams
                VkPhysicalDeviceTransformFeedbackFeaturesEXT::geometryStreams

FragmentDensityEXT
                VkPhysicalDeviceFragmentDensityMapFeaturesEXT::fragmentDensityMap
                VkPhysicalDeviceShadingRateImageFeaturesNV::shadingRateImage

PhysicalStorageBufferAddresses
                VkPhysicalDeviceVulkan12Features::bufferDeviceAddress
                VkPhysicalDeviceBufferDeviceAddressFeaturesEXT::bufferDeviceAddress

CooperativeMatrixNV
                VkPhysicalDeviceCooperativeMatrixFeaturesNV::cooperativeMatrix

IntegerFunctions2INTEL
                VkPhysicalDeviceShaderIntegerFunctions2FeaturesINTEL::shaderIntegerFunctions2

ShaderSMBuiltinsNV
                VkPhysicalDeviceShaderSMBuiltinsFeaturesNV::shaderSMBuiltins

FragmentShaderSampleInterlockEXT
                VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderSampleInterlock

FragmentShaderPixelInterlockEXT
                VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderPixelInterlock

FragmentShaderShadingRateInterlockEXT
                VkPhysicalDeviceFragmentShaderInterlockFeaturesEXT::fragmentShaderShadingRateInterlock
                VkPhysicalDeviceShadingRateImageFeaturesNV::shadingRateImage

DemoteToHelperInvocation
                VkPhysicalDeviceVulkan13Features::shaderDemoteToHelperInvocation
                VkPhysicalDeviceShaderDemoteToHelperInvocationFeaturesEXT::shaderDemoteToHelperInvocation

FragmentShadingRateKHR
                VkPhysicalDeviceFragmentShadingRateFeaturesKHR::pipelineFragmentShadingRate
                VkPhysicalDeviceFragmentShadingRateFeaturesKHR::primitiveFragmentShadingRate
                VkPhysicalDeviceFragmentShadingRateFeaturesKHR::attachmentFragmentShadingRate

WorkgroupMemoryExplicitLayoutKHR
                VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR::workgroupMemoryExplicitLayout

WorkgroupMemoryExplicitLayout8BitAccessKHR
                VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR::workgroupMemoryExplicitLayout8BitAccess

WorkgroupMemoryExplicitLayout16BitAccessKHR
                VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR::workgroupMemoryExplicitLayout16BitAccess

DotProductInputAll
                VkPhysicalDeviceVulkan13Features::shaderIntegerDotProduct
                VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR::shaderIntegerDotProduct

DotProductInput4x8Bit
                VkPhysicalDeviceVulkan13Features::shaderIntegerDotProduct
                VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR::shaderIntegerDotProduct

DotProductInput4x8BitPacked
                VkPhysicalDeviceVulkan13Features::shaderIntegerDotProduct
                VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR::shaderIntegerDotProduct

DotProduct
                VkPhysicalDeviceVulkan13Features::shaderIntegerDotProduct
                VkPhysicalDeviceShaderIntegerDotProductFeaturesKHR::shaderIntegerDotProduct

FragmentBarycentricKHR
                VkPhysicalDeviceFragmentShaderBarycentricFeaturesKHR::fragmentShaderBarycentric
                VkPhysicalDeviceFragmentShaderBarycentricFeaturesNV::fragmentShaderBarycentric

TextureSampleWeightedQCOM
                VkPhysicalDeviceImageProcessingFeaturesQCOM::textureSampleWeighted

TextureBoxFilterQCOM
                VkPhysicalDeviceImageProcessingFeaturesQCOM::textureBoxFilter

TextureBlockMatchQCOM
                VkPhysicalDeviceImageProcessingFeaturesQCOM::textureBlockMatch

TextureBlockMatch2QCOM
                VkPhysicalDeviceImageProcessing2FeaturesQCOM::textureBlockMatch2

MeshShadingEXT
                VK_EXT_mesh_shader

RayTracingOpacityMicromapEXT
                VK_EXT_opacity_micromap

CoreBuiltinsARM
                VkPhysicalDeviceShaderCoreBuiltinsFeaturesARM::shaderCoreBuiltins

ShaderInvocationReorderNV
                VK_NV_ray_tracing_invocation_reorder

ClusterCullingShadingHUAWEI
                VkPhysicalDeviceClusterCullingShaderFeaturesHUAWEI::clustercullingShader

RayTracingPositionFetchKHR
                VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR::rayTracingPositionFetch

RayQueryPositionFetchKHR
                VkPhysicalDeviceRayTracingPositionFetchFeaturesKHR::rayTracingPositionFetch

TileImageColorReadAccessEXT
                VkPhysicalDeviceShaderTileImageFeaturesEXT::shaderTileImageColorReadAccess

TileImageDepthReadAccessEXT
                VkPhysicalDeviceShaderTileImageFeaturesEXT::shaderTileImageDepthReadAccess

TileImageStencilReadAccessEXT
                VkPhysicalDeviceShaderTileImageFeaturesEXT::shaderTileImageStencilReadAccess

CooperativeMatrixKHR
                VkPhysicalDeviceCooperativeMatrixFeaturesKHR::cooperativeMatrix

ShaderEnqueueAMDX
                VkPhysicalDeviceShaderEnqueueFeaturesAMDX::shaderEnqueue

GroupNonUniformRotateKHR
                VkPhysicalDeviceVulkan14Features::shaderSubgroupRotate
                VkPhysicalDeviceShaderSubgroupRotateFeatures::shaderSubgroupRotate

ExpectAssumeKHR
                VkPhysicalDeviceVulkan14Features::shaderExpectAssume
                VkPhysicalDeviceShaderExpectAssumeFeatures::shaderExpectAssume

FloatControls2
                VkPhysicalDeviceVulkan14Features::shaderFloatControls2
                VkPhysicalDeviceShaderFloatControls2Features::shaderFloatControls2

QuadControlKHR
                VkPhysicalDeviceShaderQuadControlFeaturesKHR::shaderQuadControl

RawAccessChainsNV
                VkPhysicalDeviceRawAccessChainsFeaturesNV::shaderRawAccessChains

ReplicatedCompositesEXT
                VkPhysicalDeviceShaderReplicatedCompositesFeaturesEXT::shaderReplicatedComposites

TensorAddressingNV
                VkPhysicalDeviceCooperativeMatrix2FeaturesNV::cooperativeMatrixTensorAddressing

CooperativeMatrixReductionsNV
                VkPhysicalDeviceCooperativeMatrix2FeaturesNV::cooperativeMatrixReductions

CooperativeMatrixConversionsNV
                VkPhysicalDeviceCooperativeMatrix2FeaturesNV::cooperativeMatrixConversions

CooperativeMatrixPerElementOperationsNV
                VkPhysicalDeviceCooperativeMatrix2FeaturesNV::cooperativeMatrixPerElementOperations

CooperativeMatrixTensorAddressingNV
                VkPhysicalDeviceCooperativeMatrix2FeaturesNV::cooperativeMatrixTensorAddressing

CooperativeMatrixBlockLoadsNV
                VkPhysicalDeviceCooperativeMatrix2FeaturesNV::cooperativeMatrixBlockLoads

The application must not pass a SPIR-V module containing any of the following to vkCreateShaderModule:

  • any OpCapability not listed above,

  • an unsupported capability, or

  • a capability which corresponds to a Vulkan feature or extension which has not been enabled.

SPIR-V Extensions

The following table lists SPIR-V extensions that implementations may support. The application must not pass a SPIR-V module to vkCreateShaderModule that uses the following SPIR-V extensions unless one of the following conditions is met for the VkDevice specified in the device parameter of vkCreateShaderModule:

  • Any corresponding Vulkan extension is enabled.

  • The corresponding core version is supported (as returned by VkPhysicalDeviceProperties::apiVersion).

Table 2. List of SPIR-V Extensions and Corresponding Vulkan Extensions or Core Version
SPIR-V OpExtension
                Vulkan extension or core version

SPV_KHR_variable_pointers
                VK_VERSION_1_1
                VK_KHR_variable_pointers

SPV_AMD_shader_explicit_vertex_parameter
                VK_AMD_shader_explicit_vertex_parameter

SPV_AMD_gcn_shader
                VK_AMD_gcn_shader

SPV_AMD_gpu_shader_half_float
                VK_AMD_gpu_shader_half_float

SPV_AMD_gpu_shader_int16
                VK_AMD_gpu_shader_int16

SPV_AMD_shader_ballot
                VK_AMD_shader_ballot

SPV_AMD_shader_fragment_mask
                VK_AMD_shader_fragment_mask

SPV_AMD_shader_image_load_store_lod
                VK_AMD_shader_image_load_store_lod

SPV_AMD_shader_trinary_minmax
                VK_AMD_shader_trinary_minmax

SPV_AMD_texture_gather_bias_lod
                VK_AMD_texture_gather_bias_lod

SPV_AMD_shader_early_and_late_fragment_tests
                VK_AMD_shader_early_and_late_fragment_tests

SPV_KHR_shader_draw_parameters
                VK_VERSION_1_1
                VK_KHR_shader_draw_parameters

SPV_KHR_8bit_storage
                VK_VERSION_1_2
                VK_KHR_8bit_storage

SPV_KHR_16bit_storage
                VK_VERSION_1_1
                VK_KHR_16bit_storage

SPV_KHR_shader_clock
                VK_KHR_shader_clock

SPV_KHR_float_controls
                VK_VERSION_1_2
                VK_KHR_shader_float_controls

SPV_KHR_storage_buffer_storage_class
                VK_VERSION_1_1
                VK_KHR_storage_buffer_storage_class

SPV_KHR_post_depth_coverage
                VK_EXT_post_depth_coverage

SPV_EXT_shader_stencil_export
                VK_EXT_shader_stencil_export

SPV_KHR_shader_ballot
                VK_EXT_shader_subgroup_ballot

SPV_KHR_subgroup_vote
                VK_EXT_shader_subgroup_vote

SPV_NV_sample_mask_override_coverage
                VK_NV_sample_mask_override_coverage

SPV_NV_geometry_shader_passthrough
                VK_NV_geometry_shader_passthrough

SPV_NV_mesh_shader
                VK_NV_mesh_shader

SPV_NV_viewport_array2
                VK_NV_viewport_array2

SPV_NV_shader_subgroup_partitioned
                VK_NV_shader_subgroup_partitioned

SPV_NV_shader_invocation_reorder
                VK_NV_ray_tracing_invocation_reorder

SPV_EXT_shader_viewport_index_layer
                VK_VERSION_1_2
                VK_EXT_shader_viewport_index_layer

SPV_NVX_multiview_per_view_attributes
                VK_NVX_multiview_per_view_attributes

SPV_EXT_descriptor_indexing
                VK_VERSION_1_2
                VK_EXT_descriptor_indexing

SPV_KHR_vulkan_memory_model
                VK_VERSION_1_2
                VK_KHR_vulkan_memory_model

SPV_NV_compute_shader_derivatives
                VK_NV_compute_shader_derivatives

SPV_NV_fragment_shader_barycentric
                VK_NV_fragment_shader_barycentric

SPV_NV_shader_image_footprint
                VK_NV_shader_image_footprint

SPV_NV_shading_rate
                VK_NV_shading_rate_image

SPV_NV_ray_tracing
                VK_NV_ray_tracing

SPV_KHR_ray_tracing
                VK_KHR_ray_tracing_pipeline

SPV_KHR_ray_query
                VK_KHR_ray_query

SPV_KHR_ray_cull_mask
                VK_KHR_ray_tracing_maintenance1

SPV_GOOGLE_hlsl_functionality1
                VK_GOOGLE_hlsl_functionality1

SPV_GOOGLE_user_type
                VK_GOOGLE_user_type

SPV_GOOGLE_decorate_string
                VK_GOOGLE_decorate_string

SPV_EXT_fragment_invocation_density
                VK_EXT_fragment_density_map

SPV_KHR_physical_storage_buffer
                VK_VERSION_1_2
                VK_KHR_buffer_device_address

SPV_EXT_physical_storage_buffer
                VK_EXT_buffer_device_address

SPV_NV_cooperative_matrix
                VK_NV_cooperative_matrix

SPV_NV_shader_sm_builtins
                VK_NV_shader_sm_builtins

SPV_EXT_fragment_shader_interlock
                VK_EXT_fragment_shader_interlock

SPV_EXT_demote_to_helper_invocation
                VK_VERSION_1_3
                VK_EXT_shader_demote_to_helper_invocation

SPV_KHR_fragment_shading_rate
                VK_KHR_fragment_shading_rate

SPV_KHR_non_semantic_info
                VK_VERSION_1_3
                VK_KHR_shader_non_semantic_info

SPV_EXT_shader_image_int64
                VK_EXT_shader_image_atomic_int64

SPV_KHR_terminate_invocation
                VK_VERSION_1_3
                VK_KHR_shader_terminate_invocation

SPV_KHR_multiview
                VK_VERSION_1_1
                VK_KHR_multiview

SPV_KHR_workgroup_memory_explicit_layout
                VK_KHR_workgroup_memory_explicit_layout

SPV_EXT_shader_atomic_float_add
                VK_EXT_shader_atomic_float

SPV_KHR_fragment_shader_barycentric
                VK_KHR_fragment_shader_barycentric

SPV_KHR_subgroup_uniform_control_flow
                VK_VERSION_1_3
                VK_KHR_shader_subgroup_uniform_control_flow

SPV_EXT_shader_atomic_float_min_max
                VK_EXT_shader_atomic_float2

SPV_EXT_shader_atomic_float16_add
                VK_EXT_shader_atomic_float2

SPV_NV_shader_atomic_fp16_vector
                VK_NV_shader_atomic_float16_vector

SPV_EXT_fragment_fully_covered
                VK_EXT_conservative_rasterization

SPV_KHR_integer_dot_product
                VK_VERSION_1_3
                VK_KHR_shader_integer_dot_product

SPV_INTEL_shader_integer_functions2
                VK_INTEL_shader_integer_functions2

SPV_KHR_device_group
                VK_VERSION_1_1
                VK_KHR_device_group

SPV_QCOM_image_processing
                VK_QCOM_image_processing

SPV_QCOM_image_processing2
                VK_QCOM_image_processing2

SPV_EXT_mesh_shader
                VK_EXT_mesh_shader

SPV_KHR_ray_tracing_position_fetch
                VK_KHR_ray_tracing_position_fetch

SPV_EXT_shader_tile_image
                VK_EXT_shader_tile_image

SPV_EXT_opacity_micromap
                VK_EXT_opacity_micromap

SPV_KHR_cooperative_matrix
                VK_KHR_cooperative_matrix

SPV_ARM_core_builtins
                VK_ARM_shader_core_builtins

SPV_AMDX_shader_enqueue
                VK_AMDX_shader_enqueue

SPV_HUAWEI_cluster_culling_shader
                VK_HUAWEI_cluster_culling_shader

SPV_HUAWEI_subpass_shading
                VK_HUAWEI_subpass_shading

SPV_NV_ray_tracing_motion_blur
                VK_NV_ray_tracing_motion_blur

SPV_KHR_maximal_reconvergence
                VK_KHR_shader_maximal_reconvergence

SPV_KHR_subgroup_rotate
                VK_VERSION_1_4
                VK_KHR_shader_subgroup_rotate

SPV_KHR_expect_assume
                VK_VERSION_1_4
                VK_KHR_shader_expect_assume

SPV_KHR_float_controls2
                VK_VERSION_1_4
                VK_KHR_shader_float_controls2

SPV_KHR_quad_control
                VK_KHR_shader_quad_control

SPV_NV_raw_access_chains
                VK_NV_raw_access_chains

SPV_KHR_compute_shader_derivatives
                VK_KHR_compute_shader_derivatives

SPV_EXT_replicated_composites
                VK_EXT_shader_replicated_composites

SPV_KHR_relaxed_extended_instruction
                VK_KHR_shader_relaxed_extended_instruction

SPV_NV_cooperative_matrix2
                VK_NV_cooperative_matrix2

SPV_NV_tensor_addressing
                VK_NV_cooperative_matrix2

Validation Rules Within a Module

A SPIR-V module passed to vkCreateShaderModule must conform to the following rules:

Standalone SPIR-V Validation

The following rules can be validated with only the SPIR-V module itself. They do not depend on knowledge of the implementation and its capabilities or knowledge of runtime information, such as enabled features.

Valid Usage
  • VUID-StandaloneSpirv-None-04633
    Every entry point must have no return value and accept no arguments

  • VUID-StandaloneSpirv-None-04634
    The static function-call graph for an entry point must not contain cycles; that is, static recursion is not allowed

  • VUID-StandaloneSpirv-None-04635
    The Logical or PhysicalStorageBuffer64 addressing model must be selected

  • VUID-StandaloneSpirv-None-04636
    Scope for execution must be limited to Workgroup or Subgroup

  • VUID-StandaloneSpirv-None-04637
    If the Scope for execution is Workgroup, then it must only be used in the task, mesh, tessellation control, or compute Execution Model

  • VUID-StandaloneSpirv-None-04638
    Scope for memory must be limited to Device, QueueFamily, Workgroup, ShaderCallKHR, Subgroup, or Invocation

  • VUID-StandaloneSpirv-ExecutionModel-07320
    If the Execution Model is TessellationControl, and the MemoryModel is GLSL450, the Scope for memory must not be Workgroup

  • VUID-StandaloneSpirv-None-07321
    If the Scope for memory is Workgroup, then it must only be used in the task, mesh, tessellation control, or compute Execution Model

  • VUID-StandaloneSpirv-None-04640
    If the Scope for memory is ShaderCallKHR, then it must only be used in ray generation, intersection, closest hit, any-hit, miss, and callable Execution Model

  • VUID-StandaloneSpirv-None-04641
    If the Scope for memory is Invocation, then memory semantics must be None

  • VUID-StandaloneSpirv-None-04642
    Scope for group operations must be limited to Subgroup

  • VUID-StandaloneSpirv-SubgroupVoteKHR-07951
    If none of the SubgroupVoteKHR, GroupNonUniform, or SubgroupBallotKHR capabilities are declared, Scope for memory must not be Subgroup

  • VUID-StandaloneSpirv-None-04643
    Storage Class must be limited to UniformConstant, Input, Uniform, Output, Workgroup, Private, Function, PushConstant, Image, StorageBuffer, RayPayloadKHR, IncomingRayPayloadKHR, HitAttributeKHR, CallableDataKHR, IncomingCallableDataKHR, ShaderRecordBufferKHR, PhysicalStorageBuffer, or TileImageEXT

  • VUID-StandaloneSpirv-None-04644
    If the Storage Class is Output, then it must not be used in the GlCompute, RayGenerationKHR, IntersectionKHR, AnyHitKHR, ClosestHitKHR, MissKHR, or CallableKHR Execution Model

  • VUID-StandaloneSpirv-None-04645
    If the Storage Class is Workgroup, then it must only be used in the task, mesh, or compute Execution Model

  • VUID-StandaloneSpirv-None-08720
    If the Storage Class is TileImageEXT, then it must only be used in the fragment execution model

  • VUID-StandaloneSpirv-OpAtomicStore-04730
    OpAtomicStore must not use Acquire, AcquireRelease, or SequentiallyConsistent memory semantics

  • VUID-StandaloneSpirv-OpAtomicLoad-04731
    OpAtomicLoad must not use Release, AcquireRelease, or SequentiallyConsistent memory semantics

  • VUID-StandaloneSpirv-OpMemoryBarrier-04732
    OpMemoryBarrier must use one of Acquire, Release, AcquireRelease, or SequentiallyConsistent memory semantics

  • VUID-StandaloneSpirv-OpMemoryBarrier-04733
    OpMemoryBarrier must include at least one Storage Class

  • VUID-StandaloneSpirv-OpControlBarrier-04650
    If the semantics for OpControlBarrier includes one of Acquire, Release, AcquireRelease, or SequentiallyConsistent memory semantics, then it must include at least one Storage Class

  • VUID-StandaloneSpirv-OpVariable-04651
    Any OpVariable with an Initializer operand must have Output, Private, Function, or Workgroup as its Storage Class operand

  • VUID-StandaloneSpirv-OpVariable-04734
    Any OpVariable with an Initializer operand and Workgroup as its Storage Class operand must use OpConstantNull as the initializer

  • VUID-StandaloneSpirv-OpReadClockKHR-04652
    Scope for OpReadClockKHR must be limited to Subgroup or Device

  • VUID-StandaloneSpirv-OriginLowerLeft-04653
    The OriginLowerLeft Execution Mode must not be used; fragment entry points must declare OriginUpperLeft

  • VUID-StandaloneSpirv-PixelCenterInteger-04654
    The PixelCenterInteger Execution Mode must not be used (pixels are always centered at half-integer coordinates)

  • VUID-StandaloneSpirv-UniformConstant-04655
    Any variable in the UniformConstant Storage Class must be typed as either OpTypeImage, OpTypeSampler, OpTypeSampledImage, OpTypeAccelerationStructureKHR, or an array of one of these types

  • VUID-StandaloneSpirv-Uniform-06807
    Any variable in the Uniform or StorageBuffer Storage Class must be typed as OpTypeStruct or an array of this type

  • VUID-StandaloneSpirv-PushConstant-06808
    Any variable in the PushConstant Storage Class must be typed as OpTypeStruct

  • VUID-StandaloneSpirv-OpTypeImage-04656
    OpTypeImage must declare a scalar 32-bit float, 64-bit integer, or 32-bit integer type for the “Sampled Type” (RelaxedPrecision can be applied to a sampling instruction and to the variable holding the result of a sampling instruction)

  • VUID-StandaloneSpirv-OpTypeImage-04657
    OpTypeImage must have a “Sampled” operand of 1 (sampled image) or 2 (storage image)

  • VUID-StandaloneSpirv-OpTypeSampledImage-06671
    OpTypeSampledImage must have a OpTypeImage with a “Sampled” operand of 1 (sampled image)

  • VUID-StandaloneSpirv-Image-04965
    The SPIR-V Type of the Image Format operand of an OpTypeImage must match the Sampled Type, as defined in Image Format and Type Matching

  • VUID-StandaloneSpirv-OpImageTexelPointer-04658
    If an OpImageTexelPointer is used in an atomic operation, the image type of the image parameter to OpImageTexelPointer must have an image format of R64i, R64ui, R32f, R32i, or R32ui

  • VUID-StandaloneSpirv-OpImageQuerySizeLod-04659
    OpImageQuerySizeLod, OpImageQueryLod, and OpImageQueryLevels must only consume an “Image” operand whose type has its “Sampled” operand set to 1

  • VUID-StandaloneSpirv-OpTypeImage-09638
    An OpTypeImage must not have a “Dim” operand of Rect

  • VUID-StandaloneSpirv-OpTypeImage-06214
    An OpTypeImage with a “Dim” operand of SubpassData must have an “Arrayed” operand of 0 (non-arrayed) and a “Sampled” operand of 2 (storage image)

  • VUID-StandaloneSpirv-SubpassData-04660
    The (u,v) coordinates used for a SubpassData must be the <id> of a constant vector (0,0)

  • VUID-StandaloneSpirv-OpTypeImage-06924
    Objects of types OpTypeImage, OpTypeSampler, OpTypeSampledImage, OpTypeAccelerationStructureKHR, and arrays of these types must not be stored to or modified

  • VUID-StandaloneSpirv-Uniform-06925
    Any variable in the Uniform Storage Class decorated as Block must not be stored to or modified

  • VUID-StandaloneSpirv-Offset-04663
    Image operand Offset must only be used with OpImage*Gather instructions

  • VUID-StandaloneSpirv-Offset-04865
    Any image instruction which uses an Offset, ConstOffset, or ConstOffsets image operand, must only consume a “Sampled Image” operand whose type has its “Sampled” operand set to 1

  • VUID-StandaloneSpirv-OpImageGather-04664
    The “Component” operand of OpImageGather, and OpImageSparseGather must be the <id> of a constant instruction

  • VUID-StandaloneSpirv-OpImage-04777
    OpImage*Dref* instructions must not consume an image whose Dim is 3D

  • VUID-StandaloneSpirv-None-04667
    Structure types must not contain opaque types

  • VUID-StandaloneSpirv-BuiltIn-04668
    Any BuiltIn decoration not listed in Built-In Variables must not be used

  • VUID-StandaloneSpirv-OpEntryPoint-09658
    For a given OpEntryPoint, any BuiltIn decoration must not be used more than once by the Input interface

  • VUID-StandaloneSpirv-OpEntryPoint-09659
    For a given OpEntryPoint, any BuiltIn decoration must not be used more than once by the Output interface

  • VUID-StandaloneSpirv-Location-06672
    The Location or Component decorations must only be used with the Input, Output, RayPayloadKHR, IncomingRayPayloadKHR, HitAttributeKHR, HitObjectAttributeNV, CallableDataKHR, IncomingCallableDataKHR, or ShaderRecordBufferKHR storage classes

  • VUID-StandaloneSpirv-Location-04915
    The Location or Component decorations must not be used with BuiltIn

  • VUID-StandaloneSpirv-Location-04916
    The Location decorations must be used on user-defined variables

  • VUID-StandaloneSpirv-Location-04917
    If a user-defined variable is not a pointer to a Block decorated OpTypeStruct, then the OpVariable must have a Location decoration

  • VUID-StandaloneSpirv-Location-04918
    If a user-defined variable has a Location decoration, and the variable is a pointer to a OpTypeStruct, then the members of that structure must not have Location decorations

  • VUID-StandaloneSpirv-Location-04919
    If a user-defined variable does not have a Location decoration, and the variable is a pointer to a Block decorated OpTypeStruct, then each member of the struct must have a Location decoration

  • VUID-StandaloneSpirv-Component-04920
    The Component decoration value must not be greater than 3

  • VUID-StandaloneSpirv-Component-04921
    If the Component decoration is used on an OpVariable that has a OpTypeVector type with a Component Type with a Width that is less than or equal to 32, the sum of its Component Count and the Component decoration value must be less than or equal to 4

  • VUID-StandaloneSpirv-Component-04922
    If the Component decoration is used on an OpVariable that has a OpTypeVector type with a Component Type with a Width that is equal to 64, the sum of two times its Component Count and the Component decoration value must be less than or equal to 4

  • VUID-StandaloneSpirv-Component-04923
    The Component decorations value must not be 1 or 3 for scalar or two-component 64-bit data types

  • VUID-StandaloneSpirv-Component-04924
    The Component decorations must not be used with any type that is not a scalar or vector, or an array of such a type

  • VUID-StandaloneSpirv-Component-07703
    The Component decorations must not be used for a 64-bit vector type with more than two components

  • VUID-StandaloneSpirv-Input-09557
    The pointers of any Input or Output Interface user-defined variables must not contain any PhysicalStorageBuffer Storage Class pointers

  • VUID-StandaloneSpirv-GLSLShared-04669
    The GLSLShared and GLSLPacked decorations must not be used

  • VUID-StandaloneSpirv-Flat-04670
    The Flat, NoPerspective, Sample, and Centroid decorations must only be used on variables with the Output or Input Storage Class

  • VUID-StandaloneSpirv-Flat-06201
    The Flat, NoPerspective, Sample, and Centroid decorations must not be used on variables with the Output storage class in a fragment shader

  • VUID-StandaloneSpirv-Flat-06202
    The Flat, NoPerspective, Sample, and Centroid decorations must not be used on variables with the Input storage class in a vertex shader

  • VUID-StandaloneSpirv-PerVertexKHR-06777
    The PerVertexKHR decoration must only be used on variables with the Input Storage Class in a fragment shader

  • VUID-StandaloneSpirv-Flat-04744
    Any variable with integer or double-precision floating-point type and with Input Storage Class in a fragment shader, must be decorated Flat

  • VUID-StandaloneSpirv-ViewportRelativeNV-04672
    The ViewportRelativeNV decoration must only be used on a variable decorated with Layer in the vertex, tessellation evaluation, or geometry shader stages

  • VUID-StandaloneSpirv-ViewportRelativeNV-04673
    The ViewportRelativeNV decoration must not be used unless a variable decorated with one of ViewportIndex or ViewportMaskNV is also statically used by the same OpEntryPoint

  • VUID-StandaloneSpirv-ViewportMaskNV-04674
    The ViewportMaskNV and ViewportIndex decorations must not both be statically used by one or more OpEntryPoint’s that form the pre-rasterization shader stages of a graphics pipeline

  • VUID-StandaloneSpirv-FPRoundingMode-04675
    Rounding modes other than round-to-nearest-even and round-towards-zero must not be used for the FPRoundingMode decoration

  • VUID-StandaloneSpirv-Invariant-04677
    Variables decorated with Invariant and variables with structure types that have any members decorated with Invariant must be in the Output or Input Storage Class, Invariant used on an Input Storage Class variable or structure member has no effect

  • VUID-StandaloneSpirv-VulkanMemoryModel-04678
    If the VulkanMemoryModel capability is not declared, the Volatile decoration must be used on any variable declaration that includes one of the SMIDNV, WarpIDNV, SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask, SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask BuiltIn decorations when used in the ray generation, closest hit, miss, intersection, or callable shaders, or with the RayTmaxKHR Builtin decoration when used in an intersection shader

  • VUID-StandaloneSpirv-VulkanMemoryModel-04679
    If the VulkanMemoryModel capability is declared, the OpLoad instruction must use the Volatile memory semantics when it accesses into any variable that includes one of the SMIDNV, WarpIDNV, SubgroupSize, SubgroupLocalInvocationId, SubgroupEqMask, SubgroupGeMask, SubgroupGtMask, SubgroupLeMask, or SubgroupLtMask BuiltIn decorations when used in the ray generation, closest hit, miss, intersection, or callable shaders, or with the RayTmaxKHR Builtin decoration when used in an intersection shader

  • VUID-StandaloneSpirv-OpTypeRuntimeArray-04680
    OpTypeRuntimeArray must only be used for:

    • the last member of a Block-decorated OpTypeStruct in StorageBuffer or PhysicalStorageBuffer storage Storage Class

    • BufferBlock-decorated OpTypeStruct in the Uniform storage Storage Class

    • the outermost dimension of an arrayed variable in the StorageBuffer, Uniform, or UniformConstant storage Storage Class

    • variables in the NodePayloadAMDX storage Storage Class when the CoalescingAMDX Execution Mode is specified

  • VUID-StandaloneSpirv-Function-04681
    A type T that is an array sized with a specialization constant must neither be, nor be contained in, the type T2 of a variable V, unless either: a) T is equal to T2, b) V is declared in the Function, or Private Storage Class, c) V is a non-Block variable in the Workgroup Storage Class, or d) V is an interface variable with an additional level of arrayness, as described in interface matching, and T is the member type of the array type T2

  • VUID-StandaloneSpirv-OpControlBarrier-04682
    If OpControlBarrier is used in ray generation, intersection, any-hit, closest hit, miss, fragment, vertex, tessellation evaluation, or geometry shaders, the execution Scope must be Subgroup

  • VUID-StandaloneSpirv-LocalSize-06426
    For each compute shader entry point, either a LocalSize or LocalSizeId Execution Mode, or an object decorated with the WorkgroupSize decoration must be specified

  • VUID-StandaloneSpirv-DerivativeGroupQuadsNV-04684
    For compute shaders using the DerivativeGroupQuadsNV execution mode, the first two dimensions of the local workgroup size must be a multiple of two

  • VUID-StandaloneSpirv-DerivativeGroupLinearNV-04778
    For compute shaders using the DerivativeGroupLinearNV execution mode, the product of the dimensions of the local workgroup size must be a multiple of four

  • VUID-StandaloneSpirv-DerivativeGroupQuadsKHR-10151
    For compute, mesh, or task shaders using the DerivativeGroupQuadsKHR execution mode, the first two dimensions of the local workgroup size must be a multiple of two

  • VUID-StandaloneSpirv-DerivativeGroupLinearKHR-10152
    For compute, mesh, or task shaders using the DerivativeGroupLinearKHR execution mode, the product of the dimensions of the local workgroup size must be a multiple of four

  • VUID-StandaloneSpirv-OpGroupNonUniformBallotBitCount-04685
    If OpGroupNonUniformBallotBitCount is used, the group operation must be limited to Reduce, InclusiveScan, or ExclusiveScan

  • VUID-StandaloneSpirv-None-04686
    The Pointer operand of all atomic instructions must have a Storage Class limited to Uniform, Workgroup, Image, StorageBuffer, PhysicalStorageBuffer, or TaskPayloadWorkgroupEXT

  • VUID-StandaloneSpirv-Offset-04687
    Output variables or block members decorated with Offset that have a 64-bit type, or a composite type containing a 64-bit type, must specify an Offset value aligned to a 8 byte boundary

  • VUID-StandaloneSpirv-Offset-04689
    The size of any output block containing any member decorated with Offset that is a 64-bit type must be a multiple of 8

  • VUID-StandaloneSpirv-Offset-04690
    The first member of an output block specifying a Offset decoration must specify a Offset value that is aligned to an 8 byte boundary if that block contains any member decorated with Offset and is a 64-bit type

  • VUID-StandaloneSpirv-Offset-04691
    Output variables or block members decorated with Offset that have a 32-bit type, or a composite type contains a 32-bit type, must specify an Offset value aligned to a 4 byte boundary

  • VUID-StandaloneSpirv-Offset-04692
    Output variables, blocks or block members decorated with Offset must only contain base types that have components that are either 32-bit or 64-bit in size

  • VUID-StandaloneSpirv-Offset-04716
    Only variables or block members in the output interface decorated with Offset can be captured for transform feedback, and those variables or block members must also be decorated with XfbBuffer and XfbStride, or inherit XfbBuffer and XfbStride decorations from a block containing them

  • VUID-StandaloneSpirv-XfbBuffer-04693
    All variables or block members in the output interface of the entry point being compiled decorated with a specific XfbBuffer value must all be decorated with identical XfbStride values

  • VUID-StandaloneSpirv-Stream-04694
    If any variables or block members in the output interface of the entry point being compiled are decorated with Stream, then all variables belonging to the same XfbBuffer must specify the same Stream value

  • VUID-StandaloneSpirv-XfbBuffer-04696
    For any two variables or block members in the output interface of the entry point being compiled with the same XfbBuffer value, the ranges determined by the Offset decoration and the size of the type must not overlap

  • VUID-StandaloneSpirv-XfbBuffer-04697
    All block members in the output interface of the entry point being compiled that are in the same block and have a declared or inherited XfbBuffer decoration must specify the same XfbBuffer value

  • VUID-StandaloneSpirv-RayPayloadKHR-04698
    RayPayloadKHR Storage Class must only be used in ray generation, closest hit or miss shaders

  • VUID-StandaloneSpirv-IncomingRayPayloadKHR-04699
    IncomingRayPayloadKHR Storage Class must only be used in closest hit, any-hit, or miss shaders

  • VUID-StandaloneSpirv-IncomingRayPayloadKHR-04700
    There must be at most one variable with the IncomingRayPayloadKHR Storage Class in the input interface of an entry point

  • VUID-StandaloneSpirv-HitAttributeKHR-04701
    HitAttributeKHR Storage Class must only be used in intersection, any-hit, or closest hit shaders

  • VUID-StandaloneSpirv-HitAttributeKHR-04702
    There must be at most one variable with the HitAttributeKHR Storage Class in the input interface of an entry point

  • VUID-StandaloneSpirv-HitAttributeKHR-04703
    A variable with HitAttributeKHR Storage Class must only be written to in an intersection shader

  • VUID-StandaloneSpirv-CallableDataKHR-04704
    CallableDataKHR Storage Class must only be used in ray generation, closest hit, miss, and callable shaders

  • VUID-StandaloneSpirv-IncomingCallableDataKHR-04705
    IncomingCallableDataKHR Storage Class must only be used in callable shaders

  • VUID-StandaloneSpirv-IncomingCallableDataKHR-04706
    There must be at most one variable with the IncomingCallableDataKHR Storage Class in the input interface of an entry point

  • VUID-StandaloneSpirv-ShaderRecordBufferKHR-07119
    ShaderRecordBufferKHR Storage Class must only be used in ray generation, intersection, any-hit, closest hit, callable, or miss shaders

  • VUID-StandaloneSpirv-Base-07650
    The Base operand of OpPtrAccessChain must have a storage class of Workgroup, StorageBuffer, or PhysicalStorageBuffer

  • VUID-StandaloneSpirv-Base-07651
    If the Base operand of OpPtrAccessChain has a Workgroup Storage Class, then the VariablePointers capability must be declared

  • VUID-StandaloneSpirv-Base-07652
    If the Base operand of OpPtrAccessChain has a StorageBuffer Storage Class, then the VariablePointers or VariablePointersStorageBuffer capability must be declared

  • VUID-StandaloneSpirv-PhysicalStorageBuffer64-04708
    If the PhysicalStorageBuffer64 addressing model is enabled, all instructions that support memory access operands and that use a physical pointer must include the Aligned operand

  • VUID-StandaloneSpirv-PhysicalStorageBuffer64-04709
    If the PhysicalStorageBuffer64 addressing model is enabled, any access chain instruction that accesses into a RowMajor matrix must only be used as the Pointer operand to OpLoad or OpStore

  • VUID-StandaloneSpirv-PhysicalStorageBuffer64-04710
    If the PhysicalStorageBuffer64 addressing model is enabled, OpConvertUToPtr and OpConvertPtrToU must use an integer type whose Width is 64

  • VUID-StandaloneSpirv-OpTypeForwardPointer-04711
    OpTypeForwardPointer must have a Storage Class of PhysicalStorageBuffer

  • VUID-StandaloneSpirv-None-04745
    All block members in a variable with a Storage Class of PushConstant declared as an array must only be accessed by dynamically uniform indices

  • VUID-StandaloneSpirv-OpVariable-06673
    There must not be more than one OpVariable in the PushConstant Storage Class listed in the Interface for each OpEntryPoint

  • VUID-StandaloneSpirv-OpEntryPoint-06674
    Each OpEntryPoint must not statically use more than one OpVariable in the PushConstant Storage Class

  • VUID-StandaloneSpirv-OpEntryPoint-08721
    Each OpEntryPoint must not have more than one Input variable assigned the same Component word inside a Location slot, either explicitly or implicitly

  • VUID-StandaloneSpirv-OpEntryPoint-08722
    Each OpEntryPoint must not have more than one Output variable assigned the same Component word inside a Location slot, either explicitly or implicitly

  • VUID-StandaloneSpirv-Result-04780
    The Result Type operand of any OpImageRead or OpImageSparseRead instruction must be a vector of four components

  • VUID-StandaloneSpirv-Base-04781
    The Base operand of any OpBitCount, OpBitReverse, OpBitFieldInsert, OpBitFieldSExtract, or OpBitFieldUExtract instruction must be a 32-bit integer scalar or a vector of 32-bit integers

  • VUID-StandaloneSpirv-PushConstant-06675
    Any variable in the PushConstant or StorageBuffer storage class must be decorated as Block

  • VUID-StandaloneSpirv-Uniform-06676
    Any variable in the Uniform Storage Class must be decorated as Block or BufferBlock

  • VUID-StandaloneSpirv-UniformConstant-06677
    Any variable in the UniformConstant, StorageBuffer, or Uniform Storage Class must be decorated with DescriptorSet and Binding

  • VUID-StandaloneSpirv-InputAttachmentIndex-06678
    Variables decorated with InputAttachmentIndex must be in the UniformConstant Storage Class

  • VUID-StandaloneSpirv-DescriptorSet-06491
    If a variable is decorated by DescriptorSet or Binding, the Storage Class must correspond to an entry in Shader Resource and Storage Class Correspondence

  • VUID-StandaloneSpirv-Input-06778
    Variables with a Storage Class of Input in a fragment shader stage that are decorated with PerVertexKHR must be declared as arrays

  • VUID-StandaloneSpirv-MeshEXT-07102
    The module must not contain both an entry point that uses the TaskEXT or MeshEXT Execution Model and an entry point that uses the TaskNV or MeshNV Execution Model

  • VUID-StandaloneSpirv-MeshEXT-07106
    In mesh shaders using the MeshEXT Execution Model OpSetMeshOutputsEXT must be called before any outputs are written

  • VUID-StandaloneSpirv-MeshEXT-07107
    In mesh shaders using the MeshEXT Execution Model all variables declared as output must not be read from

  • VUID-StandaloneSpirv-MeshEXT-07108
    In mesh shaders using the MeshEXT Execution Model for OpSetMeshOutputsEXT instructions, the “Vertex Count” and “Primitive Count” operands must not depend on ViewIndex

  • VUID-StandaloneSpirv-MeshEXT-07109
    In mesh shaders using the MeshEXT Execution Model variables decorated with PrimitivePointIndicesEXT, PrimitiveLineIndicesEXT, or PrimitiveTriangleIndicesEXT declared as an array must not be accessed by indices that depend on ViewIndex

  • VUID-StandaloneSpirv-MeshEXT-07110
    In mesh shaders using the MeshEXT Execution Model any values stored in variables decorated with PrimitivePointIndicesEXT, PrimitiveLineIndicesEXT, or PrimitiveTriangleIndicesEXT must not depend on ViewIndex

  • VUID-StandaloneSpirv-MeshEXT-07111
    In mesh shaders using the MeshEXT Execution Model variables in workgroup or private Storage Class declared as or containing a composite type must not be accessed by indices that depend on ViewIndex

  • VUID-StandaloneSpirv-MeshEXT-07330
    In mesh shaders using the MeshEXT Execution Model the OutputVertices Execution Mode must be greater than 0

  • VUID-StandaloneSpirv-MeshEXT-07331
    In mesh shaders using the MeshEXT Execution Model the OutputPrimitivesEXT Execution Mode must be greater than 0

  • VUID-StandaloneSpirv-Input-07290
    Variables with a Storage Class of Input or Output and a type of OpTypeBool must be decorated with the BuiltIn decoration

  • VUID-StandaloneSpirv-TileImageEXT-08723
    The tile image variable declarations must obey the constraints on the TileImageEXT Storage Class and the Location decoration described in Fragment Tile Image Interface

  • VUID-StandaloneSpirv-None-08724
    The TileImageEXT Storage Class must only be used for declaring tile image variables

  • VUID-StandaloneSpirv-Pointer-08973
    The Storage Class of the Pointer operand to OpCooperativeMatrixLoadKHR or OpCooperativeMatrixStoreKHR must be limited to Workgroup, StorageBuffer, or PhysicalStorageBuffer

  • VUID-StandaloneSpirv-UniformBufferArrayDynamicIndexing-10127
    If the UniformBufferArrayDynamicIndexing capability is not declared, and an instruction accesses memory through a uniform buffer, the uniform buffer through which that memory is accessed must be determined by constant integral expressions

  • VUID-StandaloneSpirv-SampledImageArrayDynamicIndexing-10128
    If the SampledImageArrayDynamicIndexing capability is not declared, and an instruction accesses memory through a sampled image or sampler, the sampled image or sampler through which that memory is accessed must be determined by constant integral expressions

  • VUID-StandaloneSpirv-StorageBufferArrayDynamicIndexing-10129
    If the StorageBufferArrayDynamicIndexing capability is not declared, and an instruction accesses memory through a storage buffer, the storage buffer through which that memory is accessed must be determined by constant integral expressions

  • VUID-StandaloneSpirv-StorageImageArrayDynamicIndexing-10130
    If the StorageImageArrayDynamicIndexing capability is not declared, and an instruction accesses memory through a storage image, the storage image through which that memory is accessed must be determined by constant integral expressions

  • VUID-StandaloneSpirv-InputAttachmentArrayDynamicIndexing-10131
    If the InputAttachmentArrayDynamicIndexing capability is not declared, and an instruction accesses memory through an input attachment, the input attachmnet through which that memory is accessed must be determined by constant integral expressions

  • VUID-StandaloneSpirv-UniformTexelBufferArrayDynamicIndexing-10132
    If the UniformTexelBufferArrayDynamicIndexing capability is not declared, and an instruction accesses memory through a uniform texel buffer, the uniform texel buffer through which that memory is accessed must be determined by constant integral expressions

  • VUID-StandaloneSpirv-StorageTexelBufferArrayDynamicIndexing-10133
    If the StorageTexelBufferArrayDynamicIndexing capability is not declared, and an instruction accesses memory through a storage texel buffer, the storage texel buffer through which that memory is accessed must be determined by constant integral expressions

Runtime SPIR-V Validation

The following rules must be validated at runtime. These rules depend on knowledge of the implementation and its capabilities and knowledge of runtime information, such as enabled features.

Valid Usage
  • VUID-RuntimeSpirv-vulkanMemoryModel-06265
    If the vulkanMemoryModel feature is enabled and the vulkanMemoryModelDeviceScope feature is not enabled, Device memory scope must not be used

  • VUID-RuntimeSpirv-vulkanMemoryModel-06266
    If the vulkanMemoryModel feature is not enabled, QueueFamily memory scope must not be used

  • VUID-RuntimeSpirv-shaderSubgroupClock-06267
    If the shaderSubgroupClock feature is not enabled, the Subgroup scope must not be used for OpReadClockKHR

  • VUID-RuntimeSpirv-shaderDeviceClock-06268
    If the shaderDeviceClock feature is not enabled, the Device scope must not be used for OpReadClockKHR

  • VUID-RuntimeSpirv-None-09558
    If the dynamicRenderingLocalRead feature is not enabled, any variable created with a “Type” of OpTypeImage that has a “Dim” operand of SubpassData must be decorated with InputAttachmentIndex

  • VUID-RuntimeSpirv-OpTypeImage-09644
    Any variable declared as an OpTypeArray where the Element Type is an OpTypeImage with a “Dim” operand of SubpassData must be decorated with InputAttachmentIndex

  • VUID-RuntimeSpirv-apiVersion-07954
    If VkPhysicalDeviceProperties::apiVersion is less than Vulkan 1.3, the VK_KHR_format_feature_flags2 extension is not supported, and the shaderStorageImageWriteWithoutFormat feature is not enabled, any variable created with a “Type” of OpTypeImage that has a “Sampled” operand of 2 and an “Image Format” operand of Unknown must be decorated with NonWritable

  • VUID-RuntimeSpirv-apiVersion-07955
    If VkPhysicalDeviceProperties::apiVersion is less than Vulkan 1.3, the VK_KHR_format_feature_flags2 extension is not supported, and the shaderStorageImageReadWithoutFormat feature is not enabled, any variable created with a “Type” of OpTypeImage that has a “Sampled” operand of 2 and an “Image Format” operand of Unknown must be decorated with NonReadable

  • VUID-RuntimeSpirv-OpImageWrite-07112
    OpImageWrite to any Image whose Image Format is not Unknown must have the Texel operand contain at least as many components as the corresponding VkFormat as given in the SPIR-V Image Format compatibility table

  • VUID-RuntimeSpirv-Location-06272
    The sum of Location and the number of locations the variable it decorates consumes must be less than or equal to the value for the matching Execution Model defined in Shader Input and Output Locations

  • VUID-RuntimeSpirv-Location-06428
    The maximum number of storage buffers, storage images, and output Location decorated color attachments written to in the Fragment Execution Model must be less than or equal to maxFragmentCombinedOutputResources

  • VUID-RuntimeSpirv-UniformBufferArrayNonUniformIndexing-10134
    If the UniformBufferArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a uniform buffer, the uniform buffer through which that memory is accessed must be dynamically uniform within the invocation group or subgroup

  • VUID-RuntimeSpirv-SampledImageArrayNonUniformIndexing-10135
    If the SampledImageArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a sampled image or sampler, the sampled image or sampler through which that memory is accessed must be dynamically uniform within the invocation group or subgroup

  • VUID-RuntimeSpirv-StorageBufferArrayNonUniformIndexing-10136
    If the StorageBufferArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a storage buffer, the storage buffer through which that memory is accessed must be dynamically uniform within the invocation group or subgroup

  • VUID-RuntimeSpirv-StorageImageArrayNonUniformIndexing-10137
    If the StorageImageArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a storage image, the storage image through which that memory is accessed must be dynamically uniform within the invocation group or subgroup

  • VUID-RuntimeSpirv-InputAttachmentArrayNonUniformIndexing-10138
    If the InputAttachmentArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through an input attachment, the input attachment through which that memory is accessed must be dynamically uniform within the invocation group or subgroup

  • VUID-RuntimeSpirv-UniformTexelBufferArrayNonUniformIndexing-10139
    If the UniformTexelBufferArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a uniform texel buffer, the uniform texel buffer through which that memory is accessed must be dynamically uniform within the invocation group or subgroup

  • VUID-RuntimeSpirv-StorageTexelBufferArrayNonUniformIndexing-10140
    If the StorageTexelBufferArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a storage texel buffer, the storage texel buffer through which that memory is accessed must be dynamically uniform within the invocation group or subgroup

  • VUID-RuntimeSpirv-subgroupSize-10141
    If subgroupSize is 1, the UniformBufferArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a uniform buffer, the uniform buffer through which that memory is accessed must be dynamically uniform within the invocation group

  • VUID-RuntimeSpirv-subgroupSize-10142
    If subgroupSize is 1, the SampledImageArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a sampled image or sampler, the sampled image or sampler through which that memory is accessed must be dynamically uniform within the invocation group

  • VUID-RuntimeSpirv-subgroupSize-10143
    If subgroupSize is 1, the StorageBufferArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a storage buffer, the storage buffer through which that memory is accessed must be dynamically uniform within the invocation group

  • VUID-RuntimeSpirv-subgroupSize-10144
    If subgroupSize is 1, the StorageImageArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a storage image, the storage image through which that memory is accessed must be dynamically uniform within the invocation group

  • VUID-RuntimeSpirv-subgroupSize-10145
    If subgroupSize is 1, the InputAttachmentArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through an input attachment, the input attachment through which that memory is accessed must be dynamically uniform within the invocation group

  • VUID-RuntimeSpirv-subgroupSize-10146
    If subgroupSize is 1, the UniformTexelBufferArrayNonUniformIndexing capability is not declared, and an instruction accesses memory through a uniform texel buffer, the uniform texel buffer through which that memory is accessed must be dynamically uniform within the invocation group

  • VUID-RuntimeSpirv-subgroupSize-10147
    If subgroupSize is 1, the StorageTexelBufferArrayNonUniformIndexing capability is not is not declared, and an instruction accesses memory through a storage texel buffer, the storage texel buffer through which that memory is accessed must be dynamically uniform within the invocation group

  • VUID-RuntimeSpirv-None-10148
    If an instruction accesses memory through any resource, subgroupSize is 1, and the resource through which that memory is accessed is not uniform within the invocation group, then the operand corresponding to that resource (e.g. the pointer or sampled image operand) must be decorated with NonUniform

  • VUID-RuntimeSpirv-subgroupSize-10149
    If an instruction accesses memory through any resource, subgroupSize is greater than 1, and the resource through which that memory is accessed is not uniform within the invocation group, and not uniform within the subgroup, then the operand corresponding to that resource (e.g. the pointer or sampled image operand) must be decorated with NonUniform

  • VUID-RuntimeSpirv-None-06275
    shaderSubgroupExtendedTypes must be enabled for group operations to use 8-bit integer, 16-bit integer, 64-bit integer, 16-bit floating-point, and vectors of these types

  • VUID-RuntimeSpirv-subgroupBroadcastDynamicId-06276
    If subgroupBroadcastDynamicId is VK_TRUE, and the shader module version is 1.5 or higher, the “Index” for OpGroupNonUniformQuadBroadcast must be dynamically uniform within the derivative group. Otherwise, “Index” must be a constant

  • VUID-RuntimeSpirv-subgroupBroadcastDynamicId-06277
    If subgroupBroadcastDynamicId is VK_TRUE, and the shader module version is 1.5 or higher, the “Id” for OpGroupNonUniformBroadcast must be dynamically uniform within the subgroup. Otherwise, “Id” must be a constant

  • VUID-RuntimeSpirv-None-06278
    shaderBufferInt64Atomics must be enabled for 64-bit integer atomic operations to be supported on a Pointer with a Storage Class of StorageBuffer or Uniform

  • VUID-RuntimeSpirv-None-06279
    shaderSharedInt64Atomics must be enabled for 64-bit integer atomic operations to be supported on a Pointer with a Storage Class of Workgroup

  • VUID-RuntimeSpirv-None-06284
    shaderBufferFloat32Atomics, or shaderBufferFloat32AtomicAdd, or shaderBufferFloat64Atomics, or shaderBufferFloat64AtomicAdd, or shaderBufferFloat16Atomics, or shaderBufferFloat16AtomicAdd, or shaderBufferFloat16AtomicMinMax, or shaderBufferFloat32AtomicMinMax, or shaderBufferFloat64AtomicMinMax, or shaderFloat16VectorAtomics must be enabled for floating-point atomic operations to be supported on a Pointer with a Storage Class of StorageBuffer

  • VUID-RuntimeSpirv-None-06285
    shaderSharedFloat32Atomics, or shaderSharedFloat32AtomicAdd, or shaderSharedFloat64Atomics, or shaderSharedFloat64AtomicAdd, or shaderSharedFloat16Atomics, or shaderSharedFloat16AtomicAdd, or shaderSharedFloat16AtomicMinMax, or shaderSharedFloat32AtomicMinMax, or shaderSharedFloat64AtomicMinMax, or shaderFloat16VectorAtomics, must be enabled for floating-point atomic operations to be supported on a Pointer with a Storage Class of Workgroup

  • VUID-RuntimeSpirv-None-06286
    shaderImageFloat32Atomics, or shaderImageFloat32AtomicAdd, or shaderImageFloat32AtomicMinMax, must be enabled for 32-bit floating-point atomic operations to be supported on a Pointer with a Storage Class of Image

  • VUID-RuntimeSpirv-None-06287
    sparseImageFloat32Atomics, or sparseImageFloat32AtomicAdd, or sparseImageFloat32AtomicMinMax, must be enabled for 32-bit floating-point atomics to be supported on sparse images

  • VUID-RuntimeSpirv-None-06288
    shaderImageInt64Atomics must be enabled for 64-bit integer atomic operations to be supported on a Pointer with a Storage Class of Image

  • VUID-RuntimeSpirv-denormBehaviorIndependence-06289
    If denormBehaviorIndependence is VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, then the entry point must use the same denormals Execution Mode for both 16-bit and 64-bit floating-point types

  • VUID-RuntimeSpirv-denormBehaviorIndependence-06290
    If denormBehaviorIndependence is VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE, then the entry point must use the same denormals Execution Mode for all floating-point types

  • VUID-RuntimeSpirv-roundingModeIndependence-06291
    If roundingModeIndependence is VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, then the entry point must use the same rounding Execution Mode for both 16-bit and 64-bit floating-point types

  • VUID-RuntimeSpirv-roundingModeIndependence-06292
    If roundingModeIndependence is VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE, then the entry point must use the same rounding Execution Mode for all floating-point types

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat16-06293
    If shaderSignedZeroInfNanPreserveFloat16 is VK_FALSE, then SignedZeroInfNanPreserve for 16-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat32-06294
    If shaderSignedZeroInfNanPreserveFloat32 is VK_FALSE, then SignedZeroInfNanPreserve for 32-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat64-06295
    If shaderSignedZeroInfNanPreserveFloat64 is VK_FALSE, then SignedZeroInfNanPreserve for 64-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderDenormPreserveFloat16-06296
    If shaderDenormPreserveFloat16 is VK_FALSE, then DenormPreserve for 16-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderDenormPreserveFloat32-06297
    If shaderDenormPreserveFloat32 is VK_FALSE, then DenormPreserve for 32-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderDenormPreserveFloat64-06298
    If shaderDenormPreserveFloat64 is VK_FALSE, then DenormPreserve for 64-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderDenormFlushToZeroFloat16-06299
    If shaderDenormFlushToZeroFloat16 is VK_FALSE, then DenormFlushToZero for 16-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderDenormFlushToZeroFloat32-06300
    If shaderDenormFlushToZeroFloat32 is VK_FALSE, then DenormFlushToZero for 32-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderDenormFlushToZeroFloat64-06301
    If shaderDenormFlushToZeroFloat64 is VK_FALSE, then DenormFlushToZero for 64-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderRoundingModeRTEFloat16-06302
    If shaderRoundingModeRTEFloat16 is VK_FALSE, then RoundingModeRTE for 16-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderRoundingModeRTEFloat32-06303
    If shaderRoundingModeRTEFloat32 is VK_FALSE, then RoundingModeRTE for 32-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderRoundingModeRTEFloat64-06304
    If shaderRoundingModeRTEFloat64 is VK_FALSE, then RoundingModeRTE for 64-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderRoundingModeRTZFloat16-06305
    If shaderRoundingModeRTZFloat16 is VK_FALSE, then RoundingModeRTZ for 16-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderRoundingModeRTZFloat32-06306
    If shaderRoundingModeRTZFloat32 is VK_FALSE, then RoundingModeRTZ for 32-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderRoundingModeRTZFloat64-06307
    If shaderRoundingModeRTZFloat64 is VK_FALSE, then RoundingModeRTZ for 64-bit floating-point type must not be used

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat16-09559
    If shaderSignedZeroInfNanPreserveFloat16 is VK_FALSE then any FPFastMathDefault execution mode with a type of 16-bit float must include the NSZ, NotInf, and NotNaN flags

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat16-09560
    If shaderSignedZeroInfNanPreserveFloat16 is VK_FALSE then any FPFastMathMode decoration on an instruction with result type or any operand type that includes a 16-bit float must include the NSZ, NotInf, and NotNaN flags

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat32-09561
    If shaderSignedZeroInfNanPreserveFloat32 is VK_FALSE then any FPFastMathDefault execution mode with a type of 32-bit float must include the NSZ, NotInf, and NotNaN flags

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat32-09562
    If shaderSignedZeroInfNanPreserveFloat32 is VK_FALSE then any FPFastMathMode decoration on an instruction with result type or any operand type that includes a 32-bit float must include the NSZ, NotInf, and NotNaN flags

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat64-09563
    If shaderSignedZeroInfNanPreserveFloat64 is VK_FALSE then any FPFastMathDefault execution mode with a type of 64-bit float must include the NSZ, NotInf, and NotNaN flags

  • VUID-RuntimeSpirv-shaderSignedZeroInfNanPreserveFloat64-09564
    If shaderSignedZeroInfNanPreserveFloat64 is VK_FALSE then any FPFastMathMode decoration on an instruction with result type or any operand type that includes a 64-bit float must include the NSZ, NotInf, and NotNaN flags

  • VUID-RuntimeSpirv-Offset-06308
    The Offset plus size of the type of each variable, in the output interface of the entry point being compiled, decorated with XfbBuffer must not be greater than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBufferDataSize

  • VUID-RuntimeSpirv-XfbBuffer-06309
    For any given XfbBuffer value, define the buffer data size to be smallest number of bytes such that, for all outputs decorated with the same XfbBuffer value, the size of the output interface variable plus the Offset is less than or equal to the buffer data size. For a given Stream, the sum of all the buffer data sizes for all buffers writing to that stream the must not exceed VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreamDataSize

  • VUID-RuntimeSpirv-OpEmitStreamVertex-06310
    The Stream value to OpEmitStreamVertex and OpEndStreamPrimitive must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreams

  • VUID-RuntimeSpirv-transformFeedbackStreamsLinesTriangles-06311
    If the geometry shader emits to more than one vertex stream and VkPhysicalDeviceTransformFeedbackPropertiesEXT::transformFeedbackStreamsLinesTriangles is VK_FALSE, then Execution Mode must be OutputPoints

  • VUID-RuntimeSpirv-Stream-06312
    The stream number value to Stream must be less than VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackStreams

  • VUID-RuntimeSpirv-XfbStride-06313
    The XFB Stride value to XfbStride must be less than or equal to VkPhysicalDeviceTransformFeedbackPropertiesEXT::maxTransformFeedbackBufferDataStride

  • VUID-RuntimeSpirv-PhysicalStorageBuffer64-06314
    If the PhysicalStorageBuffer64 addressing model is enabled any load or store through a physical pointer type must be aligned to a multiple of the size of the largest scalar type in the pointed-to type

  • VUID-RuntimeSpirv-PhysicalStorageBuffer64-06315
    If the PhysicalStorageBuffer64 addressing model is enabled the pointer value of a memory access instruction must be at least as aligned as specified by the Aligned memory access operand

  • VUID-RuntimeSpirv-OpTypeCooperativeMatrixNV-06316
    For OpTypeCooperativeMatrixNV, the component type, scope, number of rows, and number of columns must match one of the matrices in any of the supported VkCooperativeMatrixPropertiesNV

  • VUID-RuntimeSpirv-OpTypeCooperativeMatrixMulAddNV-10059
    For OpTypeCooperativeMatrixMulAddNV, the operands must match a supported VkCooperativeMatrixPropertiesNV, such that:

  • VUID-RuntimeSpirv-OpTypeCooperativeMatrixNV-06322
    OpTypeCooperativeMatrixNV and OpCooperativeMatrix* instructions must not be used in shader stages not included in VkPhysicalDeviceCooperativeMatrixPropertiesNV::cooperativeMatrixSupportedStages

  • VUID-RuntimeSpirv-OpTypeCooperativeMatrixKHR-10163
    For OpTypeCooperativeMatrixKHR, if the cooperativeMatrixFlexibleDimensions feature is not enabled, the component type, scope, number of rows, and number of columns must match one of the matrices in any of the supported VkCooperativeMatrixPropertiesKHR, where

  • VUID-RuntimeSpirv-OpCooperativeMatrixMulAddKHR-10060
    For OpCooperativeMatrixMulAddKHR, if the cooperativeMatrixFlexibleDimensions feature is not enabled, the operands must match a supported VkCooperativeMatrixPropertiesKHR, such that:

  • VUID-RuntimeSpirv-cooperativeMatrixWorkgroupScope-10164
    If the cooperativeMatrixWorkgroupScope feature is not enabled, the scope of all OpTypeCooperativeMatrixKHR must not be VkScopeKHR::VK_SCOPE_WORKGROUP_KHR

  • VUID-RuntimeSpirv-cooperativeMatrixFlexibleDimensions-10165
    For OpTypeCooperativeMatrixKHR, if the cooperativeMatrixFlexibleDimensions feature is enabled, the component type, scope, number of rows, and number of columns must match either one of the matrices in one of the supported VkCooperativeMatrixPropertiesKHR as described above, or one of the supported VkCooperativeMatrixFlexibleDimensionsPropertiesNV, where

  • VUID-RuntimeSpirv-cooperativeMatrixFlexibleDimensions-10166
    For OpCooperativeMatrixMulAddKHR, if the cooperativeMatrixFlexibleDimensions feature is enabled, the operands must match either one of the supported VkCooperativeMatrixPropertiesKHR as described above, or one of the supported VkCooperativeMatrixFlexibleDimensionsPropertiesNV, such that:

  • VUID-RuntimeSpirv-cooperativeMatrixFlexibleDimensionsMaxDimension-10167
    All OpTypeCooperativeMatrixKHR dimensions must be less than or equal to cooperativeMatrixFlexibleDimensionsMaxDimension

  • VUID-RuntimeSpirv-maxComputeSharedMemorySize-10168
    If the module uses OpTypeCooperativeMatrixKHR with Scope equal to Workgroup, the sum of size in bytes for variables and padding in the Workgroup Storage Class in the GLCompute Execution Model must be less than or equal to maxComputeSharedMemorySize minus cooperativeMatrixWorkgroupScopeReservedSharedMemory

  • VUID-RuntimeSpirv-cooperativeMatrixSupportedStages-08985
    OpTypeCooperativeMatrixKHR and OpCooperativeMatrix* instructions must not be used in shader stages not included in VkPhysicalDeviceCooperativeMatrixPropertiesKHR::cooperativeMatrixSupportedStages

  • VUID-RuntimeSpirv-DescriptorSet-06323
    DescriptorSet and Binding decorations must obey the constraints on Storage Class, type, and descriptor type described in DescriptorSet and Binding Assignment

  • VUID-RuntimeSpirv-OpCooperativeMatrixLoadNV-06324
    For OpCooperativeMatrixLoadNV and OpCooperativeMatrixStoreNV instructions, the Pointer and Stride operands must be aligned to at least the lesser of 16 bytes or the natural alignment of a row or column (depending on ColumnMajor) of the matrix (where the natural alignment is the number of columns/rows multiplied by the component size)

  • VUID-RuntimeSpirv-MeshNV-07113
    For mesh shaders using the MeshNV Execution Model the OutputVertices OpExecutionMode must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesNV::maxMeshOutputVertices

  • VUID-RuntimeSpirv-MeshNV-07114
    For mesh shaders using the MeshNV Execution Model the OutputPrimitivesNV OpExecutionMode must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesNV::maxMeshOutputPrimitives

  • VUID-RuntimeSpirv-MeshEXT-07115
    For mesh shaders using the MeshEXT Execution Model the OutputVertices OpExecutionMode must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshOutputVertices

  • VUID-RuntimeSpirv-MeshEXT-07332
    For mesh shaders using the MeshEXT Execution Model the “Vertex Count” operand of OpSetMeshOutputsEXT must be less than or equal to OutputVertices OpExecutionMode

  • VUID-RuntimeSpirv-MeshEXT-07116
    For mesh shaders using the MeshEXT Execution Model the OutputPrimitivesEXT OpExecutionMode must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshOutputPrimitives

  • VUID-RuntimeSpirv-MeshEXT-07333
    For mesh shaders using the MeshEXT Execution Model the “Primitive Count” operand of OpSetMeshOutputsEXT must be less than or equal to OutputPrimitivesEXT OpExecutionMode

  • VUID-RuntimeSpirv-TaskEXT-07117
    In task shaders using the TaskEXT Execution Model OpEmitMeshTasksEXT must be called exactly once under dynamically uniform conditions

  • VUID-RuntimeSpirv-MeshEXT-07118
    In mesh shaders using the MeshEXT Execution Model OpSetMeshOutputsEXT must be called at most once under dynamically uniform conditions

  • VUID-RuntimeSpirv-TaskEXT-07291
    In task shaders using the TaskEXT Execution Model the x size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskWorkGroupSize[0]

  • VUID-RuntimeSpirv-TaskEXT-07292
    In task shaders using the TaskEXT Execution Model the y size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskWorkGroupSize[1]

  • VUID-RuntimeSpirv-TaskEXT-07293
    In task shaders using the TaskEXT Execution Model the z size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskWorkGroupSize[2]

  • VUID-RuntimeSpirv-TaskEXT-07294
    In task shaders using the TaskEXT Execution Model the product of x size, y size, and z size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxTaskWorkGroupInvocations

  • VUID-RuntimeSpirv-MeshEXT-07295
    For mesh shaders using the MeshEXT Execution Model the x size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupSize[0]

  • VUID-RuntimeSpirv-MeshEXT-07296
    For mesh shaders using the MeshEXT Execution Model the y size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupSize[1]

  • VUID-RuntimeSpirv-MeshEXT-07297
    For mesh shaders using the MeshEXT Execution Model the z size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupSize[2]

  • VUID-RuntimeSpirv-MeshEXT-07298
    For mesh shaders using the MeshEXT Execution Model the product of x size, y size, and z size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupInvocations

  • VUID-RuntimeSpirv-TaskEXT-07299
    In task shaders using the TaskEXT Execution Model the value of the “Group Count X” operand of OpEmitMeshTasksEXT must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupCount[0]

  • VUID-RuntimeSpirv-TaskEXT-07300
    In task shaders using the TaskEXT Execution Model the value of the “Group Count Y” operand of OpEmitMeshTasksEXT must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupCount[1]

  • VUID-RuntimeSpirv-TaskEXT-07301
    In task shaders using the TaskEXT Execution Model the value of the “Group Count Z” operand of OpEmitMeshTasksEXT must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupCount[2]

  • VUID-RuntimeSpirv-TaskEXT-07302
    In task shaders using the TaskEXT Execution Model the product of the “Group Count” operands of OpEmitMeshTasksEXT must be less than or equal to VkPhysicalDeviceMeshShaderPropertiesEXT::maxMeshWorkGroupTotalCount

  • VUID-RuntimeSpirv-maxMeshSharedMemorySize-08754
    The sum of size in bytes for variables and padding in the Workgroup Storage Class in the MeshEXT Execution Model must be less than or equal to maxMeshSharedMemorySize

  • VUID-RuntimeSpirv-maxMeshPayloadAndSharedMemorySize-08755
    The sum of size in bytes for variables and padding in the TaskPayloadWorkgroupEXT or Workgroup Storage Class in the MeshEXT Execution Model must be less than or equal to maxMeshPayloadAndSharedMemorySize

  • VUID-RuntimeSpirv-maxMeshOutputMemorySize-08756
    The sum of size in bytes for variables in the Output Storage Class in the MeshEXT Execution Model must be less than or equal to maxMeshOutputMemorySize according to the formula in Mesh Shader Output

  • VUID-RuntimeSpirv-maxMeshPayloadAndOutputMemorySize-08757
    The sum of size in bytes for variables and in the TaskPayloadWorkgroupEXT or Output Storage Class in the MeshEXT Execution Model must be less than or equal to maxMeshPayloadAndOutputMemorySize according to the formula in Mesh Shader Output

  • VUID-RuntimeSpirv-maxTaskPayloadSize-08758
    The sum of size in bytes for variables and in the TaskPayloadWorkgroupEXT Storage Class in the TaskEXT Execution Model must be less than or equal to maxTaskPayloadSize

  • VUID-RuntimeSpirv-maxTaskSharedMemorySize-08759
    The sum of size in bytes for variables and padding in the Workgroup Storage Class in the TaskEXT Execution Model must be less than or equal to maxTaskSharedMemorySize

  • VUID-RuntimeSpirv-maxTaskPayloadAndSharedMemorySize-08760
    The sum of size in bytes for variables and padding in the TaskPayloadWorkgroupEXT or Workgroup Storage Class in the TaskEXT Execution Model must be less than or equal to maxTaskPayloadAndSharedMemorySize

  • VUID-RuntimeSpirv-OpCooperativeMatrixLoadKHR-08986
    For OpCooperativeMatrixLoadKHR and OpCooperativeMatrixStoreKHR instructions, the Pointer and Stride operands must be aligned to at least the lesser of 16 bytes or the natural alignment of a row or column (depending on ColumnMajor) of the matrix (where the natural alignment is the number of columns/rows multiplied by the component size)

  • VUID-RuntimeSpirv-shaderSampleRateInterpolationFunctions-06325
    If the VK_KHR_portability_subset extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::shaderSampleRateInterpolationFunctions is VK_FALSE, then GLSL.std.450 fragment interpolation functions are not supported by the implementation and OpCapability must not be InterpolationFunction

  • VUID-RuntimeSpirv-tessellationShader-06326
    If the tessellationShader feature is enabled, and the VK_KHR_portability_subset extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::tessellationIsolines is VK_FALSE, then OpExecutionMode must not be IsoLines

  • VUID-RuntimeSpirv-tessellationShader-06327
    If the tessellationShader feature is enabled, and the VK_KHR_portability_subset extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::tessellationPointMode is VK_FALSE, then OpExecutionMode must not be PointMode

  • VUID-RuntimeSpirv-storageBuffer8BitAccess-06328
    If storageBuffer8BitAccess is VK_FALSE, then objects containing an 8-bit integer element must not have Storage Class of StorageBuffer, ShaderRecordBufferKHR, or PhysicalStorageBuffer

  • VUID-RuntimeSpirv-uniformAndStorageBuffer8BitAccess-06329
    If uniformAndStorageBuffer8BitAccess is VK_FALSE, then objects in the Uniform Storage Class with the Block decoration must not have an 8-bit integer member

  • VUID-RuntimeSpirv-storagePushConstant8-06330
    If storagePushConstant8 is VK_FALSE, then objects containing an 8-bit integer element must not have Storage Class of PushConstant

  • VUID-RuntimeSpirv-storageBuffer16BitAccess-06331
    If storageBuffer16BitAccess is VK_FALSE, then objects containing 16-bit integer or 16-bit floating-point elements must not have Storage Class of StorageBuffer, ShaderRecordBufferKHR, or PhysicalStorageBuffer

  • VUID-RuntimeSpirv-uniformAndStorageBuffer16BitAccess-06332
    If uniformAndStorageBuffer16BitAccess is VK_FALSE, then objects in the Uniform Storage Class with the Block decoration must not have 16-bit integer or 16-bit floating-point members

  • VUID-RuntimeSpirv-storagePushConstant16-06333
    If storagePushConstant16 is VK_FALSE, then objects containing 16-bit integer or 16-bit floating-point elements must not have Storage Class of PushConstant

  • VUID-RuntimeSpirv-storageInputOutput16-06334
    If storageInputOutput16 is VK_FALSE, then objects containing 16-bit integer or 16-bit floating-point elements must not have Storage Class of Input or Output

  • VUID-RuntimeSpirv-None-06337
    shaderBufferFloat16Atomics, or shaderBufferFloat16AtomicAdd, or shaderBufferFloat16AtomicMinMax, or shaderSharedFloat16Atomics, or shaderSharedFloat16AtomicAdd, or shaderSharedFloat16AtomicMinMax must be enabled for 16-bit floating-point atomic operations

  • VUID-RuntimeSpirv-None-06338
    shaderBufferFloat32Atomics, or shaderBufferFloat32AtomicAdd, or shaderSharedFloat32Atomics, or shaderSharedFloat32AtomicAdd, or shaderImageFloat32Atomics, or shaderImageFloat32AtomicAdd or shaderBufferFloat32AtomicMinMax, or shaderSharedFloat32AtomicMinMax, or shaderImageFloat32AtomicMinMax must be enabled for 32-bit floating-point atomic operations

  • VUID-RuntimeSpirv-None-06339
    shaderBufferFloat64Atomics, or shaderBufferFloat64AtomicAdd, or shaderSharedFloat64Atomics, or shaderSharedFloat64AtomicAdd, or shaderBufferFloat64AtomicMinMax, or shaderSharedFloat64AtomicMinMax, must be enabled for 64-bit floating-point atomic operations

  • VUID-RuntimeSpirv-shaderFloat16VectorAtomics-09581
    shaderFloat16VectorAtomics, must be enabled for 16-bit floating-point, 2- and 4-component vector atomic operations to be supported

  • VUID-RuntimeSpirv-NonWritable-06340
    If the fragmentStoresAndAtomics feature is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the fragment stage must be decorated with the NonWritable decoration

  • VUID-RuntimeSpirv-NonWritable-06341
    If the vertexPipelineStoresAndAtomics feature is not enabled, then all storage image, storage texel buffer, and storage buffer variables in the vertex, tessellation, and geometry stages must be decorated with the NonWritable decoration

  • VUID-RuntimeSpirv-None-06342
    If subgroupQuadOperationsInAllStages is VK_FALSE, then quad subgroup operations must not be used except for in fragment and compute stages

  • VUID-RuntimeSpirv-None-06343
    Group operations with subgroup scope must not be used if the shader stage is not in subgroupSupportedStages

  • VUID-RuntimeSpirv-Offset-06344
    The first element of the Offset operand of InterpolateAtOffset must be greater than or equal to:
    fragwidth × minInterpolationOffset
    where fragwidth is the width of the current fragment in pixels

  • VUID-RuntimeSpirv-Offset-06345
    The first element of the Offset operand of InterpolateAtOffset must be less than or equal to
    fragwidth × ( maxInterpolationOffset + ULP ) - ULP
    where fragwidth is the width of the current fragment in pixels and ULP = 1 / 2^ subPixelInterpolationOffsetBits^

  • VUID-RuntimeSpirv-Offset-06346
    The second element of the Offset operand of InterpolateAtOffset must be greater than or equal to
    fragheight × minInterpolationOffset
    where fragheight is the height of the current fragment in pixels

  • VUID-RuntimeSpirv-Offset-06347
    The second element of the Offset operand of InterpolateAtOffset must be less than or equal to
    fragheight × ( maxInterpolationOffset + ULP ) - ULP
    where fragheight is the height of the current fragment in pixels and ULP = 1 / 2^ subPixelInterpolationOffsetBits^

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06348
    For OpRayQueryInitializeKHR instructions, all components of the RayOrigin and RayDirection operands must be finite floating-point values

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06349
    For OpRayQueryInitializeKHR instructions, the RayTmin and RayTmax operands must be non-negative floating-point values

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06350
    For OpRayQueryInitializeKHR instructions, the RayTmin operand must be less than or equal to the RayTmax operand

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06351
    For OpRayQueryInitializeKHR instructions, RayOrigin, RayDirection, RayTmin, and RayTmax operands must not contain NaNs

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06352
    For OpRayQueryInitializeKHR instructions, Acceleration Structure must be an acceleration structure built as a top-level acceleration structure

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06889
    For OpRayQueryInitializeKHR instructions, the Rayflags operand must not contain both SkipTrianglesKHR and SkipAABBsKHR

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06890
    For OpRayQueryInitializeKHR instructions, the Rayflags operand must not contain more than one of SkipTrianglesKHR, CullBackFacingTrianglesKHR, and CullFrontFacingTrianglesKHR

  • VUID-RuntimeSpirv-OpRayQueryInitializeKHR-06891
    For OpRayQueryInitializeKHR instructions, the Rayflags operand must not contain more than one of OpaqueKHR, NoOpaqueKHR, CullOpaqueKHR, and CullNoOpaqueKHR

  • VUID-RuntimeSpirv-OpRayQueryGenerateIntersectionKHR-06353
    For OpRayQueryGenerateIntersectionKHR instructions, Hit T must satisfy the condition RayTminHit TRayTmax, where RayTmin is equal to the value returned by OpRayQueryGetRayTMinKHR with the same ray query object, and RayTmax is equal to the value of OpRayQueryGetIntersectionTKHR for the current committed intersection with the same ray query object

  • VUID-RuntimeSpirv-OpRayQueryGenerateIntersectionKHR-06354
    For OpRayQueryGenerateIntersectionKHR instructions, Acceleration Structure must not be built with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in flags

  • VUID-RuntimeSpirv-flags-08761
    For OpRayQueryGetIntersectionTriangleVertexPositionsKHR instructions, Acceleration Structure must have been built with VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR in flags

  • VUID-RuntimeSpirv-OpTraceRayKHR-06355
    For OpTraceRayKHR instructions, all components of the RayOrigin and RayDirection operands must be finite floating-point values

  • VUID-RuntimeSpirv-OpTraceRayKHR-06356
    For OpTraceRayKHR instructions, the RayTmin and RayTmax operands must be non-negative floating-point values

  • VUID-RuntimeSpirv-OpTraceRayKHR-06552
    For OpTraceRayKHR instructions, the Rayflags operand must not contain both SkipTrianglesKHR and SkipAABBsKHR

  • VUID-RuntimeSpirv-OpTraceRayKHR-06892
    For OpTraceRayKHR instructions, the Rayflags operand must not contain more than one of SkipTrianglesKHR, CullBackFacingTrianglesKHR, and CullFrontFacingTrianglesKHR

  • VUID-RuntimeSpirv-OpTraceRayKHR-06893
    For OpTraceRayKHR instructions, the Rayflags operand must not contain more than one of OpaqueKHR, NoOpaqueKHR, CullOpaqueKHR, and CullNoOpaqueKHR

  • VUID-RuntimeSpirv-OpTraceRayKHR-06553
    For OpTraceRayKHR instructions, if the Rayflags operand contains SkipTrianglesKHR, the pipeline must not have been created with VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR set

  • VUID-RuntimeSpirv-OpTraceRayKHR-06554
    For OpTraceRayKHR instructions, if the Rayflags operand contains SkipAABBsKHR, the pipeline must not have been created with VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR set

  • VUID-RuntimeSpirv-OpTraceRayKHR-06357
    For OpTraceRayKHR instructions, the RayTmin operand must be less than or equal to the RayTmax operand

  • VUID-RuntimeSpirv-OpTraceRayKHR-06358
    For OpTraceRayKHR instructions, RayOrigin, RayDirection, RayTmin, and RayTmax operands must not contain NaNs

  • VUID-RuntimeSpirv-OpTraceRayKHR-06359
    For OpTraceRayKHR instructions, Acceleration Structure must be an acceleration structure built as a top-level acceleration structure

  • VUID-RuntimeSpirv-OpReportIntersectionKHR-06998
    The value of the “Hit Kind” operand of OpReportIntersectionKHR must be in the range [0,127]

  • VUID-RuntimeSpirv-OpTraceRayKHR-06360
    For OpTraceRayKHR instructions, if Acceleration Structure was built with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in flags, the pipeline must have been created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV set

  • VUID-RuntimeSpirv-OpTraceRayMotionNV-06361
    For OpTraceRayMotionNV instructions, all components of the RayOrigin and RayDirection operands must be finite floating-point values

  • VUID-RuntimeSpirv-OpTraceRayMotionNV-06362
    For OpTraceRayMotionNV instructions, the RayTmin and RayTmax operands must be non-negative floating-point values

  • VUID-RuntimeSpirv-OpTraceRayMotionNV-06363
    For OpTraceRayMotionNV instructions, the RayTmin operand must be less than or equal to the RayTmax operand

  • VUID-RuntimeSpirv-OpTraceRayMotionNV-06364
    For OpTraceRayMotionNV instructions, RayOrigin, RayDirection, RayTmin, and RayTmax operands must not contain NaNs

  • VUID-RuntimeSpirv-OpTraceRayMotionNV-06365
    For OpTraceRayMotionNV instructions, Acceleration Structure must be an acceleration structure built as a top-level acceleration structure with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in flags

  • VUID-RuntimeSpirv-OpTraceRayMotionNV-06366
    For OpTraceRayMotionNV instructions the time operand must be between 0.0 and 1.0

  • VUID-RuntimeSpirv-OpTraceRayMotionNV-06367
    For OpTraceRayMotionNV instructions the pipeline must have been created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV set

  • VUID-RuntimeSpirv-OpHitObjectTraceRayMotionNV-07704
    For OpHitObjectTraceRayMotionNV instructions, if Acceleration Structure was built with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in flags, the pipeline must have been created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV set

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07705
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, all components of the RayOrigin and RayDirection operands must be finite floating-point values

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07706
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, the RayTmin and RayTmax operands must be non-negative floating-point values

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07707
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, the RayTmin operand must be less than or equal to the RayTmax operand

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07708
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, RayOrigin, RayDirection, RayTmin, and RayTmax operands must not contain NaNs

  • VUID-RuntimeSpirv-OpHitObjectTraceRayMotionNV-07709
    For OpHitObjectTraceRayMotionNV instructions, Acceleration Structure must be an acceleration structure built as a top-level acceleration structure with VK_BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV in flags

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07710
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions the time operand must be between 0.0 and 1.0

  • VUID-RuntimeSpirv-OpHitObjectTraceRayMotionNV-07711
    For OpHitObjectTraceRayMotionNV instructions the pipeline must have been created with VK_PIPELINE_CREATE_RAY_TRACING_ALLOW_MOTION_BIT_NV set

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07712
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, the Rayflags operand must not contain both SkipTrianglesKHR and SkipAABBsKHR

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07713
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, the Rayflags operand must not contain more than one of SkipTrianglesKHR, CullBackFacingTrianglesKHR, and CullFrontFacingTrianglesKHR

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07714
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, the Rayflags operand must not contain more than one of OpaqueKHR, NoOpaqueKHR, CullOpaqueKHR, and CullNoOpaqueKHR

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07715
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, if the Rayflags operand contains SkipTrianglesKHR, the pipeline must not have been created with VK_PIPELINE_CREATE_RAY_TRACING_SKIP_AABBS_BIT_KHR set

  • VUID-RuntimeSpirv-OpHitObjectTraceRayNV-07716
    For OpHitObjectTraceRayNV and OpHitObjectTraceRayMotionNV instructions, if the Rayflags operand contains SkipAABBsKHR, the pipeline must not have been created with VK_PIPELINE_CREATE_RAY_TRACING_SKIP_TRIANGLES_BIT_KHR set

  • VUID-RuntimeSpirv-x-06429
    In compute shaders using the GLCompute Execution Model the x size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupSize[0]

  • VUID-RuntimeSpirv-y-06430
    In compute shaders using the GLCompute Execution Model the y size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupSize[1]

  • VUID-RuntimeSpirv-z-06431
    In compute shaders using the GLCompute Execution Model the z size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupSize[2]

  • VUID-RuntimeSpirv-x-06432
    In compute shaders using the GLCompute Execution Model the product of x size, y size, and z size in LocalSize or LocalSizeId must be less than or equal to VkPhysicalDeviceLimits::maxComputeWorkGroupInvocations

  • VUID-RuntimeSpirv-LocalSizeId-06434
    If Execution Mode LocalSizeId is used, maintenance4 must be enabled

  • VUID-RuntimeSpirv-maintenance4-06817
    If the maintenance4 feature is not enabled, any OpTypeVector output interface variables must not have a higher Component Count than a matching OpTypeVector input interface variable

  • VUID-RuntimeSpirv-OpEntryPoint-08743
    Any user-defined variables shared between the OpEntryPoint of two shader stages, and declared with Input as its Storage Class for the subsequent shader stage, must have all Location slots and Component words declared in the preceding shader stage’s OpEntryPoint with Output as the Storage Class

  • VUID-RuntimeSpirv-OpEntryPoint-07754
    Any user-defined variables between the OpEntryPoint of two shader stages must have the same type and width for each Component

  • VUID-RuntimeSpirv-OpVariable-08746
    Any OpVariable, Block-decorated OpTypeStruct, or Block-decorated OpTypeStruct members shared between the OpEntryPoint of two shader stages must have matching decorations as defined in interface matching

  • VUID-RuntimeSpirv-Workgroup-06530
    The sum of size in bytes for variables and padding in the Workgroup Storage Class in the GLCompute Execution Model must be less than or equal to maxComputeSharedMemorySize

  • VUID-RuntimeSpirv-shaderZeroInitializeWorkgroupMemory-06372
    If the shaderZeroInitializeWorkgroupMemory feature is not enabled, any OpVariable with Workgroup as its Storage Class must not have an Initializer operand

  • VUID-RuntimeSpirv-OpImage-06376
    If an OpImage*Gather operation has an image operand of Offset, ConstOffset, or ConstOffsets the offset value must be greater than or equal to minTexelGatherOffset

  • VUID-RuntimeSpirv-OpImage-06377
    If an OpImage*Gather operation has an image operand of Offset, ConstOffset, or ConstOffsets the offset value must be less than or equal to maxTexelGatherOffset

  • VUID-RuntimeSpirv-OpImageSample-06435
    If an OpImageSample* or OpImageFetch* operation has an image operand of ConstOffset then the offset value must be greater than or equal to minTexelOffset

  • VUID-RuntimeSpirv-OpImageSample-06436
    If an OpImageSample* or OpImageFetch* operation has an image operand of ConstOffset then the offset value must be less than or equal to maxTexelOffset

  • VUID-RuntimeSpirv-samples-08725
    If an OpTypeImage has an MS operand 0, its bound image must have been created with VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT

  • VUID-RuntimeSpirv-samples-08726
    If an OpTypeImage has an MS operand 1, its bound image must not have been created with VkImageCreateInfo::samples as VK_SAMPLE_COUNT_1_BIT

  • VUID-RuntimeSpirv-SampleRateShading-06378
    If the subpass description contains VK_SUBPASS_DESCRIPTION_FRAGMENT_REGION_BIT_QCOM, then the SPIR-V fragment shader Capability SampleRateShading must not be enabled

  • VUID-RuntimeSpirv-SubgroupUniformControlFlowKHR-06379
    The Execution Mode SubgroupUniformControlFlowKHR must not be applied to an entry point unless the shaderSubgroupUniformControlFlow feature is enabled, the corresponding shader stage bit is set in subgroupSupportedStages, and the entry point does not execute any invocation repack instructions

  • VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06767
    If the shaderEarlyAndLateFragmentTests feature is not enabled, the EarlyAndLateFragmentTestsEXT Execution Mode must not be used

  • VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06768
    If the shaderEarlyAndLateFragmentTests feature is not enabled, the StencilRefUnchangedFrontEXT Execution Mode must not be used

  • VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06769
    If the shaderEarlyAndLateFragmentTests feature is not enabled, the StencilRefUnchangedBackEXT Execution Mode must not be used

  • VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06770
    If the shaderEarlyAndLateFragmentTests feature is not enabled, the StencilRefGreaterFrontEXT Execution Mode must not be used

  • VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06771
    If the shaderEarlyAndLateFragmentTests feature is not enabled, the StencilRefGreaterBackEXT Execution Mode must not be used

  • VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06772
    If the shaderEarlyAndLateFragmentTests feature is not enabled, the StencilRefLessFrontEXT Execution Mode must not be used

  • VUID-RuntimeSpirv-shaderEarlyAndLateFragmentTests-06773
    If the shaderEarlyAndLateFragmentTests feature is not enabled, the StencilRefLessBackEXT Execution Mode must not be used

  • VUID-RuntimeSpirv-OpImageWeightedSampleQCOM-06979
    If an OpImageWeightedSampleQCOM operation is used, then the Texture Sampled Image and Weight Image parameters must both be dynamically uniform for the quad

  • VUID-RuntimeSpirv-OpImageWeightedSampleQCOM-06980
    If an OpImageWeightedSampleQCOM operation is used, then the Weight Image parameter must be of Storage Class UniformConstant and type OpTypeImage with Depth=0, Dim=2D, Arrayed=1, MS=0, and Sampled=1

  • VUID-RuntimeSpirv-OpImageWeightedSampleQCOM-06981
    If an OpImageWeightedSampleQCOM operation is used, then the Weight Image parameter must be decorated with WeightTextureQCOM

  • VUID-RuntimeSpirv-OpImageBlockMatchSADQCOM-06982
    If an OpImageBlockMatchSADQCOM or OpImageBlockMatchSSDQCOM operation is used, then the target sampled image, reference sampled image, and Block Size parameters must both be dynamically uniform for the quad

  • VUID-RuntimeSpirv-OpImageBlockMatchSSDQCOM-06983
    If an OpImageBlockMatchSSDQCOM or OpImageBlockMatchSADQCOM operation is used, then target sampled image and reference sampled image parameters must be of storage class UniformConstant and type OpTypeImage with Depth=0, Dim=2D, Arrayed=0, MS=0, and Sampled=1

  • VUID-RuntimeSpirv-OpImageBlockMatchSSDQCOM-06984
    If an OpImageBlockMatchSSDQCOM or OpImageBlockMatchSADQCOM operation is used, then the target sampled image and reference sampled image parameters must be decorated with BlockMatchTextureQCOM

  • VUID-RuntimeSpirv-OpImageBlockMatchSSDQCOM-06985
    If an OpImageBlockMatchSSDQCOM or OpImageBlockMatchSADQCOM operation is used, then target sampled image and reference sampled image parameters must have been created using an identical sampler object

  • VUID-RuntimeSpirv-OpImageBlockMatchSSDQCOM-06986
    If an OpImageBlockMatchSSDQCOM or OpImageBlockMatchSADQCOM operation is used, then target sampled image and reference sampled image parameters must have been created with a sampler object with unnormalizedCoordinates equal to VK_TRUE

  • VUID-RuntimeSpirv-OpImageBlockMatchSSDQCOM-06987
    If an OpImageBlockMatchSSDQCOM or OpImageBlockMatchSADQCOM operation is used, then target sampled image and reference sampled image parameters must have been created with a sampler object with unnormalizedCoordinates equal to VK_TRUE

  • VUID-RuntimeSpirv-OpImageBlockMatchSSDQCOM-06988
    If an OpImageBlockMatchSSDQCOM or OpImageBlockMatchSADQCOM operation is used, then Block Size less than or equal to maxBlockMatchRegion

  • VUID-RuntimeSpirv-OpImageBoxFilterQCOM-06989
    If an OpImageBoxFilterQCOM operation is used, then Box Size.y must be equal to or greater than 1.0 and less than or equal to maxBoxFilterBlockSize.height

  • VUID-RuntimeSpirv-OpImageBoxFilterQCOM-06990
    If an OpImageBoxFilterQCOM operation is used, then Sampled Texture Image and Box Size parameters must be dynamically uniform

  • VUID-RuntimeSpirv-OpEntryPoint-08727
    Each OpEntryPoint must not have more than one variable decorated with InputAttachmentIndex per image aspect of the attachment image bound to it, either explicitly or implicitly as described by input attachment interface

  • VUID-RuntimeSpirv-minSampleShading-08731
    If sample shading is enabled and minSampleShading is 1.0, the sample operand of any OpColorAttachmentReadEXT, OpDepthAttachmentReadEXT, or OpStencilAttachmentReadEXT operation must evaluate to the value of the coverage index for any given fragment invocation

  • VUID-RuntimeSpirv-minSampleShading-08732
    If sample shading is enabled and any of the OpColorAttachmentReadEXT, OpDepthAttachmentReadEXT, or OpStencilAttachmentReadEXT operations are used, then minSampleShading must be 1.0

  • VUID-RuntimeSpirv-MeshEXT-09218
    In mesh shaders using the MeshEXT or MeshNV Execution Model and the OutputPoints Execution Mode, if the maintenance5 feature is not enabled, and if the number of output points is greater than 0, a PointSize decorated variable must be written to for each output point

  • VUID-RuntimeSpirv-maintenance5-09190
    If the maintenance5 feature is enabled and a PointSize decorated variable is written to, all execution paths must write to a PointSize decorated variable

  • VUID-RuntimeSpirv-ShaderEnqueueAMDX-09191
    The ShaderEnqueueAMDX capability must only be used in shaders with the GLCompute or MeshEXT execution model

  • VUID-RuntimeSpirv-NodePayloadAMDX-09192
    Variables in the NodePayloadAMDX storage class must only be declared in the GLCompute or MeshEXT execution model

  • VUID-RuntimeSpirv-maxExecutionGraphShaderPayloadSize-09193
    Variables declared in the NodePayloadAMDX storage class must not be larger than the maxExecutionGraphShaderPayloadSize limit

  • VUID-RuntimeSpirv-maxExecutionGraphShaderPayloadSize-09194
    Variables declared in the NodeOutputPayloadAMDX storage class must not be larger than the maxExecutionGraphShaderPayloadSize limit

  • VUID-RuntimeSpirv-maxExecutionGraphShaderPayloadSize-09195
    For a given entry point, the sum of the size of any variable in the NodePayloadAMDX storage class, and the combined size of all statically initialized variables in the NodeOutputPayloadAMDX storage class must not be greater than maxExecutionGraphShaderPayloadSize

  • VUID-RuntimeSpirv-maxExecutionGraphShaderPayloadCount-09196
    Shaders must not statically initialize more than maxExecutionGraphShaderPayloadCount variables in the NodeOutputPayloadAMDX storage class

  • VUID-RuntimeSpirv-maxExecutionGraphShaderOutputNodes-09197
    Shaders must not include more than maxExecutionGraphShaderOutputNodes instances of OpInitializeNodePayloadsAMDX

  • VUID-RuntimeSpirv-OpImageBlockMatchWindow-09219
    If a OpImageBlockMatchWindow*QCOM or OpImageBlockMatchGather*QCOM operation is used, then the target sampled image, reference sampled image, and Block Size parameters must both be dynamically uniform for the quad

  • VUID-RuntimeSpirv-OpImageBlockMatchWindow-09220
    If a OpImageBlockMatchWindow*QCOM or OpImageBlockMatchGather*QCOM operation is used, then target sampled image and reference sampled image parameters must be of storage class UniformConstant and type OpTypeImage with Depth=0, Dim=2D, Arrayed=0, MS=0, and Sampled=1

  • VUID-RuntimeSpirv-OpImageBlockMatchWindow-09221
    If a OpImageBlockMatchWindow*QCOM or OpImageBlockMatchGather*QCOM operation is used, then the target sampled image and reference sampled image parameters must be decorated with BlockMatchTextureQCOM

  • VUID-RuntimeSpirv-OpImageBlockMatchWindow-09222
    If a OpImageBlockMatchWindow*QCOM or OpImageBlockMatchGather*QCOM operation is used, then target sampled image and reference sampled image parameters must have been created using an identical sampler object

  • VUID-RuntimeSpirv-OpImageBlockMatchWindow-09223
    If a OpImageBlockMatchWindow*QCOM or OpImageBlockMatchGather*QCOM operation is used, then target sampled image and reference sampled image parameters must have been created with a sampler object with unnormalizedCoordinates equal to VK_TRUE

  • VUID-RuntimeSpirv-OpImageBlockMatchWindow-09224
    If a OpImageBlockMatchWindow*QCOM or OpImageBlockMatchGather*QCOM operation is used, then target sampled image and reference sampled image parameters must have been created with sampler object with unnormalizedCoordinates equal to VK_TRUE

  • VUID-RuntimeSpirv-maxBlockMatchRegion-09225
    If a OpImageBlockMatchWindow*QCOM or OpImageBlockMatchGather*QCOM operation is used, then Block Size less than or equal to maxBlockMatchRegion

  • VUID-RuntimeSpirv-pNext-09226
    If a OpImageBlockMatchWindow*QCOM operation is used, then target sampled image must have been created using asampler object that included VkSamplerBlockMatchWindowCreateInfoQCOM in the pNext chain

  • VUID-RuntimeSpirv-MaximallyReconvergesKHR-09565
    The execution mode MaximallyReconvergesKHR must not be applied to an entry point unless the entry point does not execute any invocation repack instructions

  • VUID-RuntimeSpirv-shaderSubgroupRotateClustered-09566
    If shaderSubgroupRotateClustered is VK_FALSE, then the ClusterSize operand to OpGroupNonUniformRotateKHR must not be used

  • VUID-RuntimeSpirv-protectedNoFault-09645
    If protectedNoFault is not supported, the Storage Class of the PhysicalStorageBuffer must not be used if the buffer being accessed is protected

  • VUID-RuntimeSpirv-meshAndTaskShaderDerivatives-10153
    If meshAndTaskShaderDerivatives is VK_FALSE, the DerivativeGroupLinearKHR and DerivativeGroupQuadsKHR execution modes must not be used in the MeshEXT, MeshNV, TaskEXT, or TaskNV Execution Model

Precision and Operation of SPIR-V Instructions

The following rules apply to half, single, and double-precision floating-point instructions:

  • Positive and negative infinities and positive and negative zeros are generated as dictated by IEEE 754, but subject to the precisions allowed in the table below.

  • Signaling NaNs are not required to be generated and exceptions are never raised. Signaling NaN may be converted to quiet NaNs values by any floating-point instruction.

  • The set of operations OpPhi, OpSelect, OpFunctionCall, OpReturnValue, OpVectorExtractDynamic, OpVectorInsertDynamic, OpVectorShuffle, OpCompositeConstruct, OpCompositeExtract, OpCompositeInsert, OpTranspose, OpCopyObject, OpCopyLogical, OpCopyMemory, OpGroupNonUniformBroadcast, OpGroupNonUniformBroadcastFirst, OpGroupNonUniformShuffle, OpGroupNonUniformShuffleXor, OpGroupNonUniformShuffleUp, OpGroupNonUniformShuffleDown, OpGroupNonUniformQuadBroadcast, OpGroupNonUniformQuadSwap, OpSubgroupReadInvocationKHR, OpSubgroupFirstInvocationKHR, OpGroupNonUniformRotateKHR, OpCooperativeMatrixLoadKHR, OpCooperativeMatrixStoreKHR, OpCooperativeMatrixLoadNV, OpCooperativeMatrixStoreNV, OpCooperativeMatrixLoadTensorNV, OpCooperativeMatrixStoreTensorNV, OpAtomicLoad, OpAtomicStore, OpAtomicExchange, OpStore, and OpLoad are referred to as bit-preserving operations.

  • The floating-point environment used for an instruction can be determined as follows:

    • If the SPIR-V specifies it explicitly using the FPFastMath decoration or FPFastMathDefault Execution Mode then that is used.

    • If the environment is not specified in the SPIR-V then it is determined as follows:

      • If the operation is not decorated NoContraction then the flags AllowContract, AllowReassoc, AllowRecip, and AllowTransform are assumed.

      • If any of the following conditions are true then the flags NSZ, NotInf, and NotNaN are assumed:

        • The entry point does not use the Execution Mode SignedZeroInfNanPreserve with a bit-width corresponding to one of the operands or to the result type.

        • The operation is not a bit-preserving operation and is not one of OpFConvert, OpFNegate, OpFAdd, OpFSub, OpFMul, OpFDiv, OpIsNan, OpIsInf, OpVectorTimesScalar, OpMatrixTimesScalar, OpVectorTimesMatrix, OpMatrixTimesVector, OpMatrixTimesMatrix, OpOuterProduct, OpDot, OpFOrdEqual, OpFUnordEqual, OpFOrdNotEqual, OpFUnordNotEqual, OpFOrdLessThan, OpFUnordLessThan, OpFOrdGreaterThan, OpFUnordGreaterThan, OpFOrdLessThanEqual, OpFUnordLessThanEqual, OpFOrdGreaterThanEqual, OpFUnordGreaterThanEqual, OpGroupNonUniformAllEqual, OpSubgroupAllEqualKHR, OpGroupNonUniformFMin, OpGroupNonUniformFMax, OpAtomicCompareExchange, OpAtomicCompareExchangeWeak, OpDPdx, OpDPdy, OpFwidth, OpDPdxFine, OpDPdyFine, OpFwidthFine, OpDPdxCoarse, OpDPdyCoarse, or OpFwidthCoarse.

        • The operation is an OpLoad from the Input Storage Class in the fragment shader stage.

  • All bit-preserving operations and the following instructions must not flush denormalized values: OpConstant, OpConstantComposite, OpSpecConstant, OpSpecConstantComposite, and OpBitcast.

  • Denormalized values are supported.

    • By default, any half, single, or double-precision denormalized value input into a shader or potentially generated by any instruction (except those listed above) or any extended instructions for GLSL in a shader may be flushed to zero.

    • If the entry point is declared with the DenormFlushToZero Execution Mode then for the affected instructions the denormalized result must be flushed to zero and the denormalized operands may be flushed to zero. Denormalized values obtained via unpacking an integer into a vector of values with smaller bit width and interpreting those values as floating-point numbers must be flushed to zero.

    • The following core SPIR-V instructions must respect the DenormFlushToZero Execution Mode: OpSpecConstantOp (with opcode OpFConvert), OpFConvert, OpFNegate, OpFAdd, OpFSub, OpFMul, OpFDiv, OpFRem, OpFMod, OpVectorTimesScalar, OpMatrixTimesScalar, OpVectorTimesMatrix, OpMatrixTimesVector, OpMatrixTimesMatrix, OpOuterProduct, OpDot, OpGroupNonUniformFMin, OpGroupNonUniformFMax, OpAtomicFAddEXT, OpAtomicFMinEXT, OpAtomicFMaxEXT, OpDPdx, OpDPdy, OpFwidth, OpDPdxFine, OpDPdyFine OpFwidthFine, OpDPdxCoarse, OpDPdyCoarse, OpFwidthCoarse; and the following extended instructions for GLSL: Round, RoundEven, Trunc, FAbs, Floor, Ceil, Fract, Radians, Degrees, Sin, Cos, Tan, Asin, Acos, Atan, Sinh, Cosh, Tanh, Asinh, Acosh, Atanh, Atan2, Pow, Exp, Log, Exp2, Log2, Sqrt, InverseSqrt, Determinant, MatrixInverse, Modf, ModfStruct, FMin, FMax, FClamp, FMix, Step, SmoothStep, Fma, UnpackHalf2x16, Length, Distance, Cross, Normalize, FaceForward, Reflect, Refract, NMin, NMax, and NClamp.

    • The following core SPIR-V instructions must respect the DenormPreserve Execution Mode: OpSpecConstantOp, OpFConvert, OpFNegate, OpFAdd, OpFSub, OpFMul, OpVectorTimesScalar, OpMatrixTimesScalar, OpVectorTimesMatrix, OpMatrixTimesVector, OpMatrixTimesMatrix, OpOuterProduct, OpDot, OpFOrdEqual, OpFUnordEqual, OpFOrdNotEqual, OpFUnordNotEqual, OpFOrdLessThan, OpFUnordLessThan, OpFOrdGreaterThan, OpFUnordGreaterThan, OpFOrdLessThanEqual, OpFUnordLessThanEqual, OpFOrdGreaterThanEqual, OpFUnordGreaterThanEqual, OpSubgroupAllEqualKHR, OpGroupNonUniformAllEqual, OpGroupNonUniformFMin, OpGroupNonUniformFMax, OpAtomicCompareExchange, OpAtomicCompareExchangeWeak, OpAtomicFAddEXT, OpAtomicFMinEXT, OpAtomicFMaxEXT, OpDPdx, OpDPdy, OpFwidth, OpDPdxFine, OpDPdyFine OpFwidthFine, OpDPdxCoarse, OpDPdyCoarse, OpFwidthCoarse; and the following extended instructions for GLSL: FAbs, FSign, Radians, Degrees, FMin, FMax, FClamp, FMix, Fma, PackHalf2x16, PackDouble2x32, UnpackHalf2x16, UnpackDouble2x32, NMin, NMax, and NClamp.

The precision of double-precision instructions is at least that of single precision.

The precision of individual operations is defined in Precision of Individual Operations. Subject to the constraints below, however, implementations may reorder or combine operations, resulting in expressions exhibiting different precisions than might be expected from the constituent operations.

Evaluation of Expressions

Implementations may rearrange floating-point operations using any of the mathematical properties governing the expressions in precise arithmetic, even where the floating- point operations do not share these properties. This includes, but is not limited to, associativity and distributivity, and may involve a different number of rounding steps than would occur if the operations were not rearranged. In shaders that use the SignedZeroInfNanPreserve Execution Mode the values must be preserved if they are generated after any rearrangement but the Execution Mode does not change which rearrangements are valid. This rearrangement can be prevented for particular operations by using the NoContraction decoration.

For example, in the absence of the NoContraction decoration implementations are allowed to implement a + b - a and \({a \times b}\over{a}\) as b. The SignedZeroInfNanPreserve does not prevent these transformations, even though they may overflow to infinity or NaN when evaluated in floating-point.

If the NoContraction decoration is applied then operations may not be rearranged, so, for example, a + a - a must account for possible overflow to infinity. If infinities are not preserved then the expression may be replaced with a, since the replacement is exact when overflow does not occur and infinities may be replaced with undefined values. If both NoContraction and SignedZeroInfNanPreserve are used then the result must be infinity for sufficiently large a.

Precision of Individual Operations

The precision of individual operations is defined either in terms of rounding (correctly rounded), as an error bound in ULP, or as inherited from a formula as follows:

Correct Result

Operations that are described as returning the “correct result” will return the infinitely precise result which, due to the nature of the operation, will not need rounding.

Correctly Rounded

Operations described as “correctly rounded” will return the infinitely precise result, x, rounded so as to be representable in floating-point. If the entry point is declared with the RoundingModeRTE or the RoundingModeRTZ Execution Mode then this is done according to IEEE 754 “roundTiesToEven” or “roundTowardZero” rounding directions, respectively. Otherwise, they are rounded with implementation-defined rounding mode.

Correctly Rounded with Implementation-Defined Rounding Mode

Operations described as “correctly rounded with implementation-defined rounding mode” will return the infinitely precise result, x, rounded so as to be representable in floating-point. If x is exactly representable then x will be returned. Otherwise, either the floating-point value closest to and no less than x or the value closest to and no greater than x will be returned. Which value is chosen is implementation-defined.

ULP

Where an error bound of n ULP (units in the last place) is given, for an operation with infinitely precise result x the value returned must be in the range [x - n × ulp(x), x + n × ulp(x)]. The function ulp(x) is defined as follows:

If there exist non-equal, finite floating-point numbers a and b such that a ≤ x ≤ b then ulp(x) is the minimum possible distance between such numbers, \(ulp(x) = \mathrm{min}_{a,b} | b - a |\). If such numbers do not exist then ulp(x) is defined to be the difference between the two non-equal, finite floating-point numbers nearest to x.

Where the range of allowed return values includes any value of magnitude larger than that of the largest representable finite floating-point number, operations may, additionally, return either an infinity of the appropriate sign or the finite number with the largest magnitude of the appropriate sign. If the infinitely precise result of the operation is not mathematically defined then the value returned is undefined.

Inherited From …​

Where an operation’s precision is described as being inherited from a formula, the result returned must be at least as accurate as the result of computing an approximation to x using a formula equivalent to the given formula applied to the supplied inputs. Specifically, the formula given may be transformed using the mathematical associativity, commutativity and distributivity of the operators involved to yield an equivalent formula. The SPIR-V precision rules, when applied to each such formula and the given input values, define a range of permitted values. If NaN is one of the permitted values then the operation may return any result, otherwise let the largest permitted value in any of the ranges be Fmax and the smallest be Fmin. The operation must return a value in the range [x - E, x + E] where \(E = \mathrm{max} \left( | x - F_{\mathrm{min}} |, | x - F_{\mathrm{max}} | \right) \). If the entry point is declared with the DenormFlushToZero execution mode, then any intermediate denormal value(s) while evaluating the formula may be flushed to zero. Denormal final results must be flushed to zero. If the entry point is declared with the DenormPreserve Execution Mode, then denormals must be preserved throughout the formula.

For half- (16 bit) and single- (32 bit) precision instructions, precisions are required to be at least as follows:

Table 3. Precision of Core SPIR-V Instructions
Instruction Single precision, unless decorated with RelaxedPrecision Half precision

OpFNegate

Correct result.

OpFAdd

Correctly rounded.

OpFSub

Correctly rounded.

OpFMul, OpVectorTimesScalar, OpMatrixTimesScalar

Correctly rounded.

OpMatrixTimesVector

Inherited from .

OpVectorTimesMatrix

Inherited from .

OpMatrixTimesMatrix

Inherited from .

OpOuterProduct

Correctly rounded.

OpDot(x, y)

Inherited from .

OpIsNan, OpIsInf

Correct result.

OpFOrdEqual, OpFUnordEqual

Correct result.

OpFOrdNotEqual, OpFUnordNotEqual

Correct result.

OpFOrdLessThan, OpFUnordLessThan

Correct result.

OpFOrdGreaterThan, OpFUnordGreaterThan

Correct result.

OpFOrdLessThanEqual, OpFUnordLessThanEqual

Correct result.

OpFOrdGreaterThanEqual, OpFUnordGreaterThanEqual

Correct result.

OpSubgroupAllEqualKHR

Correct result.

OpGroupNonUniformAllEqual

Correct result.

OpGroupNonUniformFMin, OpGroupNonUniformFMax

Correct result.

OpFDiv(x,y)

2.5 ULP for |y| = 0 or |y| in the range [2-126, 2126].

2.5 ULP for |y| = 0 or |y| in the range [2-14, 214].

OpFRem(x,y)

Inherited from x - y × trunc(x/y).

OpFMod(x,y)

Inherited from x - y × floor(x/y).

OpQuantizeToF16

Correctly rounded with implementation defined rounding mode.

conversions between types

Correctly rounded.

OpAtomicCompareExchange, OpAtomicCompareExchangeWeak

Correct result.

OpAtomicFAddEXT

Return value correct result, value in memory correctly rounded.

OpAtomicFMinEXT, OpAtomicFMaxEXT

Correct result.

OpDPdx, OpDPdy, OpFwidth

Correctly rounded.

OpDPdxCoarse, OpDPdyCoarse, OpFwidthCoarse

Correctly rounded.

OpDPdxFine, OpDPdyFine, OpFwidthFine

Correctly rounded.

The OpFRem and OpFMod instructions use cheap approximations of remainder, and the error can be large due to the discontinuity in trunc() and floor(). This can produce mathematically unexpected results in some cases, such as FMod(x,x) computing x rather than 0, and can also cause the result to have a different sign than the infinitely precise result.

Table 4. Precision of GLSL.std.450 Instructions
Instruction Single precision, unless decorated with RelaxedPrecision Half precision

fma()

Inherited from OpFMul followed by OpFAdd.

exp(x), exp2(x)

ULP.

ULP.

log(), log2()

3 ULP outside the range . Absolute error < inside the range .

3 ULP outside the range . Absolute error < inside the range .

pow(x, y)

Inherited from exp2(y × log2(x)).

sqrt()

Inherited from 1.0 / inversesqrt().

inversesqrt()

2 ULP.

radians(x)

Inherited from , where is a correctly rounded approximation to .

degrees(x)

Inherited from , where is a correctly rounded approximation to .

sin()

Absolute error inside the range .

Absolute error inside the range .

cos()

Absolute error inside the range .

Absolute error inside the range .

tan()

Inherited from .

asin(x)

Inherited from .

acos(x)

Inherited from .

atan(), atan2()

4096 ULP

5 ULP.

sinh(x)

Inherited from .

cosh(x)

Inherited from .

tanh()

Inherited from .

asinh(x)

Inherited from .

acosh(x)

Inherited from .

atanh(x)

Inherited from .

frexp()

Correct result.

ldexp()

Correctly rounded.

length(x)

Inherited from .

distance(x, y)

Inherited from .

cross()

Inherited from OpFSub(OpFMul, OpFMul).

normalize(x)

Inherited from .

faceforward(N, I, NRef)

Inherited from dot(NRef, I) < 0.0 ? N : -N.

reflect(x, y)

Inherited from x - 2.0 × dot(y, x) × y.

refract(I, N, eta)

Inherited from k < 0.0 ? 0.0 : eta × I - (eta × dot(N, I) + sqrt(k)) × N, where k = 1 - eta × eta × (1.0 - dot(N, I) × dot(N, I)).

round

Correctly rounded.

roundEven

Correctly rounded.

trunc

Correctly rounded.

fabs

Correct result.

fsign

Correct result.

floor

Correctly rounded.

ceil

Correctly rounded.

fract

Correctly rounded.

modf

Correctly rounded.

fmin

Correct result.

fmax

Correct result.

fclamp

Correct result.

fmix(x, y, a)

Inherited from .

step

Correctly rounded.

smoothStep(edge0, edge1, x)

Inherited from , where .

nmin

Correct result.

nmax

Correct result.

nclamp

Correct result.

packHalf2x16

Correctly rounded with implementation defined rounding mode.

GLSL.std.450 extended instructions specifically defined in terms of the above instructions inherit the above errors. GLSL.std.450 extended instructions not listed above and not defined in terms of the above have undefined precision.

For the OpSRem and OpSMod instructions, if either operand is negative the result is undefined.

While the OpSRem and OpSMod instructions are supported by the Vulkan environment, they require non-negative values and thus do not enable additional functionality beyond what OpUMod provides.

OpCooperativeMatrixMulAddNV performs its operations in an implementation-dependent order and internal precision.

OpCooperativeMatrixMulAddKHR performs its operations in an implementation-dependent order and internal precision.

Signedness of SPIR-V Image Accesses

SPIR-V associates a signedness with all integer image accesses. This is required in certain parts of the SPIR-V and the Vulkan image access pipeline to ensure defined results. The signedness is determined from a combination of the access instruction’s Image Operands and the underlying image’s Sampled Type as follows:

  1. If the instruction’s Image Operands contains the SignExtend operand then the access is signed.

  2. If the instruction’s Image Operands contains the ZeroExtend operand then the access is unsigned.

  3. Otherwise, the image accesses signedness matches that of the Sampled Type of the OpTypeImage being accessed.

Image Format and Type Matching

When specifying the Image Format of an OpTypeImage, the converted bit width and type, as shown in the table below, must match the Sampled Type. The signedness must match the signedness of any access to the image.

Formatted accesses are always converted from a shader readable type to the resource’s format or vice versa via Format Conversion for reads and Texel Output Format Conversion for writes. As such, the bit width and format below do not necessarily match 1:1 with what might be expected for some formats.

For a given Image Format, the Sampled Type must be the type described in the Type column of the below table, with its Literal Width set to that in the Bit Width column. Every access that is made to the image must have a signedness equal to that in the Signedness column (where applicable).

Image Format Type-Declaration instructions Bit Width Signedness

Unknown

Any

Any

Any

Rgba32f

OpTypeFloat

32

N/A

Rg32f

R32f

Rgba16f

Rg16f

R16f

Rgba16

Rg16

R16

Rgba16Snorm

Rg16Snorm

R16Snorm

Rgb10A2

R11fG11fB10f

Rgba8

Rg8

R8

Rgba8Snorm

Rg8Snorm

R8Snorm

Rgba32i

OpTypeInt

32

1

Rg32i

R32i

Rgba16i

Rg16i

R16i

Rgba8i

Rg8i

R8i

Rgba32ui

0

Rg32ui

R32ui

Rgba16ui

Rg16ui

R16ui

Rgb10a2ui

Rgba8ui

Rg8ui

R8ui

R64i

OpTypeInt

64

1

R64ui

0

The SPIR-V Type is defined by an instruction in SPIR-V, declared with the Type-Declaration Instruction, Bit Width, and Signedness from above.

Compatibility Between SPIR-V Image Dimensions and Vulkan ImageView Types

SPIR-V Image Dim values are compatible with VkImageView viewType values as defined below:

Table 5. SPIR-V and Vulkan ImageView Dimension Compatibility
SPIR-V Image Dim Compatible Vulkan ImageView viewTypes

1D

VK_IMAGE_VIEW_TYPE_1D, VK_IMAGE_VIEW_TYPE_1D_ARRAY

2D

VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_VIEW_TYPE_2D_ARRAY

3D

VK_IMAGE_VIEW_TYPE_3D

Cube

VK_IMAGE_VIEW_TYPE_CUBE, VK_IMAGE_VIEW_TYPE_CUBE_ARRAY

Compatibility Between SPIR-V Image Formats and Vulkan Formats

SPIR-V Image Format values are compatible with VkFormat values as defined below:

Table 6. SPIR-V and Vulkan Image Format Compatibility
SPIR-V Image Format Compatible Vulkan Format

Unknown

Any

R8

VK_FORMAT_R8_UNORM

R8Snorm

VK_FORMAT_R8_SNORM

R8ui

VK_FORMAT_R8_UINT

R8i

VK_FORMAT_R8_SINT

Rg8

VK_FORMAT_R8G8_UNORM

Rg8Snorm

VK_FORMAT_R8G8_SNORM

Rg8ui

VK_FORMAT_R8G8_UINT

Rg8i

VK_FORMAT_R8G8_SINT

Rgba8

VK_FORMAT_R8G8B8A8_UNORM

Rgba8Snorm

VK_FORMAT_R8G8B8A8_SNORM

Rgba8ui

VK_FORMAT_R8G8B8A8_UINT

Rgba8i

VK_FORMAT_R8G8B8A8_SINT

Rgb10A2

VK_FORMAT_A2B10G10R10_UNORM_PACK32

Rgb10a2ui

VK_FORMAT_A2B10G10R10_UINT_PACK32

R16

VK_FORMAT_R16_UNORM

R16Snorm

VK_FORMAT_R16_SNORM

R16ui

VK_FORMAT_R16_UINT

R16i

VK_FORMAT_R16_SINT

R16f

VK_FORMAT_R16_SFLOAT

Rg16

VK_FORMAT_R16G16_UNORM

Rg16Snorm

VK_FORMAT_R16G16_SNORM

Rg16ui

VK_FORMAT_R16G16_UINT

Rg16i

VK_FORMAT_R16G16_SINT

Rg16f

VK_FORMAT_R16G16_SFLOAT

Rgba16

VK_FORMAT_R16G16B16A16_UNORM

Rgba16Snorm

VK_FORMAT_R16G16B16A16_SNORM

Rgba16ui

VK_FORMAT_R16G16B16A16_UINT

Rgba16i

VK_FORMAT_R16G16B16A16_SINT

Rgba16f

VK_FORMAT_R16G16B16A16_SFLOAT

R32ui

VK_FORMAT_R32_UINT

R32i

VK_FORMAT_R32_SINT

R32f

VK_FORMAT_R32_SFLOAT

Rg32ui

VK_FORMAT_R32G32_UINT

Rg32i

VK_FORMAT_R32G32_SINT

Rg32f

VK_FORMAT_R32G32_SFLOAT

Rgba32ui

VK_FORMAT_R32G32B32A32_UINT

Rgba32i

VK_FORMAT_R32G32B32A32_SINT

Rgba32f

VK_FORMAT_R32G32B32A32_SFLOAT

R64ui

VK_FORMAT_R64_UINT

R64i

VK_FORMAT_R64_SINT

R11fG11fB10f

VK_FORMAT_B10G11R11_UFLOAT_PACK32

Ray Query Precision and Operation

The values returned by OpRayQueryGetIntersectionTriangleVertexPositionsKHR are transformed by the geometry transform, which is performed at standard floating-point precision, but without a specifically defined order of floating-point operations to perform the matrix multiplication.