[Mesa-dev] [PATCH 4/4] mesa: simplify Driver.GetCompressedTexImage() parameters

Brian Paul brian.e.paul at gmail.com
Mon Dec 26 15:09:38 PST 2011


From: Brian Paul <brianp at vmware.com>

---
 src/mesa/main/dd.h          |    7 +++----
 src/mesa/main/texgetimage.c |   10 ++++------
 src/mesa/main/texgetimage.h |    7 +++----
 3 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 5a306e3..6707e78 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -400,10 +400,9 @@ struct dd_function_table {
    /**
     * Called by glGetCompressedTexImage.
     */
-   void (*GetCompressedTexImage)(struct gl_context *ctx, GLenum target, GLint level,
-                                 GLvoid *img,
-                                 struct gl_texture_object *texObj,
-                                 struct gl_texture_image *texImage);
+   void (*GetCompressedTexImage)(struct gl_context *ctx,
+                                 struct gl_texture_image *texImage,
+                                 GLvoid *data);
 
    /*@}*/
 
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 738c181..f848aa8 100644
--- a/src/mesa/main/texgetimage.c
+++ b/src/mesa/main/texgetimage.c
@@ -603,10 +603,9 @@ _mesa_get_teximage(struct gl_context *ctx,
  * All error checking will have been done before this routine is called.
  */
 void
-_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level,
-                              GLvoid *img,
-                              struct gl_texture_object *texObj,
-                              struct gl_texture_image *texImage)
+_mesa_get_compressed_teximage(struct gl_context *ctx,
+                              struct gl_texture_image *texImage,
+                              GLvoid *img)
 {
    const GLuint row_stride =
       _mesa_format_row_stride(texImage->TexFormat, texImage->Width);
@@ -981,8 +980,7 @@ _mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize,
 
    _mesa_lock_texture(ctx, texObj);
    {
-      ctx->Driver.GetCompressedTexImage(ctx, target, level, img,
-                                        texObj, texImage);
+      ctx->Driver.GetCompressedTexImage(ctx, texImage, img);
    }
    _mesa_unlock_texture(ctx, texObj);
 }
diff --git a/src/mesa/main/texgetimage.h b/src/mesa/main/texgetimage.h
index 02b1cf4..cd8e76e 100644
--- a/src/mesa/main/texgetimage.h
+++ b/src/mesa/main/texgetimage.h
@@ -40,10 +40,9 @@ _mesa_get_teximage(struct gl_context *ctx,
 
 
 extern void
-_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level,
-                              GLvoid *img,
-                              struct gl_texture_object *texObj,
-                              struct gl_texture_image *texImage);
+_mesa_get_compressed_teximage(struct gl_context *ctx,
+                              struct gl_texture_image *texImage,
+                              GLvoid *data);
 
 
 
-- 
1.7.1



More information about the mesa-dev mailing list