projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://people.freedesktop.org/~jbarnes/mesa
[mesa.git]
/
src
/
mesa
/
drivers
/
dri
/
mach64
/
mach64_tex.c
diff --git
a/src/mesa/drivers/dri/mach64/mach64_tex.c
b/src/mesa/drivers/dri/mach64/mach64_tex.c
index 9fe267eafd5795b328dadffc766e975aae4df9ad..6627d3c38a05b82e1261186428a5dbe061c54811 100644
(file)
--- a/
src/mesa/drivers/dri/mach64/mach64_tex.c
+++ b/
src/mesa/drivers/dri/mach64/mach64_tex.c
@@
-41,7
+41,6
@@
#include "main/simple_list.h"
#include "main/enums.h"
#include "main/texstore.h"
#include "main/simple_list.h"
#include "main/enums.h"
#include "main/texstore.h"
-#include "main/texformat.h"
#include "main/teximage.h"
#include "main/texobj.h"
#include "main/imports.h"
#include "main/teximage.h"
#include "main/texobj.h"
#include "main/imports.h"
@@
-99,7
+98,7
@@
static void mach64SetTexFilter( mach64TexObjPtr t,
}
}
}
}
-static void mach64SetTexBorderColor( mach64TexObjPtr t,
GLubyte
c[4] )
+static void mach64SetTexBorderColor( mach64TexObjPtr t,
const GLfloat
c[4] )
{
#if 0
GLuint border = mach64PackColor( 4, c[0], c[1], c[2], c[3] );
{
#if 0
GLuint border = mach64PackColor( 4, c[0], c[1], c[2], c[3] );
@@
-131,14
+130,14
@@
mach64AllocTexObj( struct gl_texture_object *texObj )
mach64SetTexWrap( t, texObj->WrapS, texObj->WrapT );
mach64SetTexFilter( t, texObj->MinFilter, texObj->MagFilter );
mach64SetTexWrap( t, texObj->WrapS, texObj->WrapT );
mach64SetTexFilter( t, texObj->MinFilter, texObj->MagFilter );
- mach64SetTexBorderColor( t, texObj->
_BorderChan
);
+ mach64SetTexBorderColor( t, texObj->
BorderColor.f
);
return t;
}
/* Called by the _mesa_store_teximage[123]d() functions. */
return t;
}
/* Called by the _mesa_store_teximage[123]d() functions. */
-static
const struct gl_texture_format *
+static
gl_format
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
GLenum format, GLenum type )
{
@@
-167,15
+166,15
@@
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
case GL_RGBA2:
case GL_COMPRESSED_RGBA:
if (mmesa->mach64Screen->cpp == 4)
case GL_RGBA2:
case GL_COMPRESSED_RGBA:
if (mmesa->mach64Screen->cpp == 4)
- return
&_mesa_texformat_argb
8888;
+ return
MESA_FORMAT_ARGB
8888;
else
else
- return
&_mesa_texformat_argb
4444;
+ return
MESA_FORMAT_ARGB
4444;
case GL_RGB5_A1:
if (mmesa->mach64Screen->cpp == 4)
case GL_RGB5_A1:
if (mmesa->mach64Screen->cpp == 4)
- return
&_mesa_texformat_argb
8888;
+ return
MESA_FORMAT_ARGB
8888;
else
else
- return
&_mesa_texformat_argb
1555;
+ return
MESA_FORMAT_ARGB
1555;
case GL_RGBA8:
case GL_RGB10_A2:
case GL_RGBA8:
case GL_RGB10_A2:
@@
-183,9
+182,9
@@
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
case GL_RGBA16:
case GL_RGBA4:
if (mmesa->mach64Screen->cpp == 4)
case GL_RGBA16:
case GL_RGBA4:
if (mmesa->mach64Screen->cpp == 4)
- return
&_mesa_texformat_argb
8888;
+ return
MESA_FORMAT_ARGB
8888;
else
else
- return
&_mesa_texformat_argb
4444;
+ return
MESA_FORMAT_ARGB
4444;
case 3:
case GL_RGB:
case 3:
case GL_RGB:
@@
-198,9
+197,9
@@
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
case GL_RGB16:
case GL_COMPRESSED_RGB:
if (mmesa->mach64Screen->cpp == 4)
case GL_RGB16:
case GL_COMPRESSED_RGB:
if (mmesa->mach64Screen->cpp == 4)
- return
&_mesa_texformat_argb
8888;
+ return
MESA_FORMAT_ARGB
8888;
else
else
- return
&_mesa_texformat_rgb
565;
+ return
MESA_FORMAT_RGB
565;
case 1:
case GL_LUMINANCE:
case 1:
case GL_LUMINANCE:
@@
-210,9
+209,9
@@
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
case GL_LUMINANCE16:
case GL_COMPRESSED_LUMINANCE:
if (mmesa->mach64Screen->cpp == 4)
case GL_LUMINANCE16:
case GL_COMPRESSED_LUMINANCE:
if (mmesa->mach64Screen->cpp == 4)
- return
&_mesa_texformat_argb
8888; /* inefficient but accurate */
+ return
MESA_FORMAT_ARGB
8888; /* inefficient but accurate */
else
else
- return
&_mesa_texformat_argb
1555;
+ return
MESA_FORMAT_ARGB
1555;
case GL_INTENSITY4:
case GL_INTENSITY:
case GL_INTENSITY4:
case GL_INTENSITY:
@@
-221,9
+220,9
@@
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
case GL_INTENSITY16:
case GL_COMPRESSED_INTENSITY:
if (mmesa->mach64Screen->cpp == 4)
case GL_INTENSITY16:
case GL_COMPRESSED_INTENSITY:
if (mmesa->mach64Screen->cpp == 4)
- return
&_mesa_texformat_argb
8888; /* inefficient but accurate */
+ return
MESA_FORMAT_ARGB
8888; /* inefficient but accurate */
else
else
- return
&_mesa_texformat_argb
4444;
+ return
MESA_FORMAT_ARGB
4444;
case GL_COLOR_INDEX:
case GL_COLOR_INDEX1_EXT:
case GL_COLOR_INDEX:
case GL_COLOR_INDEX1_EXT:
@@
-232,18
+231,18
@@
mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
case GL_COLOR_INDEX8_EXT:
case GL_COLOR_INDEX12_EXT:
case GL_COLOR_INDEX16_EXT:
case GL_COLOR_INDEX8_EXT:
case GL_COLOR_INDEX12_EXT:
case GL_COLOR_INDEX16_EXT:
- return
&_mesa_texformat_ci
8;
+ return
MESA_FORMAT_CI
8;
case GL_YCBCR_MESA:
if (type == GL_UNSIGNED_SHORT_8_8_APPLE ||
type == GL_UNSIGNED_BYTE)
case GL_YCBCR_MESA:
if (type == GL_UNSIGNED_SHORT_8_8_APPLE ||
type == GL_UNSIGNED_BYTE)
- return
&_mesa_texformat_ycbcr
;
+ return
MESA_FORMAT_YCBCR
;
else
else
- return
&_mesa_texformat_ycbcr_rev
;
+ return
MESA_FORMAT_YCBCR_REV
;
default:
_mesa_problem( ctx, "unexpected format in %s", __FUNCTION__ );
default:
_mesa_problem( ctx, "unexpected format in %s", __FUNCTION__ );
- return
NULL
;
+ return
MESA_FORMAT_NONE
;
}
}
}
}
@@
-471,7
+470,7
@@
static void mach64DDTexParameter( GLcontext *ctx, GLenum target,
case GL_TEXTURE_BORDER_COLOR:
if ( t->base.bound ) FLUSH_BATCH( mmesa );
case GL_TEXTURE_BORDER_COLOR:
if ( t->base.bound ) FLUSH_BATCH( mmesa );
- mach64SetTexBorderColor( t, tObj->
_BorderChan
);
+ mach64SetTexBorderColor( t, tObj->
BorderColor.f
);
break;
case GL_TEXTURE_BASE_LEVEL:
break;
case GL_TEXTURE_BASE_LEVEL:
@@
-566,8
+565,6
@@
void mach64InitTextureFuncs( struct dd_function_table *functions )
functions->IsTextureResident = driIsTextureResident;
functions->UpdateTexturePalette = NULL;
functions->IsTextureResident = driIsTextureResident;
functions->UpdateTexturePalette = NULL;
- functions->ActiveTexture = NULL;
- functions->PrioritizeTexture = NULL;
driInitTextureFormats();
}
driInitTextureFormats();
}