summaryrefslogtreecommitdiff
path: root/src/mesa/state_tracker/st_texture.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2008-04-27 18:04:50 +1000
committerBen Skeggs <skeggsb@gmail.com>2008-04-27 18:04:50 +1000
commit0cca90cea1dbe1a76dbf9ac1985c3676ec460b0a (patch)
tree6e496a5d77d13a9f1679006c3c5334e0b8d889f4 /src/mesa/state_tracker/st_texture.c
parent7342688286cc3b7c938af2dfeac22df4fa8c8464 (diff)
parenta8e39b6f5a1fedf2f8719e1adb8802ebbfc09688 (diff)
Merge remote branch 'upstream/gallium-0.1' into nouveau-gallium-0.1
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r--src/mesa/state_tracker/st_texture.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 8e3235cc99..66d81e2b95 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -290,8 +290,7 @@ st_texture_image_copy(struct pipe_context *pipe,
GLuint i;
/* XXX this is a hack */
- if (dst->compressed)
- height /= 4;
+ const GLuint copyHeight = dst->compressed ? height / 4 : height;
for (i = 0; i < depth; i++) {
GLuint srcLevel;
@@ -315,7 +314,7 @@ st_texture_image_copy(struct pipe_context *pipe,
0, 0, /* destX, Y */
src_surface,
0, 0, /* srcX, Y */
- width, height);
+ width, copyHeight);
pipe_surface_reference(&dst_surface, NULL);
pipe_surface_reference(&src_surface, NULL);