/**
* Called by glCompressedTexImage1D().
- *
- * \param target user specified.
- * \param format user specified.
- * \param type user specified.
- * \param pixels user specified.
- * \param packing indicates the image packing of pixels.
- * \param texObj is the target texture object.
- * \param texImage is the target texture image. It will have the texture \p
- * width, \p height, \p depth, \p border and \p internalFormat information.
- *
- * \a retainInternalCopy is returned by this function and indicates whether
- * core Mesa should keep an internal copy of the texture image.
- */
- void (*CompressedTexImage1D)( struct gl_context *ctx, GLenum target,
- GLint level, GLint internalFormat,
- GLsizei width, GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage );
+ * The parameters are the same as for glCompressedTexImage1D(), plus a
+ * pointer to the destination texure image.
+ */
+ void (*CompressedTexImage1D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint internalFormat,
+ GLsizei width, GLint border,
+ GLsizei imageSize, const GLvoid *data);
/**
* Called by glCompressedTexImage2D().
*
* \sa dd_function_table::CompressedTexImage1D.
*/
- void (*CompressedTexImage2D)( struct gl_context *ctx, GLenum target,
- GLint level, GLint internalFormat,
- GLsizei width, GLsizei height, GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage );
+ void (*CompressedTexImage2D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint internalFormat,
+ GLsizei width, GLsizei height, GLint border,
+ GLsizei imageSize, const GLvoid *data);
+
/**
* Called by glCompressedTexImage3D().
*
* \sa dd_function_table::CompressedTexImage3D.
*/
- void (*CompressedTexImage3D)( struct gl_context *ctx, GLenum target,
- GLint level, GLint internalFormat,
- GLsizei width, GLsizei height, GLsizei depth,
- GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage );
+ void (*CompressedTexImage3D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint internalFormat,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLint border,
+ GLsizei imageSize, const GLvoid *data);
/**
* Called by glCompressedTexSubImage1D().
- *
- * \param target user specified.
- * \param level user specified.
- * \param xoffset user specified.
- * \param yoffset user specified.
- * \param zoffset user specified.
- * \param width user specified.
- * \param height user specified.
- * \param depth user specified.
- * \param imageSize user specified.
- * \param data user specified.
- * \param texObj is the target texture object.
- * \param texImage is the target texture image. It will have the texture \p
- * width, \p height, \p depth, \p border and \p internalFormat information.
- */
- void (*CompressedTexSubImage1D)(struct gl_context *ctx, GLenum target, GLint level,
+ */
+ void (*CompressedTexSubImage1D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLsizei width,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
+
/**
* Called by glCompressedTexSubImage2D().
- *
- * \sa dd_function_table::CompressedTexImage3D.
*/
- void (*CompressedTexSubImage2D)(struct gl_context *ctx, GLenum target, GLint level,
+ void (*CompressedTexSubImage2D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset,
GLsizei width, GLint height,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
+
/**
* Called by glCompressedTexSubImage3D().
- *
- * \sa dd_function_table::CompressedTexImage3D.
*/
- void (*CompressedTexSubImage3D)(struct gl_context *ctx, GLenum target, GLint level,
+ void (*CompressedTexSubImage3D)(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLint height, GLint depth,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
/**
switch (dims) {
case 1:
ASSERT(ctx->Driver.CompressedTexImage1D);
- ctx->Driver.CompressedTexImage1D(ctx, target, level,
+ ctx->Driver.CompressedTexImage1D(ctx, texImage,
internalFormat,
width,
- border, imageSize, data,
- texObj, texImage);
+ border, imageSize, data);
break;
case 2:
ASSERT(ctx->Driver.CompressedTexImage2D);
- ctx->Driver.CompressedTexImage2D(ctx, target, level,
+ ctx->Driver.CompressedTexImage2D(ctx, texImage,
internalFormat,
width, height,
- border, imageSize, data,
- texObj, texImage);
+ border, imageSize, data);
break;
case 3:
ASSERT(ctx->Driver.CompressedTexImage3D);
- ctx->Driver.CompressedTexImage3D(ctx, target, level,
+ ctx->Driver.CompressedTexImage3D(ctx, texImage,
internalFormat,
width, height, depth,
- border, imageSize, data,
- texObj, texImage);
+ border, imageSize, data);
break;
default:
_mesa_problem(ctx, "bad dims in compressedteximage");
switch (dims) {
case 1:
if (ctx->Driver.CompressedTexSubImage1D) {
- ctx->Driver.CompressedTexSubImage1D(ctx, target, level,
+ ctx->Driver.CompressedTexSubImage1D(ctx, texImage,
xoffset, width,
- format, imageSize, data,
- texObj, texImage);
+ format, imageSize, data);
}
break;
case 2:
if (ctx->Driver.CompressedTexSubImage2D) {
- ctx->Driver.CompressedTexSubImage2D(ctx, target, level,
+ ctx->Driver.CompressedTexSubImage2D(ctx, texImage,
xoffset, yoffset,
width, height,
- format, imageSize, data,
- texObj, texImage);
+ format, imageSize, data);
}
break;
case 3:
if (ctx->Driver.CompressedTexSubImage3D) {
- ctx->Driver.CompressedTexSubImage3D(ctx, target, level,
+ ctx->Driver.CompressedTexSubImage3D(ctx, texImage,
xoffset, yoffset, zoffset,
width, height, depth,
- format, imageSize, data,
- texObj, texImage);
+ format, imageSize, data);
}
break;
default:
*/
void
_mesa_store_compressed_teximage1d(struct gl_context *ctx,
- GLenum target, GLint level,
+ struct gl_texture_image *texImage,
GLint internalFormat,
GLint width, GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
- /* this space intentionally left blank */
+ /* no compressed 1D image formats at this time */
(void) ctx;
- (void) target; (void) level;
(void) internalFormat;
(void) width; (void) border;
(void) imageSize; (void) data;
- (void) texObj;
(void) texImage;
}
*/
void
_mesa_store_compressed_teximage2d(struct gl_context *ctx,
- GLenum target, GLint level,
+ struct gl_texture_image *texImage,
GLint internalFormat,
GLint width, GLint height, GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
/* This is pretty simple, because unlike the general texstore path we don't
* have to worry about the usual image unpacking or image transfer
* operations.
*/
- ASSERT(texObj);
ASSERT(texImage);
ASSERT(texImage->Width > 0);
ASSERT(texImage->Height > 0);
return;
}
- _mesa_store_compressed_texsubimage2d(ctx, target, level,
+ _mesa_store_compressed_texsubimage2d(ctx, texImage,
0, 0,
width, height,
texImage->TexFormat,
- imageSize, data,
- texObj, texImage);
+ imageSize, data);
}
*/
void
_mesa_store_compressed_teximage3d(struct gl_context *ctx,
- GLenum target, GLint level,
+ struct gl_texture_image *texImage,
GLint internalFormat,
GLint width, GLint height, GLint depth,
GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
/* this space intentionally left blank */
(void) ctx;
- (void) target; (void) level;
(void) internalFormat;
(void) width; (void) height; (void) depth;
(void) border;
(void) imageSize; (void) data;
- (void) texObj;
(void) texImage;
}
* Fallback for Driver.CompressedTexSubImage1D()
*/
void
-_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target,
- GLint level,
+_mesa_store_compressed_texsubimage1d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLsizei width,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
/* there are no compressed 1D texture formats yet */
(void) ctx;
- (void) target; (void) level;
(void) xoffset; (void) width;
(void) format;
(void) imageSize; (void) data;
- (void) texObj;
(void) texImage;
}
* Fallback for Driver.CompressedTexSubImage2D()
*/
void
-_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target,
- GLint level,
+_mesa_store_compressed_texsubimage2d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
GLint bytesPerRow, dstRowStride, srcRowStride;
GLint i, rows;
* Fallback for Driver.CompressedTexSubImage3D()
*/
void
-_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target,
- GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+_mesa_store_compressed_texsubimage3d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format,
+ GLsizei imageSize, const GLvoid *data)
{
/* there are no compressed 3D texture formats yet */
(void) ctx;
- (void) target; (void) level;
(void) xoffset; (void) yoffset; (void) zoffset;
(void) width; (void) height; (void) depth;
(void) format;
(void) imageSize; (void) data;
- (void) texObj;
(void) texImage;
}
extern void
-_mesa_store_compressed_teximage1d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage1d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint internalFormat,
GLint width, GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
extern void
-_mesa_store_compressed_teximage2d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage2d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint internalFormat,
GLint width, GLint height, GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
extern void
-_mesa_store_compressed_teximage3d(struct gl_context *ctx, GLenum target, GLint level,
+_mesa_store_compressed_teximage3d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint internalFormat,
GLint width, GLint height, GLint depth,
GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
extern void
-_mesa_store_compressed_texsubimage1d(struct gl_context *ctx, GLenum target,
- GLint level,
+_mesa_store_compressed_texsubimage1d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLsizei width,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
extern void
-_mesa_store_compressed_texsubimage2d(struct gl_context *ctx, GLenum target,
- GLint level,
+_mesa_store_compressed_texsubimage2d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+ GLsizei imageSize, const GLvoid *data);
extern void
-_mesa_store_compressed_texsubimage3d(struct gl_context *ctx, GLenum target,
- GLint level,
- GLint xoffset, GLint yoffset, GLint zoffset,
- GLsizei width, GLsizei height, GLsizei depth,
- GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage);
+_mesa_store_compressed_texsubimage3d(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
+ GLint xoffset, GLint yoffset, GLint zoffset,
+ GLsizei width, GLsizei height, GLsizei depth,
+ GLenum format,
+ GLsizei imageSize, const GLvoid *data);
#endif
static void
-st_CompressedTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
+st_CompressedTexImage2D(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint internalFormat,
GLint width, GLint height, GLint border,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
st_TexImage(ctx, 2, texImage, internalFormat, width, height, 1, border,
0, 0, data, &ctx->Unpack, imageSize, GL_TRUE);
static void
-st_CompressedTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
+st_CompressedTexSubImage1D(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLsizei width,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
assert(0);
}
static void
-st_CompressedTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
+st_CompressedTexSubImage2D(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset,
GLsizei width, GLint height,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
struct st_context *st = st_context(ctx);
struct st_texture_image *stImage = st_texture_image(texImage);
static void
-st_CompressedTexSubImage3D(struct gl_context *ctx, GLenum target, GLint level,
+st_CompressedTexSubImage3D(struct gl_context *ctx,
+ struct gl_texture_image *texImage,
GLint xoffset, GLint yoffset, GLint zoffset,
GLsizei width, GLint height, GLint depth,
GLenum format,
- GLsizei imageSize, const GLvoid *data,
- struct gl_texture_object *texObj,
- struct gl_texture_image *texImage)
+ GLsizei imageSize, const GLvoid *data)
{
assert(0);
}