<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jun 18, 2018 at 2:33 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I was wondering whether we should pick up the patch version from the registry.<br></blockquote><div><br></div><div>I've thought about that.  However, I like the manual step of someone saying "Yes, I've been paying attention and I'm pretty sure we're still compliant.  I'm not sure how much we actually gain from that though.  In practice it probably just means that the number doesn't get bumped as often as it should. :-/<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Anyway :<br>
<br>
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a><wbr>><br><div class="HOEnZb"><div class="h5"></div></div></blockquote><div><br></div><div>Thanks!<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
On 18/06/18 00:29, Jason Ekstrand wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The Vulkan API has only one patch version shared among all of the<br>
major.minor versions.  We should also advertise the same patch version<br>
regardless of major.minor.<br>
<br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=106941" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/s<wbr>how_bug.cgi?id=106941</a><br>
---<br>
  src/intel/vulkan/anv_extension<wbr>s.py     | 17 ++++++++++-------<br>
  src/intel/vulkan/anv_extension<wbr>s_gen.py |  2 +-<br>
  2 files changed, 11 insertions(+), 8 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_extensi<wbr>ons.py b/src/intel/vulkan/anv_extensi<wbr>ons.py<br>
index 8160864685f..18851c0ff90 100644<br>
--- a/src/intel/vulkan/anv_extensi<wbr>ons.py<br>
+++ b/src/intel/vulkan/anv_extensi<wbr>ons.py<br>
@@ -44,20 +44,22 @@ class Extension:<br>
          self.enable = _bool_to_c_expr(enable)<br>
    class ApiVersion:<br>
-    def __init__(self, max_patch_version, enable):<br>
-        self.max_patch_version = max_patch_version<br>
+    def __init__(self, version, enable):<br>
+        self.version = version<br>
          self.enable = _bool_to_c_expr(enable)<br>
  +API_PATCH_VERSION = 76<br>
+<br>
  # Supported API versions.  Each one is the maximum patch version for the given<br>
  # version.  Version come in increasing order and each version is available if<br>
  # it's provided "enable" condition is true and all previous versions are<br>
  # available.<br>
  API_VERSIONS = [<br>
-    ApiVersion('1.0.57',    True),<br>
+    ApiVersion('1.0',   True),<br>
        # DRM_IOCTL_SYNCOBJ_WAIT is required for VK_KHR_external_fence which is a<br>
      # required core feature in Vulkan 1.1<br>
-    ApiVersion('1.1.0',     'device->has_syncobj_wait'),<br>
+    ApiVersion('1.1',   'device->has_syncobj_wait'),<br>
  ]<br>
    MAX_API_VERSION = None # Computed later<br>
@@ -160,6 +162,7 @@ class VkVersion:<br>
    MAX_API_VERSION = VkVersion('0.0.0')<br>
  for version in API_VERSIONS:<br>
-    version.max_patch_version = VkVersion(version.max_patch_ve<wbr>rsion)<br>
-    assert version.max_patch_version > MAX_API_VERSION<br>
-    MAX_API_VERSION = version.max_patch_version<br>
+    version.version = VkVersion(version.version)<br>
+    version.version.patch = API_PATCH_VERSION<br>
+    assert version.version > MAX_API_VERSION<br>
+    MAX_API_VERSION = version.version<br>
diff --git a/src/intel/vulkan/anv_extensi<wbr>ons_gen.py b/src/intel/vulkan/anv_extensi<wbr>ons_gen.py<br>
index 5ea82204eea..b75cb3e6fbb 100644<br>
--- a/src/intel/vulkan/anv_extensi<wbr>ons_gen.py<br>
+++ b/src/intel/vulkan/anv_extensi<wbr>ons_gen.py<br>
@@ -157,7 +157,7 @@ anv_physical_device_api_versio<wbr>n(struct anv_physical_device *device)<br>
  %for version in API_VERSIONS:<br>
      if (!(${version.enable}))<br>
          return version;<br>
-    version = ${version.max_patch_version.c_<wbr>vk_version()};<br>
+    version = ${version.version.c_vk_version<wbr>()};<br>
    %endfor<br>
      return version;<br>
</blockquote>
<br>
<br>
</div></div></blockquote></div><br></div></div>