[Mesa-dev] [PATCH] mesa/glsl/glapi: enable GL_EXT_draw_buffers extension

Tapani tapani.palli at intel.com
Tue Nov 25 21:52:29 PST 2014


On 11/25/2014 03:56 PM, Ilia Mirkin wrote:
> On Tue, Nov 25, 2014 at 6:23 AM, Tapani Pälli <tapani.palli at intel.com> wrote:
>> Patch enables ES2 extension that utilizes existing ES3 functionality.
>>
>> Changes make all the subtests to run and pass in WebGL conformance
>> test 'webgl-draw-buffers' when running Chrome on OpenGL ES.
>>
>> Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
>> ---
>>   src/glsl/glcpp/glcpp-parse.y    | 2 ++
>>   src/glsl/glsl_parser_extras.cpp | 1 +
>>   src/glsl/glsl_parser_extras.h   | 2 ++
>>   src/mapi/glapi/gen/es_EXT.xml   | 9 +++++++++
>>   src/mesa/main/extensions.c      | 1 +
>>   src/mesa/main/mtypes.h          | 1 +
>>   6 files changed, 16 insertions(+)
>>
>> diff --git a/src/glsl/glcpp/glcpp-parse.y b/src/glsl/glcpp/glcpp-parse.y
>> index f1119eb..414f4df 100644
>> --- a/src/glsl/glcpp/glcpp-parse.y
>> +++ b/src/glsl/glcpp/glcpp-parse.y
>> @@ -2380,6 +2380,8 @@ _glcpp_parser_handle_version_declaration(glcpp_parser_t *parser, intmax_t versio
>>                   add_builtin_define(parser, "GL_OES_EGL_image_external", 1);
>>                 if (extensions->OES_standard_derivatives)
>>                    add_builtin_define(parser, "GL_OES_standard_derivatives", 1);
>> +             if (extensions->EXT_draw_buffers)
>> +                add_builtin_define(parser, "GL_EXT_draw_buffers", 1);
> It appears that you used tabs here instead of spaces. Also, nothing
> was ever setting extensions->EXT_draw_buffers and you were enabling
> the extension unconditionally. As such, the define should be added
> unconditionally... Or am I misunderstanding?

oops yes, this is a leftover, this patch was more complicated until I 
cleaned it up to current state but it seems I can now remove this 
boolean as well and enable extension unconditionally.

>>             }
>>          } else {
>>             add_builtin_define(parser, "GL_ARB_draw_buffers", 1);
>> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
>> index 7389baa..c798737 100644
>> --- a/src/mesa/main/mtypes.h
>> +++ b/src/mesa/main/mtypes.h
>> @@ -3785,6 +3785,7 @@ struct gl_extensions
>>      GLboolean EXT_blend_func_separate;
>>      GLboolean EXT_blend_minmax;
>>      GLboolean EXT_depth_bounds_test;
>> +   GLboolean EXT_draw_buffers;
> This does not appear to be used anywhere... why did you add it?

serves no purpose, will remove it

// Tapani


More information about the mesa-dev mailing list