[Mesa-dev] [PATCH V2 07/24] i965/cnl: Update the script generating genX_bits.h

Jason Ekstrand jason at jlekstrand.net
Mon May 15 22:06:49 UTC 2017


Maybe tweak the commit message:

intel/genxml: Update genx_bits for gen10+

This commit adds a gen10 case to the switch statement and drops some
unneeded code for handling gen numbers which doesn't work on gen10 and
above.

On Mon, May 15, 2017 at 3:04 PM, Jason Ekstrand <jason at jlekstrand.net>
wrote:

> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>
> On Mon, May 15, 2017 at 3:02 PM, Anuj Phogat <anuj.phogat at gmail.com>
> wrote:
>
>> V2: Drop "z = float(z)" and the "z *= 10" lines
>>
>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>> Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
>> ---
>>  src/intel/genxml/gen_bits_header.py | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/src/intel/genxml/gen_bits_header.py
>> b/src/intel/genxml/gen_bits_header.py
>> index ac8ec4c..1b35040 100644
>> --- a/src/intel/genxml/gen_bits_header.py
>> +++ b/src/intel/genxml/gen_bits_header.py
>> @@ -80,6 +80,7 @@ static inline uint32_t ATTRIBUTE_PURE
>>  ${item.token_name}_${prop}(const struct gen_device_info *devinfo)
>>  {
>>     switch (devinfo->gen) {
>> +   case 10: return ${item.get_prop(prop, 10)};
>>     case 9: return ${item.get_prop(prop, 9)};
>>     case 8: return ${item.get_prop(prop, 8)};
>>     case 7:
>> @@ -167,10 +168,7 @@ class Gen(object):
>>
>>      def __init__(self, z):
>>          # Convert potential "major.minor" string
>> -        z = float(z)
>> -        if z < 10:
>> -            z *= 10
>> -        self.tenx = int(z)
>> +        self.tenx = int(float(z) * 10)
>>
>>      def __lt__(self, other):
>>          return self.tenx < other.tenx
>> --
>> 2.9.3
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170515/74afc90c/attachment.html>


More information about the mesa-dev mailing list