aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordan sinclair <dj2@everburning.com>2019-01-17 13:06:28 -0500
committerJaebaek Seo <duke.acacia@gmail.com>2019-01-17 13:06:28 -0500
commitcd9431246b97f3df2fadb6e23e8035c93712b02e (patch)
treec5f466857e1e42a0a4229bba23d3044636b3e869 /include
parent75a67f949933fe1e4b8091462800bc3baf7f7ba2 (diff)
downloadamber-cd9431246b97f3df2fadb6e23e8035c93712b02e.tar.gz
Allow CTS to provide alternate vulkan.h file. (#231)
This CL changes the includes to allow the CTS to use vkDefs.h instead of vulkan/vulkan.h
Diffstat (limited to 'include')
-rw-r--r--include/amber/amber_vulkan.h6
-rw-r--r--include/amber/vulkan_header.h27
2 files changed, 28 insertions, 5 deletions
diff --git a/include/amber/amber_vulkan.h b/include/amber/amber_vulkan.h
index 435b2ba..4e14c59 100644
--- a/include/amber/amber_vulkan.h
+++ b/include/amber/amber_vulkan.h
@@ -20,11 +20,7 @@
#include <vector>
#include "amber/amber.h"
-
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
-#include "vulkan/vulkan.h"
-#pragma clang diagnostic pop
+#include "amber/vulkan_header.h"
namespace amber {
diff --git a/include/amber/vulkan_header.h b/include/amber/vulkan_header.h
new file mode 100644
index 0000000..64c3194
--- /dev/null
+++ b/include/amber/vulkan_header.h
@@ -0,0 +1,27 @@
+// Copyright 2019 The Amber Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#ifndef AMBER_VULKAN_HEADER_H_
+#define AMBER_VULKAN_HEADER_H_
+
+#if AMBER_CTS_VULKAN_HEADER
+#include "vkDefs.h"
+#else // DAMBER_CTS_VULKAN_HEADER
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
+#include "vulkan/vulkan.h"
+#pragma clang diagnostic pop
+#endif // AMBER_CTS_VULKAN_HEADER
+
+#endif // AMBER_VULKAN_HEADER_H_