[Mesa-dev] [PATCH] gles2: a stub implementation for GL_EXT_discard_framebuffer

Ian Romanick idr at freedesktop.org
Wed Feb 13 07:23:29 PST 2013


On 02/12/2013 11:04 PM, Tapani Pälli wrote:
> On 02/12/2013 08:45 PM, Eric Anholt wrote:
>> Tapani Pälli <tapani.palli at intel.com> writes:
>>
>>> On 02/12/2013 12:38 AM, Eric Anholt wrote:
>>>> Tapani Pälli <tapani.palli at intel.com> writes:
>>>>> ---
>>>>>    src/mapi/glapi/gen/es_EXT.xml                 | 13 +++++++++
>>>>>    src/mesa/drivers/dri/intel/intel_extensions.c |  1 +
>>>>>    src/mesa/main/dd.h                            |  4 ++-
>>>>>    src/mesa/main/extensions.c                    |  1 +
>>>>>    src/mesa/main/fbobject.c                      | 40
>>>>> +++++++++++++++++++++++++++
>>>>>    src/mesa/main/fbobject.h                      |  4 +++
>>>>>    src/mesa/main/mtypes.h                        |  1 +
>>>>>    src/mesa/main/tests/dispatch_sanity.cpp       |  1 +
>>>>>    8 files changed, 64 insertions(+), 1 deletion(-)
>>>>> diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c
>>>>> b/src/mesa/drivers/dri/intel/intel_extensions.c
>>>>> index bf5e2b5..a182139 100755
>>>>> --- a/src/mesa/drivers/dri/intel/intel_extensions.c
>>>>> +++ b/src/mesa/drivers/dri/intel/intel_extensions.c
>>>>> @@ -65,6 +65,7 @@ intelInitExtensions(struct gl_context *ctx)
>>>>>       ctx->Extensions.EXT_blend_equation_separate = true;
>>>>>       ctx->Extensions.EXT_blend_func_separate = true;
>>>>>       ctx->Extensions.EXT_blend_minmax = true;
>>>>> +   ctx->Extensions.EXT_discard_framebuffer = true;
>>>>>       ctx->Extensions.EXT_framebuffer_blit = true;
>>>>>       ctx->Extensions.EXT_framebuffer_object = true;
>>>>>       ctx->Extensions.EXT_fog_coord = true;
>>>>> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
>>>>> index 04435e0..f7bd6f2 100644
>>>>> --- a/src/mesa/main/extensions.c
>>>>> +++ b/src/mesa/main/extensions.c
>>>>> @@ -168,6 +168,7 @@ static const struct extension extension_table[]
>>>>> = {
>>>>>       { "GL_EXT_blend_color",
>>>>> o(EXT_blend_color),                         GLL,            1995 },
>>>>>       { "GL_EXT_blend_equation_separate",
>>>>> o(EXT_blend_equation_separate),             GL,             2003 },
>>>>>       { "GL_EXT_blend_func_separate",
>>>>> o(EXT_blend_func_separate),                 GLL,            1999 },
>>>>> +   { "GL_EXT_discard_framebuffer",
>>>>> o(EXT_discard_framebuffer),                             ES2, 2009 },
>>>>>       { "GL_EXT_blend_minmax",
>>>>> o(EXT_blend_minmax),                        GLL | ES1 | ES2, 1995 },
>>>>>       { "GL_EXT_blend_subtract",
>>>>> o(dummy_true),                              GLL,            1995 },
>>>>>       { "GL_EXT_clip_volume_hint",
>>>>> o(EXT_clip_volume_hint),                    GL,             1996 },
>>>> Is there any reason not to just expose this stub extension everywhere,
>>>> since it requires nothing from the driver author?
>>> I'm not aware of any other than ES2 users so this is why I enabled it
>>> only for ES2. I'll add ES1 too as requested by Ian and Chad.
>> I wasnt't meaning gles1, I meant using o(dummy_true) so that every
>> driver gets it.
>>
>
> OK, now I got it. Yes, it can be enabled for every driver.

No, it can't.  This extension requires OES_framebuffer_object.  If we're 
going to enable this on ES1, it must, at the very least, use the same 
enable bit as OES_framebuffer_object.

+   { "GL_EXT_discard_framebuffer", 
o(EXT_framebuffer_object),                                    ES1 | ES2, 
2009 },

I said this in my reply on 2/11:

http://lists.freedesktop.org/archives/mesa-dev/2013-February/034408.html

> // Tapani
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list