summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/nouveau
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/nouveau
parent8f5fffe75d2f8ae7c7ee706b53379a25bc673ae4 (diff)
mesa: consolidate internal glTexSubImage1/2/3D code
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_texture.c43
1 files changed, 8 insertions, 35 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_texture.c b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
index e5ef3d3ff9f..4d6518d2426 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_texture.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_texture.c
@@ -611,44 +611,19 @@ nouveau_texsubimage(struct gl_context *ctx, GLint dims,
}
static void
-nouveau_texsubimage_3d(struct gl_context *ctx,
- struct gl_texture_image *ti,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLint width, GLint height, GLint depth,
- GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *packing)
+nouveau_texsubimage_123d(struct gl_context *ctx, GLuint dims,
+ struct gl_texture_image *ti,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLint width, GLint height, GLint depth,
+ GLenum format, GLenum type, const void *pixels,
+ const struct gl_pixelstore_attrib *packing)
{
- nouveau_texsubimage(ctx, 3, ti, xoffset, yoffset, zoffset,
+ nouveau_texsubimage(ctx, dims, ti, xoffset, yoffset, zoffset,
width, height, depth, 0, format, type, pixels,
packing, GL_FALSE);
}
static void
-nouveau_texsubimage_2d(struct gl_context *ctx,
- struct gl_texture_image *ti,
- GLint xoffset, GLint yoffset,
- GLint width, GLint height,
- GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *packing)
-{
- nouveau_texsubimage(ctx, 2, ti, xoffset, yoffset, 0,
- width, height, 1, 0, format, type, pixels,
- packing, GL_FALSE);
-}
-
-static void
-nouveau_texsubimage_1d(struct gl_context *ctx,
- struct gl_texture_image *ti,
- GLint xoffset, GLint width,
- GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *packing)
-{
- nouveau_texsubimage(ctx, 1, ti, xoffset, 0, 0,
- width, 1, 1, 0, format, type, pixels,
- packing, GL_FALSE);
-}
-
-static void
nouveau_compressed_texsubimage_2d(struct gl_context *ctx,
struct gl_texture_image *ti,
GLint xoffset, GLint yoffset,
@@ -732,9 +707,7 @@ nouveau_texture_functions_init(struct dd_function_table *functions)
functions->FreeTextureImageBuffer = nouveau_teximage_free;
functions->ChooseTextureFormat = nouveau_choose_tex_format;
functions->TexImage = nouveau_teximage_123d;
- functions->TexSubImage1D = nouveau_texsubimage_1d;
- functions->TexSubImage2D = nouveau_texsubimage_2d;
- functions->TexSubImage3D = nouveau_texsubimage_3d;
+ functions->TexSubImage = nouveau_texsubimage_123d;
functions->CompressedTexImage2D = nouveau_compressed_teximage_2d;
functions->CompressedTexSubImage2D = nouveau_compressed_texsubimage_2d;
functions->BindTexture = nouveau_bind_texture;