diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-09-25 12:09:52 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2023-09-26 14:36:31 +0200 |
commit | 9f6a2e357b55998e7022fe9640a9acff26d7c64e (patch) | |
tree | 7c47018f353e946907cfeecbcdb0a2290991215a /src/gui/rhi/qrhivulkan_p.h | |
parent | 266c2d23ae01ab452b7396df5a1d06dacb3149d5 (diff) |
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 <andy.nichols@qt.io>
Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io>
Diffstat (limited to 'src/gui/rhi/qrhivulkan_p.h')
-rw-r--r-- | src/gui/rhi/qrhivulkan_p.h | 1 |
1 files changed, 1 insertions, 0 deletions
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; |