v3dv: return out of host memory if we fail to create event pipelines
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 28 Oct 2022 10:10:17 +0000 (12:10 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 28 Oct 2022 10:55:37 +0000 (10:55 +0000)
Fixes: ecb01d53fd ('v3dv: refactor events')
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19366>

src/broadcom/vulkan/v3dv_device.c

index 2e04ce4..af66011 100644 (file)
@@ -3191,8 +3191,10 @@ device_allocate_event_resources(struct v3dv_device *device)
    bind_buffer_memory(&bind_info);
 
    /* Pipelines */
-   if (!device_create_event_pipelines(device))
+   if (!device_create_event_pipelines(device)) {
+      result = VK_ERROR_OUT_OF_HOST_MEMORY;
       goto fail;
+   }
 
    /* Descriptor pool & set to access the buffer */
    VkDescriptorPoolSize pool_size = {