[Mesa-dev] [PATCH v2 05/21] mesa: Remove unnecessary parameters CompressedTexImage

Pauli Nieminen pauli.nieminen at linux.intel.com
Tue Jun 12 11:38:45 PDT 2012


In tune with previous patches. Again there is duplication of information
in function parameters that is good to remove.

Signed-off-by: Pauli Nieminen <pauli.nieminen at linux.intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
 src/mesa/drivers/dri/nouveau/nouveau_texture.c |    2 --
 src/mesa/main/dd.h                             |    3 ---
 src/mesa/main/teximage.c                       |    6 ++----
 src/mesa/main/texstore.c                       |    5 +----
 src/mesa/main/texstore.h                       |    3 ---
 src/mesa/state_tracker/st_cb_texture.c         |    5 +----
 6 files changed, 4 insertions(+), 20 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index 18dc9f7..0e42758 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -553,8 +553,6 @@ nouveau_teximage_123d(struct gl_context *ctx, GLuint dims,
 static void
 nouveau_compressed_teximage(struct gl_context *ctx, GLuint dims,
 		    struct gl_texture_image *ti,
-		    GLint internalFormat,
-		    GLint width, GLint height, GLint depth, GLint border,
 		    GLsizei imageSize, const GLvoid *data)
 {
 	nouveau_teximage(ctx, 2, ti, imageSize, 0, 0, data,
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 6f16ef7..dc1d8bb 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -271,9 +271,6 @@ struct dd_function_table {
     */
    void (*CompressedTexImage)(struct gl_context *ctx, GLuint dims,
                               struct gl_texture_image *texImage,
-                              GLint internalFormat,
-                              GLsizei width, GLsizei height, GLsizei depth,
-                              GLint border,
                               GLsizei imageSize, const GLvoid *data);
 
    /**
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 84e84b5..d536e89 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3540,10 +3540,8 @@ compressedteximage(struct gl_context *ctx, GLuint dims,
                                           width, height, depth,
                                           border, internalFormat, texFormat);
 
-               ctx->Driver.CompressedTexImage(ctx, dims, texImage,
-                                              internalFormat,
-                                              width, height, depth,
-                                              border, imageSize, data);
+               ctx->Driver.CompressedTexImage(ctx, dims, texImage, imageSize,
+                                              data);
 
                check_gen_mipmap(ctx, target, texObj, level);
 
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 1700b26..7ab1b69 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -4312,9 +4312,6 @@ _mesa_store_texsubimage(struct gl_context *ctx, GLuint dims,
 void
 _mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims,
                                 struct gl_texture_image *texImage,
-                                GLint internalFormat,
-                                GLint width, GLint height, GLint depth,
-                                GLint border,
                                 GLsizei imageSize, const GLvoid *data)
 {
    /* only 2D compressed images are supported at this time */
@@ -4340,7 +4337,7 @@ _mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims,
 
    _mesa_store_compressed_texsubimage(ctx, dims, texImage,
                                       0, 0, 0,
-                                      width, height, depth,
+                                      texImage->Width, texImage->Height, texImage->Depth,
                                       texImage->TexFormat,
                                       imageSize, data);
 }
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index fbcb41b..7af532d 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -109,9 +109,6 @@ _mesa_store_texsubimage(struct gl_context *ctx, GLuint dims,
 extern void
 _mesa_store_compressed_teximage(struct gl_context *ctx, GLuint dims,
                                 struct gl_texture_image *texImage,
-                                GLint internalFormat,
-                                GLint width, GLint height, GLint depth,
-                                GLint border,
                                 GLsizei imageSize, const GLvoid *data);
 
 
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 72dfd24..a9a3304 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -541,13 +541,10 @@ st_TexImage(struct gl_context * ctx, GLuint dims,
 static void
 st_CompressedTexImage(struct gl_context *ctx, GLuint dims,
                       struct gl_texture_image *texImage,
-                      GLint internalFormat,
-                      GLint width, GLint height, GLint border, GLint depth,
                       GLsizei imageSize, const GLvoid *data)
 {
    prep_teximage(ctx, texImage, GL_NONE, GL_NONE);
-   _mesa_store_compressed_teximage(ctx, dims, texImage, internalFormat, width,
-                                   height, depth, border, imageSize, data);
+   _mesa_store_compressed_teximage(ctx, dims, texImage, imageSize, data);
 }
 
 
-- 
1.7.9.5



More information about the mesa-dev mailing list