[waffle] [PATCH] glx: Fix gles regression

Chad Versace chad.versace at linux.intel.com
Mon Jan 21 14:44:37 PST 2013


Thanks. Patch is committed to master and 1.2.

On 01/21/2013 02:29 PM, Tom Gall wrote:
> Looks good, thanks!
> 
> On Mon, Jan 21, 2013 at 4:09 PM, Chad Versace
> <chad.versace at linux.intel.com> wrote:
>> From: Tom Gall <tom.gall at linaro.org>
>>
>> In glx_context_fill_attrib_list, recently a check was added to
>> work around a bug for OpenGL v1.0 contexts and NVidia. This
>> check introduced a bug where for OpenGL ES (all versions)
>> the attrib_list wasn't getting entries for
>> GLX_CONTEXT_MAJOR_VERSION_ARB or GLX_CONTEXT_MINOR_VERSION_ARB.
>> In piglit, this causes all OpenGL ES testcases to fail with
>> context failures.
>> This fix adjusts the comparison so that OpenGL ES will always
>> have the context version and not set it for a Open GL v1.0
>> context.
>>
>> [chadv: Replace != OPENGL_ES1 with == OPENGL to improve readability.
>>  Double negatives are confusing.]
>>
>> Signed-off-by: Tom Gall <tom.gall at linaro.org>
>> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
>> ---
>>
>> Tom, I made a slight change to improve the if-condition's readability. Does
>> this look good to you?
>>
>>
>>  src/waffle/glx/glx_context.c | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/src/waffle/glx/glx_context.c b/src/waffle/glx/glx_context.c
>> index ffb79a4..a0563a3 100644
>> --- a/src/waffle/glx/glx_context.c
>> +++ b/src/waffle/glx/glx_context.c
>> @@ -95,8 +95,8 @@ glx_context_fill_attrib_list(struct glx_config *config,
>>      // glXCreateContextAttribsARB with MAJOR=1 and MINOR=0 returns an OpenGL
>>      // 2.1 context. Calling it with MAJOR and MINOR unspecified returns
>>      // a context of the latest supported OpenGL version.
>> -    if (attrs->context_api == WAFFLE_CONTEXT_OPENGL &&
>> -        attrs->context_full_version != 10)
>> +    if (!(attrs->context_full_version == 10 &&
>> +          attrs->context_api == WAFFLE_CONTEXT_OPENGL))
>>      {
>>          attrib_list[i++] = GLX_CONTEXT_MAJOR_VERSION_ARB;
>>          attrib_list[i++] = attrs->context_major_version;
>> --
>> 1.8.1.1
>>
> 
> 
> 



More information about the waffle mailing list