From cd9431246b97f3df2fadb6e23e8035c93712b02e Mon Sep 17 00:00:00 2001 From: dan sinclair Date: Thu, 17 Jan 2019 13:06:28 -0500 Subject: 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 --- include/amber/amber_vulkan.h | 6 +----- include/amber/vulkan_header.h | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 include/amber/vulkan_header.h (limited to 'include') 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 #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_ -- cgit v1.2.3