summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/mach64/mach64_tex.c
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-01-08 15:42:57 +0000
committerJosé Fonseca <jfonseca@vmware.com>2010-01-08 15:42:57 +0000
commit080c40ab32b2abd6d8381b4a0cc143d36a1652b2 (patch)
treee173767ebc5a82d81b9fc086449d915e29348976 /src/mesa/drivers/dri/mach64/mach64_tex.c
parent9cdf6f025b2ed55cfb13dd09f870f01d0c7947d3 (diff)
parenta1de400e8de06a80ab140bb0fa950e990607572d (diff)
Merge remote branch 'origin/master' into lp-binning
Conflicts: src/gallium/auxiliary/util/u_surface.c src/gallium/drivers/llvmpipe/Makefile src/gallium/drivers/llvmpipe/SConscript src/gallium/drivers/llvmpipe/lp_bld_arit.c src/gallium/drivers/llvmpipe/lp_bld_flow.c src/gallium/drivers/llvmpipe/lp_bld_interp.c src/gallium/drivers/llvmpipe/lp_clear.c src/gallium/drivers/llvmpipe/lp_context.c src/gallium/drivers/llvmpipe/lp_context.h src/gallium/drivers/llvmpipe/lp_draw_arrays.c src/gallium/drivers/llvmpipe/lp_jit.c src/gallium/drivers/llvmpipe/lp_jit.h src/gallium/drivers/llvmpipe/lp_prim_vbuf.c src/gallium/drivers/llvmpipe/lp_setup.c src/gallium/drivers/llvmpipe/lp_setup_point.c src/gallium/drivers/llvmpipe/lp_state.h src/gallium/drivers/llvmpipe/lp_state_blend.c src/gallium/drivers/llvmpipe/lp_state_derived.c src/gallium/drivers/llvmpipe/lp_state_fs.c src/gallium/drivers/llvmpipe/lp_state_sampler.c src/gallium/drivers/llvmpipe/lp_state_surface.c src/gallium/drivers/llvmpipe/lp_tex_cache.c src/gallium/drivers/llvmpipe/lp_tex_cache.h src/gallium/drivers/llvmpipe/lp_tex_sample.h src/gallium/drivers/llvmpipe/lp_tile_cache.c
Diffstat (limited to 'src/mesa/drivers/dri/mach64/mach64_tex.c')
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_tex.c41
1 files changed, 19 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_tex.c b/src/mesa/drivers/dri/mach64/mach64_tex.c
index 225d23179e..6627d3c38a 100644
--- 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/texformat.h"
#include "main/teximage.h"
#include "main/texobj.h"
#include "main/imports.h"
@@ -131,14 +130,14 @@ mach64AllocTexObj( struct gl_texture_object *texObj )
mach64SetTexWrap( t, texObj->WrapS, texObj->WrapT );
mach64SetTexFilter( t, texObj->MinFilter, texObj->MagFilter );
- mach64SetTexBorderColor( t, texObj->BorderColor );
+ mach64SetTexBorderColor( t, texObj->BorderColor.f );
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 )
{
@@ -167,15 +166,15 @@ mach64ChooseTextureFormat( GLcontext *ctx, GLint internalFormat,
case GL_RGBA2:
case GL_COMPRESSED_RGBA:
if (mmesa->mach64Screen->cpp == 4)
- return &_mesa_texformat_argb8888;
+ return MESA_FORMAT_ARGB8888;
else
- return &_mesa_texformat_argb4444;
+ return MESA_FORMAT_ARGB4444;
case GL_RGB5_A1:
if (mmesa->mach64Screen->cpp == 4)
- return &_mesa_texformat_argb8888;
+ return MESA_FORMAT_ARGB8888;
else
- return &_mesa_texformat_argb1555;
+ return MESA_FORMAT_ARGB1555;
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)
- return &_mesa_texformat_argb8888;
+ return MESA_FORMAT_ARGB8888;
else
- return &_mesa_texformat_argb4444;
+ return MESA_FORMAT_ARGB4444;
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)
- return &_mesa_texformat_argb8888;
+ return MESA_FORMAT_ARGB8888;
else
- return &_mesa_texformat_rgb565;
+ return MESA_FORMAT_RGB565;
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)
- return &_mesa_texformat_argb8888; /* inefficient but accurate */
+ return MESA_FORMAT_ARGB8888; /* inefficient but accurate */
else
- return &_mesa_texformat_argb1555;
+ return MESA_FORMAT_ARGB1555;
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)
- return &_mesa_texformat_argb8888; /* inefficient but accurate */
+ return MESA_FORMAT_ARGB8888; /* inefficient but accurate */
else
- return &_mesa_texformat_argb4444;
+ return MESA_FORMAT_ARGB4444;
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:
- return &_mesa_texformat_ci8;
+ return MESA_FORMAT_CI8;
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
- return &_mesa_texformat_ycbcr_rev;
+ return MESA_FORMAT_YCBCR_REV;
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 );
- mach64SetTexBorderColor( t, tObj->BorderColor );
+ mach64SetTexBorderColor( t, tObj->BorderColor.f );
break;
case GL_TEXTURE_BASE_LEVEL:
@@ -566,8 +565,6 @@ void mach64InitTextureFuncs( struct dd_function_table *functions )
functions->IsTextureResident = driIsTextureResident;
functions->UpdateTexturePalette = NULL;
- functions->ActiveTexture = NULL;
- functions->PrioritizeTexture = NULL;
driInitTextureFormats();
}