anv/allocator: Set the BO flags in bo_cache_alloc/import
It's safer to set them there because we have the opportunity to properly handle combining flags if a BO is imported more than once. Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com>
This commit is contained in:
@@ -877,7 +877,8 @@ VkResult anv_CreateSemaphore(
|
||||
} else {
|
||||
semaphore->permanent.type = ANV_SEMAPHORE_TYPE_BO;
|
||||
VkResult result = anv_bo_cache_alloc(device, &device->bo_cache,
|
||||
4096, &semaphore->permanent.bo);
|
||||
4096, 0,
|
||||
&semaphore->permanent.bo);
|
||||
if (result != VK_SUCCESS) {
|
||||
vk_free2(&device->alloc, pAllocator, semaphore);
|
||||
return result;
|
||||
@@ -1023,7 +1024,7 @@ VkResult anv_ImportSemaphoreFdKHR(
|
||||
new_impl.type = ANV_SEMAPHORE_TYPE_BO;
|
||||
|
||||
VkResult result = anv_bo_cache_import(device, &device->bo_cache,
|
||||
fd, &new_impl.bo);
|
||||
fd, 0, &new_impl.bo);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
|
Reference in New Issue
Block a user