Description

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 vulkanMemoryModel is enabled and vulkanMemoryModelDeviceScope is not enabled, Device memory scope must not be used

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

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

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

  • VUID-RuntimeSpirv-OpTypeImage-06269
    If shaderStorageImageWriteWithoutFormat 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-OpTypeImage-06270
    If shaderStorageImageReadWithoutFormat 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 https://registry.khronos.org/vulkansc/specs/1.0-extensions/html/vkspec.html#interfaces-iointerfaces-limits

  • 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-NonUniform-06274
    If an instruction loads from or stores to a resource (including atomics and image instructions) and the resource descriptor being accessed is not dynamically uniform, 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-06280
    shaderBufferFloat32Atomics, or shaderBufferFloat32AtomicAdd, or shaderBufferFloat64Atomics, or shaderBufferFloat64AtomicAdd must be enabled for floating-point atomic operations to be supported on a Pointer with a Storage Class of StorageBuffer

  • VUID-RuntimeSpirv-None-06281
    shaderSharedFloat32Atomics, or shaderSharedFloat32AtomicAdd, or shaderSharedFloat64Atomics, or shaderSharedFloat64AtomicAdd must be enabled for floating-point atomic operations to be supported on a Pointer with a Storage Class of Workgroup

  • VUID-RuntimeSpirv-None-06282
    shaderImageFloat32Atomics or shaderImageFloat32AtomicAdd 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-06283
    sparseImageFloat32Atomics or sparseImageFloat32AtomicAdd 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-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-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-None-06335
    shaderBufferFloat32Atomics, or shaderBufferFloat32AtomicAdd, or shaderSharedFloat32Atomics, or shaderSharedFloat32AtomicAdd, or shaderImageFloat32Atomics, or shaderImageFloat32AtomicAdd must be enabled for 32-bit floating point atomic operations

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

  • VUID-RuntimeSpirv-NonWritable-06340
    If fragmentStoresAndAtomics 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 vertexPipelineStoresAndAtomics 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-OpAtomic-05091
    If shaderAtomicInstructions is not enabled, the SPIR-V Atomic Instructions listed in 3.37.18 (OpAtomic*) must not be used https://registry.khronos.org/vulkansc/specs/1.0-extensions/html/vkspec.html#SCID-1

  • 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 / 2subPixelInterpolationOffsetBits^

  • 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 / 2subPixelInterpolationOffsetBits^.

  • 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-06433
    The Execution Mode LocalSizeId must not be used

  • VUID-RuntimeSpirv-OpTypeVector-06816
    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-OpVariable-06373
    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-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-MeshEXT-09218
    In mesh shaders using the MeshEXT or MeshNV Execution Model and the OutputPoints Execution Mode, if the number of output points is greater than 0, a PointSize decorated variable must be written to for each output point

See Also

No cross-references are available

Document Notes

For more information, see the Vulkan Specification

This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.

Copyright 2014-2023 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0