summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/intel
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-06-05 16:32:23 -0600
committerBrian Paul <[email protected]>2012-06-06 07:55:59 -0600
commite42d00b3f4503a0840575c8e5f4517a66c8af613 (patch)
treec8248d3f0b7bd95fec33d405ce25dc566df8c8b7 /src/mesa/drivers/dri/intel
parent8f5fffe75d2f8ae7c7ee706b53379a25bc673ae4 (diff)
mesa: consolidate internal glTexSubImage1/2/3D code
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/intel')
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index eb8b9839a2b..ae4b3bca305 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -149,27 +149,29 @@ intel_blit_texsubimage(struct gl_context * ctx,
}
static void
-intelTexSubImage2D(struct gl_context * ctx,
- struct gl_texture_image *texImage,
- GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height,
- GLenum format, GLenum type,
- const GLvoid * pixels,
- const struct gl_pixelstore_attrib *packing)
+intelTexSubImage(struct gl_context * ctx,
+ GLuint dims,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format, GLenum type,
+ const GLvoid * pixels,
+ const struct gl_pixelstore_attrib *packing)
{
- if (!intel_blit_texsubimage(ctx, texImage,
+ /* The intel_blit_texsubimage() function only handles 2D images */
+ if (dims != 2 || !intel_blit_texsubimage(ctx, texImage,
xoffset, yoffset,
width, height,
format, type, pixels, packing)) {
- _mesa_store_texsubimage2d(ctx, texImage,
- xoffset, yoffset,
- width, height,
- format, type, pixels, packing);
+ _mesa_store_texsubimage(ctx, dims, texImage,
+ xoffset, yoffset, zoffset,
+ width, height, depth,
+ format, type, pixels, packing);
}
}
void
intelInitTextureSubImageFuncs(struct dd_function_table *functions)
{
- functions->TexSubImage2D = intelTexSubImage2D;
+ functions->TexSubImage = intelTexSubImage;
}