Features
Features describe functionality which is not supported on all implementations. Features are properties of the physical device. Features are optional, and must be explicitly enabled before use. Support for features is reported and enabled on a per-feature basis.
Features are reported via the basic VkPhysicalDeviceFeatures
structure, as well as the extensible structure
VkPhysicalDeviceFeatures2
, which was added in the
VK_KHR_get_physical_device_properties2 extension and included in
Vulkan 1.1.
When new features are added in future Vulkan versions or extensions, each
extension should introduce one new feature structure, if needed.
This structure can be added to the pNext
chain of the
VkPhysicalDeviceFeatures2
structure.
For convenience, new core versions of Vulkan may introduce new unified feature structures for features promoted from extensions. At the same time, the extension’s original feature structure (if any) is also promoted to the core API, and is an alias of the extension’s structure. This results in multiple names for the same feature: in the original extension’s feature structure and the promoted structure alias, in the unified feature structure. When a feature was implicitly supported and enabled in the extension, but an explicit name was added during promotion, then the extension itself acts as an alias for the feature as listed in the table below.
All aliases of the same feature in the core API must be reported consistently: either all must be reported as supported, or none of them. When a promoted extension is available, any corresponding feature aliases must be supported.
Fine-grained features used by a logical device must be enabled at
VkDevice
creation time.
If a feature is enabled that the physical device does not support,
VkDevice
creation will fail and return
VK_ERROR_FEATURE_NOT_PRESENT
.
The fine-grained features are enabled by passing a pointer to the
VkPhysicalDeviceFeatures
structure via the pEnabledFeatures
member of the VkDeviceCreateInfo structure that is passed into the
vkCreateDevice
call.
If a member of pEnabledFeatures
is set to VK_TRUE
or
VK_FALSE
, then the device will be created with the indicated feature
enabled or disabled, respectively.
Features can also be enabled by using the VkPhysicalDeviceFeatures2
structure.
If an application wishes to enable all features supported by a device, it
can simply pass in the VkPhysicalDeviceFeatures
structure that was
previously returned by vkGetPhysicalDeviceFeatures
.
To disable an individual feature, the application can set the desired
member to VK_FALSE
in the same structure.
Setting pEnabledFeatures
to NULL
and not including a VkPhysicalDeviceFeatures2 in the pNext
chain
of VkDeviceCreateInfo
is equivalent to setting all members of the structure to VK_FALSE
.
Some features, such as robustBufferAccess
, may incur a runtime
performance cost.
Application writers should carefully consider the implications of enabling
all supported features.
Feature Requirements
All Vulkan graphics implementations must support the following features:
robustBufferAccess
, unless the VK_KHR_portability_subset extension is enabled.uniformBufferStandardLayout
, if Vulkan 1.2 or the VK_KHR_uniform_buffer_standard_layout extension is supported.variablePointersStorageBuffer
, if the VK_KHR_variable_pointers extension is supported.storageBuffer8BitAccess
, if the VK_KHR_8bit_storage extension is supported.storageBuffer8BitAccess
, ifuniformAndStorageBuffer8BitAccess
is enabled.- If
the VK_EXT_descriptor_indexing extension is supported:
shaderSampledImageArrayDynamicIndexing
shaderStorageBufferArrayDynamicIndexing
shaderUniformTexelBufferArrayDynamicIndexing
shaderStorageTexelBufferArrayDynamicIndexing
shaderSampledImageArrayNonUniformIndexing
shaderStorageBufferArrayNonUniformIndexing
shaderUniformTexelBufferArrayNonUniformIndexing
descriptorBindingSampledImageUpdateAfterBind
descriptorBindingStorageImageUpdateAfterBind
descriptorBindingStorageBufferUpdateAfterBind
(see alsorobustBufferAccessUpdateAfterBind
)descriptorBindingUniformTexelBufferUpdateAfterBind
(see alsorobustBufferAccessUpdateAfterBind
)descriptorBindingStorageTexelBufferUpdateAfterBind
(see alsorobustBufferAccessUpdateAfterBind
)descriptorBindingUpdateUnusedWhilePending
descriptorBindingPartiallyBound
runtimeDescriptorArray
inlineUniformBlock
, if the VK_EXT_inline_uniform_block extension is supported.descriptorBindingInlineUniformBlockUpdateAfterBind
, if the VK_EXT_inline_uniform_block extension is supported; and if the VK_EXT_descriptor_indexing extension is supported.scalarBlockLayout
, if the VK_EXT_scalar_block_layout extension is supported.subgroupSizeControl
, if the VK_EXT_subgroup_size_control extension is supported.computeFullSubgroups
, if the VK_EXT_subgroup_size_control extension is supported.deviceMemoryReport
, if the VK_EXT_device_memory_report extension is supported.globalPriorityQuery
, if the VK_EXT_global_priority_query extension is supported.globalPriorityQuery
, if the VK_KHR_global_priority extension is supported.imagelessFramebuffer
, if Vulkan 1.2 or the VK_KHR_imageless_framebuffer extension is supported.separateDepthStencilLayouts
, if Vulkan 1.2 or the VK_KHR_separate_depth_stencil_layouts extension is supported.hostQueryReset
, if Vulkan 1.2 or the VK_EXT_host_query_reset extension is supported.timelineSemaphore
, if Vulkan 1.2 or the VK_KHR_timeline_semaphore extension is supported.- If the VK_KHR_acceleration_structure extension is supported:
accelerationStructure
- All the features required by the VK_EXT_descriptor_indexing extension.
descriptorBindingAccelerationStructureUpdateAfterBind
bufferDeviceAddress
from the VK_KHR_buffer_device_address extension.
- If the VK_KHR_ray_tracing_pipeline extension is supported:
rayTracingPipeline
rayTracingPipelineTraceRaysIndirect
rayTraversalPrimitiveCulling
, ifrayQuery
is supported- the VK_KHR_pipeline_library extension must be supported.
rayQuery
, if the VK_KHR_ray_query extension is supported.pipelineCreationCacheControl
, if the VK_EXT_pipeline_creation_cache_control extension is supported.shaderSubgroupExtendedTypes
, if Vulkan 1.2 or the VK_KHR_shader_subgroup_extended_types extension is supported.samplerYcbcrConversion
, if the VK_KHR_sampler_ycbcr_conversion extension is supported.pipelineExecutableInfo
, if the VK_KHR_pipeline_executable_properties extension is supported.textureCompressionASTC_HDR
, if the VK_EXT_texture_compression_astc_hdr extension is supported.depthClipEnable
, if the VK_EXT_depth_clip_enable extension is supported.memoryPriority
, if the VK_EXT_memory_priority extension is supported.ycbcrImageArrays
, if the VK_EXT_ycbcr_image_arrays extension is supported.indexTypeUint8
, if the VK_KHR_index_type_uint8 or VK_EXT_index_type_uint8 extension is supported.indexTypeUint8
, if the VK_KHR_index_type_uint8 extension is supported.primitiveTopologyListRestart
, if the VK_EXT_primitive_topology_list_restart extension is supported.shaderDemoteToHelperInvocation
, if the VK_EXT_shader_demote_to_helper_invocation extension is supported.texelBufferAlignment
, if the VK_EXT_texel_buffer_alignment extension is supported.vulkanMemoryModel
, if the VK_KHR_vulkan_memory_model extension is supported.bufferDeviceAddress
, if the VK_KHR_buffer_device_address extension is supported.performanceCounterQueryPools
, if the VK_KHR_performance_query extension is supported.transformFeedback
, if the VK_EXT_transform_feedback extension is supported.conditionalRendering
, if the VK_EXT_conditional_rendering extension is supported.vertexAttributeInstanceRateDivisor
, if the VK_EXT_vertex_attribute_divisor extension or the VK_KHR_vertex_attribute_divisor extension is supported.fragmentDensityMap
, if the VK_EXT_fragment_density_map extension is supported.shaderSubgroupClock
, if the VK_KHR_shader_clock extension is supported.shaderBufferInt64Atomics
, if the VK_KHR_shader_atomic_int64 extension is supported.shaderInt64
, if theshaderSharedInt64Atomics
orshaderBufferInt64Atomics
features are supported.shaderFloat16
orshaderInt8
, if the VK_KHR_shader_float16_int8 extension is supported.fragmentShaderSampleInterlock
orfragmentShaderPixelInterlock
orfragmentShaderShadingRateInterlock
, if the VK_EXT_fragment_shader_interlock extension is supported.rectangularLines
orbresenhamLines
orsmoothLines
orstippledRectangularLines
orstippledBresenhamLines
orstippledSmoothLines
, if the VK_KHR_line_rasterization extension is supported.rectangularLines
orbresenhamLines
orsmoothLines
orstippledRectangularLines
orstippledBresenhamLines
orstippledSmoothLines
, if the VK_EXT_line_rasterization extension is supported.storageBuffer16BitAccess
, if the VK_KHR_16bit_storage extension is supported.storageBuffer16BitAccess
, ifuniformAndStorageBuffer16BitAccess
is enabled.robustImageAccess
, if the VK_EXT_image_robustness extension is supported.formatA4R4G4B4
, if the VK_EXT_4444_formats extension is supported.mutableDescriptorType
, if the VK_EXT_mutable_descriptor_type or VK_VALVE_mutable_descriptor_type extension is supported.shaderInt64
andshaderImageInt64Atomics
, if the VK_EXT_shader_image_atomic_int64 extension is supported.shaderImageInt64Atomics
, if thesparseImageInt64Atomics
feature is supported.shaderImageFloat32Atomics
, if thesparseImageFloat32Atomics
feature is supported.shaderImageFloat32AtomicAdd
, if thesparseImageFloat32AtomicAdd
feature is supported.primitivesGeneratedQuery
, if the VK_EXT_primitives_generated_query extension is supported.pipelineFragmentShadingRate
, if the VK_KHR_fragment_shading_rate extension is supported.pipelineProtectedAccess
, if the VK_EXT_pipeline_protected_access extension is supported.legacyDithering
, if the VK_EXT_legacy_dithering extension is supported.shaderTerminateInvocation
if the VK_KHR_shader_terminate_invocation extension is supported.shaderZeroInitializeWorkgroupMemory
, if the VK_KHR_zero_initialize_workgroup_memory extension is supported.workgroupMemoryExplicitLayout
, if the VK_KHR_workgroup_memory_explicit_layout extension is supported.vertexInputDynamicState
, if the VK_EXT_vertex_input_dynamic_state extension is supported.synchronization2
if the VK_KHR_synchronization2 extension is supported.provokingVertexLast
, if the VK_EXT_provoking_vertex extension is supported.descriptorBuffer
, if the xref::name::VK_EXT_descriptor_buffer extension is supported.shaderSubgroupUniformControlFlow
, if the VK_KHR_shader_subgroup_uniform_control_flow extension is supported.borderColorSwizzle
if the VK_EXT_border_color_swizzle extension is supported.multiDraw
, if the VK_EXT_multi_draw extension is supported.shaderImageFloat32AtomicMinMax
, if thesparseImageFloat32AtomicMinMax
feature is supported.presentId
, if the VK_KHR_present_id extension is supported.presentWait
, if the VK_KHR_present_wait extension is supported.hostImageCopy
, if the xref::name::VK_EXT_host_image_copy extension is supported.shaderIntegerDotProduct
if the VK_KHR_shader_integer_dot_product extension is supported.maintenance4
, if the VK_KHR_maintenance4 extension is supported.maintenance5
, if the VK_KHR_maintenance5 extension is supported.maintenance6
, if the VK_KHR_maintenance6 extension is supported.image2DViewOf3D
, if the VK_EXT_image_2d_view_of_3d extension is supported.imageSlicedViewOf3D
, if the VK_EXT_image_sliced_view_of_3d extension is supported.privateData
, if the VK_EXT_private_data extension is supported.extendedDynamicState
, if the VK_EXT_extended_dynamic_state extension is supported.extendedDynamicState2
, if the VK_EXT_extended_dynamic_state2 extension is supported.depthClipControl
, if the VK_EXT_depth_clip_control extension is supported.minLod
, if the VK_EXT_image_view_min_lod extension is supported.linearColorAttachment
, if the VK_NV_linear_color_attachment extension is supported.presentBarrier
, if the VK_NV_present_barrier extension is supported.graphicsPipelineLibrary
, if the VK_EXT_graphics_pipeline_library extension is supported.dynamicRendering
, if the VK_KHR_dynamic_rendering extension is supported.nestedCommandBuffer
, if the VK_EXT_nested_command_buffer extension is supported.taskShader
andmeshShader
, if the VK_EXT_mesh_shader extension is supported.primitiveFragmentShadingRate
ifprimitiveFragmentShadingRateMeshShader
feature is supported.subpassMergeFeedback
, if the VK_EXT_subpass_merge_feedback extension is supported.rayTracingMaintenance1
, if the VK_KHR_ray_tracing_maintenance1 extension is supported.videoMaintenance1
, if the VK_KHR_video_maintenance1 extension is supported.colorWriteEnable
, if the VK_EXT_color_write_enable extension is supported.multisampledRenderToSingleSampled
, if the VK_EXT_multisampled_render_to_single_sampled extension is supported.imageCompressionControl
, if the VK_EXT_image_compression_control extension is supported.imageCompressionControlSwapchain
, if the VK_EXT_image_compression_control_swapchain extension is supported.shaderEarlyAndLateFragmentTests
, if the VK_AMD_shader_early_and_late_fragment_tests extension is supported.nonSeamlessCubeMap
, if the VK_EXT_non_seamless_cube_map extension is supported.shaderModuleIdentifier
, if VK_EXT_shader_module_identifier extension is supported.pipelineRobustness
, if the VK_EXT_pipeline_robustness extension is supported.textureSampleWeighted
,TextureBlockMatch
, andTextureBoxFilter
if VK_QCOM_image_processing extension is supported.TextureBlockMatch2
if VK_QCOM_image_processing2 extension is supported.tileProperties
if VK_QCOM_tile_properties extension is supported.attachmentFeedbackLoopLayout
, if the VK_EXT_attachment_feedback_loop_layout extension is supported.depthClampZeroOne
, if the VK_EXT_depth_clamp_zero_one extension is supported.deviceFault
, if the VK_EXT_device_fault extension is supported.reportAddressBinding
, if the VK_EXT_device_address_binding_report extension is supported.micromap
, if the VK_EXT_opacity_micromap extension is supported.frameBoundary
, if the VK_EXT_frame_boundary extension is supported.displacementMicromap
, if the VK_NV_displacement_micromap extension is supported.pipelineLibraryGroupHandles
, if the VK_EXT_pipeline_library_group_handles extension is supported.swapchainMaintenance1
, if the VK_EXT_swapchain_maintenance1 extension is supported.tessellationShader
, if theextendedDynamicState3TessellationDomainOrigin
feature is supported.depthClamp
, if theextendedDynamicState3DepthClampEnable
feature is supported.fillModeNonSolid
, if theextendedDynamicState3PolygonMode
feature is supported.alphaToOne
, if theextendedDynamicState3AlphaToOneEnable
feature is supported.logicOp
, if theextendedDynamicState3LogicOpEnable
feature is supported.geometryStreams
, if theextendedDynamicState3RasterizationStream
feature is supported.- VK_EXT_conservative_rasterization extension, if the
extendedDynamicState3ConservativeRasterizationMode
feature is supported. - VK_EXT_conservative_rasterization extension, if the
extendedDynamicState3ExtraPrimitiveOverestimationSize
feature is supported. - VK_EXT_sample_locations extension, if the
extendedDynamicState3SampleLocationsEnable
feature is supported. - VK_EXT_blend_operation_advanced extension, if the
extendedDynamicState3ColorBlendAdvanced
feature is supported. provokingVertexLast
, if theextendedDynamicState3ProvokingVertexMode
feature is supported.- VK_KHR_line_rasterization or VK_EXT_line_rasterization
extension, if the
extendedDynamicState3LineRasterizationMode
feature is supported. - VK_KHR_line_rasterization or VK_EXT_line_rasterization
extension, if the
extendedDynamicState3LineStippleEnable
feature is supported. depthClipControl
, if theextendedDynamicState3DepthClipNegativeOneToOne
feature is supported.- VK_NV_clip_space_w_scaling extension, if the
extendedDynamicState3ViewportWScalingEnable
feature is supported. - VK_NV_viewport_swizzle extension, if the
extendedDynamicState3ViewportSwizzle
feature is supported. - VK_NV_fragment_coverage_to_color extension, if the
extendedDynamicState3CoverageToColorEnable
feature is supported. - VK_NV_fragment_coverage_to_color extension, if the
extendedDynamicState3CoverageToColorLocation
feature is supported. - VK_NV_framebuffer_mixed_samples extension, if the
extendedDynamicState3CoverageModulationMode
feature is supported. - VK_NV_framebuffer_mixed_samples extension, if the
extendedDynamicState3CoverageModulationTableEnable
feature is supported. - VK_NV_framebuffer_mixed_samples extension, if the
extendedDynamicState3CoverageModulationTable
feature is supported. coverageReductionMode
, if theextendedDynamicState3CoverageReductionMode
feature is supported.representativeFragmentTest
, if theextendedDynamicState3RepresentativeFragmentTestEnable
feature is supported.shadingRateImage
, if theextendedDynamicState3ShadingRateImageEnable
feature is supported.multiviewPerViewViewports
, if the VK_QCOM_multiview_per_view_viewports extension is supported.attachmentFeedbackLoopDynamicState
, if the VK_EXT_attachment_feedback_loop_dynamic_state extension is supported.rayTracingPositionFetch
, if the VK_KHR_ray_tracing_position_fetch extension is supported.shaderObject
, if the VK_EXT_shader_object extension is supported.shaderTileImageColorReadAccess
, if the VK_EXT_shader_tile_image extension is supported.depthBiasControl
, if the VK_EXT_depth_bias_control extension is supported.deviceGeneratedCompute
, if the VK_NV_device_generated_commands_compute extension is supported.shaderEnqueue
if the VK_AMDX_shader_enqueue extension is supported.cooperativeMatrix
if the VK_KHR_cooperative_matrix extension is supported.ycbcrDegamma
, if the VK_QCOM_ycbcr_degamma extension is supported.descriptorPoolOverallocation
, if the VK_NV_descriptor_pool_overallocation extension is supported.externalFormatResolve
, if the VK_ANDROID_external_format_resolve extension is supported.extendedSparseAddressSpace
, if the VK_NV_extended_sparse_address_space extension is supported.schedulingControls
, if the VK_ARM_scheduling_controls extension is supported.relaxedLineRasterization
, if the VK_IMG_relaxed_line_rasterization extension is supported.renderPassStriped
, if the VK_ARM_render_pass_striped extension is supported.perStageDescriptorSet
, if the VK_NV_per_stage_descriptor_set extension is supported.shaderMaximalReconvergence
, if the VK_KHR_shader_maximal_reconvergence extension is supported.shaderSubgroupRotate
, if the xref::name::VK_KHR_shader_subgroup_rotate extension is supported.shaderExpectAssume
, if the VK_KHR_shader_expect_assume extension is supported.shaderFloatControls2
, if the VK_KHR_shader_float_controls2 extension is supported.dynamicRenderingLocalRead
, if the VK_KHR_dynamic_rendering_local_read extension is supported.shaderQuadControl
, if the VK_KHR_shader_quad_control extension is supported.shaderFloat16VectorAtomics
, if the VK_NV_shader_atomic_float16_vector extension is supported.memoryMapPlaced
if the VK_EXT_map_memory_placed extension is supported.shaderRawAccessChains
, if the VK_NV_raw_access_chains extension is supported.customBorderColors
, if the VK_EXT_custom_border_color extension is supported.
All other features defined in the Specification are optional.