[Mesa-dev] [PATCH] mesa: only copy requested compressed teximage faces

Ilia Mirkin imirkin at alum.mit.edu
Sun Aug 20 00:07:15 UTC 2017


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

Will push this out tomorrow unless there are any objections.

On Sat, Aug 19, 2017 at 7:59 PM, Christoph Haag
<haagch+mesadev at frickel.club> wrote:
> From: Christoph Haag <haagch at frickel.club>
>
> This is analogous to commit 2259b11 which missed the compressed case
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102308
> Signed-off-by: Christoph Haag <haagch+mesadev at frickel.club>
> ---
>  src/mesa/main/teximage.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
> index 7bcd734204..e5dc469437 100644
> --- a/src/mesa/main/teximage.c
> +++ b/src/mesa/main/teximage.c
> @@ -4968,13 +4968,13 @@ compressed_tex_sub_image(unsigned dim, GLenum target, GLuint texture,
>        }
>
>        /* Copy in each face. */
> -      for (int i = 0; i < 6; ++i) {
> +      for (int i = zoffset; i < zoffset + depth; ++i) {
>           texImage = texObj->Image[i][level];
>           assert(texImage);
>
>           compressed_texture_sub_image(ctx, 3, texObj, texImage,
>                                        texObj->Target, level, xoffset, yoffset,
> -                                      zoffset, width, height, 1, format,
> +                                      0, width, height, 1, format,
>                                        imageSize, pixels);
>
>           /* Compressed images don't have a client format */
> --
> 2.14.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list