Skip to content

Commit

Permalink
Use vulkan/vulkan_core.h instead of vulkan/vulkan.h
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
charles-lunarg committed Feb 11, 2024
1 parent 1d909da commit dde0170
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/triangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <fstream>
#include <string>

#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>
#include <GLFW/glfw3.h>

#include <VkBootstrap.h>
Expand Down
2 changes: 1 addition & 1 deletion script/generate_dispatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ def get_macro_guard(reqs_collection, command_name):
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):
Expand Down
2 changes: 1 addition & 1 deletion src/VkBootstrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include <string>
#include <system_error>

#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

#include "VkBootstrapDispatch.h"

Expand Down
2 changes: 1 addition & 1 deletion src/VkBootstrapDispatch.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#pragma once

#include <vulkan/vulkan.h>
#include <vulkan/vulkan_core.h>

namespace vkb {

Expand Down
2 changes: 1 addition & 1 deletion tests/vulkan_mock.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit dde0170

Please sign in to comment.