Przeglądaj źródła

GPU: Add error message to Vulkan buffer creation error path

Lucas Murray 2 miesięcy temu
rodzic
commit
cced3ce8b9
1 zmienionych plików z 1 dodań i 2 usunięć
  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,
             renderer->logicalDevice,
             buffer->buffer,
             buffer->buffer,
             NULL);
             NULL);
-
         SDL_free(buffer);
         SDL_free(buffer);
-        return NULL;
+        SET_STRING_ERROR_AND_RETURN("Failed to bind memory for buffer!", NULL);
     }
     }
 
 
     buffer->usedRegion->vulkanBuffer = buffer; // lol
     buffer->usedRegion->vulkanBuffer = buffer; // lol