Use vulkan/vulkan_core.h instead of vulkan/vulkan.h

vulkan.h includes platform specific headers that cause non trivial build
overhead. Because vk-bootstrap doesn't make use of any platform specific
API's, it can move over to vulkan_core.h.

This *MAY* break users of the library who were depending on vulkan/vulkan.h
including other headers, like windows.h. But because the benefits outweigh
the drawbacks, it is a good change.
This commit is contained in:
Charles Giessen 2024-02-11 12:48:55 -06:00 committed by Charles Giessen
parent bc510bc421
commit a330227666
5 changed files with 5 additions and 5 deletions

View File

@ -5,7 +5,7 @@
#include <fstream>
#include <string>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>
#include <GLFW/glfw3.h>
#include <VkBootstrap.h>

View File

@ -262,7 +262,7 @@ info = '// This file is a part of VkBootstrap\n'
info += '// https://github.com/charles-lunarg/vk-bootstrap\n\n'
# # Content
head = '\n#pragma once\n\n#include <vulkan/vulkan.h>\n\n'
head = '\n#pragma once\n\n#include <vulkan/vulkan_core.h>\n\n'
head += 'namespace vkb {\n\n'
def create_dispatch_table(dispatch_type):

View File

@ -24,7 +24,7 @@
#include <string>
#include <system_error>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>
#include "VkBootstrapDispatch.h"

View File

@ -21,7 +21,7 @@
#pragma once
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>
namespace vkb {

View File

@ -8,7 +8,7 @@
#include <string>
#include <vector>
#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>
// Helper function to get the size of a struct given a VkStructureType
// Hand written, must be updated to include any used struct.