Skip to content

Commit 16be034

Browse files
committed
build: Downstream Vulkan-ValidationLayers 1.3.302
2 parents c61c7c3 + 17e195e commit 16be034

File tree

742 files changed

+117627
-67887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

742 files changed

+117627
-67887
lines changed

BUILD.gn

Lines changed: 40 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ vvl_sources = [
108108
"layers/core_checks/cc_descriptor.cpp",
109109
"layers/core_checks/cc_device.cpp",
110110
"layers/core_checks/cc_device_memory.cpp",
111+
"layers/core_checks/cc_device_generated_commands.cpp",
111112
"layers/core_checks/cc_drawdispatch.cpp",
112113
"layers/core_checks/cc_external_object.cpp",
113114
"layers/core_checks/cc_image.cpp",
@@ -125,7 +126,10 @@ vvl_sources = [
125126
"layers/core_checks/cc_spirv.cpp",
126127
"layers/core_checks/cc_state_tracker.cpp",
127128
"layers/core_checks/cc_state_tracker.h",
129+
"layers/core_checks/cc_submit.cpp",
130+
"layers/core_checks/cc_submit.h",
128131
"layers/core_checks/cc_synchronization.cpp",
132+
"layers/core_checks/cc_synchronization.h",
129133
"layers/core_checks/cc_video.cpp",
130134
"layers/core_checks/cc_vuid_maps.cpp",
131135
"layers/core_checks/cc_vuid_maps.h",
@@ -142,6 +146,9 @@ vvl_sources = [
142146
"layers/error_message/logging.cpp",
143147
"layers/error_message/logging.h",
144148
"layers/error_message/record_object.h",
149+
"layers/error_message/log_message_type.h",
150+
"layers/error_message/spirv_logging.cpp",
151+
"layers/error_message/spirv_logging.h",
145152
"layers/external/inplace_function.h",
146153
"layers/external/vma/vk_mem_alloc.h",
147154
"layers/external/vma/vma.cpp",
@@ -157,10 +164,7 @@ vvl_sources = [
157164
"layers/gpu/cmd_validation/gpuav_draw.h",
158165
"layers/gpu/cmd_validation/gpuav_trace_rays.cpp",
159166
"layers/gpu/cmd_validation/gpuav_trace_rays.h",
160-
"layers/gpu/core/gpu_settings.h",
161-
"layers/gpu/core/gpu_shader_cache_hash.h",
162-
"layers/gpu/core/gpu_state_tracker.cpp",
163-
"layers/gpu/core/gpu_state_tracker.h",
167+
"layers/gpu/core/gpuav_settings.h",
164168
"layers/gpu/core/gpuav.h",
165169
"layers/gpu/core/gpuav_constants.h",
166170
"layers/gpu/core/gpuav_record.cpp",
@@ -175,30 +179,33 @@ vvl_sources = [
175179
"layers/gpu/descriptor_validation/gpuav_image_layout.h",
176180
"layers/gpu/error_message/gpuav_vuids.cpp",
177181
"layers/gpu/error_message/gpuav_vuids.h",
178-
"layers/gpu/instrumentation/gpu_shader_instrumentor.cpp",
179-
"layers/gpu/instrumentation/gpu_shader_instrumentor.h",
182+
"layers/gpu/instrumentation/gpuav_shader_instrumentor.cpp",
183+
"layers/gpu/instrumentation/gpuav_shader_instrumentor.h",
180184
"layers/gpu/instrumentation/gpuav_instrumentation.cpp",
181185
"layers/gpu/instrumentation/gpuav_instrumentation.h",
182-
"layers/gpu/resources/gpu_resources.cpp",
183-
"layers/gpu/resources/gpu_resources.h",
184-
"layers/gpu/resources/gpu_shader_resources.h",
186+
"layers/gpu/resources/gpuav_resources.cpp",
187+
"layers/gpu/resources/gpuav_resources.h",
188+
"layers/gpu/resources/gpuav_shader_resources.h",
185189
"layers/gpu/resources/gpuav_subclasses.cpp",
186190
"layers/gpu/resources/gpuav_subclasses.h",
187-
"layers/gpu/shaders/gpu_error_codes.h",
188-
"layers/gpu/shaders/gpu_error_header.h",
189-
"layers/gpu/shaders/gpu_shaders_constants.h",
190-
"layers/gpu/spirv/bindless_descriptor_pass.cpp",
191-
"layers/gpu/spirv/bindless_descriptor_pass.h",
192-
"layers/gpu/spirv/non_bindless_oob_buffer_pass.cpp",
193-
"layers/gpu/spirv/non_bindless_oob_buffer_pass.h",
194-
"layers/gpu/spirv/non_bindless_oob_texel_buffer_pass.cpp",
195-
"layers/gpu/spirv/non_bindless_oob_texel_buffer_pass.h",
191+
"layers/gpu/shaders/gpuav_error_codes.h",
192+
"layers/gpu/shaders/gpuav_error_header.h",
193+
"layers/gpu/shaders/gpuav_shaders_constants.h",
194+
"layers/gpu/spirv/descriptor_indexing_oob_pass.cpp",
195+
"layers/gpu/spirv/descriptor_indexing_oob_pass.h",
196+
"layers/gpu/spirv/descriptor_class_general_buffer_pass.cpp",
197+
"layers/gpu/spirv/descriptor_class_general_buffer_pass.h",
198+
"layers/gpu/spirv/descriptor_class_texel_buffer_pass.cpp",
199+
"layers/gpu/spirv/descriptor_class_texel_buffer_pass.h",
196200
"layers/gpu/spirv/buffer_device_address_pass.cpp",
197201
"layers/gpu/spirv/buffer_device_address_pass.h",
202+
"layers/gpu/spirv/post_process_descriptor_indexing.cpp",
203+
"layers/gpu/spirv/post_process_descriptor_indexing.h",
198204
"layers/gpu/spirv/function_basic_block.cpp",
199205
"layers/gpu/spirv/function_basic_block.h",
200206
"layers/gpu/spirv/instruction.cpp",
201207
"layers/gpu/spirv/instruction.h",
208+
"layers/gpu/spirv/interface.h",
202209
"layers/gpu/spirv/link.h",
203210
"layers/gpu/spirv/module.cpp",
204211
"layers/gpu/spirv/module.h",
@@ -224,6 +231,8 @@ vvl_sources = [
224231
"layers/state_tracker/cmd_buffer_state.h",
225232
"layers/state_tracker/descriptor_sets.cpp",
226233
"layers/state_tracker/descriptor_sets.h",
234+
"layers/state_tracker/device_generated_commands_state.cpp",
235+
"layers/state_tracker/device_generated_commands_state.h",
227236
"layers/state_tracker/device_memory_state.cpp",
228237
"layers/state_tracker/device_memory_state.h",
229238
"layers/state_tracker/device_state.cpp",
@@ -269,6 +278,7 @@ vvl_sources = [
269278
"layers/stateless/sl_cmd_buffer.cpp",
270279
"layers/stateless/sl_cmd_buffer_dynamic.cpp",
271280
"layers/stateless/sl_descriptor.cpp",
281+
"layers/stateless/sl_device_generated_commands.cpp",
272282
"layers/stateless/sl_device_memory.cpp",
273283
"layers/stateless/sl_external_object.cpp",
274284
"layers/stateless/sl_framebuffer.cpp",
@@ -297,6 +307,8 @@ vvl_sources = [
297307
"layers/sync/sync_op.h",
298308
"layers/sync/sync_renderpass.cpp",
299309
"layers/sync/sync_renderpass.h",
310+
"layers/sync/sync_reporting.cpp",
311+
"layers/sync/sync_reporting.h",
300312
"layers/sync/sync_settings.h",
301313
"layers/sync/sync_stats.cpp",
302314
"layers/sync/sync_stats.h",
@@ -355,17 +367,20 @@ vvl_sources = [
355367
"layers/vulkan/generated/error_location_helper.h",
356368
"layers/vulkan/generated/feature_requirements_helper.cpp",
357369
"layers/vulkan/generated/feature_requirements_helper.h",
358-
"layers/vulkan/generated/gpu_av_shader_hash.h",
359-
"layers/vulkan/generated/instrumentation_bindless_descriptor_comp.cpp",
360-
"layers/vulkan/generated/instrumentation_bindless_descriptor_comp.h",
361-
"layers/vulkan/generated/instrumentation_non_bindless_oob_buffer_comp.cpp",
362-
"layers/vulkan/generated/instrumentation_non_bindless_oob_buffer_comp.h",
363-
"layers/vulkan/generated/instrumentation_non_bindless_oob_texel_buffer_comp.cpp",
364-
"layers/vulkan/generated/instrumentation_non_bindless_oob_texel_buffer_comp.h",
370+
"layers/vulkan/generated/instrumentation_descriptor_indexing_oob_bindless_comp.cpp",
371+
"layers/vulkan/generated/instrumentation_descriptor_indexing_oob_bindless_comp.h",
372+
"layers/vulkan/generated/instrumentation_descriptor_indexing_oob_non_bindless_comp.cpp",
373+
"layers/vulkan/generated/instrumentation_descriptor_indexing_oob_non_bindless_comp.h",
374+
"layers/vulkan/generated/instrumentation_descriptor_class_general_buffer_comp.cpp",
375+
"layers/vulkan/generated/instrumentation_descriptor_class_general_buffer_comp.h",
376+
"layers/vulkan/generated/instrumentation_descriptor_class_texel_buffer_comp.cpp",
377+
"layers/vulkan/generated/instrumentation_descriptor_class_texel_buffer_comp.h",
365378
"layers/vulkan/generated/instrumentation_buffer_device_address_comp.cpp",
366379
"layers/vulkan/generated/instrumentation_buffer_device_address_comp.h",
367380
"layers/vulkan/generated/instrumentation_ray_query_comp.cpp",
368381
"layers/vulkan/generated/instrumentation_ray_query_comp.h",
382+
"layers/vulkan/generated/instrumentation_post_process_descriptor_index_comp.cpp",
383+
"layers/vulkan/generated/instrumentation_post_process_descriptor_index_comp.h",
369384
"layers/vulkan/generated/layer_chassis_dispatch.cpp",
370385
"layers/vulkan/generated/layer_chassis_dispatch.h",
371386
"layers/vulkan/generated/object_tracker.cpp",

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,10 @@ option(BUILD_TESTS "Build the tests")
207207
if(BUILD_TESTS)
208208
enable_testing()
209209
add_subdirectory(tests)
210+
# Set tests as Visual Studio startup project
211+
if(VULKANSC)
212+
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT vksc_layer_validation_tests)
213+
else()
214+
set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT vk_layer_validation_tests)
215+
endif()
210216
endif()

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ For those who don't want to build from source, there are few ways to get working
1616
- For Android, each SDK tag will have binaries to download (example: [vulkan-sdk-1.3.280.0 tag](https://github.com/KhronosGroup/Vulkan-ValidationLayers/releases/tag/vulkan-sdk-1.3.280.0))
1717
- Every change applied to the main branch runs through GitHub action and will [produce artifacts](https://github.com/KhronosGroup/Vulkan-ValidationLayers/actions?query=branch%3Amain) of the latest commit.
1818

19+
## Adjusting settings
20+
21+
See [settings documentation](./docs/settings.md).
22+
1923
## Community Assistance
2024

2125
Before submitting an issue to the validation layers or reaching out to the developers it may be prudent to reach out to the community first.

docs/creating_tests.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ m_errorMonitor->VerifyFound();
180180
```cpp
181181
m_errorMonitor->SetDesiredError("VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00905");
182182
m_errorMonitor->SetDesiredError("VUID-VkDeviceGroupRenderPassBeginInfo-deviceMask-00907");
183-
vk::CmdBeginRenderPass(m_commandBuffer->handle(), &m_renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
183+
vk::CmdBeginRenderPass(m_command_buffer.handle(), &m_renderPassBeginInfo, VK_SUBPASS_CONTENTS_INLINE);
184184
m_errorMonitor->VerifyFound();
185185
```
186186
@@ -189,7 +189,7 @@ m_errorMonitor->VerifyFound();
189189
```cpp
190190
const char* vuid = IsExtensionsEnabled(VK_KHR_SAMPLER_YCBCR_CONVERSION_EXTENSION_NAME) ? "VUID-vkCmdCopyImage-dstImage-01733" : "VUID-vkCmdCopyImage-dstImage-01733";
191191
m_errorMonitor->SetDesiredError(vuid);
192-
m_commandBuffer->CopyImage(image_2.image(), VK_IMAGE_LAYOUT_GENERAL, image_1.image(), VK_IMAGE_LAYOUT_GENERAL, 1, &copy_region);
192+
m_command_buffer.CopyImage(image_2.image(), VK_IMAGE_LAYOUT_GENERAL, image_1.image(), VK_IMAGE_LAYOUT_GENERAL, 1, &copy_region);
193193
m_errorMonitor->VerifyFound();
194194
```
195195

docs/debug_printf.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ The Debug Printf settings are managed by configuring the Validation Layer. These
2525

2626
Debug Printf settings can also be managed using the [Vulkan Configurator](https://vulkan.lunarg.com/doc/sdk/latest/windows/vkconfig.html) included with the Vulkan SDK.
2727

28+
For those who "just need to quick use it" there is also a `set VK_LAYER_PRINTF_ONLY_PRESET=1` environment variable that will turn on DebugPrintf and turn off all of the other validation logic.
29+
2830
### Settings
2931

3032
> All settings are found in Vulkan Configurator (`VkConfig`)
33+
>
34+
> Even if you use `VK_LAYER_PRINTF_ONLY_PRESET` you need to set those settings yourself as desired
3135
3236
There are currently 3 environment variables that are used for settings in Debug Printf
3337

@@ -46,7 +50,7 @@ There are currently 3 environment variables that are used for settings in Debug
4650
To use Debug Printf in GLSL shaders, you need to enable the GL_EXT_debug_printf extension.
4751
Then add debugPrintfEXT calls at the locations in your shader where you want to print
4852
messages and/or values
49-
Here is a very simple example:
53+
Here is a very simple example ([Try Online](https://godbolt.org/z/MnYGj8azM)):
5054
```
5155
#version 450
5256
#extension GL_EXT_debug_printf : enable
@@ -64,7 +68,7 @@ in a vertex shader and a triangle was drawn, it would be printed 3 times.
6468

6569
## Using Debug Printf in HLSL Shaders
6670

67-
In HLSL, debug printf can be invoked as follows:
71+
In HLSL, debug printf can be invoked as follows ([Try Online](https://godbolt.org/z/3ThznsdK8)):
6872
```
6973
void main() {
7074
float myfloat = 3.1415;
@@ -182,8 +186,6 @@ Would print **"Here's a vector of floats 1.20, 2.20, 3.20, 4.20"**
182186
Would print **"Unsigned long as decimal 2305843009213693953 and as hex 0x2000000000000001"**
183187

184188
### Limitations
185-
* Debug Printf cannot be used at the same time as GPU Assisted Validation.
186-
* https://github.com/KhronosGroup/Vulkan-ValidationLayers/issues/8192
187189
* Debug Printf consumes a descriptor set. If your application uses every last
188190
descriptor set on the GPU, Debug Printf will not work.
189191
* Suggest using `VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_RESERVE_BINDING_SLOT_EXT`
@@ -193,8 +195,7 @@ buffer size.
193195
* Can be controlled with `VK_LAYER_PRINTF_BUFFER_SIZE`
194196
* Validation Layers version: `1.2.135.0` or later is required
195197
* Vulkan API version 1.1 or greater is required
196-
* VkPhysicalDevice features: `fragmentStoresAndAtomics` and `vertexPipelineStoresAndAtomics`
197-
are required
198+
* When using Validation Layers, the `fragmentStoresAndAtomics`, `vertexPipelineStoresAndAtomics`, and `timelineSemaphore` features are required
198199
* The `VK_KHR_shader_non_semantic_info` extension must be supported and enabled
199200
* If using the Validation Layers, we attempt to strip it out to allow wider range of users to still use Debug Printf
200201
* RenderDoc release 1.14 or later

docs/generated_code.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ values when the Vulkan Headers or SPIR-V Grammer is updated.
77
- [Adding and Editing code generation](#adding-and-editing-code-generation)
88
- [How it works](#how-it-works)
99

10+
# Dependency
11+
12+
`pyparsing` is required, so if it is not installed, you will need to call `pip install pyparsing`
13+
1014
# How to generate the code
1115

1216
- Linux:

0 commit comments

Comments
 (0)