[Mesa-dev] [PATCH 3/4] anv: Use central api generation scripts.

Emil Velikov emil.l.velikov at gmail.com
Wed Aug 8 10:31:09 UTC 2018


On 8 August 2018 at 00:14, Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl> wrote:
> This became kind of messy as python imports cannot really look up
> parent/sibling directories. I saw some scripts use sys.path but
> that became even more messy due to import locations.
>
> I also move the selections of the dispatch table out of the
> generation script because it is not easily shared, and generating
> it did not really win anything anyway.
> ---
>  src/intel/Android.vulkan.mk             |   9 +
>  src/intel/Makefile.vulkan.am            |  25 +-

The Android/Makefile/meson changes seem OK. Admittedly we have better
meson experts ;-)
For those:
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>


> diff --git a/src/vulkan/util/vk_extensions.py b/src/vulkan/util/vk_extensions.py
> index 4f6667fe86c..79ae3af02ea 100644
> --- a/src/vulkan/util/vk_extensions.py
> +++ b/src/vulkan/util/vk_extensions.py
> @@ -82,11 +82,12 @@ 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()
> +

Another hunk that should have been part of patch 1/4?

Thanks
Emil


More information about the mesa-dev mailing list