From e42d00b3f4503a0840575c8e5f4517a66c8af613 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 5 Jun 2012 16:32:23 -0600 Subject: mesa: consolidate internal glTexSubImage1/2/3D code Reviewed-by: Kenneth Graunke --- src/mesa/main/teximage.c | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) (limited to 'src/mesa/main/teximage.c') 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); -- cgit v1.2.3