Re: [Mesa-dev] [PATCH v2 07/12] mesa: glGet: simplify the 'enum not found' condition

2012-09-13 Thread Brian Paul
On 09/13/2012 02:44 PM, Kristian Høgsberg wrote: On Tue, Sep 11, 2012 at 1:13 PM, Brian Paul wrote: On 09/11/2012 10:36 AM, Kristian Høgsberg wrote: On Tue, Sep 11, 2012 at 11:47 AM, Brian Paul wrote: On 09/10/2012 12:41 AM, Imre Deak wrote: When traversing the hash table looking up an

Re: [Mesa-dev] [PATCH v2 07/12] mesa: glGet: simplify the 'enum not found' condition

2012-09-13 Thread Kristian Høgsberg
On Tue, Sep 11, 2012 at 1:13 PM, Brian Paul wrote: > On 09/11/2012 10:36 AM, Kristian Høgsberg wrote: >> >> On Tue, Sep 11, 2012 at 11:47 AM, Brian Paul wrote: >>> >>> On 09/10/2012 12:41 AM, Imre Deak wrote: When traversing the hash table looking up an enum that is invalid we

Re: [Mesa-dev] [PATCH v2 07/12] mesa: glGet: simplify the 'enum not found' condition

2012-09-11 Thread Imre Deak
On Tue, 2012-09-11 at 09:47 -0600, Brian Paul wrote: > On 09/10/2012 12:41 AM, Imre Deak wrote: > > When traversing the hash table looking up an enum that is invalid we > > eventually reach the first element in the descriptor array. By looking > > at the type of that element, which is always TYPE_A

Re: [Mesa-dev] [PATCH v2 07/12] mesa: glGet: simplify the 'enum not found' condition

2012-09-11 Thread Brian Paul
On 09/11/2012 10:36 AM, Kristian Høgsberg wrote: On Tue, Sep 11, 2012 at 11:47 AM, Brian Paul wrote: On 09/10/2012 12:41 AM, Imre Deak wrote: When traversing the hash table looking up an enum that is invalid we eventually reach the first element in the descriptor array. By looking at the type

Re: [Mesa-dev] [PATCH v2 07/12] mesa: glGet: simplify the 'enum not found' condition

2012-09-11 Thread Kristian Høgsberg
On Tue, Sep 11, 2012 at 11:47 AM, Brian Paul wrote: > On 09/10/2012 12:41 AM, Imre Deak wrote: >> >> When traversing the hash table looking up an enum that is invalid we >> eventually reach the first element in the descriptor array. By looking >> at the type of that element, which is always TYPE_A

Re: [Mesa-dev] [PATCH v2 07/12] mesa: glGet: simplify the 'enum not found' condition

2012-09-11 Thread Brian Paul
On 09/10/2012 12:41 AM, Imre Deak wrote: When traversing the hash table looking up an enum that is invalid we eventually reach the first element in the descriptor array. By looking at the type of that element, which is always TYPE_API_MASK, we know that we can stop the search and return error. Si

[Mesa-dev] [PATCH v2 07/12] mesa: glGet: simplify the 'enum not found' condition

2012-09-09 Thread Imre Deak
When traversing the hash table looking up an enum that is invalid we eventually reach the first element in the descriptor array. By looking at the type of that element, which is always TYPE_API_MASK, we know that we can stop the search and return error. Since this element is always the first it's e