[Mesa-dev] [PATCH v3 2/2] anv/entrypoints: VkGetDeviceProcAddr returns NULL for core instance commands

Jason Ekstrand jason at jlekstrand.net
Tue Mar 13 14:39:16 UTC 2018


both are

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

On Tue, Mar 13, 2018 at 4:12 AM, Iago Toral Quiroga <itoral at igalia.com>
wrote:

> af5f2322d0c64 addressed this for extension commands, but the spec mandates
> this behavior also for core API commands. From the Vulkan spec,
> Table 2. vkGetDeviceProcAddr behavior:
>
> device     pname                            return
> ----------------------------------------------------------
> (..)
> device     core device-level command        fp
> (...)
>
> See that it specifically states "device-level".
>
> Since the vk.xml file doesn't state if core commands are instance or
> device level, we identify device level commands as the ones that take a
> VkDevice, VkQueue or VkCommandBuffer as their first parameter.
>
> Fixes test failures in new work-in-progress CTS tests.
>
> Also see the public issue:
> https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/
> issues/2323
>
> v2:
>   - Include reference to github issue (Emil)
>   - Rebased on top of Vulkan 1.1 changes.
>
> v3:
>   - Remove the not in the condition and switch the then/else cases (Jason)
>
> Reviewed-by: Emil Velikov <emil.velikov at collabora.com> (v1)
> ---
>  src/intel/vulkan/anv_entrypoints_gen.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_entrypoints_gen.py
> b/src/intel/vulkan/anv_entrypoints_gen.py
> index 7211034782..d603ac1b20 100644
> --- a/src/intel/vulkan/anv_entrypoints_gen.py
> +++ b/src/intel/vulkan/anv_entrypoints_gen.py
> @@ -279,7 +279,11 @@ anv_entrypoint_is_enabled(int index, uint32_t
> core_version,
>     case ${e.num}:
>        /* ${e.name} */
>     % if e.core_version:
> -      return ${e.core_version.c_vk_version()} <= core_version;
> +      % if e.is_device_entrypoint():
> +         return ${e.core_version.c_vk_version()} <= core_version;
> +      % else:
> +         return !device && ${e.core_version.c_vk_version()} <=
> core_version;
> +      % endif
>     % elif e.extensions:
>       % for ext in e.extensions:
>         % if ext.type == 'instance':
> --
> 2.14.1
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180313/d0957599/attachment.html>


More information about the mesa-dev mailing list