summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_gen_mipmap.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2011-03-02 16:13:59 +1000
committerDave Airlie <airlied@redhat.com>2011-03-02 16:13:59 +1000
commite8d061fd7476ee0266a2f9860771f924e9ffccd5 (patch)
treec0fd4f5b5952eee64369fd0d41c500552e5a0c65 /src/mesa/state_tracker/st_gen_mipmap.c
parente80bfc85150ef766c4145bdbd2aa38590589911a (diff)
mesa/st: fix softpipe npot compressed mipmaps.
this fixes fbo-generatemipmap-formats rgtc and s3tc in NPOT mode with softpipe. r600g fails to even get level 0 correct so have to look into that a bit further. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/state_tracker/st_gen_mipmap.c')
-rw-r--r--src/mesa/state_tracker/st_gen_mipmap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index 2ec8431bc1..a12a32e114 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -265,7 +265,7 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
dstTemp = malloc(dstWidth2 * dstHeight2 * comps * (datatype == GL_FLOAT ? 4 : 1));
/* decompress the src image: srcData -> srcTemp */
- decompress_image(format, datatype, srcData, srcTemp, srcWidth, srcHeight, srcTrans->stride);
+ decompress_image(format, datatype, srcData, srcTemp, srcWidth2, srcHeight2, srcTrans->stride);
_mesa_generate_mipmap_level(target, datatype, comps,
0 /*border*/,
@@ -277,7 +277,7 @@ fallback_generate_mipmap(struct gl_context *ctx, GLenum target,
dstWidth2); /* stride in texels */
/* compress the new image: dstTemp -> dstData */
- compress_image(format, datatype, dstTemp, dstData, dstWidth, dstHeight, dstTrans->stride);
+ compress_image(format, datatype, dstTemp, dstData, dstWidth2, dstHeight2, dstTrans->stride);
free(srcTemp);
free(dstTemp);