summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/dd.h44
-rw-r--r--src/mesa/main/mipmap.c5
-rw-r--r--src/mesa/main/teximage.c15
-rw-r--r--src/mesa/main/texstore.c21
-rw-r--r--src/mesa/main/texstore.h21
5 files changed, 47 insertions, 59 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 5816faa783f..5226a6811cf 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -245,41 +245,39 @@ struct dd_function_table {
* with new texel data.
* \sa dd_function_table::TexImage1D.
*/
- void (*TexSubImage1D)( struct gl_context *ctx, GLenum target, GLint level,
- GLint xoffset, GLsizei width,
- GLenum format, GLenum type,
- const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage );
+ void (*TexSubImage1D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLsizei width,
+ GLenum format, GLenum type,
+ const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *packing);
/**
* Called by glTexSubImage2D().
*
* \sa dd_function_table::TexSubImage1D.
*/
- void (*TexSubImage2D)( struct gl_context *ctx, GLenum target, GLint level,
- GLint xoffset, GLint yoffset,
- GLsizei width, GLsizei height,
- GLenum format, GLenum type,
- const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage );
+ void (*TexSubImage2D)(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);
/**
* Called by glTexSubImage3D().
*
* \sa dd_function_table::TexSubImage1D.
*/
- void (*TexSubImage3D)( struct gl_context *ctx, GLenum target, GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLint depth,
- GLenum format, GLenum type,
- const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage );
+ void (*TexSubImage3D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLint depth,
+ GLenum format, GLenum type,
+ const GLvoid *pixels,
+ const struct gl_pixelstore_attrib *packing);
+
/**
* Called by glGetTexImage().
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 867cb22e28a..9a6c6dea272 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -2132,11 +2132,10 @@ generate_mipmap_compressed(struct gl_context *ctx, GLenum target,
}
/* The image space was allocated above so use glTexSubImage now */
- ctx->Driver.TexSubImage2D(ctx, target, level + 1,
+ ctx->Driver.TexSubImage2D(ctx, dstImage,
0, 0, dstWidth, dstHeight,
temp_base_format, temp_datatype,
- temp_dst, &ctx->DefaultPacking,
- texObj, dstImage);
+ temp_dst, &ctx->DefaultPacking);
/* swap src and dest pointers */
{
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 18a7b87c0d3..ad7a1ea0c8d 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2681,23 +2681,20 @@ texsubimage(struct gl_context *ctx, GLuint dims, GLenum target, GLint level,
switch (dims) {
case 1:
- ctx->Driver.TexSubImage1D(ctx, target, level,
+ ctx->Driver.TexSubImage1D(ctx, texImage,
xoffset, width,
- format, type, pixels,
- &ctx->Unpack, texObj, texImage );
+ format, type, pixels, &ctx->Unpack);
break;
case 2:
- ctx->Driver.TexSubImage2D(ctx, target, level,
+ ctx->Driver.TexSubImage2D(ctx, texImage,
xoffset, yoffset, width, height,
- format, type, pixels,
- &ctx->Unpack, texObj, texImage );
+ format, type, pixels, &ctx->Unpack);
break;
case 3:
- ctx->Driver.TexSubImage3D(ctx, target, level,
+ ctx->Driver.TexSubImage3D(ctx, texImage,
xoffset, yoffset, zoffset,
width, height, depth,
- format, type, pixels,
- &ctx->Unpack, texObj, texImage );
+ format, type, pixels, &ctx->Unpack);
break;
default:
_mesa_problem(ctx, "unexpected dims in subteximage()");
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 86c35d38f74..e97178dc8b5 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -4785,12 +4785,11 @@ _mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
* This is the fallback for Driver.TexSubImage1D().
*/
void
-_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage1d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint width,
GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ const struct gl_pixelstore_attrib *packing)
{
store_texsubimage(ctx, texImage,
xoffset, 0, 0, width, 1, 1,
@@ -4803,13 +4802,12 @@ _mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level,
* This is the fallback for Driver.TexSubImage2D().
*/
void
-_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage2d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset,
GLint width, GLint height,
GLenum format, GLenum type, const void *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ const struct gl_pixelstore_attrib *packing)
{
store_texsubimage(ctx, texImage,
xoffset, yoffset, 0, width, height, 1,
@@ -4821,13 +4819,12 @@ _mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level,
* This is the fallback for Driver.TexSubImage3D().
*/
void
-_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage3d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
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,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ const struct gl_pixelstore_attrib *packing)
{
store_texsubimage(ctx, texImage,
xoffset, yoffset, zoffset, width, height, depth,
diff --git a/src/mesa/main/texstore.h b/src/mesa/main/texstore.h
index f956b0436b9..83826ce97e0 100644
--- a/src/mesa/main/texstore.h
+++ b/src/mesa/main/texstore.h
@@ -121,32 +121,29 @@ _mesa_store_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
extern void
-_mesa_store_texsubimage1d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage1d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint width,
GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ const struct gl_pixelstore_attrib *packing);
extern void
-_mesa_store_texsubimage2d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage2d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset,
GLint width, GLint height,
GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ const struct gl_pixelstore_attrib *packing);
extern void
-_mesa_store_texsubimage3d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_texsubimage3d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint width, GLint height, GLint depth,
GLenum format, GLenum type, const GLvoid *pixels,
- const struct gl_pixelstore_attrib *packing,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ const struct gl_pixelstore_attrib *packing);
extern void