Hi Roderick,
Thank you for your advice, I’m not really understanding your last suggestion though. Do you still think it’s best for winex11/winemac to retrieve and store the function pointer itself? What would these wrappers do, and which thunks would need to be wrapped?
Thanks, Brendan
On Jan 26, 2020, at 10:49 PM, Roderick Colenbrander thunderbird2k@gmail.com wrote:
Thinking about it some more, we probably just want to add winex11/winemac wrappers for the few winevulkan thunks, which operate on the "native instance". Then our ICD drivers can do whatever they want behind the scenes. As I said my knowledge is a little rusty right now, so there might be other things I have overlooked, but it feels like the best approach.
On Sun, Jan 26, 2020 at 10:21 PM Roderick Colenbrander thunderbird2k@gmail.com wrote:
Hi Brendan,
My memory on winevulkan is not that fresh anymore since I originally wrote it. Though after glancing over the code it is coming back. The approach you took is kind of the right way, but not fully.
I guess we didn't bump into an issue like this with the loading not providing a function, because we mostly supported some basic surface related extensions which were available since inception of vulkan. (Though I do notice Jozef added a LOAD_OPTIONAL_FUNCPTR for perhaps a related scenario. Not sure why that approach was taken there... would need to dig deeper)
The main issue is that the function pointer returned is specific to that particular instance object. We shouldn't trust it, though it will work for most users in practice (maybe not in a multi gpu setup or so). The situation is similar for loading other instance and device functions, which is why there are all the instance / device specific dispatch tables in winevulkan.
I think the proper solution would be to store the function pointer within the "instance" on the winex11 / winemac side. Though this is not that easy. The problem is that so far the "instance" passed back to winevulkan was essentially the native instance (and then winevulkan wraps it). Both winex11 and winevulkan pass the "native instance" to native vulkan calls.
I don't like the solution, but it feels like winex11/winemac need to provide some kind of partially opaque driver structure back to winevulkan.
struct wine_vk_icd_instance { VkInstance *instance; /* hidden ICD specific magic */ }
And winex11 side something like: struct wine_vk_instance { struct wine_vk_icd_instance; pkGetPhysicalDeviceSurfaceCapabilities2KHR .. }
You can then still retrieve the "native instance" to whatever functions there are in winevulkan, which we don't need to implement all the way down at the winex11/winemac level.
To be honest I don't like this approach to much... maybe it is almost better to just move the few functions, which are directly passed a "VkInstance" down to winex11/winemac.... need to think a bit... maybe others have some ideas as well.
Thanks, Roderick
On Fri, Jan 24, 2020 at 4:27 PM Brendan Shanks bshanks@codeweavers.com wrote:
Signed-off-by: Brendan Shanks bshanks@codeweavers.com
Although this works, I'm not sure if it's the best/correct way to get the addresses of vkGetPhysicalDeviceSurfaceCapabilities2KHR() and vkGetPhysicalDeviceSurfaceFormats2KHR() in winex11. The loader doesn't export them, they must be retrieved through vkGetInstanceProcAddress().
dlls/winemac.drv/vulkan.c | 35 +++++ dlls/winevulkan/make_vulkan | 7 +- dlls/winevulkan/vulkan_thunks.c | 46 +++++++ dlls/winevulkan/vulkan_thunks.h | 19 +++ dlls/winex11.drv/vulkan.c | 36 +++++ include/wine/vulkan.h | 234 ++++++++++++++++++-------------- include/wine/vulkan_driver.h | 8 +- 7 files changed, 280 insertions(+), 105 deletions(-)
diff --git a/dlls/winemac.drv/vulkan.c b/dlls/winemac.drv/vulkan.c index 360dd02f7b..0e8a9e2be9 100644 --- a/dlls/winemac.drv/vulkan.c +++ b/dlls/winemac.drv/vulkan.c @@ -86,13 +86,16 @@ static void (*pvkDestroySwapchainKHR)(VkDevice, VkSwapchainKHR, const VkAllocati static VkResult (*pvkEnumerateInstanceExtensionProperties)(const char *, uint32_t *, VkExtensionProperties *); static void * (*pvkGetDeviceProcAddr)(VkDevice, const char *); static void * (*pvkGetInstanceProcAddr)(VkInstance, const char *); +static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *); static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *); +static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *); static VkResult (*pvkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); static VkResult (*pvkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *); static VkResult (*pvkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *); static VkResult (*pvkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *); static VkResult (*pvkQueuePresentKHR)(VkQueue, const VkPresentInfoKHR *);
static void *macdrv_get_vk_device_proc_addr(const char *name); static void *macdrv_get_vk_instance_proc_addr(VkInstance instance, const char *name);
@@ -122,7 +125,9 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context) LOAD_FUNCPTR(vkEnumerateInstanceExtensionProperties) LOAD_FUNCPTR(vkGetDeviceProcAddr) LOAD_FUNCPTR(vkGetInstanceProcAddr)
- LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilities2KHR) LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)
- LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormats2KHR) LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR) LOAD_FUNCPTR(vkGetPhysicalDeviceSurfacePresentModesKHR) LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceSupportKHR)
@@ -441,6 +446,20 @@ static void *macdrv_vkGetInstanceProcAddr(VkInstance instance, const char *name) return pvkGetInstanceProcAddr(instance, name); }
+static VkResult macdrv_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice phys_dev,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, VkSurfaceCapabilities2KHR *capabilities)
+{
- VkPhysicalDeviceSurfaceInfo2KHR surface_info_host;
- TRACE("%p, %p, %p\n", phys_dev, surface_info, capabilities);
- surface_info_host = *surface_info;
- surface_info_host.surface = surface_from_handle(surface_info->surface)->surface;
- return pvkGetPhysicalDeviceSurfaceCapabilities2KHR(phys_dev, &surface_info_host,
capabilities);
+}
static VkResult macdrv_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice phys_dev, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *capabilities) { @@ -452,6 +471,20 @@ static VkResult macdrv_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevic capabilities); }
+static VkResult macdrv_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice phys_dev,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, uint32_t *count, VkSurfaceFormat2KHR *formats)
+{
- VkPhysicalDeviceSurfaceInfo2KHR surface_info_host;
- TRACE("%p, %p, %p, %p\n", phys_dev, surface_info, count, formats);
- surface_info_host = *surface_info;
- surface_info_host.surface = surface_from_handle(surface_info->surface)->surface;
- return pvkGetPhysicalDeviceSurfaceFormats2KHR(phys_dev, &surface_info_host,
count, formats);
+}
static VkResult macdrv_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice phys_dev, VkSurfaceKHR surface, uint32_t *count, VkSurfaceFormatKHR *formats) { @@ -542,7 +575,9 @@ static const struct vulkan_funcs vulkan_funcs = macdrv_vkGetDeviceProcAddr, macdrv_vkGetInstanceProcAddr, NULL,
- macdrv_vkGetPhysicalDeviceSurfaceCapabilities2KHR, macdrv_vkGetPhysicalDeviceSurfaceCapabilitiesKHR,
- macdrv_vkGetPhysicalDeviceSurfaceFormats2KHR, macdrv_vkGetPhysicalDeviceSurfaceFormatsKHR, macdrv_vkGetPhysicalDeviceSurfacePresentModesKHR, macdrv_vkGetPhysicalDeviceSurfaceSupportKHR,
diff --git a/dlls/winevulkan/make_vulkan b/dlls/winevulkan/make_vulkan index 5eebc0f3b2..e22074aa57 100755 --- a/dlls/winevulkan/make_vulkan +++ b/dlls/winevulkan/make_vulkan @@ -95,7 +95,6 @@ BLACKLISTED_EXTENSIONS = [ "VK_EXT_validation_features", "VK_EXT_validation_flags", "VK_KHR_display", # Needs WSI work.
"VK_KHR_get_surface_capabilities2", "VK_KHR_surface_protected_capabilities",
# Device extensions
@@ -138,7 +137,7 @@ CORE_EXTENSIONS = [ # Functions part of our winevulkan graphics driver interface. # DRIVER_VERSION should be bumped on any change to driver interface # in FUNCTION_OVERRIDES -DRIVER_VERSION = 7 +DRIVER_VERSION = 8
# Table of functions for which we have a special implementation. # These are regular device / instance functions for which we need @@ -185,6 +184,10 @@ FUNCTION_OVERRIDES = { "vkGetPhysicalDeviceSurfaceFormatsKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, "vkGetPhysicalDeviceSurfacePresentModesKHR" : {"dispatch" : True, "driver" : True, "thunk" : True},
- # VK_KHR_get_surface_capabilities2
- "vkGetPhysicalDeviceSurfaceCapabilities2KHR" : {"dispatch" : True, "driver" : True, "thunk" : True},
- "vkGetPhysicalDeviceSurfaceFormats2KHR" : {"dispatch" : True, "driver" : True, "thunk" : True},
- # VK_KHR_win32_surface "vkCreateWin32SurfaceKHR" : {"dispatch" : True, "driver" : True, "thunk" : True}, "vkGetPhysicalDeviceWin32PresentationSupportKHR" : {"dispatch" : True, "driver" : True, "thunk" : True},
diff --git a/dlls/winevulkan/vulkan_thunks.c b/dlls/winevulkan/vulkan_thunks.c index fecf9ab502..2e33ab1e32 100644 --- a/dlls/winevulkan/vulkan_thunks.c +++ b/dlls/winevulkan/vulkan_thunks.c @@ -1159,6 +1159,15 @@ static inline void convert_VkPhysicalDeviceProperties2_host_to_win(const VkPhysi convert_VkPhysicalDeviceProperties_host_to_win(&in->properties, &out->properties); }
+static inline void convert_VkPhysicalDeviceSurfaceInfo2KHR_win_to_host(const VkPhysicalDeviceSurfaceInfo2KHR *in, VkPhysicalDeviceSurfaceInfo2KHR_host *out) +{
- if (!in) return;
- out->sType = in->sType;
- out->pNext = in->pNext;
- out->surface = in->surface;
+}
static inline void convert_VkPipelineExecutableInfoKHR_win_to_host(const VkPipelineExecutableInfoKHR *in, VkPipelineExecutableInfoKHR_host *out) { if (!in) return; @@ -4348,12 +4357,46 @@ static VkResult WINAPI wine_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesC return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(physicalDevice->phys_dev, pCombinationCount, pCombinations); }
+static VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities) +{ +#if defined(USE_STRUCT_CONVERSION)
- VkResult result;
- VkPhysicalDeviceSurfaceInfo2KHR_host pSurfaceInfo_host;
- TRACE("%p, %p, %p\n", physicalDevice, pSurfaceInfo, pSurfaceCapabilities);
- convert_VkPhysicalDeviceSurfaceInfo2KHR_win_to_host(pSurfaceInfo, &pSurfaceInfo_host);
- result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice->phys_dev, &pSurfaceInfo_host, pSurfaceCapabilities);
- return result;
+#else
- TRACE("%p, %p, %p\n", physicalDevice, pSurfaceInfo, pSurfaceCapabilities);
- return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilities2KHR(physicalDevice->phys_dev, pSurfaceInfo, pSurfaceCapabilities);
+#endif +}
VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities) { TRACE("%p, 0x%s, %p\n", physicalDevice, wine_dbgstr_longlong(surface), pSurfaceCapabilities); return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice->phys_dev, surface, pSurfaceCapabilities); }
+static VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, uint32_t *pSurfaceFormatCount, VkSurfaceFormat2KHR *pSurfaceFormats) +{ +#if defined(USE_STRUCT_CONVERSION)
- VkResult result;
- VkPhysicalDeviceSurfaceInfo2KHR_host pSurfaceInfo_host;
- TRACE("%p, %p, %p, %p\n", physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats);
- convert_VkPhysicalDeviceSurfaceInfo2KHR_win_to_host(pSurfaceInfo, &pSurfaceInfo_host);
- result = physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice->phys_dev, &pSurfaceInfo_host, pSurfaceFormatCount, pSurfaceFormats);
- return result;
+#else
- TRACE("%p, %p, %p, %p\n", physicalDevice, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats);
- return physicalDevice->instance->funcs.p_vkGetPhysicalDeviceSurfaceFormats2KHR(physicalDevice->phys_dev, pSurfaceInfo, pSurfaceFormatCount, pSurfaceFormats);
+#endif +}
VkResult WINAPI wine_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats) { TRACE("%p, 0x%s, %p, %p\n", physicalDevice, wine_dbgstr_longlong(surface), pSurfaceFormatCount, pSurfaceFormats); @@ -4986,7 +5029,9 @@ static const struct vulkan_func vk_instance_dispatch_table[] = {"vkGetPhysicalDeviceSparseImageFormatProperties2", &wine_vkGetPhysicalDeviceSparseImageFormatProperties2}, {"vkGetPhysicalDeviceSparseImageFormatProperties2KHR", &wine_vkGetPhysicalDeviceSparseImageFormatProperties2KHR}, {"vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV", &wine_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV},
- {"vkGetPhysicalDeviceSurfaceCapabilities2KHR", &wine_vkGetPhysicalDeviceSurfaceCapabilities2KHR}, {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", &wine_vkGetPhysicalDeviceSurfaceCapabilitiesKHR},
- {"vkGetPhysicalDeviceSurfaceFormats2KHR", &wine_vkGetPhysicalDeviceSurfaceFormats2KHR}, {"vkGetPhysicalDeviceSurfaceFormatsKHR", &wine_vkGetPhysicalDeviceSurfaceFormatsKHR}, {"vkGetPhysicalDeviceSurfacePresentModesKHR", &wine_vkGetPhysicalDeviceSurfacePresentModesKHR}, {"vkGetPhysicalDeviceSurfaceSupportKHR", &wine_vkGetPhysicalDeviceSurfaceSupportKHR},
@@ -5170,6 +5215,7 @@ static const char * const vk_instance_extensions[] = "VK_KHR_external_memory_capabilities", "VK_KHR_external_semaphore_capabilities", "VK_KHR_get_physical_device_properties2",
- "VK_KHR_get_surface_capabilities2", "VK_KHR_surface", "VK_KHR_win32_surface",
}; diff --git a/dlls/winevulkan/vulkan_thunks.h b/dlls/winevulkan/vulkan_thunks.h index 01c1efb277..6805113bba 100644 --- a/dlls/winevulkan/vulkan_thunks.h +++ b/dlls/winevulkan/vulkan_thunks.h @@ -726,6 +726,13 @@ typedef struct VkPhysicalDeviceProperties2_host VkPhysicalDeviceProperties_host properties; } VkPhysicalDeviceProperties2_host;
+typedef struct VkPhysicalDeviceSurfaceInfo2KHR_host +{
- VkStructureType sType;
- const void *pNext;
- VkSurfaceKHR surface;
+} VkPhysicalDeviceSurfaceInfo2KHR_host;
typedef struct VkPipelineExecutableInfoKHR_host { VkStructureType sType; @@ -1359,7 +1366,17 @@ struct vulkan_instance_funcs void (*p_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *, uint32_t *, VkSparseImageFormatProperties2 *); void (*p_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *, uint32_t *, VkSparseImageFormatProperties2 *); VkResult (*p_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV)(VkPhysicalDevice, uint32_t *, VkFramebufferMixedSamplesCombinationNV *); +#if defined(USE_STRUCT_CONVERSION)
- VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR_host *, VkSurfaceCapabilities2KHR *);
+#else
- VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *);
+#endif VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *); +#if defined(USE_STRUCT_CONVERSION)
- VkResult (*p_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR_host *, uint32_t *, VkSurfaceFormat2KHR *);
+#else
- VkResult (*p_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *);
+#endif VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *); VkResult (*p_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *); @@ -1637,7 +1654,9 @@ struct vulkan_instance_funcs USE_VK_FUNC(vkGetPhysicalDeviceSparseImageFormatProperties2) \ USE_VK_FUNC(vkGetPhysicalDeviceSparseImageFormatProperties2KHR) \ USE_VK_FUNC(vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV) \
- USE_VK_FUNC(vkGetPhysicalDeviceSurfaceCapabilities2KHR) \ USE_VK_FUNC(vkGetPhysicalDeviceSurfaceCapabilitiesKHR) \
- USE_VK_FUNC(vkGetPhysicalDeviceSurfaceFormats2KHR) \ USE_VK_FUNC(vkGetPhysicalDeviceSurfaceFormatsKHR) \ USE_VK_FUNC(vkGetPhysicalDeviceSurfacePresentModesKHR) \ USE_VK_FUNC(vkGetPhysicalDeviceSurfaceSupportKHR) \
diff --git a/dlls/winex11.drv/vulkan.c b/dlls/winex11.drv/vulkan.c index 28ae1a9e0e..8ca0b6a3d2 100644 --- a/dlls/winex11.drv/vulkan.c +++ b/dlls/winex11.drv/vulkan.c @@ -93,6 +93,10 @@ static VkBool32 (*pvkGetPhysicalDeviceXlibPresentationSupportKHR)(VkPhysicalDevi static VkResult (*pvkGetSwapchainImagesKHR)(VkDevice, VkSwapchainKHR, uint32_t *, VkImage *); static VkResult (*pvkQueuePresentKHR)(VkQueue, const VkPresentInfoKHR *);
+/* Functions only available through vkGetInstanceProcAddress */ +static VkResult (*pvkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *); +static VkResult (*pvkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *);
static void *X11DRV_get_vk_device_proc_addr(const char *name); static void *X11DRV_get_vk_instance_proc_addr(VkInstance instance, const char *name);
@@ -245,6 +249,12 @@ static VkResult X11DRV_vkCreateInstance(const VkInstanceCreateInfo *create_info, res = pvkCreateInstance(&create_info_host, NULL /* allocator */, instance);
heap_free((void *)create_info_host.ppEnabledExtensionNames);
- if (res == VK_SUCCESS && !pvkGetPhysicalDeviceSurfaceCapabilities2KHR)
pvkGetPhysicalDeviceSurfaceCapabilities2KHR = pvkGetInstanceProcAddr(*instance, "vkGetPhysicalDeviceSurfaceCapabilities2KHR");
- if (res == VK_SUCCESS && !pvkGetPhysicalDeviceSurfaceFormats2KHR)
pvkGetPhysicalDeviceSurfaceFormats2KHR = pvkGetInstanceProcAddr(*instance, "vkGetPhysicalDeviceSurfaceFormats2KHR");
- return res;
}
@@ -456,6 +466,18 @@ static VkResult X11DRV_vkGetPhysicalDevicePresentRectanglesKHR(VkPhysicalDevice return pvkGetPhysicalDevicePresentRectanglesKHR(phys_dev, x11_surface->surface, count, rects); }
+static VkResult X11DRV_vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice phys_dev,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, VkSurfaceCapabilities2KHR *capabilities)
+{
- VkPhysicalDeviceSurfaceInfo2KHR surface_info_host;
- TRACE("%p, %p, %p\n", phys_dev, surface_info, capabilities);
- surface_info_host = *surface_info;
- surface_info_host.surface = surface_from_handle(surface_info->surface)->surface;
- return pvkGetPhysicalDeviceSurfaceCapabilities2KHR(phys_dev, &surface_info_host, capabilities);
+}
static VkResult X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice phys_dev, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *capabilities) { @@ -466,6 +488,18 @@ static VkResult X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevic return pvkGetPhysicalDeviceSurfaceCapabilitiesKHR(phys_dev, x11_surface->surface, capabilities); }
+static VkResult X11DRV_vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice phys_dev,
const VkPhysicalDeviceSurfaceInfo2KHR *surface_info, uint32_t *count, VkSurfaceFormat2KHR *formats)
+{
- VkPhysicalDeviceSurfaceInfo2KHR surface_info_host = *surface_info;
- TRACE("%p, %p, %p, %p\n", phys_dev, surface_info, count, formats);
- surface_info_host = *surface_info;
- surface_info_host.surface = surface_from_handle(surface_info->surface)->surface;
- return pvkGetPhysicalDeviceSurfaceFormats2KHR(phys_dev, &surface_info_host, count, formats);
+}
static VkResult X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice phys_dev, VkSurfaceKHR surface, uint32_t *count, VkSurfaceFormatKHR *formats) { @@ -557,7 +591,9 @@ static const struct vulkan_funcs vulkan_funcs = X11DRV_vkGetDeviceProcAddr, X11DRV_vkGetInstanceProcAddr, X11DRV_vkGetPhysicalDevicePresentRectanglesKHR,
- X11DRV_vkGetPhysicalDeviceSurfaceCapabilities2KHR, X11DRV_vkGetPhysicalDeviceSurfaceCapabilitiesKHR,
- X11DRV_vkGetPhysicalDeviceSurfaceFormats2KHR, X11DRV_vkGetPhysicalDeviceSurfaceFormatsKHR, X11DRV_vkGetPhysicalDeviceSurfacePresentModesKHR, X11DRV_vkGetPhysicalDeviceSurfaceSupportKHR,
diff --git a/include/wine/vulkan.h b/include/wine/vulkan.h index fe804fd23e..c6d72c49fa 100644 --- a/include/wine/vulkan.h +++ b/include/wine/vulkan.h @@ -198,6 +198,8 @@ #define VK_KHR_PERFORMANCE_QUERY_EXTENSION_NAME "VK_KHR_performance_query" #define VK_KHR_MAINTENANCE2_SPEC_VERSION 1 #define VK_KHR_MAINTENANCE2_EXTENSION_NAME "VK_KHR_maintenance2" +#define VK_KHR_GET_SURFACE_CAPABILITIES_2_SPEC_VERSION 1 +#define VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME "VK_KHR_get_surface_capabilities2" #define VK_KHR_VARIABLE_POINTERS_SPEC_VERSION 1 #define VK_KHR_VARIABLE_POINTERS_EXTENSION_NAME "VK_KHR_variable_pointers" #define VK_EXT_QUEUE_FAMILY_FOREIGN_SPEC_VERSION 1 @@ -2348,6 +2350,9 @@ typedef enum VkStructureType VK_STRUCTURE_TYPE_RENDER_PASS_INPUT_ATTACHMENT_ASPECT_CREATE_INFO = 1000117001, VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO = 1000117002, VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_DOMAIN_ORIGIN_STATE_CREATE_INFO = 1000117003,
- VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SURFACE_INFO_2_KHR = 1000119000,
- VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_2_KHR = 1000119001,
- VK_STRUCTURE_TYPE_SURFACE_FORMAT_2_KHR = 1000119002, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES = 1000120000, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_REQUIREMENTS = 1000127000, VK_STRUCTURE_TYPE_MEMORY_DEDICATED_ALLOCATE_INFO = 1000127001,
@@ -4083,20 +4088,6 @@ typedef struct VkSubresourceLayout VkDeviceSize WINE_VK_ALIGN(8) depthPitch; } VkSubresourceLayout;
-typedef struct VkSurfaceCapabilitiesKHR -{
- uint32_t minImageCount;
- uint32_t maxImageCount;
- VkExtent2D currentExtent;
- VkExtent2D minImageExtent;
- VkExtent2D maxImageExtent;
- uint32_t maxImageArrayLayers;
- VkSurfaceTransformFlagsKHR supportedTransforms;
- VkSurfaceTransformFlagBitsKHR currentTransform;
- VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
- VkImageUsageFlags supportedUsageFlags;
-} VkSurfaceCapabilitiesKHR;
typedef struct VkSurfaceFormatKHR { VkFormat format; @@ -4673,6 +4664,13 @@ typedef struct VkPhysicalDeviceSparseProperties VkBool32 residencyNonResidentStrict; } VkPhysicalDeviceSparseProperties;
+typedef struct VkPhysicalDeviceSurfaceInfo2KHR +{
- VkStructureType sType;
- const void *pNext;
- VkSurfaceKHR WINE_VK_ALIGN(8) surface;
+} VkPhysicalDeviceSurfaceInfo2KHR;
typedef struct VkPhysicalDeviceTimelineSemaphoreFeaturesKHR { VkStructureType sType; @@ -4965,6 +4963,20 @@ typedef struct VkSubpassSampleLocationsEXT VkSampleLocationsInfoEXT sampleLocationsInfo; } VkSubpassSampleLocationsEXT;
+typedef struct VkSurfaceCapabilitiesKHR +{
- uint32_t minImageCount;
- uint32_t maxImageCount;
- VkExtent2D currentExtent;
- VkExtent2D minImageExtent;
- VkExtent2D maxImageExtent;
- uint32_t maxImageArrayLayers;
- VkSurfaceTransformFlagsKHR supportedTransforms;
- VkSurfaceTransformFlagBitsKHR currentTransform;
- VkCompositeAlphaFlagsKHR supportedCompositeAlpha;
- VkImageUsageFlags supportedUsageFlags;
+} VkSurfaceCapabilitiesKHR;
typedef struct VkSwapchainCreateInfoKHR { VkStructureType sType; @@ -5537,20 +5549,26 @@ typedef struct VkSubpassDescriptionDepthStencilResolveKHR const VkAttachmentReference2KHR *pDepthStencilResolveAttachment; } VkSubpassDescriptionDepthStencilResolveKHR;
-typedef struct VkVertexInputBindingDivisorDescriptionEXT +typedef struct VkSurfaceCapabilities2KHR {
- uint32_t binding;
- uint32_t divisor;
-} VkVertexInputBindingDivisorDescriptionEXT;
- VkStructureType sType;
- void *pNext;
- VkSurfaceCapabilitiesKHR surfaceCapabilities;
+} VkSurfaceCapabilities2KHR;
-typedef struct VkWin32SurfaceCreateInfoKHR +typedef struct VkViewportWScalingNV +{
- float xcoeff;
- float ycoeff;
+} VkViewportWScalingNV;
+typedef struct VkWriteDescriptorSetInlineUniformBlockEXT { VkStructureType sType; const void *pNext;
- VkWin32SurfaceCreateFlagsKHR flags;
- HINSTANCE hinstance;
- HWND hwnd;
-} VkWin32SurfaceCreateInfoKHR;
- uint32_t dataSize;
- const void *pData;
+} VkWriteDescriptorSetInlineUniformBlockEXT;
typedef struct VkBindImageMemoryDeviceGroupInfo { @@ -5781,13 +5799,13 @@ typedef struct VkPipelineRepresentativeFragmentTestStateCreateInfoNV VkBool32 representativeFragmentTestEnable; } VkPipelineRepresentativeFragmentTestStateCreateInfoNV;
-typedef struct VkPipelineVertexInputDivisorStateCreateInfoEXT +typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV { VkStructureType sType; const void *pNext;
- uint32_t vertexBindingDivisorCount;
- const VkVertexInputBindingDivisorDescriptionEXT *pVertexBindingDivisors;
-} VkPipelineVertexInputDivisorStateCreateInfoEXT;
- uint32_t exclusiveScissorCount;
- const VkRect2D *pExclusiveScissors;
+} VkPipelineViewportExclusiveScissorStateCreateInfoNV;
typedef struct VkPresentRegionsKHR { @@ -5852,13 +5870,14 @@ typedef struct VkSpecializationInfo const void *pData; } VkSpecializationInfo;
-typedef struct VkWriteDescriptorSetInlineUniformBlockEXT +typedef struct VkWin32SurfaceCreateInfoKHR { VkStructureType sType; const void *pNext;
- uint32_t dataSize;
- const void *pData;
-} VkWriteDescriptorSetInlineUniformBlockEXT;
- VkWin32SurfaceCreateFlagsKHR flags;
- HINSTANCE hinstance;
- HWND hwnd;
+} VkWin32SurfaceCreateInfoKHR;
typedef struct VkAttachmentSampleLocationsEXT { @@ -6005,12 +6024,29 @@ typedef struct VkPipelineShaderStageCreateInfo const VkSpecializationInfo *pSpecializationInfo; } VkPipelineShaderStageCreateInfo;
-typedef struct VkQueueFamilyCheckpointPropertiesNV +typedef struct VkPipelineViewportWScalingStateCreateInfoNV { VkStructureType sType;
- void *pNext;
- VkPipelineStageFlags checkpointExecutionStageMask;
-} VkQueueFamilyCheckpointPropertiesNV;
- const void *pNext;
- VkBool32 viewportWScalingEnable;
- uint32_t viewportCount;
- const VkViewportWScalingNV *pViewportWScalings;
+} VkPipelineViewportWScalingStateCreateInfoNV;
+typedef struct VkRayTracingPipelineCreateInfoNV +{
- VkStructureType sType;
- const void *pNext;
- VkPipelineCreateFlags flags;
- uint32_t stageCount;
- const VkPipelineShaderStageCreateInfo *pStages;
- uint32_t groupCount;
- const VkRayTracingShaderGroupCreateInfoNV *pGroups;
- uint32_t maxRecursionDepth;
- VkPipelineLayout WINE_VK_ALIGN(8) layout;
- VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
- int32_t basePipelineIndex;
+} VkRayTracingPipelineCreateInfoNV;
typedef struct VkRenderPassSampleLocationsBeginInfoEXT { @@ -6043,11 +6079,11 @@ typedef struct VkSubpassDescription const uint32_t *pPreserveAttachments; } VkSubpassDescription;
-typedef struct VkViewportWScalingNV +typedef struct VkVertexInputBindingDivisorDescriptionEXT {
- float xcoeff;
- float ycoeff;
-} VkViewportWScalingNV;
- uint32_t binding;
- uint32_t divisor;
+} VkVertexInputBindingDivisorDescriptionEXT;
typedef struct VkAccelerationStructureInfoNV { @@ -6108,28 +6144,33 @@ typedef struct VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT VkBool32 vertexAttributeInstanceRateZeroDivisor; } VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT;
-typedef struct VkPipelineViewportExclusiveScissorStateCreateInfoNV +typedef struct VkPipelineVertexInputDivisorStateCreateInfoEXT { VkStructureType sType; const void *pNext;
- uint32_t exclusiveScissorCount;
- const VkRect2D *pExclusiveScissors;
-} VkPipelineViewportExclusiveScissorStateCreateInfoNV;
- uint32_t vertexBindingDivisorCount;
- const VkVertexInputBindingDivisorDescriptionEXT *pVertexBindingDivisors;
+} VkPipelineVertexInputDivisorStateCreateInfoEXT;
-typedef struct VkRayTracingPipelineCreateInfoNV +typedef struct VkRenderPassCreateInfo { VkStructureType sType; const void *pNext;
- VkPipelineCreateFlags flags;
- uint32_t stageCount;
- const VkPipelineShaderStageCreateInfo *pStages;
- uint32_t groupCount;
- const VkRayTracingShaderGroupCreateInfoNV *pGroups;
- uint32_t maxRecursionDepth;
- VkPipelineLayout WINE_VK_ALIGN(8) layout;
- VkPipeline WINE_VK_ALIGN(8) basePipelineHandle;
- int32_t basePipelineIndex;
-} VkRayTracingPipelineCreateInfoNV;
- VkRenderPassCreateFlags flags;
- uint32_t attachmentCount;
- const VkAttachmentDescription *pAttachments;
- uint32_t subpassCount;
- const VkSubpassDescription *pSubpasses;
- uint32_t dependencyCount;
- const VkSubpassDependency *pDependencies;
+} VkRenderPassCreateInfo;
+typedef struct VkSparseImageMemoryBindInfo +{
- VkImage WINE_VK_ALIGN(8) image;
- uint32_t bindCount;
- const VkSparseImageMemoryBind *pBinds;
+} VkSparseImageMemoryBindInfo;
typedef struct VkAccelerationStructureCreateInfoNV { @@ -6186,34 +6227,21 @@ typedef struct VkPipelineLayoutCreateInfo const VkPushConstantRange *pPushConstantRanges; } VkPipelineLayoutCreateInfo;
-typedef struct VkRenderPassCreateInfo -{
- VkStructureType sType;
- const void *pNext;
- VkRenderPassCreateFlags flags;
- uint32_t attachmentCount;
- const VkAttachmentDescription *pAttachments;
- uint32_t subpassCount;
- const VkSubpassDescription *pSubpasses;
- uint32_t dependencyCount;
- const VkSubpassDependency *pDependencies;
-} VkRenderPassCreateInfo;
-typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT -{
- VkStructureType sType;
- const void *pNext;
- VkQueueGlobalPriorityEXT globalPriority;
-} VkDeviceQueueGlobalPriorityCreateInfoEXT;
-typedef struct VkPipelineViewportWScalingStateCreateInfoNV +typedef struct VkBindSparseInfo { VkStructureType sType; const void *pNext;
- VkBool32 viewportWScalingEnable;
- uint32_t viewportCount;
- const VkViewportWScalingNV *pViewportWScalings;
-} VkPipelineViewportWScalingStateCreateInfoNV;
- uint32_t waitSemaphoreCount;
- const VkSemaphore *pWaitSemaphores;
- uint32_t bufferBindCount;
- const VkSparseBufferMemoryBindInfo *pBufferBinds;
- uint32_t imageOpaqueBindCount;
- const VkSparseImageOpaqueMemoryBindInfo *pImageOpaqueBinds;
- uint32_t imageBindCount;
- const VkSparseImageMemoryBindInfo *pImageBinds;
- uint32_t signalSemaphoreCount;
- const VkSemaphore *pSignalSemaphores;
+} VkBindSparseInfo;
typedef struct VkGraphicsPipelineCreateInfo { @@ -6238,29 +6266,6 @@ typedef struct VkGraphicsPipelineCreateInfo int32_t basePipelineIndex; } VkGraphicsPipelineCreateInfo;
-typedef struct VkSparseImageMemoryBindInfo -{
- VkImage WINE_VK_ALIGN(8) image;
- uint32_t bindCount;
- const VkSparseImageMemoryBind *pBinds;
-} VkSparseImageMemoryBindInfo;
-typedef struct VkBindSparseInfo -{
- VkStructureType sType;
- const void *pNext;
- uint32_t waitSemaphoreCount;
- const VkSemaphore *pWaitSemaphores;
- uint32_t bufferBindCount;
- const VkSparseBufferMemoryBindInfo *pBufferBinds;
- uint32_t imageOpaqueBindCount;
- const VkSparseImageOpaqueMemoryBindInfo *pImageOpaqueBinds;
- uint32_t imageBindCount;
- const VkSparseImageMemoryBindInfo *pImageBinds;
- uint32_t signalSemaphoreCount;
- const VkSemaphore *pSignalSemaphores;
-} VkBindSparseInfo;
typedef struct VkPhysicalDeviceShaderCorePropertiesAMD { VkStructureType sType; @@ -6281,6 +6286,27 @@ typedef struct VkPhysicalDeviceShaderCorePropertiesAMD uint32_t vgprAllocationGranularity; } VkPhysicalDeviceShaderCorePropertiesAMD;
+typedef struct VkSurfaceFormat2KHR +{
- VkStructureType sType;
- void *pNext;
- VkSurfaceFormatKHR surfaceFormat;
+} VkSurfaceFormat2KHR;
+typedef struct VkDeviceQueueGlobalPriorityCreateInfoEXT +{
- VkStructureType sType;
- const void *pNext;
- VkQueueGlobalPriorityEXT globalPriority;
+} VkDeviceQueueGlobalPriorityCreateInfoEXT;
+typedef struct VkQueueFamilyCheckpointPropertiesNV +{
- VkStructureType sType;
- void *pNext;
- VkPipelineStageFlags checkpointExecutionStageMask;
+} VkQueueFamilyCheckpointPropertiesNV;
typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImage2KHR)(VkDevice, const VkAcquireNextImageInfoKHR *, uint32_t *); typedef VkResult (VKAPI_PTR *PFN_vkAcquireNextImageKHR)(VkDevice, VkSwapchainKHR, uint64_t, VkSemaphore, VkFence, uint32_t *); typedef VkResult (VKAPI_PTR *PFN_vkAcquirePerformanceConfigurationINTEL)(VkDevice, const VkPerformanceConfigurationAcquireInfoINTEL *, VkPerformanceConfigurationINTEL *); @@ -6520,7 +6546,9 @@ typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties)(VkP typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *, uint32_t *, VkSparseImageFormatProperties2 *); typedef void (VKAPI_PTR *PFN_vkGetPhysicalDeviceSparseImageFormatProperties2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *, uint32_t *, VkSparseImageFormatProperties2 *); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV)(VkPhysicalDevice, uint32_t *, VkFramebufferMixedSamplesCombinationNV *); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *); +typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *); typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *); @@ -6808,7 +6836,9 @@ void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2 *pProperties); void VKAPI_CALL vkGetPhysicalDeviceSparseImageFormatProperties2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSparseImageFormatInfo2 *pFormatInfo, uint32_t *pPropertyCount, VkSparseImageFormatProperties2 *pProperties); VkResult VKAPI_CALL vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV(VkPhysicalDevice physicalDevice, uint32_t *pCombinationCount, VkFramebufferMixedSamplesCombinationNV *pCombinations); +VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilities2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, VkSurfaceCapabilities2KHR *pSurfaceCapabilities); VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR *pSurfaceCapabilities); +VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormats2KHR(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *pSurfaceInfo, uint32_t *pSurfaceFormatCount, VkSurfaceFormat2KHR *pSurfaceFormats); VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats); VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes); VkResult VKAPI_CALL vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32 *pSupported); diff --git a/include/wine/vulkan_driver.h b/include/wine/vulkan_driver.h index 02f504e9ae..187cde70ad 100644 --- a/include/wine/vulkan_driver.h +++ b/include/wine/vulkan_driver.h @@ -39,7 +39,7 @@ #define __WINE_VULKAN_DRIVER_H
/* Wine internal vulkan driver version, needs to be bumped upon vulkan_funcs changes. */ -#define WINE_VULKAN_DRIVER_VERSION 7 +#define WINE_VULKAN_DRIVER_VERSION 8
struct vulkan_funcs { @@ -58,7 +58,9 @@ struct vulkan_funcs void * (*p_vkGetDeviceProcAddr)(VkDevice, const char *); void * (*p_vkGetInstanceProcAddr)(VkInstance, const char *); VkResult (*p_vkGetPhysicalDevicePresentRectanglesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkRect2D *);
- VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilities2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, VkSurfaceCapabilities2KHR *); VkResult (*p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)(VkPhysicalDevice, VkSurfaceKHR, VkSurfaceCapabilitiesKHR *);
- VkResult (*p_vkGetPhysicalDeviceSurfaceFormats2KHR)(VkPhysicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR *, uint32_t *, VkSurfaceFormat2KHR *); VkResult (*p_vkGetPhysicalDeviceSurfaceFormatsKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkSurfaceFormatKHR *); VkResult (*p_vkGetPhysicalDeviceSurfacePresentModesKHR)(VkPhysicalDevice, VkSurfaceKHR, uint32_t *, VkPresentModeKHR *); VkResult (*p_vkGetPhysicalDeviceSurfaceSupportKHR)(VkPhysicalDevice, uint32_t, VkSurfaceKHR, VkBool32 *);
@@ -116,8 +118,12 @@ static inline void *get_vulkan_driver_instance_proc_addr( return vulkan_funcs->p_vkGetInstanceProcAddr; if (!strcmp(name, "GetPhysicalDevicePresentRectanglesKHR")) return vulkan_funcs->p_vkGetPhysicalDevicePresentRectanglesKHR;
- if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilities2KHR"))
if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilitiesKHR")) return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceCapabilitiesKHR;return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceCapabilities2KHR;
- if (!strcmp(name, "GetPhysicalDeviceSurfaceFormats2KHR"))
if (!strcmp(name, "GetPhysicalDeviceSurfaceFormatsKHR")) return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceFormatsKHR; if (!strcmp(name, "GetPhysicalDeviceSurfacePresentModesKHR"))return vulkan_funcs->p_vkGetPhysicalDeviceSurfaceFormats2KHR;
-- 2.24.1