From 9f6a2e357b55998e7022fe9640a9acff26d7c64e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 25 Sep 2023 12:09:52 +0200 Subject: rhi: vulkan: Print vma statistics on out of device memory Following a vmaCreate* it makes sense to test for VK_ERROR_OUT_OF_DEVICE_MEMORY and print the allocator statistics in order to give an idea of the application's (video) memory usage. For instance when running on a Raspberry Pi 4, this helps to indicate that the application is just too big for the device, and is more informative then just a Failed to create image: -2 message. Pick-to: 6.6 6.5 Change-Id: I666e2358303894efab9d12d2b3a3d98f0bd3a5b6 Reviewed-by: Andy Nichols Reviewed-by: Kristoffer Skau --- src/gui/rhi/qrhivulkan_p.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gui/rhi/qrhivulkan_p.h') diff --git a/src/gui/rhi/qrhivulkan_p.h b/src/gui/rhi/qrhivulkan_p.h index c9f21b8cb9..7531c9e567 100644 --- a/src/gui/rhi/qrhivulkan_p.h +++ b/src/gui/rhi/qrhivulkan_p.h @@ -821,6 +821,7 @@ public: void updateShaderResourceBindings(QRhiShaderResourceBindings *srb, int descSetIdx = -1); void ensureCommandPoolForNewFrame(); double elapsedSecondsFromTimestamp(quint64 timestamp[2], bool *ok); + void printExtraErrorInfo(VkResult err); QVulkanInstance *inst = nullptr; QWindow *maybeWindow = nullptr; -- cgit v1.2.3