Mesa (master): mesa/st: fix incorrect face, level in compress_with_blit
Keith Whitwell
keithw at kemper.freedesktop.org
Mon Apr 27 13:44:36 UTC 2009
Module: Mesa
Branch: master
Commit: 5ed7764fd6354da8e2be15d6fb724c2d6be9be4a
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=5ed7764fd6354da8e2be15d6fb724c2d6be9be4a
Author: Keith Whitwell <keithw at vmware.com>
Date: Mon Apr 27 14:42:23 2009 +0100
mesa/st: fix incorrect face, level in compress_with_blit
We were incorrectly applying the destination texture face and level
when requesting a transfer to the temporary texture, which has only
one face and level. This would obviously cause problems uploading to
compressed cube and mipmap textures.
---
src/mesa/state_tracker/st_cb_texture.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index c3e990e..aeb7511 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -418,7 +418,6 @@ compress_with_blit(GLcontext * ctx,
const GLuint dstImageOffsets[1] = {0};
struct st_texture_image *stImage = st_texture_image(texImage);
struct pipe_screen *screen = ctx->st->pipe->screen;
- const GLuint face = _mesa_tex_target_to_face(target);
const struct gl_texture_format *mesa_format;
struct pipe_texture templ;
struct pipe_texture *src_tex;
@@ -467,7 +466,7 @@ compress_with_blit(GLcontext * ctx,
/* Put user's tex data into the temporary texture
*/
tex_xfer = st_cond_flush_get_tex_transfer(st_context(ctx), src_tex,
- face, level, 0,
+ 0, 0, 0, /* face, level are zero */
PIPE_TRANSFER_WRITE,
0, 0, width, height); /* x, y, w, h */
map = screen->transfer_map(screen, tex_xfer);
More information about the mesa-commit
mailing list