Commit de16f327 by Nicolas Capens Committed by Nicolas Capens

Replace vulkan.h includes with vulkan_core.h

vulkan_core.h only includes 'core' Vulkan declarations, while vulkan.h consists of vulkan_core.h plus platform-specific headers. Only Window System Integration (WSI) and closely related source files should have a need to include vulkan.h. Everything else, in particular our back-end, should not require anything Vulkan platform-specific. This avoids issues such as Xlib defining global macros which clash with C++ type and variable names. Bug b/124265819 Change-Id: I6c250f27aef39b98a2a8b677c169df060698f104 Reviewed-on: https://swiftshader-review.googlesource.com/c/24709Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent 73c3124c
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "Color.hpp" #include "Color.hpp"
#include "Device/Config.hpp" #include "Device/Config.hpp"
#include "System/Resource.hpp" #include "System/Resource.hpp"
#include <vulkan/vulkan.h> #include <vulkan/vulkan_core.h>
namespace sw namespace sw
{ {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#ifndef VK_UTILS_HPP_ #ifndef VK_UTILS_HPP_
#define VK_UTILS_HPP_ #define VK_UTILS_HPP_
#include <vulkan/vulkan.h> #include <vulkan/vulkan_core.h>
namespace vk namespace vk
{ {
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
#ifndef VK_MEMORY_HPP_ #ifndef VK_MEMORY_HPP_
#define VK_MEMORY_HPP_ #define VK_MEMORY_HPP_
#include <vulkan/vulkan.h> #include <vulkan/vulkan_core.h>
namespace vk namespace vk
{ {
......
...@@ -18,7 +18,8 @@ ...@@ -18,7 +18,8 @@
#include "VkConfig.h" #include "VkConfig.h"
#include "VkDebug.hpp" #include "VkDebug.hpp"
#include "VkMemory.h" #include "VkMemory.h"
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>
#include <vulkan/vk_icd.h> #include <vulkan/vk_icd.h>
namespace vk namespace vk
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
// VK_KHR_storage_buffer_storage_class (no functions in this extension) // VK_KHR_storage_buffer_storage_class (no functions in this extension)
// VK_KHR_variable_pointers (no functions in this extension) // VK_KHR_variable_pointers (no functions in this extension)
#include <vulkan/vulkan.h> #include <vulkan/vulkan_core.h>
extern "C" extern "C"
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include <vulkan/vulkan.h> #include <vulkan/vulkan_core.h>
#include <vulkan/vk_icd.h> #include <vulkan/vk_icd.h>
#include <cstring> #include <cstring>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment