Got vk-bootstrap compiling on Windows and fixed class/struct inconsistency

This commit is contained in:
Charles Giessen 2020-02-27 20:58:38 -07:00
parent 6f0184bdbe
commit 6933882f63
3 changed files with 14 additions and 10 deletions

View File

@ -7,8 +7,8 @@ add_library(vk-bootstrap src/VkBootstrap.h src/VkBootstrap.cpp)
target_include_directories(vk-bootstrap PUBLIC src) target_include_directories(vk-bootstrap PUBLIC src)
target_include_directories(vk-bootstrap PRIVATE ${Vulkan_INCLUDE_DIRS}) target_include_directories(vk-bootstrap PUBLIC ${Vulkan_INCLUDE_DIR})
target_link_libraries(vk-bootstrap PRIVATE ${Vulkan_LIBRARIES}) target_link_libraries(vk-bootstrap PUBLIC ${Vulkan_LIBRARY})
target_compile_features(vk-bootstrap PUBLIC cxx_std_11) target_compile_features(vk-bootstrap PUBLIC cxx_std_11)
@ -16,6 +16,10 @@ option(VK_BOOTSTRAP_TEST "Test Vk-Bootstrap with glfw and Catch2" OFF)
if (VK_BOOTSTRAP_TEST) if (VK_BOOTSTRAP_TEST)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(ext/glfw) add_subdirectory(ext/glfw)
add_subdirectory(ext/Catch2) add_subdirectory(ext/Catch2)

@ -1 +1 @@
Subproject commit d973acc123826666ecc9e6fd475682e3d84c54a6 Subproject commit 0ac013381be83fcd6e53ea874f09b1895943bd9e

View File

@ -144,7 +144,7 @@ class InstanceBuilder {
InstanceBuilder& check_and_add_layer (const char* layer_name); InstanceBuilder& check_and_add_layer (const char* layer_name);
// Adds a layer to be enabled. Will fail to create an instance if the layer isn't available. // Adds a layer to be enabled. Will fail to create an instance if the layer isn't available.
InstanceBuilder& must_enable_layer (const char* layer_name); InstanceBuilder& must_enable_layer (const char* layer_name);
// Enables the specified extension if it is avaiable. // Enables the specified extension if it is available.
InstanceBuilder& check_and_add_extension (const char* extension_name); InstanceBuilder& check_and_add_extension (const char* extension_name);
// Adds an extension to be enabled. Will fail to create an instance if the extension isn't available. // Adds an extension to be enabled. Will fail to create an instance if the extension isn't available.
InstanceBuilder& must_enable_extension (const char* extension_name); InstanceBuilder& must_enable_extension (const char* extension_name);
@ -266,7 +266,7 @@ struct PhysicalDevice {
}; };
enum class PreferredDeviceType { discrete, integrated, virtual_gpu, cpu, dont_care }; enum class PreferredDeviceType { discrete, integrated, virtual_gpu, cpu, dont_care };
struct PhysicalDeviceSelector { class PhysicalDeviceSelector {
public: public:
// Requires a vkb::Instance to construct, needed to pass instance creation info. // Requires a vkb::Instance to construct, needed to pass instance creation info.
PhysicalDeviceSelector (Instance const& instance); PhysicalDeviceSelector (Instance const& instance);
@ -390,10 +390,10 @@ class DeviceBuilder {
detail::Expected<Device, detail::Error<DeviceError>> build (); detail::Expected<Device, detail::Error<DeviceError>> build ();
bool has_dedicated_compute_queue(); bool has_dedicated_compute_queue ();
bool has_distinct_compute_queue(); bool has_distinct_compute_queue ();
bool has_dedicated_transfer_queue(); bool has_dedicated_transfer_queue ();
bool has_distinct_transfer_queue(); bool has_distinct_transfer_queue ();
// Require a queue family that supports compute operations but not graphics nor transfer. // Require a queue family that supports compute operations but not graphics nor transfer.
DeviceBuilder& request_dedicated_compute_queue (bool compute = true); DeviceBuilder& request_dedicated_compute_queue (bool compute = true);
@ -406,7 +406,7 @@ class DeviceBuilder {
DeviceBuilder& request_distinct_transfer_queue (bool transfer = true); DeviceBuilder& request_distinct_transfer_queue (bool transfer = true);
// For Advanced Users: specify the exact list of VkDeviceQueueCreateInfo's needed for the application. // For Advanced Users: specify the exact list of VkDeviceQueueCreateInfo's needed for the application.
// If a custom queue setup is provided, getting the queues and queue indexes is up to the applicatoin. // If a custom queue setup is provided, getting the queues and queue indexes is up to the application.
DeviceBuilder& custom_queue_setup (std::vector<CustomQueueDescription> queue_descriptions); DeviceBuilder& custom_queue_setup (std::vector<CustomQueueDescription> queue_descriptions);
// For Advanced Users: Add a structure to the pNext chain of VkDeviceCreateInfo. // For Advanced Users: Add a structure to the pNext chain of VkDeviceCreateInfo.