mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-29 18:10:23 +01:00
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@jlekstrand.net>
Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 92163482bd)
This commit is contained in:
parent
f0a736160b
commit
20471e9423
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue