Mesa (master): main: Fixed _mesa_GetCompressedTexImage_sw to copy slices correctly.

Laura Ekstrand ldeks at kemper.freedesktop.org
Tue Feb 17 21:46:44 UTC 2015


Module: Mesa
Branch: master
Commit: 92163482bda87216764edc0beca3ca090678038d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=92163482bda87216764edc0beca3ca090678038d

Author: Laura Ekstrand <laura at jlekstrand.net>
Date:   Mon Feb 16 14:29:57 2015 -0800

main: Fixed _mesa_GetCompressedTexImage_sw to copy slices correctly.

Previously array textures were not working with GetCompressedTextureImage,
leading to failures in the test
arb_direct_state_access/getcompressedtextureimage.c.

Tested-by: Laura Ekstrand <laura at jlekstrand.net>
Reviewed-by: Brian Paul <brianp at vmware.com>

Cc: "10.4, 10.5" <mesa-stable at lists.freedesktop.org>

---

 src/mesa/main/texgetimage.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 23cc3f0..24df5b6 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -742,7 +742,7 @@ _mesa_GetCompressedTexImage_sw(struct gl_context *ctx,
       GLubyte *src;
 
       /* map src texture buffer */
-      ctx->Driver.MapTextureImage(ctx, texImage, 0,
+      ctx->Driver.MapTextureImage(ctx, texImage, slice,
                                   0, 0, texImage->Width, texImage->Height,
                                   GL_MAP_READ_BIT, &src, &srcRowStride);
 
@@ -754,7 +754,7 @@ _mesa_GetCompressedTexImage_sw(struct gl_context *ctx,
             src += srcRowStride;
          }
 
-         ctx->Driver.UnmapTextureImage(ctx, texImage, 0);
+         ctx->Driver.UnmapTextureImage(ctx, texImage, slice);
 
          /* Advance to next slice */
          dest += store.TotalBytesPerRow * (store.TotalRowsPerSlice - store.CopyRowsPerSlice);




More information about the mesa-commit mailing list