summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorPauli Nieminen <[email protected]>2012-06-12 21:38:43 +0300
committerKenneth Graunke <[email protected]>2012-08-12 15:49:13 -0700
commitc5af8891805fc4f590c1371c098cdbc704c44e00 (patch)
treee1b0460b0d8e46328e9531ebfeffc12caa2c5895 /src/mesa/state_tracker
parente98ace934e1ea875f352fcef823ca46a416ca751 (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/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 92ce3fa2073..0c4e8a8f47b 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -500,8 +500,6 @@ st_AllocTextureImageBuffer(struct gl_context *ctx,
*/
static void
prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage,
- GLint internalFormat,
- GLint width, GLint height, GLint depth, GLint border,
GLenum format, GLenum type)
{
struct gl_texture_object *texObj = texImage->TexObject;
@@ -518,11 +516,13 @@ prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage,
/* oops, need to init this image again */
texFormat = _mesa_choose_texture_format(ctx, texObj, target, level,
- internalFormat, format, type);
+ texImage->InternalFormat, format,
+ type);
_mesa_init_teximage_fields(ctx, texImage,
- width, height, depth, border,
- internalFormat, texFormat);
+ texImage->Width, texImage->Height,
+ texImage->Depth, texImage->Border,
+ texImage->InternalFormat, texFormat);
stObj->surface_based = GL_FALSE;
}
@@ -532,15 +532,11 @@ prep_teximage(struct gl_context *ctx, struct gl_texture_image *texImage,
static void
st_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 void *pixels,
const struct gl_pixelstore_attrib *unpack)
{
- prep_teximage(ctx, texImage, internalFormat, width, height, depth, border,
- format, type);
- _mesa_store_teximage(ctx, dims, texImage, internalFormat, width, height, depth,
- border, format, type, pixels, unpack);
+ prep_teximage(ctx, texImage, format, type);
+ _mesa_store_teximage(ctx, dims, texImage, format, type, pixels, unpack);
}
@@ -551,8 +547,7 @@ st_CompressedTexImage(struct gl_context *ctx, GLuint dims,
GLint width, GLint height, GLint border, GLint depth,
GLsizei imageSize, const GLvoid *data)
{
- prep_teximage(ctx, texImage, internalFormat, width, height, depth, border,
- GL_NONE, GL_NONE);
+ prep_teximage(ctx, texImage, GL_NONE, GL_NONE);
_mesa_store_compressed_teximage(ctx, dims, texImage, internalFormat, width,
height, depth, border, imageSize, data);
}