mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-28 12:27:24 +02:00
vulkan: SDL_Vulkan_CreateSurface now accepts an app-provided allocator.
Fixes #3638.
This commit is contained in:
@@ -125,6 +125,7 @@ char const* const* WIN_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this,
|
||||
SDL_bool WIN_Vulkan_CreateSurface(SDL_VideoDevice *_this,
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
const struct VkAllocationCallbacks *allocator,
|
||||
VkSurfaceKHR *surface)
|
||||
{
|
||||
SDL_WindowData *windowData = window->driverdata;
|
||||
@@ -152,8 +153,7 @@ SDL_bool WIN_Vulkan_CreateSurface(SDL_VideoDevice *_this,
|
||||
createInfo.flags = 0;
|
||||
createInfo.hinstance = windowData->hinstance;
|
||||
createInfo.hwnd = windowData->hwnd;
|
||||
result = vkCreateWin32SurfaceKHR(instance, &createInfo,
|
||||
NULL, surface);
|
||||
result = vkCreateWin32SurfaceKHR(instance, &createInfo, allocator, surface);
|
||||
if (result != VK_SUCCESS) {
|
||||
SDL_SetError("vkCreateWin32SurfaceKHR failed: %s",
|
||||
SDL_Vulkan_GetResultString(result));
|
||||
|
||||
@@ -41,6 +41,7 @@ char const* const* WIN_Vulkan_GetInstanceExtensions(SDL_VideoDevice *_this,
|
||||
SDL_bool WIN_Vulkan_CreateSurface(SDL_VideoDevice *_this,
|
||||
SDL_Window *window,
|
||||
VkInstance instance,
|
||||
const struct VkAllocationCallbacks *allocator,
|
||||
VkSurfaceKHR *surface);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user