i965: Clean up brw_prepare_vertices()
[mesa.git] / src / mesa / main / texformat.c
index 41853bce5ffc703049acd82d4479b70f40ae5d5d..2542cea856b65154e1b15504bc523b1b65b2b7f0 100644 (file)
@@ -34,6 +34,8 @@
 
 
 #include "context.h"
+#include "mfeatures.h"
+#include "mtypes.h"
 #include "texcompress.h"
 #include "texformat.h"
 
@@ -589,6 +591,17 @@ _mesa_choose_tex_format( struct gl_context *ctx, GLint internalFormat,
       }
    }
 
+   if (ctx->Extensions.EXT_texture_format_BGRA8888) {
+      switch (internalFormat) {
+      case GL_BGRA:
+        RETURN_IF_SUPPORTED(MESA_FORMAT_ARGB8888);
+        break;
+
+      default:
+         ; /* fallthrough */
+      }
+   }
+
    _mesa_problem(ctx, "unexpected format in _mesa_choose_tex_format()");
    return MESA_FORMAT_NONE;
 }