diff options
author | Brian Paul <[email protected]> | 2012-06-05 16:32:23 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-06-06 07:56:00 -0600 |
commit | cd9ab2584f5e2a5eb0e96a948e6aedc9a33c886d (patch) | |
tree | e3614aaca8f5d746d932ca99544f8773b22dad13 /src/mesa/drivers/dri/radeon | |
parent | e42d00b3f4503a0840575c8e5f4517a66c8af613 (diff) |
mesa: consolidate internal glCopyTexSubImage1/2/3D code
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/radeon')
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_tex_copy.c | 18 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/radeon/radeon_texture.h | 12 |
3 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c index a26acbfdd04..1faf9c81db9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_tex_copy.c +++ b/src/mesa/drivers/dri/radeon/radeon_tex_copy.c @@ -134,17 +134,17 @@ do_copy_texsubimage(struct gl_context *ctx, } void -radeonCopyTexSubImage2D(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, - struct gl_renderbuffer *rb, - GLint x, GLint y, - GLsizei width, GLsizei height) +radeonCopyTexSubImage(struct gl_context *ctx, GLuint dims, + struct gl_texture_image *texImage, + GLint xoffset, GLint yoffset, GLint zoffset, + struct gl_renderbuffer *rb, + GLint x, GLint y, + GLsizei width, GLsizei height) { radeonContextPtr radeon = RADEON_CONTEXT(ctx); radeon_prepare_render(radeon); - if (!do_copy_texsubimage(ctx, + if (dims != 2 || !do_copy_texsubimage(ctx, radeon_tex_obj(texImage->TexObject), (radeon_texture_image *)texImage, xoffset, yoffset, @@ -153,8 +153,8 @@ radeonCopyTexSubImage2D(struct gl_context *ctx, radeon_print(RADEON_FALLBACKS, RADEON_NORMAL, "Falling back to sw for glCopyTexSubImage2D\n"); - _mesa_meta_CopyTexSubImage2D(ctx, texImage, - xoffset, yoffset, + _mesa_meta_CopyTexSubImage(ctx, dims, texImage, + xoffset, yoffset, zoffset, rb, x, y, width, height); } } diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 8df5484f557..6c7171953bb 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -727,7 +727,7 @@ radeon_init_common_texture_funcs(radeonContextPtr radeon, functions->TexImage = radeonTexImage; - functions->CopyTexSubImage2D = radeonCopyTexSubImage2D; + functions->CopyTexSubImage = radeonCopyTexSubImage; functions->Bitmap = _mesa_meta_Bitmap; #if FEATURE_OES_EGL_image diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.h b/src/mesa/drivers/dri/radeon/radeon_texture.h index 6cca011bf2f..8f9f5bd128e 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.h +++ b/src/mesa/drivers/dri/radeon/radeon_texture.h @@ -65,12 +65,12 @@ gl_format radeonChooseTextureFormat(struct gl_context * ctx, GLenum format, GLenum type, GLboolean fbo); -void radeonCopyTexSubImage2D(struct gl_context *ctx, - struct gl_texture_image *texImage, - GLint xoffset, GLint yoffset, - struct gl_renderbuffer *rb, - GLint x, GLint y, - GLsizei width, GLsizei height); +void radeonCopyTexSubImage(struct gl_context *ctx, GLuint dims, + struct gl_texture_image *texImage, + GLint xoffset, GLint yoffset, GLint zoffset, + struct gl_renderbuffer *rb, + GLint x, GLint y, + GLsizei width, GLsizei height); unsigned radeonIsFormatRenderable(gl_format mesa_format); |