On Fri, 4 May 2012 22:33:41 +0800, Liu Aleaxander <aleaxan...@gmail.com> wrote:
> From: Yuanhan Liu <yuanhan....@linux.intel.com>
> 
> If there are already some texture unit enabled, a fallback is needed,
> or the original texture stuff would not work.
> 
> A much better way is to use multi-texture to handle this case: like
> treat the pixels as texture 1 and the original texture as texture 2.
> I haven't do much inverstigation on that way, but fallback is definitely
> a much simpler and straight way.
> 
> This would fix oglc mipsel test case.
> 
> Signed-off-by: Yuanhan Liu <yuanhan....@linux.intel.com>
> ---
>  src/mesa/drivers/common/meta.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
> index 95336fc..c860f3c 100644
> --- a/src/mesa/drivers/common/meta.c
> +++ b/src/mesa/drivers/common/meta.c
> @@ -2210,6 +2210,16 @@ _mesa_meta_DrawPixels(struct gl_context *ctx,
>        fallback = GL_TRUE;
>     }
> 
> +   /*
> +    * If there are already some texture unit enabled, a fallback is needed,
> +    * or the original texture stuff would not work
> +    *
> +    * FIXME: we may use multi-texture to handle this case. But fallback is
> +    * definitely a much simple and straight way.
> +    */
> +   if (ctx->Texture._EnabledUnits)
> +      fallback = GL_TRUE;

_EnabledUnits is computed state at texture state update time, right?  So
you can't rely on it being correct here -- you'd need to
_mesa_update_state(ctx) first.  I think it should go at the very top of
the function, due to the _ImageTransferState check also relying on that.

Attachment: pgpCYbDQMDhGE.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