[Mesa-dev] [PATCH] radv/extensions: fix c_vk_version for patch == None

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Fri Feb 23 22:49:09 UTC 2018


Huh, can confirm that it generates None for me too, no clue what
defines that symbol.

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

Did you have push access? Otherwise I can push it.

On Fri, Feb 23, 2018 at 11:33 PM, Mauro Rossi <issor.oruam at gmail.com> wrote:
> 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.")
> ---
>  src/amd/vulkan/radv_extensions.py | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_extensions.py b/src/amd/vulkan/radv_extensions.py
> index ac6ec8744e..92b1ea3e14 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):
> --
> 2.14.1
>


More information about the mesa-dev mailing list