anv/entrypoints: VkGetDeviceProcAddr returns NULL for core instance commands
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 12 Mar 2018 07:27:04 +0000 (08:27 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Wed, 14 Mar 2018 07:09:15 +0000 (08:09 +0100)
commit1a0aba7216e54e117df744c252f152ff3eab6441
tree62373623049199d24eacfd6281536b5ba5e2632d
parenta631575ff4e415271d7b4b5574d64fc5d2e5586e
anv/entrypoints: VkGetDeviceProcAddr returns NULL for core instance commands

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@collabora.com> (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_entrypoints_gen.py