st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format.
authorStéphane Marchesin <marcheu@chromium.org>
Fri, 24 Jun 2011 21:07:31 +0000 (14:07 -0700)
committerStéphane Marchesin <marcheu@chromium.org>
Fri, 24 Jun 2011 21:32:48 +0000 (14:32 -0700)
Otherwise we can end up creating RGBA render targets (which are BGRA on the
hardware), and then we bind them as RGBA textures (which are RGBA on the
hardware). This generates software fallbacks every time we bind the frame as
a texture.

src/mesa/state_tracker/st_format.c

index b8c0d1f..fa5d8f5 100644 (file)
@@ -616,7 +616,7 @@ static const struct format_mapping format_map[] = {
    },
    {
       { 4, GL_RGBA, GL_RGBA8, 0 },
-      { DEFAULT_RGBA_FORMATS }
+      { PIPE_FORMAT_R8G8B8A8_UNORM, DEFAULT_RGBA_FORMATS }
    },
    {
       { GL_BGRA, 0 },