#include "main/mtypes.h"
#include "main/enums.h"
#include "main/formats.h"
-#include "main/colortab.h"
-#include "main/convolve.h"
#include "main/context.h"
#include "main/mipmap.h"
#include "main/mm.h"
#include "main/simple_list.h"
-#include "main/texcompress.h"
#include "main/texobj.h"
#include "main/texstore.h"
#include "via_context.h"
#include "via_fb.h"
#include "via_tex.h"
-#include "via_state.h"
#include "via_ioctl.h"
#include "via_3d_reg.h"
static gl_format
-viaChooseTexFormat( GLcontext *ctx, GLint internalFormat,
+viaChooseTexFormat( struct gl_context *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
/* Basically, just collect the image dimensions and addresses for each
* image and update the texture object state accordingly.
*/
-static GLboolean viaSetTexImages(GLcontext *ctx,
+static GLboolean viaSetTexImages(struct gl_context *ctx,
struct gl_texture_object *texObj)
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
}
-GLboolean viaUpdateTextureState( GLcontext *ctx )
+GLboolean viaUpdateTextureState( struct gl_context *ctx )
{
struct gl_texture_unit *texUnit = ctx->Texture.Unit;
GLuint i;
-static void viaTexImage(GLcontext *ctx,
+static void viaTexImage(struct gl_context *ctx,
GLint dims,
GLenum target, GLint level,
GLint internalFormat,
via_release_pending_textures(vmesa);
}
- if (ctx->_ImageTransferState & IMAGE_CONVOLUTION_BIT) {
- _mesa_adjust_image_for_convolution(ctx, dims, &postConvWidth,
- &postConvHeight);
- }
-
/* choose the texture format */
texImage->TexFormat = viaChooseTexFormat(ctx, internalFormat,
format, type);
GLboolean success;
if (_mesa_is_format_compressed(texImage->TexFormat)) {
- dstRowStride = _mesa_compressed_row_stride(texImage->TexFormat, width);
+ dstRowStride = _mesa_format_row_stride(texImage->TexFormat, width);
}
else {
dstRowStride = postConvWidth * _mesa_get_format_bytes(texImage->TexFormat);
_mesa_unmap_teximage_pbo(ctx, packing);
}
-static void viaTexImage2D(GLcontext *ctx,
+static void viaTexImage2D(struct gl_context *ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint height, GLint border,
packing, texObj, texImage );
}
-static void viaTexSubImage2D(GLcontext *ctx,
+static void viaTexSubImage2D(struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset, GLint yoffset,
texImage);
}
-static void viaTexImage1D(GLcontext *ctx,
+static void viaTexImage1D(struct gl_context *ctx,
GLenum target, GLint level,
GLint internalFormat,
GLint width, GLint border,
packing, texObj, texImage );
}
-static void viaTexSubImage1D(GLcontext *ctx,
+static void viaTexSubImage1D(struct gl_context *ctx,
GLenum target,
GLint level,
GLint xoffset,
-static GLboolean viaIsTextureResident(GLcontext *ctx,
+static GLboolean viaIsTextureResident(struct gl_context *ctx,
struct gl_texture_object *texObj)
{
struct via_texture_object *viaObj =
-static struct gl_texture_image *viaNewTextureImage( GLcontext *ctx )
+static struct gl_texture_image *viaNewTextureImage( struct gl_context *ctx )
{
(void) ctx;
return (struct gl_texture_image *)CALLOC_STRUCT(via_texture_image);
}
-static struct gl_texture_object *viaNewTextureObject( GLcontext *ctx,
+static struct gl_texture_object *viaNewTextureObject( struct gl_context *ctx,
GLuint name,
GLenum target )
{
}
-static void viaFreeTextureImageData( GLcontext *ctx,
+static void viaFreeTextureImageData( struct gl_context *ctx,
struct gl_texture_image *texImage )
{
struct via_context *vmesa = VIA_CONTEXT(ctx);
* Note that this function is currently disabled in via_tris.c too.
*/
if (getenv("VIA_NO_SSE"))
- functions->TextureMemCpy = _mesa_memcpy;
+ functions->TextureMemCpy = memcpy;
else
functions->TextureMemCpy = via_sse_memcpy;
#else
- functions->TextureMemCpy = _mesa_memcpy;
+ functions->TextureMemCpy = memcpy;
#endif
- functions->UpdateTexturePalette = 0;
functions->IsTextureResident = viaIsTextureResident;
}