[Mesa-dev] [PATCH 2/3] meta: Don't use GL_TEXTURE_RECTANGLE as texture target in GLES

Anuj Phogat anuj.phogat at gmail.com
Wed Dec 5 09:41:24 PST 2012


On Tue, Dec 4, 2012 at 11:17 AM, Eric Anholt <eric at anholt.net> wrote:
> Anuj Phogat <anuj.phogat at gmail.com> writes:
>
>> Makes framebuffer_blit_coverage_mismatched_buffer_formats.test
>> in gles3 conformance pass.
>>
>> Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
>> ---
>>  src/mesa/drivers/common/meta.c |   11 ++++++++---
>>  1 files changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
>> index 978eeb5..02e64ff 100644
>> --- a/src/mesa/drivers/common/meta.c
>> +++ b/src/mesa/drivers/common/meta.c
>
>> -   _mesa_set_enable(ctx, tex->Target, GL_TRUE);
>> +   /* glEnable() in gles2 and gles3 doesn't allow GL_TEXTURE_{1D, 2D, etc.}
>> +    * tokens.
>> +    */
>> +   if (ctx->API == API_OPENGL && ctx->API == API_OPENGLES)
>> +      _mesa_set_enable(ctx, tex->Target, GL_TRUE);
>>
>>     if (mask & GL_COLOR_BUFFER_BIT) {
>>        setup_copypix_texture(tex, newTex, srcX, srcY, srcW, srcH,
>> @@ -1679,7 +1683,8 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
>>        /* XXX can't easily do stencil */
>>     }
>>
>> -   _mesa_set_enable(ctx, tex->Target, GL_FALSE);
>> +   if (ctx->API == API_OPENGL && ctx->API == API_OPENGLES)
>> +      _mesa_set_enable(ctx, tex->Target, GL_FALSE);
>
> If BlitFramebuffer is doing fixed function, then it needs
> _mesa_set_enable() to work to enable the texture it's reading from.
>
> For GLES3, it sounds like we need to either make blorp handle all
> BlitFramebuffer, or make a BlitFramebuffer path using GLSL instead.  I
> don't think this halfway point of a BlitFramebuffer implementation that
> doesn't successfully blit makes sense.

Yeah. I realized it after posting this patch. I'm working on GLSL implementation
of BlitFrameBuffer.


More information about the mesa-dev mailing list