Mesa (master): radv: Fix freeing meta state if the device pipeline cache fails to allocate.

Bas Nieuwenhuizen bnieuwenhuizen at kemper.freedesktop.org
Sun Jan 21 23:16:13 UTC 2018


Module: Mesa
Branch: master
Commit: c685076ab0706309d7ba2012a7bc4e2c6637d402
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c685076ab0706309d7ba2012a7bc4e2c6637d402

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Sun Jan 21 21:47:31 2018 +0100

radv: Fix freeing meta state if the device pipeline cache fails to allocate.

CC: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Dave Airlie <airlied at redhat.com>

---

 src/amd/vulkan/radv_device.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 152ae7e7ae..b5ae103239 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);




More information about the mesa-commit mailing list