Stefan Dirsch
ded7693b9b
* This release consists of nearly 2200 commits from approximately 130 developers. * The top highlights include: - OpenGL 4.3 on virgl. - OpenGL 4.4 Compatibility profile on radeonsi. - OpenGL ES 3.2 on radeonsi and virgl. - GL_ARB_ES3_2_compatibility on radeonsi. - GL_ARB_fragment_shader_interlock on i965. - GL_ARB_sample_locations and GL_NV_sample_locations on nvc0 (GM200+). - GL_ANDROID_extension_pack_es31a on radeonsi. - GL_KHR_texture_compression_astc_ldr on radeonsi. - GL_NV_conservative_raster and GL_NV_conservative_raster_dilate on nvc0 (GM200+). - GL_NV_conservative_raster_pre_snap_triangles on nvc0 (GP102+). - multisampled images on nvc0 (GM107+) (now supported on GF100+). * Additional features: - ANV Extensions: - VK_KHR_bind_memory2. - VK_KHR_external_fence. - VK_KHR_external_fence_capabilities. - VK_KHR_external_semaphore. - VK_KHR_external_semaphore_capabilities. - VK_KHR_maintenance2. - VK_KHR_maintenance3. - VK_KHR_multiview. - VK_KHR_relaxed_block_layout. - VK_KHR_sampler_ycbcr_conversion. - VK_KHR_8bit_storage. - VK_KHR_create_renderpass2. - VK_KHR_display. - VK_KHR_display_swapchain. - VK_KHR_external_fence_fd. - VK_KHR_external_semaphore_fd. - VK_KHR_get_display_properties2. - VK_KHR_image_format_list. - RADV Extensions: - VK_KHR_bind_memory2. - VK_KHR_external_fence. - VK_KHR_external_fence_capabilities. - VK_KHR_maintenance2. - VK_KHR_maintenance3. - VK_KHR_multiview. - VK_KHR_relaxed_block_layout. - VK_KHR_create_renderpass2. - VK_KHR_display. - VK_KHR_display_swapchain. - VK_KHR_draw_indirect_count. - VK_KHR_external_fence_fd. - VK_KHR_get_display_properties2. - VK_KHR_get_surface_capabilities2. - VK_KHR_image_format_list. - New GL extensions supported by all drivers: - GL_OES_EGL_image_external. - GL_OES_EGL_image_external_essl3. - freedreno: - GL 3.0's multisample anti-aliasing support on a5xx. - GL_ARB_texture_multisample support on a5xx. - GLES3.1's GS5 Packing/bitfield/conversion functions support on a5xx. - Dynamically uniform UBO array indices. - Packing/bitfield/conversion functions. - Enhanced textureGather. - GL_OES_texture_buffer. - GL_ARB_seamless_cubemap_per_texture. - i965: - GL_OES_texture_view on gen8+. - GL_EXT_texture_norm16. - nouveau: - GL_ARB_post_depth_coverage. - GL_ARB_sample_locations. - GL_EXT_texture_norm16. - r600: - GL_EXT_texture_norm16. - radeonsi: - GL_EXT_texture_norm16. - virgl: - GL_ARB_seamless_cubemap_per_texture. - GL_ARB_shader_stencil_export. - supersedes u_r600-egd_tables.py-make-the-script-python-2-3-compat.patch, u_intel_anv-make-scripts-python-2-3-compat.patch - U_intel-decoder-mark-total_length-as-MAYBE_UNUSED-in-g.patch, U_intel-aubinator-mark-ftruncate_res-as-MAYBE_UNUSED-i.patch, U_python-Fix-rich-comparisons.patch, U_python-Use-key-functions-when-sorting-containers.patch * buildfixes ... OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/Mesa?expand=0&rev=770
101 lines
3.4 KiB
Diff
101 lines
3.4 KiB
Diff
From e1b88aee680bbdadd283b4a26db74672bb130df5 Mon Sep 17 00:00:00 2001
|
|
From: Mathieu Bridon <bochecha@daitauha.fr>
|
|
Date: Tue, 17 Jul 2018 22:57:39 +0200
|
|
Subject: [PATCH] python: Fix rich comparisons
|
|
|
|
Python 3 doesn't call objects __cmp__() methods any more to compare
|
|
them. Instead, it requires implementing the rich comparison methods
|
|
explicitly: __eq__(), __ne(), __lt__(), __le__(), __gt__() and __ge__().
|
|
|
|
Fortunately Python 2 also supports those.
|
|
|
|
This commit only implements the comparison methods which are actually
|
|
used by the build scripts.
|
|
|
|
Signed-off-by: Mathieu Bridon <bochecha@daitauha.fr>
|
|
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
|
|
---
|
|
src/amd/vulkan/radv_extensions.py | 5 +++--
|
|
src/intel/vulkan/anv_extensions.py | 5 +++--
|
|
src/mapi/mapi_abi.py | 15 +++++++--------
|
|
3 files changed, 13 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py
|
|
index 15d29becfd..8b5eee867a 100644
|
|
--- a/src/amd/vulkan/radv_extensions.py
|
|
+++ b/src/amd/vulkan/radv_extensions.py
|
|
@@ -147,14 +147,15 @@ class VkVersion:
|
|
patch = self.patch if self.patch is not None else 0
|
|
return (self.major << 22) | (self.minor << 12) | patch
|
|
|
|
- def __cmp__(self, other):
|
|
+ def __gt__(self, other):
|
|
# If only one of them has a patch version, "ignore" it by making
|
|
# other's patch version match self.
|
|
if (self.patch is None) != (other.patch is None):
|
|
other = copy.copy(other)
|
|
other.patch = self.patch
|
|
|
|
- return self.__int_ver().__cmp__(other.__int_ver())
|
|
+ return self.__int_ver() > other.__int_ver()
|
|
+
|
|
|
|
MAX_API_VERSION = VkVersion(MAX_API_VERSION)
|
|
|
|
diff --git a/src/intel/vulkan/anv_extensions.py b/src/intel/vulkan/anv_extensions.py
|
|
index cffc3e700c..9a65aed1c4 100644
|
|
--- a/src/intel/vulkan/anv_extensions.py
|
|
+++ b/src/intel/vulkan/anv_extensions.py
|
|
@@ -160,14 +160,15 @@ class VkVersion:
|
|
patch = self.patch if self.patch is not None else 0
|
|
return (self.major << 22) | (self.minor << 12) | patch
|
|
|
|
- def __cmp__(self, other):
|
|
+ def __gt__(self, other):
|
|
# If only one of them has a patch version, "ignore" it by making
|
|
# other's patch version match self.
|
|
if (self.patch is None) != (other.patch is None):
|
|
other = copy.copy(other)
|
|
other.patch = self.patch
|
|
|
|
- return self.__int_ver().__cmp__(other.__int_ver())
|
|
+ return self.__int_ver() > other.__int_ver()
|
|
+
|
|
|
|
|
|
MAX_API_VERSION = VkVersion('0.0.0')
|
|
diff --git a/src/mapi/mapi_abi.py b/src/mapi/mapi_abi.py
|
|
index be1d15d922..e4ce2b6caf 100644
|
|
--- a/src/mapi/mapi_abi.py
|
|
+++ b/src/mapi/mapi_abi.py
|
|
@@ -121,19 +121,18 @@ class ABIEntry(object):
|
|
def __str__(self):
|
|
return self.c_prototype()
|
|
|
|
- def __cmp__(self, other):
|
|
+ def __lt__(self, other):
|
|
# compare slot, alias, and then name
|
|
- res = cmp(self.slot, other.slot)
|
|
- if not res:
|
|
+ if self.slot == other.slot:
|
|
if not self.alias:
|
|
- res = -1
|
|
+ return True
|
|
elif not other.alias:
|
|
- res = 1
|
|
+ return False
|
|
|
|
- if not res:
|
|
- res = cmp(self.name, other.name)
|
|
+ return self.name < other.name
|
|
+
|
|
+ return self.slot < other.slot
|
|
|
|
- return res
|
|
|
|
def abi_parse_xml(xml):
|
|
"""Parse a GLAPI XML file for ABI entries."""
|
|
--
|
|
2.16.4
|
|
|