diff options
author | Pauli Nieminen <[email protected]> | 2012-06-12 21:38:43 +0300 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-08-12 15:49:13 -0700 |
commit | c5af8891805fc4f590c1371c098cdbc704c44e00 (patch) | |
tree | e1b0460b0d8e46328e9531ebfeffc12caa2c5895 /src/mesa/main | |
parent | e98ace934e1ea875f352fcef823ca46a416ca751 (diff) |
mesa: Remove unnecessary parameters from TexImage
gl_texture_image structure always holds size and internal format before
TexImage driver hook is called. Those passing same information in
function parameters only duplicates information making the interface
harder to understand.
Signed-off-by: Pauli Nieminen <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/dd.h | 2 | ||||
-rw-r--r-- | src/mesa/main/teximage.c | 7 | ||||
-rw-r--r-- | src/mesa/main/texobj.c | 3 | ||||
-rw-r--r-- | src/mesa/main/texstore.c | 9 | ||||
-rw-r--r-- | src/mesa/main/texstore.h | 2 |
5 files changed, 8 insertions, 15 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h index e60d019bb0d..546e360819a 100644 --- a/src/mesa/main/dd.h +++ b/src/mesa/main/dd.h @@ -208,8 +208,6 @@ struct dd_function_table { */ void (*TexImage)(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing); diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 9ffdb465668..607869cdf76 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2616,8 +2616,7 @@ teximage(struct gl_context *ctx, GLuint dims, border, internalFormat, texFormat); /* Give the texture to the driver. <pixels> may be null. */ - ctx->Driver.TexImage(ctx, dims, texImage, internalFormat, - width, height, depth, border, format, + ctx->Driver.TexImage(ctx, dims, texImage, format, type, pixels, unpack); check_gen_mipmap(ctx, target, texObj, level); @@ -2945,8 +2944,8 @@ copyteximage(struct gl_context *ctx, GLuint dims, border, internalFormat, texFormat); /* Allocate texture memory (no pixel data yet) */ - ctx->Driver.TexImage(ctx, dims, texImage, internalFormat, - width, height, 1, border, GL_NONE, GL_NONE, + ctx->Driver.TexImage(ctx, dims, texImage, + GL_NONE, GL_NONE, NULL, &ctx->Unpack); if (_mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY, diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 529a6d44929..f70da4fbc94 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -807,8 +807,7 @@ _mesa_get_fallback_texture(struct gl_context *ctx, gl_texture_index tex) 0, /* border */ GL_RGBA, texFormat); - ctx->Driver.TexImage(ctx, dims, texImage, GL_RGBA, - width, height, depth, 0, + ctx->Driver.TexImage(ctx, dims, texImage, GL_RGBA, GL_UNSIGNED_BYTE, texel, &ctx->DefaultPacking); } diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index ab9fdf26d3e..52eef3ebab3 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -4336,25 +4336,24 @@ void _mesa_store_teximage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing) { assert(dims == 1 || dims == 2 || dims == 3); - if (width == 0 || height == 0 || depth == 0) + if (texImage->Width == 0 || texImage->Height == 0 || texImage->Depth == 0) return; /* allocate storage for texture data */ if (!ctx->Driver.AllocTextureImageBuffer(ctx, texImage, texImage->TexFormat, - width, height, depth)) { + texImage->Width, texImage->Height, + texImage->Depth)) { _mesa_error(ctx, GL_OUT_OF_MEMORY, "glTexImage%uD", dims); return; } store_texsubimage(ctx, texImage, - 0, 0, 0, width, height, depth, + 0, 0, 0, texImage->Width, texImage->Height, texImage->Depth, format, type, pixels, packing, "glTexImage"); } diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h index 5a1c014231c..fbcb41b490d 100644 --- a/src/mesa/main/texstore.h +++ b/src/mesa/main/texstore.h @@ -93,8 +93,6 @@ extern void _mesa_store_teximage(struct gl_context *ctx, GLuint dims, struct gl_texture_image *texImage, - GLint internalFormat, - GLint width, GLint height, GLint depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels, const struct gl_pixelstore_attrib *packing); |