summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
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
commitcd9ab2584f5e2a5eb0e96a948e6aedc9a33c886d (patch)
treee3614aaca8f5d746d932ca99544f8773b22dad13 /src/mesa/state_tracker
parente42d00b3f4503a0840575c8e5f4517a66c8af613 (diff)
mesa: consolidate internal glCopyTexSubImage1/2/3D code
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c58
1 files changed, 6 insertions, 52 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index eb861586c4a..593dc95cde4 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -928,12 +928,11 @@ compatible_src_dst_formats(struct gl_context *ctx,
* Note: srcY=0=Bottom of renderbuffer (GL convention)
*/
static void
-st_copy_texsubimage(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint destX, GLint destY, GLint destZ,
- struct gl_renderbuffer *rb,
- GLint srcX, GLint srcY,
- GLsizei width, GLsizei height)
+st_CopyTexSubImage(struct gl_context *ctx, GLuint dims,
+ struct gl_texture_image *texImage,
+ GLint destX, GLint destY, GLint destZ,
+ struct gl_renderbuffer *rb,
+ GLint srcX, GLint srcY, GLsizei width, GLsizei height)
{
struct st_texture_image *stImage = st_texture_image(texImage);
const GLenum texBaseFormat = texImage->_BaseFormat;
@@ -1096,49 +1095,6 @@ fallback:
}
-
-static void
-st_CopyTexSubImage1D(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset,
- struct gl_renderbuffer *rb,
- GLint x, GLint y, GLsizei width)
-{
- const GLint yoffset = 0, zoffset = 0;
- const GLsizei height = 1;
- st_copy_texsubimage(ctx, texImage,
- xoffset, yoffset, zoffset, /* destX,Y,Z */
- rb, x, y, width, height); /* src X, Y, size */
-}
-
-
-static void
-st_CopyTexSubImage2D(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)
-{
- const GLint zoffset = 0;
- st_copy_texsubimage(ctx, texImage,
- xoffset, yoffset, zoffset, /* destX,Y,Z */
- rb, x, y, width, height); /* src X, Y, size */
-}
-
-
-static void
-st_CopyTexSubImage3D(struct gl_context *ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset, GLint zoffset,
- struct gl_renderbuffer *rb,
- GLint x, GLint y, GLsizei width, GLsizei height)
-{
- st_copy_texsubimage(ctx, texImage,
- xoffset, yoffset, zoffset, /* destX,Y,Z */
- rb, x, y, width, height); /* src X, Y, size */
-}
-
-
/**
* Copy image data from stImage into the texture object 'stObj' at level
* 'dstLevel'.
@@ -1401,9 +1357,7 @@ st_init_texture_functions(struct dd_function_table *functions)
functions->CompressedTexSubImage1D = _mesa_store_compressed_texsubimage1d;
functions->CompressedTexSubImage2D = _mesa_store_compressed_texsubimage2d;
functions->CompressedTexSubImage3D = _mesa_store_compressed_texsubimage3d;
- functions->CopyTexSubImage1D = st_CopyTexSubImage1D;
- functions->CopyTexSubImage2D = st_CopyTexSubImage2D;
- functions->CopyTexSubImage3D = st_CopyTexSubImage3D;
+ functions->CopyTexSubImage = st_CopyTexSubImage;
functions->GenerateMipmap = st_generate_mipmap;
functions->GetTexImage = st_GetTexImage;