From: Brian Paul Date: Thu, 29 Oct 2009 01:33:48 +0000 (-0600) Subject: mesa: choose texture format in _mesa_get_fallback_texture() X-Git-Tag: mesa-7.8~2720^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7ac233ec15743763996e59c8b283f7c2e78a7210;p=platform%2Fupstream%2Fmesa.git mesa: choose texture format in _mesa_get_fallback_texture() --- diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 678845e..f69379d 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -33,6 +33,7 @@ #include "context.h" #include "enums.h" #include "fbobject.h" +#include "formats.h" #include "hash.h" #include "imports.h" #include "macros.h" @@ -740,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,