summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/vulkan')
-rw-r--r--src/intel/vulkan/anv_allocator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 33bd3c68c55..fe14d6cfabd 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -1088,8 +1088,10 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
pthread_mutex_lock(&device->mutex);
__sync_synchronize();
- if (bo->exists)
+ if (bo->exists) {
+ pthread_mutex_unlock(&device->mutex);
return &bo->bo;
+ }
const struct anv_physical_device *physical_device =
&device->instance->physicalDevice;