diff options
author | Laura Ekstrand <[email protected]> | 2015-02-16 14:29:57 -0800 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2015-02-24 12:22:43 +0000 |
commit | 20471e9423a06af8cfbd0d9bc6ccf838afa668bb (patch) | |
tree | cb3c38ed2f3fdcda41c0121afb061f40ef2bd10a | |
parent | f0a736160b7c690d1a4aa0b0e8a634821ada7795 (diff) |
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 <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Cc: "10.4, 10.5" <[email protected]>
(cherry picked from commit 92163482bda87216764edc0beca3ca090678038d)
-rw-r--r-- | src/mesa/main/texgetimage.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 405f0853426..7cebe62890e 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -743,7 +743,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); @@ -755,7 +755,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); |