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 <[email protected]>
---
  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?

     if (result != VK_SUCCESS) {
        return vk_errorf(device->instance, device, result,
                         "failed to import dma-buf from VkNativeBufferANDROID");


_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to