anv: Replace ANV_BO_EXTERNAL with anv_bo::is_external

We're not THAT strapped for space that we can't burn one extra bit for
a boolean.  If we're really worried about it, we can always shrink the
flags field to 16 bits because the kernel only uses 7 currently.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand
2019-10-28 20:12:24 -05:00
parent 5534358ef6
commit b781c85c79
6 changed files with 22 additions and 20 deletions

View File

@@ -952,7 +952,8 @@ VkResult anv_CreateSemaphore(
} else {
semaphore->permanent.type = ANV_SEMAPHORE_TYPE_BO;
VkResult result = anv_bo_cache_alloc(device, &device->bo_cache,
4096, ANV_BO_EXTERNAL,
4096, 0 /* flags */,
true /* is_external */,
&semaphore->permanent.bo);
if (result != VK_SUCCESS) {
vk_free2(&device->alloc, pAllocator, semaphore);
@@ -1106,7 +1107,7 @@ VkResult anv_ImportSemaphoreFdKHR(
new_impl.type = ANV_SEMAPHORE_TYPE_BO;
VkResult result = anv_bo_cache_import(device, &device->bo_cache,
fd, ANV_BO_EXTERNAL,
fd, 0 /* flags */,
&new_impl.bo);
if (result != VK_SUCCESS)
return result;