aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-03-07 16:00:29 +0000
committermarha <marha@users.sourceforge.net>2010-03-07 16:00:29 +0000
commitb40894093babb10f3cd155f11ff2d6c710372395 (patch)
treee6e94e5aa39ca9d5a653af567145e4b5dda25d61 /mesalib/src/mesa/main/texobj.c
parentd27419efcdaaccb40e0f10c549a6b732a2f29e81 (diff)
parent14b1cb8d5a27ec9716d3f790fce95f0469e35605 (diff)
downloadvcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.tar.gz
vcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.tar.bz2
vcxsrv-b40894093babb10f3cd155f11ff2d6c710372395.zip
svn merge ^/branches/released .
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r--mesalib/src/mesa/main/texobj.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/mesalib/src/mesa/main/texobj.c b/mesalib/src/mesa/main/texobj.c
index da55ac869..237b6eb00 100644
--- a/mesalib/src/mesa/main/texobj.c
+++ b/mesalib/src/mesa/main/texobj.c
@@ -29,12 +29,11 @@
#include "mfeatures.h"
-#if FEATURE_colortable
#include "colortab.h"
-#endif
#include "context.h"
#include "enums.h"
#include "fbobject.h"
+#include "formats.h"
#include "hash.h"
#include "imports.h"
#include "macros.h"
@@ -194,9 +193,7 @@ _mesa_delete_texture_object( GLcontext *ctx, struct gl_texture_object *texObj )
*/
texObj->Target = 0x99;
-#if FEATURE_colortable
_mesa_free_colortable_data(&texObj->Palette);
-#endif
/* free the texture images */
for (face = 0; face < 6; face++) {
@@ -418,7 +415,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
/* Detect cases where the application set the base level to an invalid
* value.
*/
- if ((baseLevel < 0) || (baseLevel > MAX_TEXTURE_LEVELS)) {
+ if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) {
char s[100];
_mesa_sprintf(s, "base level = %d is invalid", baseLevel);
incomplete(t, s);
@@ -495,7 +492,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx,
t->Image[face][baseLevel]->Width2 != w ||
t->Image[face][baseLevel]->Height2 != h) {
t->_Complete = GL_FALSE;
- incomplete(t, "Non-quare cubemap image");
+ incomplete(t, "Cube face missing or mismatched size");
return;
}
}
@@ -744,6 +741,10 @@ _mesa_get_fallback_texture(GLcontext *ctx)
_mesa_init_teximage_fields(ctx, GL_TEXTURE_2D, texImage,
8, 8, 1, 0, GL_RGBA);
+ texImage->TexFormat =
+ ctx->Driver.ChooseTextureFormat(ctx, GL_RGBA, GL_RGBA, GL_UNSIGNED_BYTE);
+ ASSERT(texImage->TexFormat != MESA_FORMAT_NONE);
+
/* set image data */
ctx->Driver.TexImage2D(ctx, GL_TEXTURE_2D, 0, GL_RGBA,
8, 8, 0,
@@ -1102,8 +1103,6 @@ _mesa_PrioritizeTextures( GLsizei n, const GLuint *texName,
struct gl_texture_object *t = _mesa_lookup_texture(ctx, texName[i]);
if (t) {
t->Priority = CLAMP( priorities[i], 0.0F, 1.0F );
- if (ctx->Driver.PrioritizeTexture)
- ctx->Driver.PrioritizeTexture( ctx, t, t->Priority );
}
}
}