There are a variety of implementation-dependent limits.
The VkPhysicalDeviceLimits
are properties of the physical device.
These are available in the limits
member of the
VkPhysicalDeviceProperties
structure which is returned from
vkGetPhysicalDeviceProperties
.
The VkPhysicalDeviceLimits
structure is defined as:
typedef struct VkPhysicalDeviceLimits { uint32_t maxImageDimension1D; uint32_t maxImageDimension2D; uint32_t maxImageDimension3D; uint32_t maxImageDimensionCube; uint32_t maxImageArrayLayers; uint32_t maxTexelBufferElements; uint32_t maxUniformBufferRange; uint32_t maxStorageBufferRange; uint32_t maxPushConstantsSize; uint32_t maxMemoryAllocationCount; uint32_t maxSamplerAllocationCount; VkDeviceSize bufferImageGranularity; VkDeviceSize sparseAddressSpaceSize; uint32_t maxBoundDescriptorSets; uint32_t maxPerStageDescriptorSamplers; uint32_t maxPerStageDescriptorUniformBuffers; uint32_t maxPerStageDescriptorStorageBuffers; uint32_t maxPerStageDescriptorSampledImages; uint32_t maxPerStageDescriptorStorageImages; uint32_t maxPerStageDescriptorInputAttachments; uint32_t maxPerStageResources; uint32_t maxDescriptorSetSamplers; uint32_t maxDescriptorSetUniformBuffers; uint32_t maxDescriptorSetUniformBuffersDynamic; uint32_t maxDescriptorSetStorageBuffers; uint32_t maxDescriptorSetStorageBuffersDynamic; uint32_t maxDescriptorSetSampledImages; uint32_t maxDescriptorSetStorageImages; uint32_t maxDescriptorSetInputAttachments; uint32_t maxVertexInputAttributes; uint32_t maxVertexInputBindings; uint32_t maxVertexInputAttributeOffset; uint32_t maxVertexInputBindingStride; uint32_t maxVertexOutputComponents; uint32_t maxTessellationGenerationLevel; uint32_t maxTessellationPatchSize; uint32_t maxTessellationControlPerVertexInputComponents; uint32_t maxTessellationControlPerVertexOutputComponents; uint32_t maxTessellationControlPerPatchOutputComponents; uint32_t maxTessellationControlTotalOutputComponents; uint32_t maxTessellationEvaluationInputComponents; uint32_t maxTessellationEvaluationOutputComponents; uint32_t maxGeometryShaderInvocations; uint32_t maxGeometryInputComponents; uint32_t maxGeometryOutputComponents; uint32_t maxGeometryOutputVertices; uint32_t maxGeometryTotalOutputComponents; uint32_t maxFragmentInputComponents; uint32_t maxFragmentOutputAttachments; uint32_t maxFragmentDualSrcAttachments; uint32_t maxFragmentCombinedOutputResources; uint32_t maxComputeSharedMemorySize; uint32_t maxComputeWorkGroupCount[3]; uint32_t maxComputeWorkGroupInvocations; uint32_t maxComputeWorkGroupSize[3]; uint32_t subPixelPrecisionBits; uint32_t subTexelPrecisionBits; uint32_t mipmapPrecisionBits; uint32_t maxDrawIndexedIndexValue; uint32_t maxDrawIndirectCount; float maxSamplerLodBias; float maxSamplerAnisotropy; uint32_t maxViewports; uint32_t maxViewportDimensions[2]; float viewportBoundsRange[2]; uint32_t viewportSubPixelBits; size_t minMemoryMapAlignment; VkDeviceSize minTexelBufferOffsetAlignment; VkDeviceSize minUniformBufferOffsetAlignment; VkDeviceSize minStorageBufferOffsetAlignment; int32_t minTexelOffset; uint32_t maxTexelOffset; int32_t minTexelGatherOffset; uint32_t maxTexelGatherOffset; float minInterpolationOffset; float maxInterpolationOffset; uint32_t subPixelInterpolationOffsetBits; uint32_t maxFramebufferWidth; uint32_t maxFramebufferHeight; uint32_t maxFramebufferLayers; VkSampleCountFlags framebufferColorSampleCounts; VkSampleCountFlags framebufferDepthSampleCounts; VkSampleCountFlags framebufferStencilSampleCounts; VkSampleCountFlags framebufferNoAttachmentsSampleCounts; uint32_t maxColorAttachments; VkSampleCountFlags sampledImageColorSampleCounts; VkSampleCountFlags sampledImageIntegerSampleCounts; VkSampleCountFlags sampledImageDepthSampleCounts; VkSampleCountFlags sampledImageStencilSampleCounts; VkSampleCountFlags storageImageSampleCounts; uint32_t maxSampleMaskWords; VkBool32 timestampComputeAndGraphics; float timestampPeriod; uint32_t maxClipDistances; uint32_t maxCullDistances; uint32_t maxCombinedClipAndCullDistances; uint32_t discreteQueuePriorities; float pointSizeRange[2]; float lineWidthRange[2]; float pointSizeGranularity; float lineWidthGranularity; VkBool32 strictLines; VkBool32 standardSampleLocations; VkDeviceSize optimalBufferCopyOffsetAlignment; VkDeviceSize optimalBufferCopyRowPitchAlignment; VkDeviceSize nonCoherentAtomSize; } VkPhysicalDeviceLimits;
maxImageDimension1D
is the
maximum dimension (width
) of an image created with an
imageType
of VK_IMAGE_TYPE_1D
.
maxImageDimension2D
is the
maximum dimension (width
or height
) of an image created with
an imageType
of VK_IMAGE_TYPE_2D
and without
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
set in flags
.
maxImageDimension3D
is the
maximum dimension (width
, height
, or depth
) of an
image created with an imageType
of VK_IMAGE_TYPE_3D
.
maxImageDimensionCube
is
the maximum dimension (width
or height
) of an image created
with an imageType
of VK_IMAGE_TYPE_2D
and with
VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT
set in flags
.
maxImageArrayLayers
is the
maximum number of layers (arrayLayers
) for an image.
maxTexelBufferElements
is the maximum number of addressable texels for a buffer view created on
a buffer which was created with the
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
or
VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
set in the usage
member of the VkBufferCreateInfo
structure.
maxUniformBufferRange
is
the maximum value that can be specified in the range
member of
any VkDescriptorBufferInfo
structures passed to a call to
vkUpdateDescriptorSets
for descriptors of type
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
or
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
.
maxStorageBufferRange
is
the maximum value that can be specified in the range
member of
any VkDescriptorBufferInfo
structures passed to a call to
vkUpdateDescriptorSets
for descriptors of type
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
or
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
.
maxPushConstantsSize
is
the maximum size, in bytes, of the pool of push constant memory.
For each of the push constant ranges indicated by the
pPushConstantRanges
member of the VkPipelineLayoutCreateInfo
structure, offset
+ size
must be less than or equal to this
limit.
maxMemoryAllocationCount
is the maximum number of device memory
allocations, as created by vkAllocateMemory
, which can
simultaneously exist.
maxSamplerAllocationCount
is the maximum number of sampler
objects, as created by vkCreateSampler
, which can simultaneously
exist on a device.
bufferImageGranularity
is the granularity, in bytes, at which buffer or linear image resources,
and optimal image resources can be bound to adjacent offsets in the
same VkDeviceMemory
object without aliasing.
See Buffer-Image Granularity for
more details.
sparseAddressSpaceSize
is the total amount of address space available, in bytes, for sparse
memory resources.
This is an upper bound on the sum of the size of all sparse resources,
regardless of whether any memory is bound to them.
maxBoundDescriptorSets
is the maximum number of descriptor sets that can be simultaneously
used by a pipeline.
All DescriptorSet
decorations in shader modules must have a value
less than maxBoundDescriptorSets
.
See Section 13.2, “Descriptor Sets”.
maxPerStageDescriptorSamplers
is the maximum number of samplers
that can be accessible to a single shader stage in a pipeline layout.
Descriptors with a type of VK_DESCRIPTOR_TYPE_SAMPLER
or
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
count against this
limit.
A descriptor is accessible to a shader stage when the stageFlags
member of the VkDescriptorSetLayoutBinding
structure has the bit
for that shader stage set.
See Section 13.1.2, “Sampler” and
Section 13.1.4, “Combined Image Sampler”.
maxPerStageDescriptorUniformBuffers
is the maximum number of
uniform buffers that can be accessible to a single shader stage in a
pipeline layout.
Descriptors with a type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
or
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
count against this
limit.
A descriptor is accessible to a shader stage when the stageFlags
member of the VkDescriptorSetLayoutBinding
structure has the bit
for that shader stage set.
See Section 13.1.7, “Uniform Buffer” and
Section 13.1.9, “Dynamic Uniform Buffer”.
maxPerStageDescriptorStorageBuffers
is the maximum number of
storage buffers that can be accessible to a single shader stage in a
pipeline layout.
Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
or
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
count against this
limit.
A descriptor is accessible to a pipeline shader stage when the
stageFlags
member of the VkDescriptorSetLayoutBinding
structure has the bit for that shader stage set.
See Section 13.1.8, “Storage Buffer” and
Section 13.1.10, “Dynamic Storage Buffer”.
maxPerStageDescriptorSampledImages
is the maximum number of
sampled images that can be accessible to a single shader stage in a
pipeline layout.
Descriptors with a type of
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
, or
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
count against this limit.
A descriptor is accessible to a pipeline shader stage when the
stageFlags
member of the VkDescriptorSetLayoutBinding
structure has the bit for that shader stage set.
See Section 13.1.4, “Combined Image Sampler”,
Section 13.1.3, “Sampled Image”, and
Section 13.1.5, “Uniform Texel Buffer”.
maxPerStageDescriptorStorageImages
is the maximum number of
storage images that can be accessible to a single shader stage in a
pipeline layout.
Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
, or
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
count against this limit.
A descriptor is accessible to a pipeline shader stage when the
stageFlags
member of the VkDescriptorSetLayoutBinding
structure has the bit for that shader stage set.
See Section 13.1.1, “Storage Image”, and
Section 13.1.6, “Storage Texel Buffer”.
maxPerStageDescriptorInputAttachments
is the maximum number of
input attachments that can be accessible to a single shader stage in a
pipeline layout.
Descriptors with a type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
count against this limit.
A descriptor is accessible to a pipeline shader stage when the
stageFlags
member of the VkDescriptorSetLayoutBinding
structure has the bit for that shader stage set.
These are only supported for the fragment stage.
See Section 13.1.11, “Input Attachment”.
maxPerStageResources
is
the maximum number of resources that can be accessible to a single
shader stage in a pipeline layout.
Descriptors with a type of
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
,
VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
,
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
,
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
,
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
,
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
,
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
,
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
, or
VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
count against this limit.
For the fragment shader stage the framebuffer color attachments also
count against this limit.
maxDescriptorSetSamplers
is the maximum number of samplers that
can be included in descriptor bindings in a pipeline layout across all
pipeline shader stages and descriptor set numbers.
Descriptors with a type of VK_DESCRIPTOR_TYPE_SAMPLER
or
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
count against this
limit.
See Section 13.1.2, “Sampler” and
Section 13.1.4, “Combined Image Sampler”.
maxDescriptorSetUniformBuffers
is the maximum number of uniform
buffers that can be included in descriptor bindings in a pipeline
layout across all pipeline shader stages and descriptor set numbers.
Descriptors with a type of VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
or
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
count against this
limit.
See Section 13.1.7, “Uniform Buffer” and
Section 13.1.9, “Dynamic Uniform Buffer”.
maxDescriptorSetUniformBuffersDynamic
is the maximum number of
dynamic uniform buffers that can be included in descriptor bindings in
a pipeline layout across all pipeline shader stages and descriptor set
numbers.
Descriptors with a type of
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
count against this
limit.
See Section 13.1.9, “Dynamic Uniform Buffer”.
maxDescriptorSetStorageBuffers
is the maximum number of storage
buffers that can be included in descriptor bindings in a pipeline
layout across all pipeline shader stages and descriptor set numbers.
Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
or
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
count against this
limit.
See Section 13.1.8, “Storage Buffer” and
Section 13.1.10, “Dynamic Storage Buffer”.
maxDescriptorSetStorageBuffersDynamic
is the maximum number of
dynamic storage buffers that can be included in descriptor bindings in
a pipeline layout across all pipeline shader stages and descriptor set
numbers.
Descriptors with a type of
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
count against this
limit.
See Section 13.1.10, “Dynamic Storage Buffer”.
maxDescriptorSetSampledImages
is the maximum number of sampled
images that can be included in descriptor bindings in a pipeline layout
across all pipeline shader stages and descriptor set numbers.
Descriptors with a type of
VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER
,
VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE
, or
VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER
count against this limit.
See Section 13.1.4, “Combined Image Sampler”,
Section 13.1.3, “Sampled Image”, and
Section 13.1.5, “Uniform Texel Buffer”.
maxDescriptorSetStorageImages
is the maximum number of storage
images that can be included in descriptor bindings in a pipeline layout
across all pipeline shader stages and descriptor set numbers.
Descriptors with a type of VK_DESCRIPTOR_TYPE_STORAGE_IMAGE
, or
VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER
count against this limit.
See Section 13.1.1, “Storage Image”, and
Section 13.1.6, “Storage Texel Buffer”.
maxDescriptorSetInputAttachments
is the maximum number of input
attachments that can be included in descriptor bindings in a pipeline
layout across all pipeline shader stages and descriptor set numbers.
Descriptors with a type of VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT
count against this limit.
See Section 13.1.11, “Input Attachment”.
maxVertexInputAttributes
is the maximum number of vertex input
attributes that can be specified for a graphics pipeline.
These are described in the array of
VkVertexInputAttributeDescription
structures that are provided at
graphics pipeline creation time via the
pVertexAttributeDescriptions
member of the
VkPipelineVertexInputStateCreateInfo
structure.
See Section 20.1, “Vertex Attributes” and Section 20.2, “Vertex Input Description”.
maxVertexInputBindings
is the maximum number of vertex buffers that can be specified for
providing vertex attributes to a graphics pipeline.
These are described in the array of
VkVertexInputBindingDescription
structures that are provided at
graphics pipeline creation time via the pVertexBindingDescriptions
member of the VkPipelineVertexInputStateCreateInfo
structure.
The binding
member of VkVertexInputBindingDescription
must
be less than this limit.
See Section 20.2, “Vertex Input Description”.
maxVertexInputAttributeOffset
is the maximum vertex input
attribute offset that can be added to the vertex input binding stride.
The offset
member of the VkVertexInputAttributeDescription
structure must be less than or equal to this limit.
See Section 20.2, “Vertex Input Description”.
maxVertexInputBindingStride
is the maximum vertex input binding
stride that can be specified in a vertex input binding.
The stride
member of the VkVertexInputBindingDescription
structure must be less than or equal to this limit.
See Section 20.2, “Vertex Input Description”.
maxVertexOutputComponents
is the maximum number of components of
output variables which can be output by a vertex shader.
See Section 8.5, “Vertex Shaders”.
maxTessellationGenerationLevel
is the maximum tessellation
generation level supported by the fixed-function tessellation primitive
generator.
See Chapter 21, Tessellation.
maxTessellationPatchSize
is the maximum patch size, in vertices,
of patches that can be processed by the tessellation control shader and
tessellation primitive generator.
The patchControlPoints
member of the
VkPipelineTessellationStateCreateInfo
structure specified at
pipeline creation time and the value provided in the OutputVertices
execution mode of shader modules must be less than or equal to this
limit.
See Chapter 21, Tessellation.
maxTessellationControlPerVertexInputComponents
is the maximum
number of components of input variables which can be provided as
per-vertex inputs to the tessellation control shader stage.
maxTessellationControlPerVertexOutputComponents
is the maximum
number of components of per-vertex output variables which can be output
from the tessellation control shader stage.
maxTessellationControlPerPatchOutputComponents
is the maximum
number of components of per-patch output variables which can be output
from the tessellation control shader stage.
maxTessellationControlTotalOutputComponents
is the maximum total
number of components of per-vertex and per-patch output variables which
can be output from the tessellation control shader stage.
maxTessellationEvaluationInputComponents
is the maximum number of
components of input variables which can be provided as per-vertex
inputs to the tessellation evaluation shader stage.
maxTessellationEvaluationOutputComponents
is the maximum number of
components of per-vertex output variables which can be output from the
tessellation evaluation shader stage.
maxGeometryShaderInvocations
is the maximum invocation count
supported for instanced geometry shaders.
The value provided in the Invocations
execution mode of shader
modules must be less than or equal to this limit.
See Chapter 22, Geometry Shading.
maxGeometryInputComponents
is the maximum number of components of
input variables which can be provided as inputs to the geometry shader
stage.
maxGeometryOutputComponents
is the maximum number of components of
output variables which can be output from the geometry shader stage.
maxGeometryOutputVertices
is the maximum number of vertices which
can be emitted by any geometry shader.
maxGeometryTotalOutputComponents
is the maximum total number of
components of output, across all emitted vertices, which can be output
from the geometry shader stage.
maxFragmentInputComponents
is the maximum number of components of
input variables which can be provided as inputs to the fragment shader
stage.
maxFragmentOutputAttachments
is the maximum number of output
attachments which can be written to by the fragment shader stage.
maxFragmentDualSrcAttachments
is the maximum number of output
attachments which can be written to by the fragment shader stage when
blending is enabled and one of the dual source blend modes is in use.
See Section 26.1.2, “Dual-Source Blending” and
dualSrcBlend.
maxFragmentCombinedOutputResources
is the total number of storage
buffers, storage images, and output buffers which can be used in the
fragment shader stage.
maxComputeSharedMemorySize
is the maximum total storage size, in
bytes, of all variables declared with the WorkgroupLocal
storage
class in shader modules (or with the shared
storage qualifier in
GLSL) in the compute shader stage.
maxComputeWorkGroupCount
[3] is the maximum number of local
workgroups that can be dispatched by a single dispatch command.
These three values represent the maximum number of local workgroups for
the X, Y, and Z dimensions, respectively.
The x
, y
, and z
parameters to the vkCmdDispatch
command, or members of the VkDispatchIndirectCommand
structure
must be less than or equal to the corresponding limit.
See Chapter 27, Dispatching Commands.
maxComputeWorkGroupInvocations
is the maximum total number of
compute shader invocations in a single local workgroup.
The product of the X, Y, and Z sizes as specified by the LocalSize
execution mode in shader modules and by the object decorated by the
WorkgroupSize
decoration must be less than or equal to this limit.
maxComputeWorkGroupSize
[3] is the maximum size of a local compute
workgroup, per dimension.
These three values represent the maximum local workgroup size in the X,
Y, and Z dimensions, respectively.
The x
, y
, and z
sizes specified by the LocalSize
execution mode and by the object decorated by the WorkgroupSize
decoration in shader modules must be less than or equal to the
corresponding limit.
subPixelPrecisionBits
is
the number of bits of subpixel precision in framebuffer coordinates
xf and yf.
See Chapter 24, Rasterization.
subTexelPrecisionBits
is
the number of bits of precision in the division along an axis of an
image used for minification and magnification filters.
2subTexelPrecisionBits
is the actual number of divisions
along each axis of the image represented.
The filtering hardware will snap to these locations when computing the
filtered results.
mipmapPrecisionBits
is the
number of bits of division that the LOD calculation for mipmap fetching
get snapped to when determining the contribution from each mip level to
the mip filtered results.
2mipmapPrecisionBits
is the actual number of divisions.
![]() | Note |
---|---|
For example, if this value is 2 bits then when linearly filtering between two levels, each level could: contribute: 0%, 33%, 66%, or 100% (this is just an example and the amount of contribution should be covered by different equations in the spec). |
maxDrawIndexedIndexValue
is the maximum index value that can be
used for indexed draw calls when using 32-bit indices.
This excludes the primitive restart index value of 0xFFFFFFFF.
See fullDrawIndexUint32.
maxDrawIndirectCount
is
the maximum draw count that is supported for indirect draw calls.
See multiDrawIndirect.
maxSamplerLodBias
is the
maximum absolute sampler level of detail bias.
The sum of the mipLodBias
member of the VkSamplerCreateInfo
structure and the Bias
operand of image sampling operations in
shader modules (or 0 if no Bias
operand is provided to an image
sampling operation) are clamped to the range
[-maxSamplerLodBias
,+maxSamplerLodBias
].
See [samplers-mipLodBias].
maxSamplerAnisotropy
is
the maximum degree of sampler anisotropy.
The maximum degree of anisotropic filtering used for an image sampling
operation is the minimum of the maxAnisotropy
member of the
VkSamplerCreateInfo
structure and this limit.
See [samplers-maxAnisotropy].
maxViewports
is the maximum
number of active viewports.
The viewportCount
member of the
VkPipelineViewportStateCreateInfo
structure that is provided at
pipeline creation must be less than or equal to this limit.
maxViewportDimensions
[2]
are the maximum viewport dimensions in the X (width) and Y (height)
dimensions, respectively.
The maximum viewport dimensions must be greater than or equal to the
largest image which can be created and used as a framebuffer
attachment.
See Controlling the Viewport.
viewportBoundsRange
[2] is
the [minimum, maximum] range that the corners of a viewport must
be contained in.
This range must be at least
[-2 × size
, 2 × size
- 1], where
size
= max(maxViewportDimensions
[0],
maxViewportDimensions[1]) See Controlling the Viewport.
![]() | Note |
---|---|
The intent of the |
viewportSubPixelBits
is
the number of bits of subpixel precision for viewport bounds.
The subpixel precision that floating-point viewport bounds are
interpreted at is given by this limit.
minMemoryMapAlignment
is
the minimum required alignment, in bytes, of host visible memory
allocations within the host address space.
When mapping a memory allocation with vkMapMemory
, subtracting
offset
bytes from the returned pointer will always produce an
integer multiple of this limit.
See Section 10.2.1, “Host Access to Device Memory Objects”.
minTexelBufferOffsetAlignment
is the minimum required alignment,
in bytes, for the offset
member of the
VkBufferViewCreateInfo
structure for texel buffers.
When a buffer view is created for a buffer which was created with
VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT
or
VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT
set in the usage
member of the VkBufferCreateInfo
structure, the offset
must
be an integer multiple of this limit.
minUniformBufferOffsetAlignment
is the minimum required
alignment, in bytes, for the offset
member of the
VkDescriptorBufferInfo
structure for uniform buffers.
When a descriptor of type VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER
or
VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC
is updated, the
offset
must be an integer multiple of this limit.
Similarly, dynamic offsets for uniform buffers must be multiples of
this limit.
minStorageBufferOffsetAlignment
is the minimum required
alignment, in bytes, for the offset
member of the
VkDescriptorBufferInfo
structure for storage buffers.
When a descriptor of type VK_DESCRIPTOR_TYPE_STORAGE_BUFFER
or
VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC
is updated, the
offset
must be an integer multiple of this limit.
Similarly, dynamic offsets for storage buffers must be multiples of
this limit.
minTexelOffset
is the minimum
offset value for the ConstOffset
image operand of any of the
OpImageSample
* or OpImageFetch
* image instructions.
maxTexelOffset
is the maximum
offset value for the ConstOffset
image operand of any of the
OpImageSample
* or OpImageFetch
* image instructions.
minTexelGatherOffset
is
the minimum offset value for the Offset
or ConstOffsets
image
operands of any of the OpImage
*Gather
image instructions.
maxTexelGatherOffset
is
the maximum offset value for the Offset
or ConstOffsets
image
operands of any of the OpImage
*Gather
image instructions.
minInterpolationOffset
is the minimum negative offset value for the offset
operand of the
InterpolateAtOffset
extended instruction.
maxInterpolationOffset
is the maximum positive offset value for the offset
operand of the
InterpolateAtOffset
extended instruction.
subPixelInterpolationOffsetBits
is the number of subpixel
fractional bits that the x
and y
offsets to the
InterpolateAtOffset
extended instruction may be rounded to as
fixed-point values.
maxFramebufferWidth
is the
maximum width for a framebuffer.
The width
member of the VkFramebufferCreateInfo
structure
must be less than or equal to this limit.
maxFramebufferHeight
is
the maximum height for a framebuffer.
The height
member of the VkFramebufferCreateInfo
structure
must be less than or equal to this limit.
maxFramebufferLayers
is
the maximum layer count for a layered framebuffer.
The layers
member of the VkFramebufferCreateInfo
structure
must be less than or equal to this limit.
framebufferColorSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the color sample counts that
are supported for all framebuffer color attachments.
framebufferDepthSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the supported depth sample
counts for all framebuffer depth/stencil attachments, when the format
includes a depth component.
framebufferStencilSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the supported stencil sample
counts for all framebuffer depth/stencil attachments, when the format
includes a stencil component.
framebufferNoAttachmentsSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the supported sample counts
for a framebuffer with no attachments.
maxColorAttachments
is the
maximum number of color attachments that can be used by a subpass in a
render pass.
The colorAttachmentCount
member of the VkSubpassDescription
structure must be less than or equal to this limit.
sampledImageColorSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the sample counts supported
for all 2D images created with VK_IMAGE_TILING_OPTIMAL
,
usage
containing VK_IMAGE_USAGE_SAMPLED_BIT
, and a
non-integer color format.
sampledImageIntegerSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the sample counts supported
for all 2D images created with VK_IMAGE_TILING_OPTIMAL
,
usage
containing VK_IMAGE_USAGE_SAMPLED_BIT
, and an integer
color format.
sampledImageDepthSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the sample counts supported
for all 2D images created with VK_IMAGE_TILING_OPTIMAL
,
usage
containing VK_IMAGE_USAGE_SAMPLED_BIT
, and a depth
format.
sampledImageStencilSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the sample supported for all
2D images created with VK_IMAGE_TILING_OPTIMAL
, usage
containing VK_IMAGE_USAGE_SAMPLED_BIT
, and a stencil format.
storageImageSampleCounts
is a bitmask1 of
VkSampleCountFlagBits
bits indicating the sample counts supported
for all 2D images created with VK_IMAGE_TILING_OPTIMAL
, and
usage
containing VK_IMAGE_USAGE_STORAGE_BIT
.
maxSampleMaskWords
is the
maximum number of array elements of a variable decorated with the
SampleMask
built-in decoration.
timestampComputeAndGraphics
indicates support for timestamps on
all graphics and compute queues.
If this limit is set to VK_TRUE
, all queues that advertise the
VK_QUEUE_GRAPHICS_BIT
or VK_QUEUE_COMPUTE_BIT
in the
VkQueueFamilyProperties
::queueFlags
support
VkQueueFamilyProperties
::timestampValidBits
of at least 36.
See Timestamp Queries.
timestampPeriod
is the number
of nanoseconds required for a timestamp query to be incremented by 1.
See Timestamp Queries.
maxClipDistances
is the
maximum number of clip distances that can be used in a single shader
stage.
The size of any array declared with the ClipDistance
built-in
decoration in a shader module must be less than or equal to this limit.
maxCullDistances
is the
maximum number of cull distances that can be used in a single shader
stage.
The size of any array declared with the CullDistance
built-in
decoration in a shader module must be less than or equal to this limit.
maxCombinedClipAndCullDistances
is the maximum combined number of
clip and cull distances that can be used in a single shader stage.
The sum of the sizes of any pair of arrays declared with the
ClipDistance
and CullDistance
built-in decoration used by a
single shader stage in a shader module must be less than or equal to
this limit.
discreteQueuePriorities
is the number of discrete priorities that
can be assigned to a queue based on the value of each member of
VkDeviceQueueCreateInfo
::pQueuePriorities
.
This must be at least 2, and levels must be spread evenly over the
range, with at least one level at 1.0, and another at 0.0.
See Section 4.3.4, “Queue Priority”.
pointSizeRange
[2] is the range
[minimum
,maximum
] of supported sizes for points.
Values written to variables decorated with the PointSize
built-in
decoration are clamped to this range.
lineWidthRange
[2] is the range
[minimum
,maximum
] of supported widths for lines.
Values specified by the lineWidth
member of the
VkPipelineRasterizationStateCreateInfo
or the lineWidth
parameter to vkCmdSetLineWidth
are clamped to this range.
pointSizeGranularity
is
the granularity of supported point sizes.
Not all point sizes in the range defined by pointSizeRange
are
supported.
This limit specifies the granularity (or increment) between successive
supported point sizes.
lineWidthGranularity
is
the granularity of supported line widths.
Not all line widths in the range defined by lineWidthRange
are
supported.
This limit specifies the granularity (or increment) between successive
supported line widths.
strictLines
indicates whether
lines are rasterized according to the preferred method of rasterization.
If set to VK_FALSE
, lines may be rasterized under a relaxed set
of rules.
If set to VK_TRUE
, lines are rasterized as per the strict
definition.
See Basic Line Segment Rasterization.
standardSampleLocations
indicates whether rasterization uses the
standard sample locations as documented in
Multisampling.
If set to VK_TRUE
, the implementation uses the documented sample
locations.
If set to VK_FALSE
, the implementation may use different sample
locations.
optimalBufferCopyOffsetAlignment
is the optimal buffer offset
alignment in bytes for vkCmdCopyBufferToImage
and
vkCmdCopyImageToBuffer
.
The per texel alignment requirements are still enforced, this is just an
additional alignment recommendation for optimal performance and power.
optimalBufferCopyRowPitchAlignment
is the optimal buffer row pitch
alignment in bytes for vkCmdCopyBufferToImage
and
vkCmdCopyImageToBuffer
.
Row pitch is the number of bytes between texels with the same X
coordinate in adjacent rows (Y coordinates differ by one).
The per texel alignment requirements are still enforced, this is just an
additional alignment recommendation for optimal performance and power.
nonCoherentAtomSize
is the
size and alignment in bytes that bounds concurrent access to
host-mapped device memory.
For all bitmasks of type VkSampleCountFlags
above, possible values
include:
typedef enum VkSampleCountFlagBits { VK_SAMPLE_COUNT_1_BIT = 0x00000001, VK_SAMPLE_COUNT_2_BIT = 0x00000002, VK_SAMPLE_COUNT_4_BIT = 0x00000004, VK_SAMPLE_COUNT_8_BIT = 0x00000008, VK_SAMPLE_COUNT_16_BIT = 0x00000010, VK_SAMPLE_COUNT_32_BIT = 0x00000020, VK_SAMPLE_COUNT_64_BIT = 0x00000040, } VkSampleCountFlagBits;
The sample count limits defined above represent the minimum supported sample
counts for each image type.
Individual images may support additional sample counts, which are queried
using vkGetPhysicalDeviceImageFormatProperties
as described in
Supported Sample Counts.
The following table specifies the required minimum/maximum for all Vulkan graphics implementations. Where a limit corresponds to a fine-grained device feature which is optional, the feature name is listed with two required limits, one when the feature is supported and one when it is not supported. If an implementation supports a feature, the limits reported are the same whether or not the feature is enabled.
Table 31.1. Required Limit Types
Type | Limit | Feature |
---|---|---|
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| sparseBinding |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| - |
|
| - |
|
|
|
|
| - |
|
| - |
3 × |
| - |
|
| - |
3 × |
| - |
|
| - |
|
| - |
|
| - |
|
|
|
|
|
|
|
| - |
|
|
|
|
|
|
2 × |
| - |
2 × |
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| - |
|
| - |
|
| - |
| - | |
| - | |
| - | |
| - | |
|
| - |
| - | |
| - | |
| - | |
| - | |
|
| |
|
| - |
|
| - |
|
| - |
|
|
|
|
|
|
|
|
|
|
| - |
2 × |
|
|
2 × |
|
|
|
|
|
|
|
|
|
| - |
|
| - |
|
| - |
|
| - |
|
| - |
Table 31.2. Required Limits
Limit | Unsupported Limit | Supported Limit | Limit Type1 |
---|---|---|---|
| - | 4096 | min |
| - | 4096 | min |
| - | 256 | min |
| - | 4096 | min |
| - | 256 | min |
| - | 65536 | min |
| - | 16384 | min |
| - | 227 | min |
| - | 128 | min |
| - | 4096 | min |
| - | 4000 | min |
| - | 131072 | max |
| 0 | 231 | min |
| - | 4 | min |
| - | 16 | min |
| - | 12 | min |
| - | 4 | min |
| - | 16 | min |
| - | 4 | min |
| - | 4 | min |
| - | 128 2 | min |
| - | 96 8 | min, n × PerStage |
| - | 72 8 | min, n × PerStage |
| - | 8 | min |
| - | 24 8 | min, n × PerStage |
| - | 4 | min |
| - | 96 8 | min, n × PerStage |
| - | 24 8 | min, n × PerStage |
| - | 4 | min |
| - | 16 | min |
| - | 16 | min |
| - | 2047 | min |
| - | 2048 | min |
| - | 64 | min |
| 0 | 64 | min |
| 0 | 32 | min |
| 0 | 64 | min |
| 0 | 64 | min |
| 0 | 120 | min |
| 0 | 2048 | min |
| 0 | 64 | min |
| 0 | 64 | min |
| 0 | 32 | min |
| 0 | 64 | min |
| 0 | 64 | min |
| 0 | 256 | min |
| 0 | 1024 | min |
| - | 64 | min |
| - | 4 | min |
| 0 | 1 | min |
| - | 4 | min |
| - | 16384 | min |
| - | (65535,65535,65535) | min |
| - | 128 | min |
| - | (128,128,64) | min |
| - | 4 | min |
| - | 4 | min |
| - | 4 | min |
| 224-1 | 232-1 | min |
| 1 | 216-1 | min |
| - | 2 | min |
| 1 | 16 | min |
| 1 | 16 | min |
| - | (4096,4096) 3 | min |
| - | (-8192,8191) 4 | (max,min) |
| - | 0 | min |
| - | 64 | min |
| - | 256 | max |
| - | 256 | max |
| - | 256 | max |
| - | -8 | max |
| - | 7 | min |
| 0 | -8 | max |
| 0 | 7 | min |
| 0.0 | -0.5 5 | max |
| 0.0 | 0.5 - (1 ULP) 5 | min |
| 0 | 4 5 | min |
| - | 4096 | min |
| - | 4096 | min |
| - | 256 | min |
| - | ( | min |
| - | ( | min |
| - | ( | min |
| - | ( | min |
| - | 4 | min |
| - | ( | min |
| - |
| min |
| - | ( | min |
| - | ( | min |
|
| ( | min |
| - | 1 | min |
| - | - | implementation dependent |
| - | - | duration |
| 0 | 8 | min |
| 0 | 8 | min |
| 0 | 8 | min |
| - | 2 | min |
| (1.0,1.0) | (1.0,64.0 - ULP)6 | (max,min) |
| (1.0,1.0) | (1.0,8.0 - ULP)7 | (max,min) |
| 0.0 | 1.0 6 | max, fixed point increment |
| 0.0 | 1.0 7 | max, fixed point increment |
| - | - | implementation dependent |
| - | - | implementation dependent |
| - | - | recommendation |
| - | - | recommendation |
| - | 256 | max |
The maxPerStageResources
must be at least the smallest of the
following:
maxPerStageDescriptorUniformBuffers
,
maxPerStageDescriptorStorageBuffers
,
maxPerStageDescriptorSampledImages
,
maxPerStageDescriptorStorageImages
,
maxPerStageDescriptorInputAttachments
, maxColorAttachments
limits, or
It may not be possible to reach this limit in every stage.
maxViewportDimensions
for the required relationship to other limits.
viewportBoundsRange
for the required relationship to other limits.
minInterpolationOffset
and maxInterpolationOffset
describe the closed interval of supported interpolation offsets:
[minInterpolationOffset
, maxInterpolationOffset
].
The ULP is determined by subPixelInterpolationOffsetBits
.
If subPixelInterpolationOffsetBits
is 4, this provides increments
of (1/24) = 0.0625, and thus the range of supported interpolation
offsets would be [-0.5, 0.4375].
pointSizeGranularity
.
If the pointSizeGranularity
is 0.125, the range of supported point
sizes must be at least [1.0, 63.875].
lineWidthGranularity
.
If the lineWidthGranularity
is 0.0625, the range of supported line
widths must be at least [1.0, 7.9375].
maxDescriptorSet*
limit is n times the corresponding
maxPerStageDescriptor*
limit, where n is the number of shader
stages supported by the VkPhysicalDevice.
If all shader stages are supported, n = 6 (vertex, tessellation
control, tessellation evaluation, geometry, fragment, compute).