st/mesa: fix overwriting gl_format with pipe_format since 9d380f48
authorAndre Maasikas <amaasikas@gmail.com>
Mon, 27 Jun 2011 15:03:27 +0000 (18:03 +0300)
committerBrian Paul <brianp@vmware.com>
Wed, 29 Jun 2011 12:52:45 +0000 (06:52 -0600)
fixes assert later on in texcompress2/r600g

Signed-off-by: Brian Paul <brianp@vmware.com>
src/mesa/state_tracker/st_cb_texture.c

index d52e273514d166b8a9d5ca9fc8e33259d6faf8ee..6907cfc03cf547ad4bbaf8050fac8396c217272f 100644 (file)
@@ -842,7 +842,7 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
    else {
       /* format translation via floats */
       GLuint row;
-      enum pipe_format format = util_format_linear(dst_texture->format);
+      enum pipe_format pformat = util_format_linear(dst_texture->format);
       for (row = 0; row < height; row++) {
          const GLbitfield transferOps = 0x0; /* bypassed for glGetTexImage() */
          GLfloat rgba[4 * MAX_WIDTH];
@@ -854,7 +854,7 @@ decompress_with_blit(struct gl_context * ctx, GLenum target, GLint level,
 
          /* get float[4] rgba row from surface */
          pipe_get_tile_rgba_format(pipe, tex_xfer, 0, row, width, 1,
-                                   format, rgba);
+                                   pformat, rgba);
 
          _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, format,
                                     type, dest, &ctx->Pack, transferOps);