[Mesa-dev] [PATCH 03/12] i965/cnl: Update the script generating genX_bits.h

Jason Ekstrand jason at jlekstrand.net
Sun Apr 16 01:17:59 UTC 2017


On April 14, 2017 5:37:16 PM Anuj Phogat <anuj.phogat at gmail.com> wrote:

> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
> ---
>  src/intel/genxml/gen_bits_header.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/genxml/gen_bits_header.py 
> b/src/intel/genxml/gen_bits_header.py
> index 808e6cf..77cd966 100644
> --- a/src/intel/genxml/gen_bits_header.py
> +++ b/src/intel/genxml/gen_bits_header.py
> @@ -84,6 +84,7 @@ static inline uint32_t ATTRIBUTE_PURE
>  ${field.token_name}(const struct gen_device_info *devinfo)
>  {
>     switch (devinfo->gen) {
> +   case 10: return ${field.bits(10)};
>     case 9: return ${field.bits(9)};
>     case 8: return ${field.bits(8)};
>     case 7:
> @@ -151,8 +152,7 @@ class Gen(object):
>      def __init__(self, z):
>          # Convert potential "major.minor" string
>          z = float(z)
> -        if z < 10:
> -            z *= 10
> +        z *= 10
>          self.tenx = int(z)

While we're here, we might as well just make this

self.tenx = int(float(z) * 10)

With that,

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

>
>      def __lt__(self, other):
> --
> 2.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev




More information about the mesa-dev mailing list