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:56:00 -0600
commitec19bdd16c3d4070af69fd865042babe0a627595 (patch)
treed39293036df9b454e8c1d13350dbe7530924868c /src/mesa/main/teximage.c
parente8fdd0e0d5286f4a9c763ffde44decec51124ebc (diff)
mesa: consolidate internal glCompressedTexSubImage1/2/3D code
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c31
1 files changed, 4 insertions, 27 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 290a4e454dc..b16baaf914c 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -3633,33 +3633,10 @@ compressed_tex_sub_image(GLuint dims, GLenum target, GLint level,
/* error was recorded */
}
else if (width > 0 && height > 0 && depth > 0) {
- switch (dims) {
- case 1:
- if (ctx->Driver.CompressedTexSubImage1D) {
- ctx->Driver.CompressedTexSubImage1D(ctx, texImage,
- xoffset, width,
- format, imageSize, data);
- }
- break;
- case 2:
- if (ctx->Driver.CompressedTexSubImage2D) {
- ctx->Driver.CompressedTexSubImage2D(ctx, texImage,
- xoffset, yoffset,
- width, height,
- format, imageSize, data);
- }
- break;
- case 3:
- if (ctx->Driver.CompressedTexSubImage3D) {
- ctx->Driver.CompressedTexSubImage3D(ctx, texImage,
- xoffset, yoffset, zoffset,
- width, height, depth,
- format, imageSize, data);
- }
- break;
- default:
- ;
- }
+ ctx->Driver.CompressedTexSubImage(ctx, dims, texImage,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, imageSize, data);
check_gen_mipmap(ctx, target, texObj, level);