<div dir="ltr">Hi there,<div class="gmail_extra"><br><div class="gmail_quote">2018-06-03 21:52 GMT+02:00 Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On 03/06/18 19:41, Mauro Rossi wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Change to avoid building error:<br>
<br>
external/mesa/src/intel/vulkan<wbr>/anv_android.c:131:72:<br>
error: too few arguments to function call, expected 5, have 4<br>
    result = anv_bo_cache_import(device, &device->bo_cache, dma_buf, &bo);<br>
             ~~~~~~~~~~~~~~~~~~~                                        ^<br>
1 error generated.<br>
<br>
Fixes: b0d50247a7 ("anv/allocator: Set the BO flags in bo_cache_alloc/import")<br>
Signed-off-by: Mauro Rossi <<a href="mailto:issor.oruam@gmail.com" target="_blank">issor.oruam@gmail.com</a>><br>
---<br>
  src/intel/vulkan/anv_android.c | 2 +-<br>
  1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_android<wbr>.c b/src/intel/vulkan/anv_android<wbr>.c<br>
index 7e07dbaaa4..ed5da5b537 100644<br>
--- a/src/intel/vulkan/anv_android<wbr>.c<br>
+++ b/src/intel/vulkan/anv_android<wbr>.c<br>
@@ -128,7 +128,7 @@ anv_image_from_gralloc(VkDevic<wbr>e device_h,<br>
      */<br>
     int dma_buf = gralloc_info->handle->data[0];<br>
  -   result = anv_bo_cache_import(device, &device->bo_cache, dma_buf, &bo);<br>
+   result = anv_bo_cache_import(device, &device->bo_cache, dma_buf, 0, &bo);<br>
</blockquote>
<br></span>
If you look at anv_intel.c here are the flags that we use :<br>
<br>
   uint64_t bo_flags = 0;<br>
   if (device->instance->physicalDev<wbr>ice.supports_48bit_addresses)<br>
      bo_flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRE<wbr>SS;<br>
<br>
I'm pretty sure we want the same, potentially also the async flag?</blockquote><div><br></div><div>Please I need review on the correctness or improvements,</div><div>because I just put 0 as bo_flags as a deduction based on similar change </div><div>in src/intel/vulkan/anv_queue.c where in anv_bo_cache_import() call the bo_flag was set to 0</div><div><br></div><div>Thanks<br></div><div>M.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail-HOEnZb"><div class="gmail-h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
     if (result != VK_SUCCESS) {<br>
        return vk_errorf(device->instance, device, result,<br>
                         "failed to import dma-buf from VkNativeBufferANDROID");<br>
</blockquote>
<br>
<br>
</div></div></blockquote></div><br></div></div>