vulkan: SDL_Vulkan_CreateSurface now accepts an app-provided allocator.

Fixes #3638.
This commit is contained in:
Ryan C. Gordon
2023-11-06 13:30:56 -05:00
parent c53843a961
commit 2f92807087
23 changed files with 44 additions and 20 deletions

View File

@@ -177,6 +177,7 @@ static const VkDisplayPlaneAlphaFlagBitsKHR alphaModes[4] = {
SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_,
VkInstance instance,
const struct VkAllocationCallbacks *allocator,
VkSurfaceKHR *surface)
{
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr =
@@ -459,7 +460,7 @@ SDL_bool SDL_Vulkan_Display_CreateSurface(void *vkGetInstanceProcAddr_,
createInfo.transform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
createInfo.globalAlpha = 1.0f;
result = vkCreateDisplayPlaneSurfaceKHR(instance, &createInfo, NULL, surface);
result = vkCreateDisplayPlaneSurfaceKHR(instance, &createInfo, allocator, surface);
if (result != VK_SUCCESS) {
SDL_SetError("vkCreateDisplayPlaneSurfaceKHR failed: %s", SDL_Vulkan_GetResultString(result));
return SDL_FALSE;