summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorEric Engestrom <[email protected]>2018-07-25 19:43:24 +0100
committerEric Engestrom <[email protected]>2018-07-25 21:04:30 +0100
commitaa59f9c8bc6796796487dd74b7fd568186b38350 (patch)
tree67a9d3bfc1ad2902ed9110029edd4d7f447c7158 /src/intel
parent270a44040cd5746c6f7c20303358c2a9984440db (diff)
anv: don't crash on vkDestroyDevice(NULL)
CovID: 1438132 Fixes: a99c9e63a07477634ab73 "anv: finish the binding_table_pool on destroyDevice when use_softpin" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Maria Casanova Crespo <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_device.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c
index 97a71563b8a..6b72a79a914 100644
--- a/src/intel/vulkan/anv_device.c
+++ b/src/intel/vulkan/anv_device.c
@@ -1833,11 +1833,13 @@ void anv_DestroyDevice(
const VkAllocationCallbacks* pAllocator)
{
ANV_FROM_HANDLE(anv_device, device, _device);
- struct anv_physical_device *physical_device = &device->instance->physicalDevice;
+ struct anv_physical_device *physical_device;
if (!device)
return;
+ physical_device = &device->instance->physicalDevice;
+
anv_device_finish_blorp(device);
anv_pipeline_cache_finish(&device->default_pipeline_cache);