From f5c44772a6999a37760f6b67ee73b33876e8f7a9 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 4 Sep 2019 08:47:14 +0000 Subject: [PATCH] Use the agreed upon include path for spirv-cross. Everyone using spirv-cross includes its headers via for example. Make Dawn match that convention so it can play better with the setup used by other projects. Still leave working for now because it is used by shaderc_spvc. A follow up CL to that repo will do the same change. BUG= Change-Id: I9dc590a809d7ba733113b07930a285acfca64a66 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10801 Reviewed-by: Ryan Harrison Reviewed-by: Austin Eng Commit-Queue: Corentin Wallez --- src/dawn_native/ShaderModule.cpp | 2 +- src/dawn_native/d3d12/ShaderModuleD3D12.cpp | 2 +- src/dawn_native/metal/ShaderModuleMTL.mm | 2 +- src/dawn_native/null/DeviceNull.cpp | 2 +- src/dawn_native/opengl/ShaderModuleGL.cpp | 2 +- src/dawn_native/vulkan/ShaderModuleVk.cpp | 2 +- third_party/BUILD.gn | 9 ++++++--- 7 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/dawn_native/ShaderModule.cpp b/src/dawn_native/ShaderModule.cpp index a418420277..ccb6e32a7b 100644 --- a/src/dawn_native/ShaderModule.cpp +++ b/src/dawn_native/ShaderModule.cpp @@ -20,8 +20,8 @@ #include "dawn_native/Pipeline.h" #include "dawn_native/PipelineLayout.h" -#include #include +#include #include diff --git a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp index a01294c200..4698459b3a 100644 --- a/src/dawn_native/d3d12/ShaderModuleD3D12.cpp +++ b/src/dawn_native/d3d12/ShaderModuleD3D12.cpp @@ -20,7 +20,7 @@ #include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/PipelineLayoutD3D12.h" -#include +#include namespace dawn_native { namespace d3d12 { diff --git a/src/dawn_native/metal/ShaderModuleMTL.mm b/src/dawn_native/metal/ShaderModuleMTL.mm index 3fcad71cba..69c96333bd 100644 --- a/src/dawn_native/metal/ShaderModuleMTL.mm +++ b/src/dawn_native/metal/ShaderModuleMTL.mm @@ -18,7 +18,7 @@ #include "dawn_native/metal/DeviceMTL.h" #include "dawn_native/metal/PipelineLayoutMTL.h" -#include +#include #include diff --git a/src/dawn_native/null/DeviceNull.cpp b/src/dawn_native/null/DeviceNull.cpp index 8fcfe0ea7f..44e62db51d 100644 --- a/src/dawn_native/null/DeviceNull.cpp +++ b/src/dawn_native/null/DeviceNull.cpp @@ -19,7 +19,7 @@ #include "dawn_native/DynamicUploader.h" #include "dawn_native/Instance.h" -#include +#include namespace dawn_native { namespace null { diff --git a/src/dawn_native/opengl/ShaderModuleGL.cpp b/src/dawn_native/opengl/ShaderModuleGL.cpp index 0166b3f2d9..e7e2d33e53 100644 --- a/src/dawn_native/opengl/ShaderModuleGL.cpp +++ b/src/dawn_native/opengl/ShaderModuleGL.cpp @@ -18,7 +18,7 @@ #include "common/Platform.h" #include "dawn_native/opengl/DeviceGL.h" -#include +#include #include diff --git a/src/dawn_native/vulkan/ShaderModuleVk.cpp b/src/dawn_native/vulkan/ShaderModuleVk.cpp index 0dd8810d23..9f48e17067 100644 --- a/src/dawn_native/vulkan/ShaderModuleVk.cpp +++ b/src/dawn_native/vulkan/ShaderModuleVk.cpp @@ -17,7 +17,7 @@ #include "dawn_native/vulkan/DeviceVk.h" #include "dawn_native/vulkan/FencedDeleter.h" -#include +#include namespace dawn_native { namespace vulkan { diff --git a/third_party/BUILD.gn b/third_party/BUILD.gn index c880cb9985..cb701e5047 100644 --- a/third_party/BUILD.gn +++ b/third_party/BUILD.gn @@ -12,9 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("../scripts/dawn_overrides_with_defaults.gni") -import("../scripts/dawn_features.gni") import("//build_overrides/build.gni") +import("../scripts/dawn_features.gni") +import("../scripts/dawn_overrides_with_defaults.gni") is_msvc = is_win && !is_clang @@ -26,7 +26,10 @@ is_msvc = is_win && !is_clang spirv_cross_dir = dawn_spirv_cross_dir config("spirv_cross_public") { - include_dirs = [ "${spirv_cross_dir}/.." ] + include_dirs = [ + "${spirv_cross_dir}", + "${spirv_cross_dir}/..", + ] defines = [ "SPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS" ] }