diff options
author | Brian Paul <brianp@vmware.com> | 2009-10-28 19:33:48 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-10-28 19:33:48 -0600 |
commit | 7ac233ec15743763996e59c8b283f7c2e78a7210 (patch) | |
tree | 8cd2430e1307cbb00c84e5fc0ca4697323a7dc0d /src | |
parent | 52374d7e4cc183fb783a7012b026d4254ca43b14 (diff) |
mesa: choose texture format in _mesa_get_fallback_texture()
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texobj.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 678845ece0..f69379da46 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, |