diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2008-04-25 10:33:48 -0600 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2008-04-25 10:34:42 -0600 |
commit | 3faea292e537b8fe8f86b03ae9147c73f17efc3b (patch) | |
tree | 625fbc7eee42de2059a9b2b64823001dfe5b6c36 /src/mesa/state_tracker | |
parent | 658f5e721316f1983ae39b6b94b992baca0e2bc2 (diff) | |
download | external_mesa3d-3faea292e537b8fe8f86b03ae9147c73f17efc3b.zip external_mesa3d-3faea292e537b8fe8f86b03ae9147c73f17efc3b.tar.gz external_mesa3d-3faea292e537b8fe8f86b03ae9147c73f17efc3b.tar.bz2 |
gallium: fix the compressed texture hack in st_texture_image_copy()
Actually, the hack is still there and needs to be revisited, but I get a bit
further with compressed textures now.
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 5 |
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 8e3235c..66d81e2 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); |