<html><head></head><body><div>On Mon, 2018-03-12 at 07:37 -0700, Jason Ekstrand wrote:</div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 12, 2018 at 1:40 AM, Iago Toral Quiroga <span dir="ltr"><<a href="mailto:itoral@igalia.com" target="_blank">itoral@igalia.com</a>></span> wrote:<br><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">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>
----------------------------------------------------------<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>
Reviewed-by: Emil Velikov <<a href="mailto:emil.velikov@collabora.com">emil.velikov@collabora.com</a>> (v1)<br>
---<br>
<br>
Emil, I had to rebase the patch on top of Jason's 1.1 changes. He had already<br>
accounted for device dispatches in that work, so now I just build on top of<br>
that now. With that, I am not sure whether the comment you were asking for makes<br>
sense in this patch any more (I think it should have gone in Jason's, when he<br>
added is_device_entrypoint()). I you want a comment for that I can send<br>
another patch to include it, or maybe ammend the first patch in this series to<br>
include that. However, do notice that the comment you were referring to has<br>
been removed from the spec, since now it is clearly stated that only<br>
core device-level commands return non-NULL pointers, so I think my preference<br>
would be to not add ny comments.<br>
<br>
Also, this version won't do for 18.0, but I guess we can still use the<br>
previous version for that if you want to put it in.<br>
<br>
 src/intel/vulkan/anv_entrypoints_gen.py | 6 +++++-<br>
 1 file changed, 5 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py<br>
index 2dddd7f1aa..8e0d036469 100644<br>
--- a/src/intel/vulkan/anv_entrypoints_gen.py<br>
+++ b/src/intel/vulkan/anv_entrypoints_gen.py<br>
@@ -274,7 +274,11 @@ anv_entrypoint_is_enabled(int index, uint32_t core_version,<br>
    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()} <= core_version;<br>
+      % if not e.is_device_entrypoint():<br>
+         return !device && ${e.core_version.c_vk_version()} <= core_version;<br>
+      % else:<br>
+         return ${e.core_version.c_vk_version()} <= core_version;<br>
+      % endif<br></blockquote><div><br></div><div>Any particular reason why you did "if not" instead of just flipping the then and else blocks?<br></div></div></div></div></blockquote><div><br></div><div>Not really, I can change that.</div><div> </div><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
    % elif e.extensions:<br>
      % for ext in e.extensions:<br>
        % if ext.type == 'instance':<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.1<br>
<br>
</font></span></blockquote></div><br></div></div>
</blockquote></body></html>