[Mesa-dev] [PATCH] st/mesa: use fallback path for glCopyTexSubImage(GL_TEXTURE_1D_ARRAY)

Jose Fonseca jfonseca at vmware.com
Mon Aug 27 08:56:58 PDT 2012


Sounds good to me.

Jose

----- Original Message -----
> Fixes many failing cases in piglit copyteximage test.
> ---
>  src/mesa/state_tracker/st_cb_texture.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/src/mesa/state_tracker/st_cb_texture.c
> b/src/mesa/state_tracker/st_cb_texture.c
> index 3de96ad..ed3bbc7 100644
> --- a/src/mesa/state_tracker/st_cb_texture.c
> +++ b/src/mesa/state_tracker/st_cb_texture.c
> @@ -989,6 +989,16 @@ st_CopyTexSubImage(struct gl_context *ctx,
> GLuint dims,
>        goto fallback;
>     }
>  
> +   if (texImage->TexObject->Target == GL_TEXTURE_1D_ARRAY) {
> +      /* 1D arrays might be thought of as 2D images but the actual
> layout
> +       * might not be that way.  At some points, we convert OpenGL's
> 1D
> +       * array 'height' into gallium 'layers' and that prevents the
> blit
> +       * utility code from doing the right thing.  Simpy use the
> memcpy-based
> +       * fallback.
> +       */
> +      goto fallback;
> +   }
> +
>     if (matching_base_formats &&
>         src_format == dest_format &&
>         !do_flip) {
> --
> 1.7.3.4
> 
> _______________________________________________
> 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