anv: Stop setting BO flags in bo_init_new

The idea behind doing this was to make it easier to set various flags.
However, we have enough custom flag settings floating around the driver
that this is more of a nuisance than a help.  This commit has the
following functional changes:

 1) The workaround_bo created in anv_CreateDevice loses both flags.
    This shouldn't matter because it's very small and entirely internal
    to the driver.

 2) The bo created in anv_CreateDmaBufImageINTEL loses the
    EXEC_OBJECT_ASYNC flag.  In retrospect, it never should have gotten
    EXEC_OBJECT_ASYNC in the first place.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: "17.1" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
Jason Ekstrand
2017-05-17 11:31:02 -07:00
parent 10fad58b31
commit 00df1cd9d6
4 changed files with 25 additions and 15 deletions

View File

@@ -1453,12 +1453,6 @@ anv_bo_init_new(struct anv_bo *bo, struct anv_device *device, uint64_t size)
anv_bo_init(bo, gem_handle, size);
if (device->instance->physicalDevice.supports_48bit_addresses)
bo->flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
if (device->instance->physicalDevice.has_exec_async)
bo->flags |= EXEC_OBJECT_ASYNC;
return VK_SUCCESS;
}
@@ -1536,6 +1530,12 @@ VkResult anv_AllocateMemory(
goto fail;
}
if (pdevice->supports_48bit_addresses)
mem->bo->flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
if (pdevice->has_exec_async)
mem->bo->flags |= EXEC_OBJECT_ASYNC;
*pMem = anv_device_memory_to_handle(mem);
return VK_SUCCESS;