summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-06-05 16:32:23 -0600
committerBrian Paul <[email protected]>2012-06-06 07:55:59 -0600
commite42d00b3f4503a0840575c8e5f4517a66c8af613 (patch)
treec8248d3f0b7bd95fec33d405ce25dc566df8c8b7 /src/mesa/main/teximage.c
parent8f5fffe75d2f8ae7c7ee706b53379a25bc673ae4 (diff)
mesa: consolidate internal glTexSubImage1/2/3D code
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c24
1 files changed, 4 insertions, 20 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 5bb21cd80a8..e8353463758 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2792,26 +2792,10 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
xoffset += texImage->Border;
}
- switch (dims) {
- case 1:
- ctx->Driver.TexSubImage1D(ctx, texImage,
- xoffset, width,
- format, type, pixels, &ctx->Unpack);
- break;
- case 2:
- ctx->Driver.TexSubImage2D(ctx, texImage,
- xoffset, yoffset, width, height,
- format, type, pixels, &ctx->Unpack);
- break;
- case 3:
- ctx->Driver.TexSubImage3D(ctx, texImage,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, type, pixels, &ctx->Unpack);
- break;
- default:
- _mesa_problem(ctx, "unexpected dims in subteximage()");
- }
+ ctx->Driver.TexSubImage(ctx, dims, texImage,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, pixels, &ctx->Unpack);
check_gen_mipmap(ctx, target, texObj, level);