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/texstore.c | |
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/texstore.c')
-rw-r--r-- | src/mesa/main/texstore.c | 9 |
1 files changed, 4 insertions, 5 deletions
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"); } |