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

Eric Anholt eric at anholt.net
Tue Dec 4 11:17:15 PST 2012


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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121204/4d618269/attachment.pgp>


More information about the mesa-dev mailing list