<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 29, 2017 at 1:41 PM, Chad Versace <span dir="ltr"><<a href="mailto:chadversary@chromium.org" target="_blank">chadversary@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue 28 Nov 2017, Jason Ekstrand wrote:<br>
> ---<br>
>  src/amd/vulkan/radv_device.c      | 8 ++++++--<br>
>  src/amd/vulkan/radv_<wbr>extensions.py | 1 +<br>
>  src/amd/vulkan/radv_formats.c     | 8 ++++++--<br>
>  3 files changed, 13 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c<br>
> index 8e5ae0b..4517227 100644<br>
> --- a/src/amd/vulkan/radv_device.c<br>
> +++ b/src/amd/vulkan/radv_device.c<br>
> @@ -2166,7 +2166,9 @@ VkResult radv_alloc_memory(VkDevice                        _device,<br>
><br>
>       if (import_info) {<br>
>               assert(import_info->handleType ==<br>
> -                    VK_EXTERNAL_MEMORY_HANDLE_<wbr>TYPE_OPAQUE_FD_BIT_KHR);<br>
> +                    VK_EXTERNAL_MEMORY_HANDLE_<wbr>TYPE_OPAQUE_FD_BIT_KHR ||<br>
> +                    import_info->handleType ==<br>
> +                    VK_EXTERNAL_MEMORY_HANDLE_<wbr>TYPE_DMA_BUF_BIT_EXT);<br>
>               mem->bo = device->ws->buffer_from_fd(<wbr>device->ws, import_info->fd,<br>
>                                                    NULL, NULL);<br>
>               if (!mem->bo) {<br>
> @@ -3540,7 +3542,9 @@ VkResult radv_GetMemoryFdKHR(VkDevice _device,<br>
><br>
>       /* We support only one handle type. */<br>
<br>
</span>This comment needs updating. I suggest copy-pasting the comment from<br>
anvil.<span class=""><br></span></blockquote><div><br></div><div>Done.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
>       assert(pGetFdInfo->handleType ==<br>
> -            VK_EXTERNAL_MEMORY_HANDLE_<wbr>TYPE_OPAQUE_FD_BIT_KHR);<br>
> +            VK_EXTERNAL_MEMORY_HANDLE_<wbr>TYPE_OPAQUE_FD_BIT_KHR ||<br>
> +            pGetFdInfo->handleType ==<br>
> +            VK_EXTERNAL_MEMORY_HANDLE_<wbr>TYPE_DMA_BUF_BIT_EXT);<br>
><br>
>       bool ret = radv_get_memory_fd(device, memory, pFD);<br>
>       if (ret == false)<br>
<br>
</span>Also, radv_GetMemoryFdPropertiesKHR(<wbr>) (the next function in this file)<br>
needs updating to support dma-buf.  Today it unconditionally fails.<br>
</blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">This was missing from anv as well.  I've added it and will re-push the branch in a minute.</div><div class="gmail_extra"><br></div><div class="gmail_extra">For radv, I really don't know what to do here.  I'm sure there are some FD properties I should probably query and then walk a list of types and fill out some bits.  I have no idea how their memory handle interfaces work.  Dave?</div><div class="gmail_extra"><br></div><div class="gmail_extra">--Jason<br></div></div>