I was wondering whether we should pick up the patch version from the registry.
Anyway :

Reviewed-by: Lionel Landwerlin <lionel.g.landwer...@intel.com>

On 18/06/18 00:29, Jason Ekstrand wrote:
The Vulkan API has only one patch version shared among all of the
major.minor versions.  We should also advertise the same patch version
regardless of major.minor.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106941
---
  src/intel/vulkan/anv_extensions.py     | 17 ++++++++++-------
  src/intel/vulkan/anv_extensions_gen.py |  2 +-
  2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/intel/vulkan/anv_extensions.py 
b/src/intel/vulkan/anv_extensions.py
index 8160864685f..18851c0ff90 100644
--- a/src/intel/vulkan/anv_extensions.py
+++ b/src/intel/vulkan/anv_extensions.py
@@ -44,20 +44,22 @@ class Extension:
          self.enable = _bool_to_c_expr(enable)
class ApiVersion:
-    def __init__(self, max_patch_version, enable):
-        self.max_patch_version = max_patch_version
+    def __init__(self, version, enable):
+        self.version = version
          self.enable = _bool_to_c_expr(enable)
+API_PATCH_VERSION = 76
+
  # Supported API versions.  Each one is the maximum patch version for the given
  # version.  Version come in increasing order and each version is available if
  # it's provided "enable" condition is true and all previous versions are
  # available.
  API_VERSIONS = [
-    ApiVersion('1.0.57',    True),
+    ApiVersion('1.0',   True),
# DRM_IOCTL_SYNCOBJ_WAIT is required for VK_KHR_external_fence which is a
      # required core feature in Vulkan 1.1
-    ApiVersion('1.1.0',     'device->has_syncobj_wait'),
+    ApiVersion('1.1',   'device->has_syncobj_wait'),
  ]
MAX_API_VERSION = None # Computed later
@@ -160,6 +162,7 @@ class VkVersion:
MAX_API_VERSION = VkVersion('0.0.0')
  for version in API_VERSIONS:
-    version.max_patch_version = VkVersion(version.max_patch_version)
-    assert version.max_patch_version > MAX_API_VERSION
-    MAX_API_VERSION = version.max_patch_version
+    version.version = VkVersion(version.version)
+    version.version.patch = API_PATCH_VERSION
+    assert version.version > MAX_API_VERSION
+    MAX_API_VERSION = version.version
diff --git a/src/intel/vulkan/anv_extensions_gen.py 
b/src/intel/vulkan/anv_extensions_gen.py
index 5ea82204eea..b75cb3e6fbb 100644
--- a/src/intel/vulkan/anv_extensions_gen.py
+++ b/src/intel/vulkan/anv_extensions_gen.py
@@ -157,7 +157,7 @@ anv_physical_device_api_version(struct anv_physical_device 
*device)
  %for version in API_VERSIONS:
      if (!(${version.enable}))
          return version;
-    version = ${version.max_patch_version.c_vk_version()};
+    version = ${version.version.c_vk_version()};
%endfor
      return version;


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to