Fix wrong parameter in Wayland function

Generator script was missing a case - causing incorrect code gen resulting in a
compiler errror for wayland.
This commit is contained in:
Charles Giessen 2023-10-30 11:13:39 -06:00 committed by Charles Giessen
parent ed31a4d1b1
commit d2bc688552
4 changed files with 32 additions and 2 deletions

View File

@ -327,6 +327,9 @@ def create_dispatch_table(dispatch_type):
elif text == '**': elif text == '**':
front_mods = '' front_mods = ''
back_mods = '** ' back_mods = '** '
elif text == 'struct*':
front_mods = 'struct '
back_mods = '* '
elif text == 'struct**': elif text == 'struct**':
front_mods = 'struct ' front_mods = 'struct '
back_mods = '** ' back_mods = '** '

View File

@ -402,7 +402,7 @@ struct InstanceDispatchTable {
} }
#endif #endif
#if (defined(VK_KHR_wayland_surface)) #if (defined(VK_KHR_wayland_surface))
VkBool32 getPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, wl_display display) const noexcept { VkBool32 getPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct wl_display* display) const noexcept {
return fp_vkGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display); return fp_vkGetPhysicalDeviceWaylandPresentationSupportKHR(physicalDevice, queueFamilyIndex, display);
} }
#endif #endif
@ -462,7 +462,7 @@ struct InstanceDispatchTable {
} }
#endif #endif
#if (defined(VK_QNX_screen_surface)) #if (defined(VK_QNX_screen_surface))
VkBool32 getPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, _screen_window window) const noexcept { VkBool32 getPhysicalDeviceScreenPresentationSupportQNX(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, struct _screen_window* window) const noexcept {
return fp_vkGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window); return fp_vkGetPhysicalDeviceScreenPresentationSupportQNX(physicalDevice, queueFamilyIndex, window);
} }
#endif #endif

View File

@ -18,6 +18,7 @@ add_executable(vk-bootstrap-test
bootstrap_tests.cpp bootstrap_tests.cpp
error_code_tests.cpp error_code_tests.cpp
unit_tests.cpp unit_tests.cpp
include_checks.cpp
) )
target_link_libraries(vk-bootstrap-test target_link_libraries(vk-bootstrap-test

26
tests/include_checks.cpp Normal file
View File

@ -0,0 +1,26 @@
// Enable the platform specific parts of the API
#if defined(__ANDROID__)
#define VK_USE_PLATFORM_ANDROID_KHR
#endif
#if defined(__APPLE__)
#define VK_USE_PLATFORM_IOS_MVK
#define VK_USE_PLATFORM_MACOS_MVK
#define VK_USE_PLATFORM_METAL_EXT
#endif
#if defined(WIN32)
#define VK_USE_PLATFORM_WIN32_KHR
#endif
#if defined(__linux__)
#define VK_USE_PLATFORM_WAYLAND_KHR
#define VK_USE_PLATFORM_XCB_KHR
#define VK_USE_PLATFORM_XLIB_KHR
#define VK_USE_PLATFORM_XLIB_XRANDR_EXT
#endif
#define VK_ENABLE_BETA_EXTENSIONS
#include "VkBootstrap.h"