summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMauro Rossi <[email protected]>2018-02-23 23:33:37 +0100
committerBas Nieuwenhuizen <[email protected]>2018-02-24 00:31:31 +0100
commit8eed9421367d3a5576cb4b924d5004a1f976a418 (patch)
tree9d70aad057b01366cba8a6c61e22acf53c830026 /src
parentb4b4ada7616dec49e9386670e455553d277e5f85 (diff)
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/amd/vulkan/radv_extensions.py3
1 files changed, 2 insertions, 1 deletions
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):