[Mesa-dev] [PATCH] intel: Fix copying of separate stencil data in glCopyTexSubImage().

Jordan Justen jljusten at gmail.com
Thu May 30 16:10:06 PDT 2013


On Thu, May 30, 2013 at 3:47 PM, Eric Anholt <eric at anholt.net> wrote:
> We were copying the source stencil data onto the destination depth data.
>
> Fixes piglit copyteximage other than 1D_ARRAY.
> ---
>  src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> index c3ef054..67c40a7 100644
> --- a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
> @@ -375,10 +375,16 @@ brw_blorp_copytexsubimage(struct intel_context *intel,
>     if (_mesa_get_format_bits(dst_image->TexFormat, GL_STENCIL_BITS) > 0 &&
>         src_rb != NULL) {
>        src_irb = intel_renderbuffer(src_rb);
> -      if (src_irb->mt != src_mt)

Was this previous 'if' a mistake? I see the brw_blorp_blit_miptrees
call was not indented previously, and it was separated by a line.

> +      src_mt = src_irb->mt;
> +
> +      if (src_mt->stencil_mt)
> +         src_mt = src_mt->stencil_mt;

else
     src_mt = src_irb->mt;
?

Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>

> +
> +      if (dst_mt->stencil_mt)
> +         dst_mt = dst_mt->stencil_mt;
>
>        brw_blorp_blit_miptrees(intel,
> -                              src_irb->mt, src_irb->mt_level, src_irb->mt_layer,
> +                              src_mt, src_irb->mt_level, src_irb->mt_layer,
>                                dst_mt, dst_image->Level, dst_image->Face,
>                                srcX0, srcY0, dstX0, dstY0, dstX1, dstY1,
>                                false, mirror_y);
> --
> 1.8.3.rc0
>
> _______________________________________________
> 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