diff options
Diffstat (limited to 'mesalib/src/mesa/main/texobj.c')
-rw-r--r-- | mesalib/src/mesa/main/texobj.c | 15 |
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 ); } } } |