diff options
author | Brian Paul <[email protected]> | 2012-06-05 16:32:23 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-06-06 07:55:59 -0600 |
commit | e42d00b3f4503a0840575c8e5f4517a66c8af613 (patch) | |
tree | c8248d3f0b7bd95fec33d405ce25dc566df8c8b7 /src/mesa/drivers/common/meta.c | |
parent | 8f5fffe75d2f8ae7c7ee706b53379a25bc673ae4 (diff) |
mesa: consolidate internal glTexSubImage1/2/3D code
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.c')
-rw-r--r-- | src/mesa/drivers/common/meta.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 7978b08cbfe..af21d3b0697 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src/mesa/drivers/common/meta.c @@ -3127,7 +3127,6 @@ copy_tex_sub_image(struct gl_context *ctx, GLsizei width, GLsizei height) { struct gl_texture_object *texObj = texImage->TexObject; - const GLenum target = texObj->Target; GLenum format, type; GLint bpp; void *buf; @@ -3181,21 +3180,11 @@ copy_tex_sub_image(struct gl_context *ctx, * Store texture data (with pixel transfer ops) */ _mesa_meta_begin(ctx, MESA_META_PIXEL_STORE); - if (target == GL_TEXTURE_1D) { - ctx->Driver.TexSubImage1D(ctx, texImage, - xoffset, width, - format, type, buf, &ctx->Unpack); - } - else if (target == GL_TEXTURE_3D) { - ctx->Driver.TexSubImage3D(ctx, texImage, - xoffset, yoffset, zoffset, width, height, 1, - format, type, buf, &ctx->Unpack); - } - else { - ctx->Driver.TexSubImage2D(ctx, texImage, - xoffset, yoffset, width, height, - format, type, buf, &ctx->Unpack); - } + + ctx->Driver.TexSubImage(ctx, dims, texImage, + xoffset, yoffset, zoffset, width, height, 1, + format, type, buf, &ctx->Unpack); + _mesa_meta_end(ctx); _mesa_lock_texture(ctx, texObj); /* re-lock */ |