From 7ea85871fe7551d933948155b477a10a00548d8a Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Wed, 8 Feb 2023 10:07:21 +0100 Subject: [PATCH] vulkan: prefer vulkan_core.h over vulkan.h If we include vulkan.h, we risk including the WSI bits as well, which we don't need here. Only trouble can follow from including these where they're not needed. So let's include vulkan_core.h in these places instead. Fixes: b39958a3a18 ("anv,nir: Move the ANV YCbCr lowering pass to common code") Reviewed-by: Yonggang Luo Reviewed-by: Adam Jackson Part-of: --- src/vulkan/overlay-layer/overlay.cpp | 2 +- src/vulkan/runtime/vk_descriptors.h | 2 +- src/vulkan/runtime/vk_format_info_gen.py | 2 +- src/vulkan/runtime/vk_object.h | 2 +- src/vulkan/runtime/vk_shader_module.h | 2 +- src/vulkan/util/gen_enum_to_str.py | 4 ++-- src/vulkan/util/rmv/vk_rmv_common.h | 2 +- src/vulkan/util/rmv/vk_rmv_tokens.h | 2 +- src/vulkan/util/vk_alloc.h | 2 +- src/vulkan/util/vk_cmd_queue_gen.py | 4 ++-- src/vulkan/util/vk_util.h | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/vulkan/overlay-layer/overlay.cpp b/src/vulkan/overlay-layer/overlay.cpp index d38e05e5c3f..14746a216e1 100644 --- a/src/vulkan/overlay-layer/overlay.cpp +++ b/src/vulkan/overlay-layer/overlay.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include "git_sha1.h" diff --git a/src/vulkan/runtime/vk_descriptors.h b/src/vulkan/runtime/vk_descriptors.h index a37eae8a741..220787ece37 100644 --- a/src/vulkan/runtime/vk_descriptors.h +++ b/src/vulkan/runtime/vk_descriptors.h @@ -29,7 +29,7 @@ extern "C" { #endif -#include +#include VkResult vk_create_sorted_bindings(const VkDescriptorSetLayoutBinding *bindings, unsigned count, diff --git a/src/vulkan/runtime/vk_format_info_gen.py b/src/vulkan/runtime/vk_format_info_gen.py index e697bfabb19..898ba8c4a1f 100644 --- a/src/vulkan/runtime/vk_format_info_gen.py +++ b/src/vulkan/runtime/vk_format_info_gen.py @@ -36,7 +36,7 @@ TEMPLATE_H = Template(COPYRIGHT + """\ #ifndef VK_FORMAT_INFO_H #define VK_FORMAT_INFO_H -#include +#include #ifdef __cplusplus extern "C" { diff --git a/src/vulkan/runtime/vk_object.h b/src/vulkan/runtime/vk_object.h index 6e346c2c068..ad87121e15c 100644 --- a/src/vulkan/runtime/vk_object.h +++ b/src/vulkan/runtime/vk_object.h @@ -23,7 +23,7 @@ #ifndef VK_OBJECT_H #define VK_OBJECT_H -#include +#include #include #include "c11/threads.h" diff --git a/src/vulkan/runtime/vk_shader_module.h b/src/vulkan/runtime/vk_shader_module.h index 4748450516e..317a7b4ab52 100644 --- a/src/vulkan/runtime/vk_shader_module.h +++ b/src/vulkan/runtime/vk_shader_module.h @@ -24,7 +24,7 @@ #ifndef VK_SHADER_MODULE_H #define VK_SHADER_MODULE_H -#include +#include #include "compiler/shader_enums.h" #include "vk_object.h" diff --git a/src/vulkan/util/gen_enum_to_str.py b/src/vulkan/util/gen_enum_to_str.py index 8257f106ffc..4bdb842959d 100644 --- a/src/vulkan/util/gen_enum_to_str.py +++ b/src/vulkan/util/gen_enum_to_str.py @@ -58,7 +58,7 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\ */ #include - #include + #include #include #include #include "util/macros.h" @@ -169,7 +169,7 @@ H_DEFINE_TEMPLATE = Template(textwrap.dedent(u"""\ #ifndef MESA_VK_ENUM_DEFINES_H #define MESA_VK_ENUM_DEFINES_H - #include + #include #include #ifdef __cplusplus diff --git a/src/vulkan/util/rmv/vk_rmv_common.h b/src/vulkan/util/rmv/vk_rmv_common.h index 42c5c08477d..fd346f3ee67 100644 --- a/src/vulkan/util/rmv/vk_rmv_common.h +++ b/src/vulkan/util/rmv/vk_rmv_common.h @@ -29,7 +29,7 @@ #include "util/simple_mtx.h" #include "util/u_debug.h" #include "util/u_dynarray.h" -#include +#include #include "vk_rmv_tokens.h" struct vk_memory_trace_data; diff --git a/src/vulkan/util/rmv/vk_rmv_tokens.h b/src/vulkan/util/rmv/vk_rmv_tokens.h index 2a1f443525d..d1034bdf7e1 100644 --- a/src/vulkan/util/rmv/vk_rmv_tokens.h +++ b/src/vulkan/util/rmv/vk_rmv_tokens.h @@ -27,7 +27,7 @@ #include #include #include "util/os_time.h" -#include +#include /* * Implemented types of tokens. diff --git a/src/vulkan/util/vk_alloc.h b/src/vulkan/util/vk_alloc.h index 973f54c4cd1..17d1f2f5a58 100644 --- a/src/vulkan/util/vk_alloc.h +++ b/src/vulkan/util/vk_alloc.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include "util/u_math.h" #include "util/macros.h" diff --git a/src/vulkan/util/vk_cmd_queue_gen.py b/src/vulkan/util/vk_cmd_queue_gen.py index 11cbdb2203e..6c14aad5b1e 100644 --- a/src/vulkan/util/vk_cmd_queue_gen.py +++ b/src/vulkan/util/vk_cmd_queue_gen.py @@ -67,7 +67,7 @@ TEMPLATE_H = Template(COPYRIGHT + """\ #include "util/list.h" #define VK_PROTOTYPES -#include +#include #ifdef __cplusplus extern "C" { @@ -189,7 +189,7 @@ TEMPLATE_C = Template(COPYRIGHT + """ #include "${header}" #define VK_PROTOTYPES -#include +#include #include "vk_alloc.h" #include "vk_cmd_enqueue_entrypoints.h" diff --git a/src/vulkan/util/vk_util.h b/src/vulkan/util/vk_util.h index ac6061034ee..78cc2df0c9d 100644 --- a/src/vulkan/util/vk_util.h +++ b/src/vulkan/util/vk_util.h @@ -35,7 +35,7 @@ extern "C" { /* common inlines and macros for vulkan drivers */ -#include +#include struct vk_pnext_iterator { VkBaseOutStructure *pos;