summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-02-06 15:43:36 +0100
committerBas Nieuwenhuizen <[email protected]>2018-02-06 21:52:39 +0100
commita3e42e7a69600f0a14f08a7f370aabb85d5a8632 (patch)
treec4f06cb6a3c8f0a49d7ce6d1cd47cfe7220b915d /src
parentc7d640fbbfbb1a487535d5cef5f8d435205c977b (diff)
vulkan/wsi: Fix OOM behavior with prime images.
Fixes: d50937f137 "vulkan/wsi: Implement prime in a completely generic way" Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/wsi/wsi_common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index e9e43e12048..90ed07b7857 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -429,8 +429,10 @@ wsi_create_prime_image(const struct wsi_swapchain *chain,
vk_zalloc(&chain->alloc,
sizeof(VkCommandBuffer) * wsi->queue_family_count, 8,
VK_SYSTEM_ALLOCATION_SCOPE_OBJECT);
- if (!image->prime.blit_cmd_buffers)
+ if (!image->prime.blit_cmd_buffers) {
+ result = VK_ERROR_OUT_OF_HOST_MEMORY;
goto fail;
+ }
for (uint32_t i = 0; i < wsi->queue_family_count; i++) {
const VkCommandBufferAllocateInfo cmd_buffer_info = {