summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texgetimage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-08 20:10:15 -0700
committerBrian Paul <[email protected]>2012-02-10 08:06:57 -0700
commit07459ba50979a99e12720bd9e41a1aa3b8d24e41 (patch)
tree2cfe8cc84f3b802f9008bb2feeaf6936f6d45b0a /src/mesa/main/texgetimage.c
parent9d9111108eadd65708899284b1cfa9ca425f3ac8 (diff)
mesa: push row stride adjustment down into _mesa_decompress_image()
There's a mismatch in row strides for compressed textures between what Driver.MapTextureImage() returns and what the software fetch-texel functions use. Move it down a layer. The next step would be to fix this in the fetch-texel functions.
Diffstat (limited to 'src/mesa/main/texgetimage.c')
-rw-r--r--src/mesa/main/texgetimage.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index bff003d24a4..a69c4ff70e8 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -246,23 +246,12 @@ get_tex_rgba_compressed(struct gl_context *ctx, GLuint dimensions,
{
GLubyte *srcMap;
GLint srcRowStride;
- GLuint bytes, bw, bh;
-
- bytes = _mesa_get_format_bytes(texFormat);
- _mesa_get_format_block_size(texFormat, &bw, &bh);
ctx->Driver.MapTextureImage(ctx, texImage, 0,
0, 0, width, height,
GL_MAP_READ_BIT,
&srcMap, &srcRowStride);
if (srcMap) {
- /* XXX This line is a bit of a hack to work around the
- * mismatch of compressed row strides as returned by
- * MapTextureImage() vs. what the texture decompression code
- * uses. This will be fixed in the future.
- */
- srcRowStride = srcRowStride * bh / bytes;
-
_mesa_decompress_image(texFormat, width, height,
srcMap, srcRowStride, tempImage);