Anuj Phogat <anuj.pho...@gmail.com> writes:

> Makes framebuffer_blit_coverage_mismatched_buffer_formats.test
> in gles3 conformance pass.
>
> Signed-off-by: Anuj Phogat <anuj.pho...@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.

Attachment: pgpPKQmUz0UUW.pgp
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to