charles-lunarg / vk-bootstrap

Vulkan Bootstrapping Iibrary
MIT License
821 stars 82 forks source link

error: variable has incomplete type 'wl_display' #217

Closed dortamiguel closed 1 year ago

dortamiguel commented 1 year ago

Hellow, when I try to compile latest VkBootstrap on linux I get this issue

In file included from include/VkBootstrap.cpp:17:
In file included from include/VkBootstrap.h:29:
include/VkBootstrapDispatch.h:405:132: error: variable has incomplete type 'wl_display'
    VkBool32 getPhysicalDeviceWaylandPresentationSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, wl_display display) const noexcept {
                                                                                                                                   ^
lib/linux/include/vulkan/vulkan_wayland.h:31:12: note: forward declaration of 'wl_display'
    struct wl_display*                display;
           ^
1 error generated.

I'm currently using the latest vulkan headers from 1.3.268.0

When I go back to the last release https://github.com/charles-lunarg/vk-bootstrap/releases/tag/v1.3.264 it works again

Is this an issue with the library or now I'm missing something new I need? I tried latest on mac and it compiles fine

charles-lunarg commented 1 year ago

How are you including vk-bootstrap? Are you defining any per-platform defines such as VK_USE_PLATFORM_WAYLAND_KHR? Seems that you need to have some sort of include of wayland types. Also that forward define should be okay, since its a pointer typedef, so I'm not sure what is going wrong there.

charles-lunarg commented 1 year ago

Wait, the type is from the instance dispatchable table, so it works in 1.3.264 because that lacked the table. This appears to be a new regression. Will have to play around with linux to reproduce & subsequently fix.

charles-lunarg commented 1 year ago

Underlying problem is codegen related - there was a case that was missing and thus resulted in incorrect codegen.