[Mesa-dev] [PATCH v2 01/12] mesa: glGet: fix indentation of _mesa_init_get_hash

Brian Paul brianp at vmware.com
Thu Sep 13 15:02:16 PDT 2012


On 09/13/2012 07:50 AM, Imre Deak wrote:
> On Tue, 2012-09-11 at 17:10 -0600, Brian Paul wrote:
>> On 09/11/2012 03:55 PM, Imre Deak wrote:
>>> On Tue, 2012-09-11 at 09:30 -0600, Brian Paul wrote:
>>>> On 09/10/2012 12:41 AM, Imre Deak wrote:
>>>>> No functional change.
>>>>>
>>>>> Signed-off-by: Imre Deak<imre.deak at intel.com>
>>>>> ---
>>>>>     src/mesa/main/get.c |   18 +++++++++---------
>>>>>     1 file changed, 9 insertions(+), 9 deletions(-)
>>>>>
>>>>> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
>>>>> index 24d2a18..57457ef 100644
>>>>> --- a/src/mesa/main/get.c
>>>>> +++ b/src/mesa/main/get.c
>>>>> @@ -1442,20 +1442,20 @@ void _mesa_init_get_hash(struct gl_context *ctx)
>>>>>
>>>>>        for (i = 0; i<    Elements(values); i++) {
>>>>>           if (values[i].type == TYPE_API_MASK) {
>>>>> -	 api_mask = values[i].offset;
>>>>> -	 continue;
>>>>> +         api_mask = values[i].offset;
>>>>> +         continue;
>>>>>           }
>>>>>           if (!(api_mask&    api_bit))
>>>>> -	 continue;
>>>>> +         continue;
>>>>>
>>>>>           hash = (values[i].pname * prime_factor)&    mask;
>>>>>           while (1) {
>>>>> -	 index = hash&    mask;
>>>>> -	 if (!table[index]) {
>>>>> -	    table[index] = i;
>>>>> -	    break;
>>>>> -	 }
>>>>> -	 hash += prime_step;
>>>>> +         index = hash&    mask;
>>>>> +         if (!table[index]) {
>>>>> +            table[index] = i;
>>>>> +            break;
>>>>> +         }
>>>>> +         hash += prime_step;
>>>>>           }
>>>>>        }
>>>>>
>>>>
>>>> Reviewed-by: Brian Paul<brianp at vmware.com>
>>>>
>>>> Do you need someone to commit these patches for you?
>>>
>>> Yes, please.
>>>
>>> I don't know who have commit right or what's the workflow in general, so
>>> I just posted these in the hope that someone will commit them
>>> eventually.
>>
>> OK, I'll push 1-4 tonight or tomorrow AM.
>
> Thanks.
>
>>
>>
>>> Patches 01-04 are trivial and stand on their own, so they could be
>>> committed right away.
>>>
>>> 05-06 containing the actual fix is also independent of the subsequent
>>> ones, but I will post a new version with the comments addressed.
>>>
>>> 07-12 is moving the currently run-time hash generation to build time and
>>> hasn't received any reviewed-by lines, though Ian looked through at
>>> least some of them already.
>>
>> I'd like to have a second set of eyes look that over too.
>
> Ok, I've now made the changes you asked and talked to Ian about the
> rest. He's ok with merging it to master and 9.0. Do you want me to post
> a new version of it to the list? Otherwise I'd just add your Reviewed-by
> lines and send a pull request to Ian.

The later is fine.  Thanks!


>> It's funny that we're moving to a python-generated get.c.  That's the way I had
>> it a few years ago.
>
> I would have probably do it in C, but as I understood cross-compilation
> is not fully supported. At least in the sense that you can't build stuff
> for the build environment. The CC_FOR_BUILD autoconf thing would solve
> this, but the attempt to add support for it to Mesa wasn't successful
> ([1]), so I thought I'll try another path.
>
> One advantage though of using a script is that we can catch cases where
> we add an enum to the C headers (gl.h, glext.h) but not to the XML spec.

OK.

-Brian



More information about the mesa-dev mailing list