Ver Fonte

GPU: Add error message to Vulkan buffer creation error path

(cherry picked from commit cced3ce8b971c7f4b50e31f3daaa48816a2fffe5)
Lucas Murray há 6 meses atrás
pai
commit
9a5700e9a3
1 ficheiros alterados com 1 adições e 2 exclusões
  1. 1 2
      src/gpu/vulkan/SDL_gpu_vulkan.c

+ 1 - 2
src/gpu/vulkan/SDL_gpu_vulkan.c

@@ -4168,9 +4168,8 @@ static VulkanBuffer *VULKAN_INTERNAL_CreateBuffer(
             renderer->logicalDevice,
             buffer->buffer,
             NULL);
-
         SDL_free(buffer);
-        return NULL;
+        SET_STRING_ERROR_AND_RETURN("Failed to bind memory for buffer!", NULL);
     }
 
     buffer->usedRegion->vulkanBuffer = buffer; // lol