blob: b002a483b3ff4c0efe057238daf7aed6f1ac9470 [file] [log] [blame]
// Copyright 2018-2021 The Khronos Group, Inc.
//
// SPDX-License-Identifier: CC-BY-4.0
[open,refpage='VkValidationFeaturesEXT',desc='Specify validation features to enable or disable for a Vulkan instance',type='structs']
--
When creating a Vulkan instance for which you wish to enable or disable
specific validation features, add a slink:VkValidationFeaturesEXT structure
to the pname:pNext chain of the slink:VkInstanceCreateInfo structure,
specifying the features to be enabled or disabled.
include::{generated}/api/structs/VkValidationFeaturesEXT.txt[]
* pname:sType is the type of this structure.
* pname:pNext is `NULL` or a pointer to a structure extending this
structure.
* pname:enabledValidationFeatureCount is the number of features to enable.
* pname:pEnabledValidationFeatures is a pointer to an array of
elink:VkValidationFeatureEnableEXT values specifying the validation
features to be enabled.
* pname:disabledValidationFeatureCount is the number of features to
disable.
* pname:pDisabledValidationFeatures is a pointer to an array of
elink:VkValidationFeatureDisableEXT values specifying the validation
features to be disabled.
.Valid Usage
****
* [[VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-02967]]
If the pname:pEnabledValidationFeatures array contains
ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT,
then it must: also contain
ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT
* [[VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-02968]]
If the pname:pEnabledValidationFeatures array contains
ename:VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT, then it must: not
contain ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT
****
include::{generated}/validity/structs/VkValidationFeaturesEXT.txt[]
--
[open,refpage='VkValidationFeatureEnableEXT',desc='Specify validation features to enable',type='enums']
--
Possible values of elements of the
slink:VkValidationFeaturesEXT::pname:pEnabledValidationFeatures array,
specifying validation features to be enabled, are:
include::{generated}/api/enums/VkValidationFeatureEnableEXT.txt[]
* ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT specifies that
GPU-assisted validation is enabled.
Activating this feature instruments shader programs to generate
additional diagnostic data.
This feature is disabled by default.
* ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT
specifies that the validation layers reserve a descriptor set binding
slot for their own use.
The layer reports a value for
slink:VkPhysicalDeviceLimits::pname:maxBoundDescriptorSets that is one
less than the value reported by the device.
If the device supports the binding of only one descriptor set, the
validation layer does not perform GPU-assisted validation.
This feature is disabled by default.
* ename:VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT specifies that
Vulkan best-practices validation is enabled.
Activating this feature enables the output of warnings related to common
misuse of the API, but which are not explicitly prohibited by the
specification.
This feature is disabled by default.
* ename:VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT specifies that the
layers will process code:debugPrintfEXT operations in shaders and send
the resulting output to the debug callback.
This feature is disabled by default.
* ename:VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT
specifies that Vulkan synchronization validation is enabled.
This feature reports resource access conflicts due to missing or
incorrect synchronization operations between actions (Draw, Copy,
Dispatch, Blit) reading or writing the same regions of memory.
This feature is disabled by default.
--
[open,refpage='VkValidationFeatureDisableEXT',desc='Specify validation features to disable',type='enums']
--
Possible values of elements of the
slink:VkValidationFeaturesEXT::pname:pDisabledValidationFeatures array,
specifying validation features to be disabled, are:
include::{generated}/api/enums/VkValidationFeatureDisableEXT.txt[]
* ename:VK_VALIDATION_FEATURE_DISABLE_ALL_EXT specifies that all
validation checks are disabled.
* ename:VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT specifies that shader
validation is disabled.
This feature is enabled by default.
* ename:VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT specifies that
thread safety validation is disabled.
This feature is enabled by default.
* ename:VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT specifies that
stateless parameter validation is disabled.
This feature is enabled by default.
* ename:VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT specifies that
object lifetime validation is disabled.
This feature is enabled by default.
* ename:VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT specifies that core
validation checks are disabled.
This feature is enabled by default.
If this feature is disabled, the shader validation and GPU-assisted
validation features are also disabled.
* ename:VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT specifies that
protection against duplicate non-dispatchable object handles is
disabled.
This feature is enabled by default.
* ename:VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT
specifies that there will be no caching of shader validation results and
every shader will be validated on every application execution.
Shader validation caching is enabled by default.
--
[NOTE]
.Note
====
Disabling checks such as parameter validation and object lifetime validation
prevents the reporting of error conditions that can cause other validation
checks to behave incorrectly or crash.
Some validation checks assume that their inputs are already valid and do not
always revalidate them.
====
[NOTE]
.Note
====
The `apiext:VK_EXT_validation_features` extension subsumes all the
functionality provided in the `apiext:VK_EXT_validation_flags` extension.
====