summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-12-30 08:24:55 -0700
committerBrian Paul <[email protected]>2011-12-30 08:24:55 -0700
commit92c64624cd7533cde466dbec8722f7f72f275fd8 (patch)
treecac6f3e610b12f407a088f81c5c10896b1343458 /src/mesa/main/teximage.c
parentda0cc82a093eb97212e989648da638a262ed3e84 (diff)
mesa: simplify Driver.TexImage() parameters
As with TexSubImage(), the target, level and texObj values can be obtained through the texImage pointer. Reviewed-by: Chad Versace <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index ad7a1ea0c8d..3dfe6dffef9 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2481,22 +2481,19 @@ teximage(struct gl_context *ctx, GLuint dims,
ASSERT(ctx->Driver.TexImage3D);
switch (dims) {
case 1:
- ctx->Driver.TexImage1D(ctx, target, level, internalFormat,
+ ctx->Driver.TexImage1D(ctx, texImage, internalFormat,
width, border, format,
- type, pixels, unpack, texObj,
- texImage);
+ type, pixels, unpack);
break;
case 2:
- ctx->Driver.TexImage2D(ctx, target, level, internalFormat,
+ ctx->Driver.TexImage2D(ctx, texImage, internalFormat,
width, height, border, format,
- type, pixels, unpack, texObj,
- texImage);
+ type, pixels, unpack);
break;
case 3:
- ctx->Driver.TexImage3D(ctx, target, level, internalFormat,
+ ctx->Driver.TexImage3D(ctx, texImage, internalFormat,
width, height, depth, border, format,
- type, pixels, unpack, texObj,
- texImage);
+ type, pixels, unpack);
break;
default:
_mesa_problem(ctx, "invalid dims=%u in teximage()", dims);
@@ -2820,14 +2817,14 @@ copyteximage(struct gl_context *ctx, GLuint dims,
/* Allocate texture memory (no pixel data yet) */
if (dims == 1) {
- ctx->Driver.TexImage1D(ctx, target, level, internalFormat,
+ ctx->Driver.TexImage1D(ctx, texImage, internalFormat,
width, border, GL_NONE, GL_NONE, NULL,
- &ctx->Unpack, texObj, texImage);
+ &ctx->Unpack);
}
else {
- ctx->Driver.TexImage2D(ctx, target, level, internalFormat,
+ ctx->Driver.TexImage2D(ctx, texImage, internalFormat,
width, height, border, GL_NONE, GL_NONE,
- NULL, &ctx->Unpack, texObj, texImage);
+ NULL, &ctx->Unpack);
}
if (_mesa_clip_copytexsubimage(ctx, &dstX, &dstY, &srcX, &srcY,