summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-01-21 21:47:31 +0100
committerBas Nieuwenhuizen <[email protected]>2018-01-22 00:07:24 +0100
commitc685076ab0706309d7ba2012a7bc4e2c6637d402 (patch)
treec3d97eef60af099fb02e160c8de1e22409de123b /src/amd/vulkan/radv_device.c
parent71f0315a8861ac20cd9ed36d89eb9db60462931f (diff)
radv: Fix freeing meta state if the device pipeline cache fails to allocate.
CC: <[email protected]> Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r--src/amd/vulkan/radv_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 152ae7e7ae6..b5ae1032392 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -1196,13 +1196,15 @@ VkResult radv_CreateDevice(
result = radv_CreatePipelineCache(radv_device_to_handle(device),
&ci, NULL, &pc);
if (result != VK_SUCCESS)
- goto fail;
+ goto fail_meta;
device->mem_cache = radv_pipeline_cache_from_handle(pc);
*pDevice = radv_device_to_handle(device);
return VK_SUCCESS;
+fail_meta:
+ radv_device_finish_meta(device);
fail:
if (device->trace_bo)
device->ws->buffer_destroy(device->trace_bo);