Explorar el Código

GPU: Add error message to Vulkan buffer creation error path

Lucas Murray hace 2 meses
padre
commit
cced3ce8b9
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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