mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +00:00
vulkan: VULKAN_CreateTexture returns a boolean
Fixes regression introduced by 9ff3446f03
VK_SUCCESS == 0, where failure needs to return false (0).
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user