/* no borders! can't halve 1x1! (stride > width * comp) not allowed */
static void
-_mesa_halve2x2_teximage2d ( GLcontext *ctx,
+_mesa_halve2x2_teximage2d ( struct gl_context *ctx,
struct gl_texture_image *texImage,
GLuint bytesPerPixel,
GLint srcWidth, GLint srcHeight,
static void
-tdfxGenerateMipmap(GLcontext *ctx, GLenum target,
+tdfxGenerateMipmap(struct gl_context *ctx, GLenum target,
struct gl_texture_object *texObj)
{
GLint mipWidth, mipHeight;
* 32 32 GR_LOD_LOG2_32 (=5) GR_ASPECT_LOG2_1x1 (=0)
*/
static void
-tdfxTexGetInfo(const GLcontext *ctx, int w, int h,
+tdfxTexGetInfo(const struct gl_context *ctx, int w, int h,
GrLOD_t *lodlevel, GrAspectRatio_t *aspectratio,
float *sscale, float *tscale,
int *wscale, int *hscale)
* We need to call this when a texture object's minification filter
* or texture image sizes change.
*/
-static void RevalidateTexture(GLcontext *ctx, struct gl_texture_object *tObj)
+static void RevalidateTexture(struct gl_context *ctx, struct gl_texture_object *tObj)
{
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
GLint minl, maxl;
* Called via glBindTexture.
*/
static void
-tdfxBindTexture(GLcontext * ctx, GLenum target,
+tdfxBindTexture(struct gl_context * ctx, GLenum target,
struct gl_texture_object *tObj)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
* Called via glTexEnv.
*/
static void
-tdfxTexEnv(GLcontext * ctx, GLenum target, GLenum pname,
+tdfxTexEnv(struct gl_context * ctx, GLenum target, GLenum pname,
const GLfloat * param)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
* Called via glTexParameter.
*/
static void
-tdfxTexParameter(GLcontext * ctx, GLenum target,
+tdfxTexParameter(struct gl_context * ctx, GLenum target,
struct gl_texture_object *tObj,
GLenum pname, const GLfloat * params)
{
* Here, we delete the Glide data associated with the texture.
*/
static void
-tdfxDeleteTexture(GLcontext * ctx, struct gl_texture_object *tObj)
+tdfxDeleteTexture(struct gl_context * ctx, struct gl_texture_object *tObj)
{
if (ctx && ctx->DriverCtx) {
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
* Return true if texture is resident, false otherwise.
*/
static GLboolean
-tdfxIsTextureResident(GLcontext *ctx, struct gl_texture_object *tObj)
+tdfxIsTextureResident(struct gl_context *ctx, struct gl_texture_object *tObj)
{
tdfxTexInfo *ti = TDFX_TEXTURE_DATA(tObj);
return (GLboolean) (ti && ti->isInTM);
static void
-tdfxUpdateTexturePalette(GLcontext * ctx, struct gl_texture_object *tObj)
+tdfxUpdateTexturePalette(struct gl_context * ctx, struct gl_texture_object *tObj)
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
static gl_format
-tdfxChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
+tdfxChooseTextureFormat( struct gl_context *ctx, GLint internalFormat,
GLenum srcFormat, GLenum srcType )
{
tdfxContextPtr fxMesa = TDFX_CONTEXT(ctx);
static GLboolean
-adjust2DRatio (GLcontext *ctx,
+adjust2DRatio (struct gl_context *ctx,
GLint xoffset, GLint yoffset,
GLint width, GLint height,
GLenum format, GLenum type, const GLvoid *pixels,
static void
-tdfxTexImage2D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat, GLint width, GLint height, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
static void
-tdfxTexSubImage2D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexSubImage2D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset, GLint yoffset,
GLsizei width, GLsizei height,
GLenum format, GLenum type,
static void
-tdfxTexImage1D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint internalFormat, GLint width, GLint border,
GLenum format, GLenum type, const GLvoid *pixels,
const struct gl_pixelstore_attrib *packing,
}
static void
-tdfxTexSubImage1D(GLcontext *ctx, GLenum target, GLint level,
+tdfxTexSubImage1D(struct gl_context *ctx, GLenum target, GLint level,
GLint xoffset,
GLsizei width,
GLenum format, GLenum type,
/**********************************************************************/
static void
-tdfxCompressedTexImage2D (GLcontext *ctx, GLenum target,
+tdfxCompressedTexImage2D (struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLsizei width, GLsizei height, GLint border,
GLsizei imageSize, const GLvoid *data,
tdfxTexInfo *ti;
tdfxMipMapLevel *mml;
gl_format mesaFormat;
- GLuint compressedSize;
+ GLuint compressedSize = 0;
if (TDFX_DEBUG & DEBUG_VERBOSE_DRI) {
fprintf(stderr, "tdfxCompressedTexImage2D: id=%d int 0x%x %dx%d\n",
texImage->Data);
ti->padded = GL_TRUE;
} else {
- MEMCPY(texImage->Data, data, compressedSize);
+ memcpy(texImage->Data, data, compressedSize);
}
RevalidateTexture(ctx, texObj);
static void
-tdfxCompressedTexSubImage2D( GLcontext *ctx, GLenum target,
+tdfxCompressedTexSubImage2D( struct gl_context *ctx, GLenum target,
GLint level, GLint xoffset,
GLint yoffset, GLsizei width,
GLint height, GLenum format,
rows = height / 4; /* [dBorca] hardcoded 4, but works for FXT1/DXTC */
for (i = 0; i < rows; i++) {
- MEMCPY(dest, data, srcRowStride);
+ memcpy(dest, data, srcRowStride);
dest += destRowStride;
data = (GLvoid *)((intptr_t)data + (intptr_t)srcRowStride);
}
GLboolean
-tdfxTestProxyTexImage(GLcontext *ctx, GLenum target,
+tdfxTestProxyTexImage(struct gl_context *ctx, GLenum target,
GLint level, GLint internalFormat,
GLenum format, GLenum type,
GLint width, GLint height,
* texture object from the core mesa gl_texture_object. Not done at this time.
*/
static struct gl_texture_object *
-tdfxNewTextureObject( GLcontext *ctx, GLuint name, GLenum target )
+tdfxNewTextureObject( struct gl_context *ctx, GLuint name, GLenum target )
{
struct gl_texture_object *obj;
obj = _mesa_new_texture_object(ctx, name, target);