• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Copyright 2018-2022 The Khronos Group Inc.
2//
3// SPDX-License-Identifier: CC-BY-4.0
4
5[open,refpage='VkValidationFeaturesEXT',desc='Specify validation features to enable or disable for a Vulkan instance',type='structs']
6--
7When creating a Vulkan instance for which you wish to enable or disable
8specific validation features, add a slink:VkValidationFeaturesEXT structure
9to the pname:pNext chain of the slink:VkInstanceCreateInfo structure,
10specifying the features to be enabled or disabled.
11
12include::{generated}/api/structs/VkValidationFeaturesEXT.adoc[]
13
14  * pname:sType is the type of this structure.
15  * pname:pNext is `NULL` or a pointer to a structure extending this
16    structure.
17  * pname:enabledValidationFeatureCount is the number of features to enable.
18  * pname:pEnabledValidationFeatures is a pointer to an array of
19    elink:VkValidationFeatureEnableEXT values specifying the validation
20    features to be enabled.
21  * pname:disabledValidationFeatureCount is the number of features to
22    disable.
23  * pname:pDisabledValidationFeatures is a pointer to an array of
24    elink:VkValidationFeatureDisableEXT values specifying the validation
25    features to be disabled.
26
27.Valid Usage
28****
29  * [[VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-02967]]
30    If the pname:pEnabledValidationFeatures array contains
31    ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT,
32    then it must: also contain
33    ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT
34  * [[VUID-VkValidationFeaturesEXT-pEnabledValidationFeatures-02968]]
35    If the pname:pEnabledValidationFeatures array contains
36    ename:VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT, then it must: not
37    contain ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT
38****
39
40include::{generated}/validity/structs/VkValidationFeaturesEXT.adoc[]
41--
42
43[open,refpage='VkValidationFeatureEnableEXT',desc='Specify validation features to enable',type='enums']
44--
45Possible values of elements of the
46slink:VkValidationFeaturesEXT::pname:pEnabledValidationFeatures array,
47specifying validation features to be enabled, are:
48
49include::{generated}/api/enums/VkValidationFeatureEnableEXT.adoc[]
50
51  * ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT specifies that
52    GPU-assisted validation is enabled.
53    Activating this feature instruments shader programs to generate
54    additional diagnostic data.
55    This feature is disabled by default.
56  * ename:VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT
57    specifies that the validation layers reserve a descriptor set binding
58    slot for their own use.
59    The layer reports a value for
60    slink:VkPhysicalDeviceLimits::pname:maxBoundDescriptorSets that is one
61    less than the value reported by the device.
62    If the device supports the binding of only one descriptor set, the
63    validation layer does not perform GPU-assisted validation.
64    This feature is disabled by default.
65  * ename:VK_VALIDATION_FEATURE_ENABLE_BEST_PRACTICES_EXT specifies that
66    Vulkan best-practices validation is enabled.
67    Activating this feature enables the output of warnings related to common
68    misuse of the API, but which are not explicitly prohibited by the
69    specification.
70    This feature is disabled by default.
71  * ename:VK_VALIDATION_FEATURE_ENABLE_DEBUG_PRINTF_EXT specifies that the
72    layers will process code:debugPrintfEXT operations in shaders and send
73    the resulting output to the debug callback.
74    This feature is disabled by default.
75  * ename:VK_VALIDATION_FEATURE_ENABLE_SYNCHRONIZATION_VALIDATION_EXT
76    specifies that Vulkan synchronization validation is enabled.
77    This feature reports resource access conflicts due to missing or
78    incorrect synchronization operations between actions (Draw, Copy,
79    Dispatch, Blit) reading or writing the same regions of memory.
80    This feature is disabled by default.
81--
82
83[open,refpage='VkValidationFeatureDisableEXT',desc='Specify validation features to disable',type='enums']
84--
85Possible values of elements of the
86slink:VkValidationFeaturesEXT::pname:pDisabledValidationFeatures array,
87specifying validation features to be disabled, are:
88
89include::{generated}/api/enums/VkValidationFeatureDisableEXT.adoc[]
90
91  * ename:VK_VALIDATION_FEATURE_DISABLE_ALL_EXT specifies that all
92    validation checks are disabled.
93  * ename:VK_VALIDATION_FEATURE_DISABLE_SHADERS_EXT specifies that shader
94    validation is disabled.
95    This feature is enabled by default.
96  * ename:VK_VALIDATION_FEATURE_DISABLE_THREAD_SAFETY_EXT specifies that
97    thread safety validation is disabled.
98    This feature is enabled by default.
99  * ename:VK_VALIDATION_FEATURE_DISABLE_API_PARAMETERS_EXT specifies that
100    stateless parameter validation is disabled.
101    This feature is enabled by default.
102  * ename:VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT specifies that
103    object lifetime validation is disabled.
104    This feature is enabled by default.
105  * ename:VK_VALIDATION_FEATURE_DISABLE_CORE_CHECKS_EXT specifies that core
106    validation checks are disabled.
107    This feature is enabled by default.
108    If this feature is disabled, the shader validation and GPU-assisted
109    validation features are also disabled.
110  * ename:VK_VALIDATION_FEATURE_DISABLE_UNIQUE_HANDLES_EXT specifies that
111    protection against duplicate non-dispatchable object handles is
112    disabled.
113    This feature is enabled by default.
114  * ename:VK_VALIDATION_FEATURE_DISABLE_SHADER_VALIDATION_CACHE_EXT
115    specifies that there will be no caching of shader validation results and
116    every shader will be validated on every application execution.
117    Shader validation caching is enabled by default.
118--
119
120[NOTE]
121.Note
122====
123Disabling checks such as parameter validation and object lifetime validation
124prevents the reporting of error conditions that can cause other validation
125checks to behave incorrectly or crash.
126Some validation checks assume that their inputs are already valid and do not
127always revalidate them.
128====
129
130[NOTE]
131.Note
132====
133The `apiext:VK_EXT_validation_features` extension subsumes all the
134functionality provided in the `apiext:VK_EXT_validation_flags` extension.
135====
136