[Mesa-dev] [PATCH 4/6] anv: do not export the Vulkan API

Jason Ekstrand jason at jlekstrand.net
Wed Jul 27 16:52:28 UTC 2016


I don't really like this... Bit I believe it is correct.  The whole series
(modulo validation) is

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

Let's cc stable on the whole thing as well.

On Jul 27, 2016 6:03 AM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:

> From: Emil Velikov <emil.velikov at collabora.com>
>
> With version 1 of the Loader interface there is an internal/private symbol
> (vk_icdGetInstanceProcAddr) which is used to retrieve all the API from the
> Vulkan entrypoints from the ICD. Implying that exposing the Vulkan API is
> not
> recommended.
>
> Version 2 goes a step further explicitly forbiding the ICD from exposing
> Vulkan
> symbols (and adding a negotiation API)
>
> As a reference:
>  - Nvidia 367.35
> Missing negotiation API - version 1.
> Exposes only vk_icdGetInstanceProcAddr.
>
>  - AMD 16.30.3.306809
> Have negotiation API - version 2,
> Exposes vk_icdGetInstanceProcAddr.
> Exposes a couple of Vulkan entry points - seems to be in violation with
> the spec.
>
> Cc: "12.0" <mesa-stable at lists.freedesktop.org>
> Cc: Jason Ekstrand <jason at jlekstrand.net>
> Cc: Christian König <christian.koenig at amd.com>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>
> Christian, can you ping/check with the relevant team if I'm missing
> something
> or the driver indeed goes against the spec ?
>
> Apart from the small reduction in binary size, we get rid of the ifuncs.
> The
> latter was never checked at configure time, so things could have gone very
> badly on platforms which lack support.
> ---
>  src/intel/vulkan/anv_entrypoints_gen.py | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_entrypoints_gen.py
> b/src/intel/vulkan/anv_entrypoints_gen.py
> index a4922c2..6904d37 100644
> --- a/src/intel/vulkan/anv_entrypoints_gen.py
> +++ b/src/intel/vulkan/anv_entrypoints_gen.py
> @@ -291,17 +291,6 @@ anv_resolve_entrypoint(uint32_t index)
>  }
>  """
>
> -# Now output ifuncs and their resolve helpers for all entry points. The
> -# resolve helper calls resolve_entrypoint() with the entry point index,
> which
> -# lets the resolver look it up in the table.
> -
> -for type, name, args, num, h in entrypoints:
> -    print_guard_start(name)
> -    print "static void *resolve_%s(void) { return
> anv_resolve_entrypoint(%d); }" % (name, num)
> -    print "%s vk%s%s\n   __attribute__ ((ifunc (\"resolve_%s\"),
> visibility (\"default\")));\n" % (type, name, args, name)
> -    print_guard_end(name)
> -
> -
>  # Now generate the hash table used for entry point look up.  This is a
>  # uint16_t table of entry point indices. We use 0xffff to indicate an
> entry
>  # in the hash table is empty.
> --
> 2.9.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160727/d7aedbeb/attachment.html>


More information about the mesa-dev mailing list