From: Mauro Rossi Date: Fri, 23 Feb 2018 22:33:37 +0000 (+0100) Subject: radv/extensions: fix c_vk_version for patch == None X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8eed9421367d3a5576cb4b924d5004a1f976a418;p=mesa.git radv/extensions: fix c_vk_version for patch == None Similar to cb0d1ba156 ("anv/extensions: Fix VkVersion::c_vk_version for patch == None") fixes the following building errors: out/target/product/x86_64/obj_x86/STATIC_LIBRARIES/libmesa_radv_common_intermediates/radv_entrypoints.c:1161:48: error: use of undeclared identifier 'None'; did you mean 'long'? return instance && VK_MAKE_VERSION(1, 0, None) <= core_version; ^~~~ long external/mesa/include/vulkan/vulkan.h:34:43: note: expanded from macro 'VK_MAKE_VERSION' (((major) << 22) | ((minor) << 12) | (patch)) ^ ... fatal error: too many errors emitted, stopping now [-ferror-limit=] 20 errors generated. Fixes: e72ad05c1d ("radv: Return NULL for entrypoints when not supported.") Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py index ac6ec8744e0..92b1ea3e142 100644 --- a/src/amd/vulkan/radv_extensions.py +++ b/src/amd/vulkan/radv_extensions.py @@ -116,7 +116,8 @@ class VkVersion: return '.'.join(ver_list) def c_vk_version(self): - ver_list = [str(self.major), str(self.minor), str(self.patch)] + patch = self.patch if self.patch is not None else 0 + ver_list = [str(self.major), str(self.minor), str(patch)] return 'VK_MAKE_VERSION(' + ', '.join(ver_list) + ')' def __int_ver(self):