From 4c0cb94b961a90d744ef585b86791654a2936514 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Sun, 8 Sep 2024 13:12:44 +0200
Subject: [PATCH] vulkan: VULKAN_CreateTexture returns a boolean
Fixes regression introduced by 9ff3446f036094bc005ef119e0cf07fc9b503b8e
VK_SUCCESS == 0, where failure needs to return false (0).
---
src/render/vulkan/SDL_render_vulkan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/render/vulkan/SDL_render_vulkan.c b/src/render/vulkan/SDL_render_vulkan.c
index ea0dc19c0db26..87ae0708aa1e6 100644
--- a/src/render/vulkan/SDL_render_vulkan.c
+++ b/src/render/vulkan/SDL_render_vulkan.c
@@ -2654,7 +2654,7 @@ static bool VULKAN_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, S
result = VULKAN_AllocateImage(rendererData, create_props, width, height, textureFormat, usage, imageViewSwizzle, textureData->samplerYcbcrConversion, &textureData->mainImage);
if (result != VK_SUCCESS) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "VULKAN_AllocateImage(): %s\n", SDL_Vulkan_GetResultString(result));
- return result;
+ return false;
}
SDL_PropertiesID props = SDL_GetTextureProperties(texture);
@@ -2671,7 +2671,7 @@ static bool VULKAN_CreateTexture(SDL_Renderer *renderer, SDL_Texture *texture, S
textureData->mainRenderpasses);
if (result != VK_SUCCESS) {
SDL_LogError(SDL_LOG_CATEGORY_RENDER, "VULKAN_CreateFramebuffersAndRenderPasses(): %s\n", SDL_Vulkan_GetResultString(result));
- return result;
+ return false;
}
}
return true;