[Mesa-dev] [PATCH 1/2] anv/android: Set the BO flags in bo_cache_import
Mauro Rossi
issor.oruam at gmail.com
Sun Jun 3 20:22:00 UTC 2018
Hi there,
2018-06-03 21:52 GMT+02:00 Lionel Landwerlin <lionel.g.landwerlin at intel.com>
:
> On 03/06/18 19:41, Mauro Rossi wrote:
>
>> Change to avoid building error:
>>
>> external/mesa/src/intel/vulkan/anv_android.c:131:72:
>> error: too few arguments to function call, expected 5, have 4
>> result = anv_bo_cache_import(device, &device->bo_cache, dma_buf, &bo);
>> ~~~~~~~~~~~~~~~~~~~ ^
>> 1 error generated.
>>
>> Fixes: b0d50247a7 ("anv/allocator: Set the BO flags in
>> bo_cache_alloc/import")
>> Signed-off-by: Mauro Rossi <issor.oruam at gmail.com>
>> ---
>> src/intel/vulkan/anv_android.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/intel/vulkan/anv_android.c
>> b/src/intel/vulkan/anv_android.c
>> index 7e07dbaaa4..ed5da5b537 100644
>> --- a/src/intel/vulkan/anv_android.c
>> +++ b/src/intel/vulkan/anv_android.c
>> @@ -128,7 +128,7 @@ anv_image_from_gralloc(VkDevice device_h,
>> */
>> int dma_buf = gralloc_info->handle->data[0];
>> - result = anv_bo_cache_import(device, &device->bo_cache, dma_buf,
>> &bo);
>> + result = anv_bo_cache_import(device, &device->bo_cache, dma_buf, 0,
>> &bo);
>>
>
> If you look at anv_intel.c here are the flags that we use :
>
> uint64_t bo_flags = 0;
> if (device->instance->physicalDevice.supports_48bit_addresses)
> bo_flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;
>
> I'm pretty sure we want the same, potentially also the async flag?
Please I need review on the correctness or improvements,
because I just put 0 as bo_flags as a deduction based on similar change
in src/intel/vulkan/anv_queue.c where in anv_bo_cache_import() call the
bo_flag was set to 0
Thanks
M.
>
>
> if (result != VK_SUCCESS) {
>> return vk_errorf(device->instance, device, result,
>> "failed to import dma-buf from
>> VkNativeBufferANDROID");
>>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180603/24c10274/attachment.html>
More information about the mesa-dev
mailing list