Cherry-pick: anv: Support loader interface version 3 (patch v2)

Cherry-pick f33d1100b4d2954ac79558e8651bf6573a8b66c1 from upstream
Mesa by Chad Versace <chadversary@chromium.org>.

This is needed for MA-230 and MA-214.

This fixes an interaction between Mesa and
vulkan_loader_and_validation_layers.  Without this, when a Vulkan app
calls vkCreateMagmaSurfaceKHR() and goes through
vulkan_loader_and_validation_layers, the real implementation of
vkCreateMagmaSurfaceKHR() doesn't actually get called.

> anv: Support loader interface version 3 (patch v2)
>
> This patch implements vk_icdNegotiateLoaderICDInterfaceVersion(), which
> brings us to loader interface v3.
>
> v2:
>   - Drop the pragmas. [emil]
>   - Advertise v3 instead of v2. Anvil supported more than I
>     thought.  [jason]
>   - s/Surface/SurfaceKHR/ in comments. [emil]
>
> Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
> Cc: mesa-stable@lists.freedesktop.org
> Cc: Jason Ekstrand <jason@jlekstrand.net>
> (cherry picked from commit 1e41d7f7b0855934744fe578ba4eae9209ee69f7)

Change-Id: I1a85176a952eac998457981c74d77e11fed78e3c
1 file changed