<div dir="ltr"><div>both are<br><br></div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 13, 2018 at 4:12 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.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="">af5f2322d0c64 addressed this for extension commands, but the spec mandates<br>
this behavior also for core API commands. From the Vulkan spec,<br>
Table 2. vkGetDeviceProcAddr behavior:<br>
<br>
device     pname                            return<br>
------------------------------<wbr>----------------------------<br>
(..)<br>
device     core device-level command        fp<br>
(...)<br>
<br>
See that it specifically states "device-level".<br>
<br>
Since the vk.xml file doesn't state if core commands are instance or<br>
device level, we identify device level commands as the ones that take a<br>
VkDevice, VkQueue or VkCommandBuffer as their first parameter.<br>
<br>
Fixes test failures in new work-in-progress CTS tests.<br>
<br>
Also see the public issue:<br>
<a href="https://github.com/KhronosGroup/Vulkan-LoaderAndValidationLayers/issues/2323" rel="noreferrer" target="_blank">https://github.com/<wbr>KhronosGroup/Vulkan-<wbr>LoaderAndValidationLayers/<wbr>issues/2323</a><br>
<br>
v2:<br>
  - Include reference to github issue (Emil)<br>
  - Rebased on top of Vulkan 1.1 changes.<br>
<br>
</span>v3:<br>
  - Remove the not in the condition and switch the then/else cases (Jason)<br>
<span class=""><br>
Reviewed-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>> (v1)<br>
---<br>
</span><span class=""> src/intel/vulkan/anv_<wbr>entrypoints_gen.py | 6 +++++-<br>
 1 file changed, 5 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>entrypoints_gen.py b/src/intel/vulkan/anv_<wbr>entrypoints_gen.py<br>
</span>index 7211034782..d603ac1b20 100644<br>
--- a/src/intel/vulkan/anv_<wbr>entrypoints_gen.py<br>
+++ b/src/intel/vulkan/anv_<wbr>entrypoints_gen.py<br>
@@ -279,7 +279,11 @@ anv_entrypoint_is_enabled(int index, uint32_t core_version,<br>
<span class="">    case ${e.num}:<br>
       /* ${<a href="http://e.name" rel="noreferrer" target="_blank">e.name</a>} */<br>
    % if e.core_version:<br>
-      return ${e.core_version.c_vk_version(<wbr>)} <= core_version;<br>
</span>+      % if e.is_device_entrypoint():<br>
<span class="">+         return ${e.core_version.c_vk_version(<wbr>)} <= core_version;<br>
</span>+      % else:<br>
<span class="">+         return !device && ${e.core_version.c_vk_version(<wbr>)} <= core_version;<br>
</span>+      % endif<br>
<div class="HOEnZb"><div class="h5">    % elif e.extensions:<br>
      % for ext in e.extensions:<br>
        % if ext.type == 'instance':<br>
--<br>
2.14.1<br>
<br>
</div></div></blockquote></div><br></div>