Structures
VkPhysicalDeviceLimits
Structure reporting implementation-dependent physical device limits
The VkPhysicalDeviceLimits structure is defined as:
typedef struct VkPhysicalDeviceLimits {
// resource maximum sizes;
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;
// memory limits;
uint32_t maxMemoryAllocationCount;
uint32_t maxSamplerAllocationCount;
VkDeviceSize bufferImageGranularity;
VkDeviceSize sparseAddressSpaceSize;
// descriptor set limits;
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;
// vertex stage limits;
uint32_t maxVertexInputAttributes;
uint32_t maxVertexInputBindings;
uint32_t maxVertexInputAttributeOffset;
uint32_t maxVertexInputBindingStride;
uint32_t maxVertexOutputComponents;
// tessellation control stage limits;
uint32_t maxTessellationGenerationLevel;
uint32_t maxTessellationPatchSize;
uint32_t maxTessellationControlPerVertexInputComponents;
uint32_t maxTessellationControlPerVertexOutputComponents;
uint32_t maxTessellationControlPerPatchOutputComponents;
uint32_t maxTessellationControlTotalOutputComponents;
// tessellation evaluation stage limits;
uint32_t maxTessellationEvaluationInputComponents;
uint32_t maxTessellationEvaluationOutputComponents;
// geometry stage limits;
uint32_t maxGeometryShaderInvocations;
uint32_t maxGeometryInputComponents;
uint32_t maxGeometryOutputComponents;
uint32_t maxGeometryOutputVertices;
uint32_t maxGeometryTotalOutputComponents;
// fragment stage limits;
uint32_t maxFragmentInputComponents;
uint32_t maxFragmentOutputAttachments;
uint32_t maxFragmentDualSrcAttachments;
uint32_t maxFragmentCombinedOutputResources;
// compute stage limits;
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;
pub struct PhysicalDeviceLimits {
/// resource maximum sizes
max_image_dimension1_d: u32, // max 1D image dimension
max_image_dimension2_d: u32, // max 2D image dimension
max_image_dimension3_d: u32, // max 3D image dimension
max_image_dimension_cube: u32, // max cube map image dimension
max_image_array_layers: u32, // max layers for image arrays
max_texel_buffer_elements: u32, // max texel buffer size (fstexels)
max_uniform_buffer_range: u32, // max uniform buffer range (bytes)
max_storage_buffer_range: u32, // max storage buffer range (bytes)
max_push_constants_size: u32, // max size of the push constants pool (bytes)
/// memory limits
max_memory_allocation_count: u32, // max number of device memory allocations supported
max_sampler_allocation_count: u32, // max number of samplers that can be allocated on a device
buffer_image_granularity: vk::DeviceSize, // Granularity (in bytes) at which buffers and images can be bound to adjacent memory for simultaneous usage
sparse_address_space_size: vk::DeviceSize, // Total address space available for sparse allocations (bytes)
/// descriptor set limits
max_bound_descriptor_sets: u32, // max number of descriptors sets that can be bound to a pipeline
max_per_stage_descriptor_samplers: u32, // max number of samplers allowed per-stage in a descriptor set
max_per_stage_descriptor_uniform_buffers: u32, // max number of uniform buffers allowed per-stage in a descriptor set
max_per_stage_descriptor_storage_buffers: u32, // max number of storage buffers allowed per-stage in a descriptor set
max_per_stage_descriptor_sampled_images: u32, // max number of sampled images allowed per-stage in a descriptor set
max_per_stage_descriptor_storage_images: u32, // max number of storage images allowed per-stage in a descriptor set
max_per_stage_descriptor_input_attachments: u32, // max number of input attachments allowed per-stage in a descriptor set
max_per_stage_resources: u32, // max number of resources allowed by a single stage
max_descriptor_set_samplers: u32, // max number of samplers allowed in all stages in a descriptor set
max_descriptor_set_uniform_buffers: u32, // max number of uniform buffers allowed in all stages in a descriptor set
max_descriptor_set_uniform_buffers_dynamic: u32, // max number of dynamic uniform buffers allowed in all stages in a descriptor set
max_descriptor_set_storage_buffers: u32, // max number of storage buffers allowed in all stages in a descriptor set
max_descriptor_set_storage_buffers_dynamic: u32, // max number of dynamic storage buffers allowed in all stages in a descriptor set
max_descriptor_set_sampled_images: u32, // max number of sampled images allowed in all stages in a descriptor set
max_descriptor_set_storage_images: u32, // max number of storage images allowed in all stages in a descriptor set
max_descriptor_set_input_attachments: u32, // max number of input attachments allowed in all stages in a descriptor set
/// vertex stage limits
max_vertex_input_attributes: u32, // max number of vertex input attribute slots
max_vertex_input_bindings: u32, // max number of vertex input binding slots
max_vertex_input_attribute_offset: u32, // max vertex input attribute offset added to vertex buffer offset
max_vertex_input_binding_stride: u32, // max vertex input binding stride
max_vertex_output_components: u32, // max number of output components written by vertex shader
/// tessellation control stage limits
max_tessellation_generation_level: u32, // max level supported by tessellation primitive generator
max_tessellation_patch_size: u32, // max patch size (vertices)
max_tessellation_control_per_vertex_input_components: u32, // max number of input components per-vertex in TCS
max_tessellation_control_per_vertex_output_components: u32, // max number of output components per-vertex in TCS
max_tessellation_control_per_patch_output_components: u32, // max number of output components per-patch in TCS
max_tessellation_control_total_output_components: u32, // max total number of per-vertex and per-patch output components in TCS
/// tessellation evaluation stage limits
max_tessellation_evaluation_input_components: u32, // max number of input components per vertex in TES
max_tessellation_evaluation_output_components: u32, // max number of output components per vertex in TES
/// geometry stage limits
max_geometry_shader_invocations: u32, // max invocation count supported in geometry shader
max_geometry_input_components: u32, // max number of input components read in geometry stage
max_geometry_output_components: u32, // max number of output components written in geometry stage
max_geometry_output_vertices: u32, // max number of vertices that can be emitted in geometry stage
max_geometry_total_output_components: u32, // max total number of components (all vertices) written in geometry stage
/// fragment stage limits
max_fragment_input_components: u32, // max number of input components read in fragment stage
max_fragment_output_attachments: u32, // max number of output attachments written in fragment stage
max_fragment_dual_src_attachments: u32, // max number of output attachments written when using dual source blending
max_fragment_combined_output_resources: u32, // max total number of storage buffers, storage images and output buffers
/// compute stage limits
max_compute_shared_memory_size: u32, // max total storage size of work group local storage (bytes)
max_compute_work_group_count: [u32; 3], // max num of compute work groups that may be dispatched by a single command (x,y,z)
max_compute_work_group_invocations: u32, // max total compute invocations in a single local work group
max_compute_work_group_size: [u32; 3], // max local size of a compute work group (x,y,z)
sub_pixel_precision_bits: u32, // number bits of subpixel precision in screen x and y
sub_texel_precision_bits: u32, // number bits of precision for selecting texel weights
mipmap_precision_bits: u32, // number bits of precision for selecting mipmap weights
max_draw_indexed_index_value: u32, // max index value for indexed draw calls (for 32-bit indices)
max_draw_indirect_count: u32, // max draw count for indirect drawing calls
max_sampler_lod_bias: f32, // max absolute sampler LOD bias
max_sampler_anisotropy: f32, // max degree of sampler anisotropy
max_viewports: u32, // max number of active viewports
max_viewport_dimensions: [u32; 2], // max viewport dimensions (x,y)
viewport_bounds_range: [f32; 2], // viewport bounds range (min,max)
viewport_sub_pixel_bits: u32, // number bits of subpixel precision for viewport
min_memory_map_alignment: usize, // min required alignment of pointers returned by MapMemory (bytes)
min_texel_buffer_offset_alignment: vk::DeviceSize, // min required alignment for texel buffer offsets (bytes)
min_uniform_buffer_offset_alignment: vk::DeviceSize, // min required alignment for uniform buffer sizes and offsets (bytes)
min_storage_buffer_offset_alignment: vk::DeviceSize, // min required alignment for storage buffer offsets (bytes)
min_texel_offset: i32, // min texel offset for OpTextureSampleOffset
max_texel_offset: u32, // max texel offset for OpTextureSampleOffset
min_texel_gather_offset: i32, // min texel offset for OpTextureGatherOffset
max_texel_gather_offset: u32, // max texel offset for OpTextureGatherOffset
min_interpolation_offset: f32, // furthest negative offset for interpolateAtOffset
max_interpolation_offset: f32, // furthest positive offset for interpolateAtOffset
sub_pixel_interpolation_offset_bits: u32, // number of subpixel bits for interpolateAtOffset
max_framebuffer_width: u32, // max width for a framebuffer
max_framebuffer_height: u32, // max height for a framebuffer
max_framebuffer_layers: u32, // max layer count for a layered framebuffer
framebuffer_color_sample_counts: vk::SampleCountFlags, // supported color sample counts for a framebuffer
framebuffer_depth_sample_counts: vk::SampleCountFlags, // supported depth sample counts for a framebuffer
framebuffer_stencil_sample_counts: vk::SampleCountFlags, // supported stencil sample counts for a framebuffer
framebuffer_no_attachments_sample_counts: vk::SampleCountFlags, // supported sample counts for a subpass which uses no attachments
max_color_attachments: u32, // max number of color attachments per subpass
sampled_image_color_sample_counts: vk::SampleCountFlags, // supported color sample counts for a non-integer sampled image
sampled_image_integer_sample_counts: vk::SampleCountFlags, // supported sample counts for an integer image
sampled_image_depth_sample_counts: vk::SampleCountFlags, // supported depth sample counts for a sampled image
sampled_image_stencil_sample_counts: vk::SampleCountFlags, // supported stencil sample counts for a sampled image
storage_image_sample_counts: vk::SampleCountFlags, // supported sample counts for a storage image
max_sample_mask_words: u32, // max number of sample mask words
timestamp_compute_and_graphics: vk::Bool32, // timestamps on graphics and compute queues
timestamp_period: f32, // number of nanoseconds it takes for timestamp query value to increment by 1
max_clip_distances: u32, // max number of clip distances
max_cull_distances: u32, // max number of cull distances
max_combined_clip_and_cull_distances: u32, // max combined number of user clipping
discrete_queue_priorities: u32, // distinct queue priorities available
point_size_range: [f32; 2], // range (min,max) of supported point sizes
line_width_range: [f32; 2], // range (min,max) of supported line widths
point_size_granularity: f32, // granularity of supported point sizes
line_width_granularity: f32, // granularity of supported line widths
strict_lines: vk::Bool32, // line rasterization follows preferred rules
standard_sample_locations: vk::Bool32, // supports standard sample locations for all supported sample counts
optimal_buffer_copy_offset_alignment: vk::DeviceSize, // optimal offset of buffer copies
optimal_buffer_copy_row_pitch_alignment: vk::DeviceSize, // optimal pitch of buffer copies
non_coherent_atom_size: vk::DeviceSize, // minimum size and alignment for non-coherent host-mapped device memory access
}
The VkPhysicalDeviceLimits are properties of the physical device.
These are available in the limits member of the
VkPhysicalDeviceProperties structure which is returned from
vkGetPhysicalDeviceProperties.
maxImageDimension1Dis the largest dimension (width) that is guaranteed to be supported for all images created with animageTypeofVK_IMAGE_TYPE_1D. Some combinations of image parameters (format, usage, etc.) may allow support for larger dimensions, which can be queried using vkGetPhysicalDeviceImageFormatProperties.maxImageDimension2Dis the largest dimension (widthorheight) that is guaranteed to be supported for all images created with animageTypeofVK_IMAGE_TYPE_2Dand withoutVK_IMAGE_CREATE_CUBE_COMPATIBLE_BITset inflags. Some combinations of image parameters (format, usage, etc.) may allow support for larger dimensions, which can be queried using vkGetPhysicalDeviceImageFormatProperties.maxImageDimension3Dis the largest dimension (width,height, ordepth) that is guaranteed to be supported for all images created with animageTypeofVK_IMAGE_TYPE_3D. Some combinations of image parameters (format, usage, etc.) may allow support for larger dimensions, which can be queried using vkGetPhysicalDeviceImageFormatProperties.maxImageDimensionCubeis the largest dimension (widthorheight) that is guaranteed to be supported for all images created with animageTypeofVK_IMAGE_TYPE_2Dand withVK_IMAGE_CREATE_CUBE_COMPATIBLE_BITset inflags. Some combinations of image parameters (format, usage, etc.) may allow support for larger dimensions, which can be queried using vkGetPhysicalDeviceImageFormatProperties.maxImageArrayLayersis the maximum number of layers (arrayLayers) for an image.maxTexelBufferElementsis the maximum number of addressable texels for a buffer view created on a buffer which was created with theVK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BITorVK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BITusage flag set.maxUniformBufferRangeis the maximum value that can be specified in therangemember of a VkDescriptorBufferInfo structure passed to vkUpdateDescriptorSets for descriptors of typeVK_DESCRIPTOR_TYPE_UNIFORM_BUFFERorVK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC.maxStorageBufferRangeis the maximum value that can be specified in therangemember of a VkDescriptorBufferInfo structure passed to vkUpdateDescriptorSets for descriptors of typeVK_DESCRIPTOR_TYPE_STORAGE_BUFFERorVK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC. If theshader64BitIndexingfeature is enabled, this limit does not apply.maxPushConstantsSizeis the maximum size, in bytes, of the pool of push constant memory. For each of the push constant ranges indicated by thepPushConstantRangesmember of the VkPipelineLayoutCreateInfo structure, (offset+size) must be less than or equal to this limit.maxMemoryAllocationCountis the maximum number of device memory allocations, as created by vkAllocateMemory, which can simultaneously exist.maxSamplerAllocationCountis the maximum number of sampler objects, as created by vkCreateSampler, which can simultaneously exist on a device. If thedescriptorHeapfeature is enabled and the application intends to use embedded samplers, the number advertised here is effectively reduced by the quotient ofminSamplerHeapReservedRangeWithEmbeddeddivided bysamplerDescriptorSize, to provide storage for embedded samplers when switching to heaps. If embedded samplers are not used, this can be ignored.bufferImageGranularityis the granularity, in bytes, at which buffer or linear image resources, linear or optimal tensor resources, and optimal image resources can be bound to adjacent offsets in the sameVkDeviceMemoryobject without aliasing. See Buffer-Image Granularity for more details.sparseAddressSpaceSizeis the total amount of address space available, in bytes, for sparse memory resources. This is an upper bound on the sum of the sizes of all sparse resources, regardless of whether any memory is bound to them. If theextendedSparseAddressSpacefeature is enabled, then the difference betweenextendedSparseAddressSpaceSizeandsparseAddressSpaceSizecan also be used, byVkImagecreated with theusagemember of VkImageCreateInfo only containing bits inextendedSparseImageUsageFlagsandVkBuffercreated with theusagemember of VkBufferCreateInfo only containing bits inextendedSparseBufferUsageFlags.maxBoundDescriptorSetsis the maximum number of descriptor sets that can be simultaneously used by a pipeline. See Descriptor Sets.maxPerStageDescriptorSamplersis the maximum number of samplers that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_SAMPLERorVK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLERcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. A descriptor is accessible to a shader stage when thestageFlagsmember of theVkDescriptorSetLayoutBindingstructure has the bit for that shader stage set. See Sampler and Combined Image Sampler.maxPerStageDescriptorUniformBuffersis the maximum number of uniform buffers that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_UNIFORM_BUFFERorVK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMICcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. A descriptor is accessible to a shader stage when thestageFlagsmember of theVkDescriptorSetLayoutBindingstructure has the bit for that shader stage set. See Uniform Buffer and Dynamic Uniform Buffer.maxPerStageDescriptorStorageBuffersis the maximum number of storage buffers that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_STORAGE_BUFFERorVK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMICcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. A descriptor is accessible to a pipeline shader stage when thestageFlagsmember of theVkDescriptorSetLayoutBindingstructure has the bit for that shader stage set. See Storage Buffer and Dynamic Storage Buffer.maxPerStageDescriptorSampledImagesis the maximum number of sampled images that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, orVK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFERcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. A descriptor is accessible to a pipeline shader stage when thestageFlagsmember of theVkDescriptorSetLayoutBindingstructure has the bit for that shader stage set. See Combined Image Sampler, Sampled Image, and Uniform Texel Buffer.maxPerStageDescriptorStorageImagesis the maximum number of storage images that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_STORAGE_IMAGE, orVK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFERcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. A descriptor is accessible to a pipeline shader stage when thestageFlagsmember of theVkDescriptorSetLayoutBindingstructure has the bit for that shader stage set. See Storage Image, and Storage Texel Buffer.maxPerStageDescriptorInputAttachmentsis the maximum number of input attachments that can be accessible to a single shader stage in a pipeline layout, as well as the maximum usable input attachment index. Descriptors with a type ofVK_DESCRIPTOR_TYPE_INPUT_ATTACHMENTcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. A descriptor is accessible to a pipeline shader stage when thestageFlagsmember of theVkDescriptorSetLayoutBindingstructure has the bit for that shader stage set. These are only supported for the fragment stage. See Input Attachment.maxPerStageDescriptorInputAttachmentswas originally only intended to limit the number of attachments per stage, not the number of available input indices across all shaders in a render pass. The input indices were allowed to be semi arbitrary for render pass objects, or fully arbitrary for dynamic rendering, however some implementations have fixed limits for them. Applications already exist that exceed this limit, and they will continue to work where they already did, but will fail to render on some platforms. For forward looking applications, this can be worked around by either making careful use of index remapping with VkRenderingInputAttachmentIndexInfo for dynamic rendering, or splitting a subpass with too many input attachments into multiple subpasses.maxPerStageResourcesis the maximum number of resources that can be accessible to a single shader stage in a pipeline layout. Descriptors with a type ofVK_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, orVK_DESCRIPTOR_TYPE_INPUT_ATTACHMENTcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. For the fragment shader stage the framebuffer color attachments also count against this limit.maxDescriptorSetSamplersis the maximum number of samplers that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_SAMPLERorVK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLERcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Sampler and Combined Image Sampler.maxDescriptorSetUniformBuffersis the maximum number of uniform buffers that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_UNIFORM_BUFFERorVK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMICcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Uniform Buffer and Dynamic Uniform Buffer.maxDescriptorSetUniformBuffersDynamicis the maximum number of dynamic uniform buffers that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMICcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Dynamic Uniform Buffer.maxDescriptorSetStorageBuffersis the maximum number of storage buffers that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_STORAGE_BUFFERorVK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMICcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Storage Buffer and Dynamic Storage Buffer.maxDescriptorSetStorageBuffersDynamicis the maximum number of dynamic storage buffers that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMICcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Dynamic Storage Buffer.maxDescriptorSetSampledImagesis the maximum number of sampled images that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER,VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, orVK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFERcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Combined Image Sampler, Sampled Image, and Uniform Texel Buffer.maxDescriptorSetStorageImagesis the maximum number of storage images that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_STORAGE_IMAGE, orVK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFERcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Storage Image, and Storage Texel Buffer.maxDescriptorSetInputAttachmentsis the maximum number of input attachments that can be included in a pipeline layout. Descriptors with a type ofVK_DESCRIPTOR_TYPE_INPUT_ATTACHMENTcount against this limit. Only descriptors in descriptor set layouts created without theVK_DESCRIPTOR_SET_LAYOUT_CREATE_UPDATE_AFTER_BIND_POOL_BITbit set count against this limit. See Input Attachment.maxVertexInputAttributesis the maximum number of vertex input attributes that can be specified for a graphics pipeline. These are described in the array ofVkVertexInputAttributeDescriptionstructures that are provided at graphics pipeline creation time via thepVertexAttributeDescriptionsmember of the VkPipelineVertexInputStateCreateInfo structure. See Vertex Attributes and Vertex Input Description.maxVertexInputBindingsis the maximum number of vertex buffers that can be specified for providing vertex attributes to a graphics pipeline. These are described in the array ofVkVertexInputBindingDescriptionstructures that are provided at graphics pipeline creation time via thepVertexBindingDescriptionsmember of the VkPipelineVertexInputStateCreateInfo structure. Thebindingmember ofVkVertexInputBindingDescriptionmust be less than this limit. See Vertex Input Description.maxVertexInputAttributeOffsetis the maximum vertex input attribute offset that can be added to the vertex input binding stride. Theoffsetmember of theVkVertexInputAttributeDescriptionstructure must be less than or equal to this limit. See Vertex Input Description.maxVertexInputBindingStrideis the maximum vertex input binding stride that can be specified in a vertex input binding. Thestridemember of theVkVertexInputBindingDescriptionstructure must be less than or equal to this limit. See Vertex Input Description.maxVertexOutputComponentsis the maximum number of components of output variables which can be output by a vertex shader. See Vertex Shaders.maxTessellationGenerationLevelis the maximum tessellation generation level supported by the fixed-function tessellation primitive generator. See Tessellation.maxTessellationPatchSizeis the maximum patch size, in vertices, of patches that can be processed by the tessellation control shader and tessellation primitive generator. ThepatchControlPointsmember of the VkPipelineTessellationStateCreateInfo structure specified at pipeline creation time and the value provided in theOutputVerticesexecution mode of shader modules must be less than or equal to this limit. See Tessellation.maxTessellationControlPerVertexInputComponentsis the maximum number of components of input variables which can be provided as per-vertex inputs to the tessellation control shader stage.maxTessellationControlPerVertexOutputComponentsis the maximum number of components of per-vertex output variables which can be output from the tessellation control shader stage.maxTessellationControlPerPatchOutputComponentsis the maximum number of components of per-patch output variables which can be output from the tessellation control shader stage.maxTessellationControlTotalOutputComponentsis the maximum total number of components of per-vertex and per-patch output variables which can be output from the tessellation control shader stage.maxTessellationEvaluationInputComponentsis the maximum number of components of input variables which can be provided as per-vertex inputs to the tessellation evaluation shader stage.maxTessellationEvaluationOutputComponentsis the maximum number of components of per-vertex output variables which can be output from the tessellation evaluation shader stage.maxGeometryShaderInvocationsis the maximum invocation count supported for instanced geometry shaders. The value provided in theInvocationsexecution mode of shader modules must be less than or equal to this limit. See Geometry Shading.maxGeometryInputComponentsis the maximum number of components of input variables which can be provided as inputs to the geometry shader stage.maxGeometryOutputComponentsis the maximum number of components of output variables which can be output from the geometry shader stage.maxGeometryOutputVerticesis the maximum number of vertices which can be emitted by any geometry shader.maxGeometryTotalOutputComponentsis the maximum total number of components of output variables, across all emitted vertices, which can be output from the geometry shader stage.maxFragmentInputComponentsis the maximum number of components of input variables which can be provided as inputs to the fragment shader stage.maxFragmentOutputAttachmentsis the maximum number of output attachments which can be written to by the fragment shader stage.maxFragmentDualSrcAttachmentsis 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 Dual-Source Blending anddualSrcBlend.maxFragmentCombinedOutputResourcesis the total number of storage buffers, storage images, and outputLocationdecorated color attachments (described in Fragment Output Interface) which can be used in the fragment shader stage.-
maxComputeSharedMemorySizeis the maximum total storage size, in bytes, available for variables declared with theWorkgroupstorage class in shader modules (or with thesharedstorage qualifier in GLSL) in the compute shader stage. maxComputeWorkGroupCount[3] is the maximum number of local workgroups that can be dispatched by a single dispatching command. These three values represent the maximum number of local workgroups for the X, Y, and Z dimensions, respectively. The workgroup count parameters to the dispatching commands must be less than or equal to the corresponding limit. See Dispatching Commands.maxComputeWorkGroupInvocationsis 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 theLocalSizeorLocalSizeIdexecution mode in shader modules or by the object decorated by theWorkgroupSizedecoration, 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. Thex,y, andzsizes, as specified by theLocalSizeorLocalSizeIdexecution mode or by the object decorated by theWorkgroupSizedecoration in shader modules, must be less than or equal to the corresponding limit.subPixelPrecisionBitsis the number of bits of subpixel precision in framebuffer coordinates xf and yf. See Rasterization.subTexelPrecisionBitsis the number of bits of precision in the division along an axis of an image used for minification and magnification filters. 2subTexelPrecisionBitsis the actual number of divisions along each axis of the image represented. Sub-texel values calculated during image sampling will snap to these locations when generating the filtered results.mipmapPrecisionBitsis 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. 2mipmapPrecisionBitsis the actual number of divisions.maxDrawIndexedIndexValueis 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. SeefullDrawIndexUint32.maxDrawIndirectCountis the maximum draw count that is supported for indirect drawing calls. SeemultiDrawIndirect.maxSamplerLodBiasis the maximum absolute sampler LOD bias. The sum of themipLodBiasmember of the VkSamplerCreateInfo structure and theBiasoperand of image sampling operations in shader modules (or 0 if noBiasoperand is provided to an image sampling operation) are clamped to the range [-maxSamplerLodBias,+maxSamplerLodBias]. See VkSamplerCreateInfo.maxSamplerAnisotropyis the maximum degree of sampler anisotropy. The maximum degree of anisotropic filtering used for an image sampling operation is the minimum of themaxAnisotropymember of the VkSamplerCreateInfo structure and this limit. See VkSamplerCreateInfo.maxViewportsis the maximum number of active viewports. TheviewportCountmember 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], wheresize= max(maxViewportDimensions[0],maxViewportDimensions[1]). See Controlling the Viewport.The wide range of values required forviewportBoundsRangeallows the viewport to be arbitrarily shifted relative to the output render target while still partially overlapping. However, the minimum range required to achieve this would actually be [-size+ 1, 2 ×size- 1]. As these limits in implementations are typically simple power-of-two values, the specification reflects this convention, rounding the lower bound accordingly.viewportSubPixelBitsis 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.minMemoryMapAlignmentis the minimum required alignment, in bytes, of host visible memory allocations within the host address space. When mapping a memory allocation with vkMapMemory, subtractingoffsetbytes from the returned pointer will always produce an integer multiple of this limit. See Host Access to Device Memory Objects. The value must be a power of two.minTexelBufferOffsetAlignmentis the minimum required alignment, in bytes, for theoffsetmember of the VkBufferViewCreateInfo structure for texel buffers. The value must be a power of two. This limit is equivalent to the maximum of theuniformTexelBufferOffsetAlignmentBytesandstorageTexelBufferOffsetAlignmentBytesmembers of VkPhysicalDeviceTexelBufferAlignmentProperties, but smaller alignment is optionally allowed bystorageTexelBufferOffsetSingleTexelAlignmentanduniformTexelBufferOffsetSingleTexelAlignment. For single texel alignment, a format has an alignment requirement which is the size of a single component if the size of the format is a multiple of three bytes, otherwise, it is the size of the format itself. The effective alignment requirement is the minimum of the per-format alignment anduniformTexelBufferOffsetAlignmentBytesorstorageTexelBufferOffsetAlignmentBytesdepending on the descriptor type. If thetexelBufferAlignmentfeature is not enabled, the effective alignment requirement for any format isminTexelBufferOffsetAlignment. VkBufferViewCreateInfo::offsetmust be a multiple of this value.minUniformBufferOffsetAlignmentis the minimum required alignment, in bytes, for theoffsetmember of theVkDescriptorBufferInfostructure for uniform buffers. When a descriptor of typeVK_DESCRIPTOR_TYPE_UNIFORM_BUFFERorVK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMICis updated, theoffsetmust be an integer multiple of this limit. Similarly, dynamic offsets for uniform buffers must be multiples of this limit. The value must be a power of two.minStorageBufferOffsetAlignmentis the minimum required alignment, in bytes, for theoffsetmember of theVkDescriptorBufferInfostructure for storage buffers. When a descriptor of typeVK_DESCRIPTOR_TYPE_STORAGE_BUFFERorVK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMICis updated, theoffsetmust be an integer multiple of this limit. Similarly, dynamic offsets for storage buffers must be multiples of this limit. The value must be a power of two.minTexelOffsetis the minimum offset value for theOffsetorConstOffsetimage operand of any of theOpImageSample*orOpImageFetch*image instructions.maxTexelOffsetis the maximum offset value for theOffsetorConstOffsetimage operand of any of theOpImageSample*orOpImageFetch*image instructions.minTexelGatherOffsetis the minimum offset value for theOffset,ConstOffset, orConstOffsetsimage operands of any of theOpImage*Gatherimage instructions.maxTexelGatherOffsetis the maximum offset value for theOffset,ConstOffset, orConstOffsetsimage operands of any of theOpImage*Gatherimage instructions.minInterpolationOffsetis the base minimum (inclusive) negative offset value for theOffsetoperand of theInterpolateAtOffsetextended instruction.maxInterpolationOffsetis the base maximum (inclusive) positive offset value for theOffsetoperand of theInterpolateAtOffsetextended instruction.subPixelInterpolationOffsetBitsis the number of fractional bits that thexandyoffsets to theInterpolateAtOffsetextended instruction may be rounded to as fixed-point values.maxFramebufferWidthis the maximum width for a framebuffer. Thewidthmember of the VkFramebufferCreateInfo structure must be less than or equal to this limit.maxFramebufferHeightis the maximum height for a framebuffer. Theheightmember of the VkFramebufferCreateInfo structure must be less than or equal to this limit.maxFramebufferLayersis the maximum layer count for a layered framebuffer. Thelayersmember of the VkFramebufferCreateInfo structure must be less than or equal to this limit.framebufferColorSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the color sample counts that are supported for all framebuffer color attachments with floating- or fixed-point formats. For color attachments with integer formats, seeframebufferIntegerColorSampleCounts.framebufferDepthSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the supported depth sample counts for all framebuffer depth/stencil attachments, when the format includes a depth component.framebufferStencilSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the supported stencil sample counts for all framebuffer depth/stencil attachments, when the format includes a stencil component.framebufferNoAttachmentsSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the supported sample counts for a subpass which uses no attachments.maxColorAttachmentsis the maximum number of color attachments that can be used by a subpass in a render pass. ThecolorAttachmentCountmember of theVkSubpassDescriptionorVkSubpassDescription2structure must be less than or equal to this limit.sampledImageColorSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created withVK_IMAGE_TILING_OPTIMAL, theVK_IMAGE_USAGE_SAMPLED_BITusage flag set, and a non-integer color format.sampledImageIntegerSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created withVK_IMAGE_TILING_OPTIMAL, theVK_IMAGE_USAGE_SAMPLED_BITusage flag set, and an integer color format.sampledImageDepthSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created withVK_IMAGE_TILING_OPTIMAL, theVK_IMAGE_USAGE_SAMPLED_BITusage flag set, and a depth format.sampledImageStencilSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created withVK_IMAGE_TILING_OPTIMAL, theVK_IMAGE_USAGE_SAMPLED_BITusage flag set, and a stencil format.storageImageSampleCountsis a bitmask1 of VkSampleCountFlagBits indicating the sample counts supported for all 2D images created withVK_IMAGE_TILING_OPTIMAL, and theVK_IMAGE_USAGE_STORAGE_BITusage flag set.maxSampleMaskWordsis the maximum number of array elements of a variable decorated with theSampleMaskbuilt-in decoration.timestampComputeAndGraphicsspecifies support for timestamps on all graphics and compute queues. If this limit isVK_TRUE, all queues that advertise theVK_QUEUE_GRAPHICS_BITorVK_QUEUE_COMPUTE_BITin theVkQueueFamilyProperties::queueFlagssupportVkQueueFamilyProperties::timestampValidBitsof at least 36. See Timestamp Queries.timestampPeriodis the number of nanoseconds required for a timestamp query to be incremented by 1. See Timestamp Queries.maxClipDistancesis the maximum number of clip distances that can be used in a single shader stage. The size of any array declared with theClipDistancebuilt-in decoration in a shader module must be less than or equal to this limit.maxCullDistancesis the maximum number of cull distances that can be used in a single shader stage. The size of any array declared with theCullDistancebuilt-in decoration in a shader module must be less than or equal to this limit.maxCombinedClipAndCullDistancesis the maximum combined number of clip and cull distances that can be used in a single shader stage. The sum of the sizes of all arrays declared with theClipDistanceandCullDistancebuilt-in decoration used by a single shader stage in a shader module must be less than or equal to this limit.discreteQueuePrioritiesis 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 Queue Priority.pointSizeRange[2] is the range [minimum,maximum] of supported sizes for points. Values written to variables decorated with thePointSizebuilt-in decoration are clamped to this range.lineWidthRange[2] is the range [minimum,maximum] of supported widths for lines. Values specified by thelineWidthmember of the VkPipelineRasterizationStateCreateInfo or thelineWidthparameter tovkCmdSetLineWidthare clamped to this range.pointSizeGranularityis the granularity of supported point sizes. Not all point sizes in the range defined bypointSizeRangeare supported. This limit specifies the granularity (or increment) between successive supported point sizes.lineWidthGranularityis the granularity of supported line widths. Not all line widths in the range defined bylineWidthRangeare supported. This limit specifies the granularity (or increment) between successive supported line widths.strictLinesspecifies whether lines are rasterized according to the preferred method of rasterization. If set toVK_FALSE, lines may be rasterized under a relaxed set of rules. If set toVK_TRUE, lines are rasterized as per the strict definition. See Basic Line Segment Rasterization.standardSampleLocationsspecifies whether rasterization uses the standard sample locations as documented in Multisampling. If set toVK_TRUE, the implementation uses the documented sample locations. If set toVK_FALSE, the implementation may use different sample locations.optimalBufferCopyOffsetAlignmentis the optimal buffer offset alignment in bytes for vkCmdCopyBufferToImage2, vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer2, and vkCmdCopyImageToBuffer. This value is also the optimal host memory offset alignment in bytes for vkCopyMemoryToImage and vkCopyImageToMemory. The per texel alignment requirements are enforced, but applications should use the optimal alignment for optimal performance and power use. The value must be a power of two.optimalBufferCopyRowPitchAlignmentis the optimal buffer row pitch alignment in bytes for vkCmdCopyBufferToImage2, vkCmdCopyBufferToImage, vkCmdCopyImageToBuffer2, and vkCmdCopyImageToBuffer. This value is also the optimal host memory row pitch alignment in bytes for vkCopyMemoryToImage and vkCopyImageToMemory. 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 enforced, but applications should use the optimal alignment for optimal performance and power use. The value must be a power of two.nonCoherentAtomSizeis the size and alignment in bytes that bounds concurrent access to host-mapped device memory. The value must be a power of two.
Footnotes
- For all bitmasks of
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
. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9
Parent
VK_VERSION_1_0Type
Structures