Mesa (master): mesa: use texFormat local var in more places

Brian Paul brianp at kemper.freedesktop.org
Wed Jan 26 01:57:31 UTC 2011


Module: Mesa
Branch: master
Commit: 365f658602c0984d83e2b9617967803c70f7043a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=365f658602c0984d83e2b9617967803c70f7043a

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Jan 25 18:44:11 2011 -0700

mesa: use texFormat local var in more places

---

 src/mesa/main/texparam.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 042dd5f..6e4a8a5 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -888,9 +888,9 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
          *params = img->Depth;
          break;
       case GL_TEXTURE_INTERNAL_FORMAT:
-         if (_mesa_is_format_compressed(img->TexFormat)) {
+         if (_mesa_is_format_compressed(texFormat)) {
             /* need to return the actual compressed format */
-            *params = _mesa_compressed_format_to_glenum(ctx, img->TexFormat);
+            *params = _mesa_compressed_format_to_glenum(ctx, texFormat);
          }
          else {
             /* return the user's requested internal format */
@@ -986,7 +986,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
 
       /* GL_ARB_texture_compression */
       case GL_TEXTURE_COMPRESSED_IMAGE_SIZE:
-	 if (_mesa_is_format_compressed(img->TexFormat) && !isProxy) {
+	 if (_mesa_is_format_compressed(texFormat) && !isProxy) {
             *params = _mesa_format_image_size(texFormat, img->Width,
                                               img->Height, img->Depth);
 	 }
@@ -996,7 +996,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
 	 }
          break;
       case GL_TEXTURE_COMPRESSED:
-         *params = (GLint) _mesa_is_format_compressed(img->TexFormat);
+         *params = (GLint) _mesa_is_format_compressed(texFormat);
          break;
 
       /* GL_ARB_texture_float */




More information about the mesa-commit mailing list