<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Aug 23, 2016 at 2:17 AM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</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 23 August 2016 at 02:11, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> The only reason we should throw INITIALIZATION_FAILED is if we have found<br>
> useable intel hardware but have failed to bring it up for some reason.<br>
> Otherwise, we should just throw INCOMPATIBLE_DRIVER which will turn into<br>
> successfully advertising 0 physical devices<br>
> ---<br>
>  src/intel/vulkan/anv_device.c | 8 +++-----<br>
>  1 file changed, 3 insertions(+), 5 deletions(-)<br>
><br>
> diff --git a/src/intel/vulkan/anv_device.<wbr>c b/src/intel/vulkan/anv_device.<wbr>c<br>
> index f31f366..940a14e 100644<br>
> --- a/src/intel/vulkan/anv_device.<wbr>c<br>
> +++ b/src/intel/vulkan/anv_device.<wbr>c<br>
> @@ -62,8 +62,7 @@ anv_physical_device_init(<wbr>struct anv_physical_device *device,<br>
><br>
>     fd = open(path, O_RDWR | O_CLOEXEC);<br>
>     if (fd < 0)<br>
> -      return vk_errorf(VK_ERROR_<wbr>INITIALIZATION_FAILED,<br>
> -                       "failed to open %s: %m", path);<br>
> +      return vk_error(VK_ERROR_<wbr>INCOMPATIBLE_DRIVER);<br>
><br>
</span>Mildly related:<br>
You mentioned before that you prefer no not link against libdrm. What<br>
is the reasoning behind that - opencoding some of it's functionality<br>
in here is not likely to pan out well.<br></blockquote><div><br></div><div>The amount of libdrm functionality we are repeating here is pretty small.  Also, if we need more queries, having to add them to libdrm *and* add support to the vulkan driver to query it through libdrm is kind-of pointless since each query is only a couple of lines. <br></div></div></div></div>