Mesa (master): st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format.

Stephane Marchesin marcheu at kemper.freedesktop.org
Fri Jun 24 21:33:34 UTC 2011


Module: Mesa
Branch: master
Commit: 407832b0d251515307dc0712863e243435baa4c2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=407832b0d251515307dc0712863e243435baa4c2

Author: Stéphane Marchesin <marcheu at chromium.org>
Date:   Fri Jun 24 14:07:31 2011 -0700

st/mesa: add PIPE_FORMAT_R8G8B8A8_UNORM as the first RGBA format.

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 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index b8c0d1f..fa5d8f5 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -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 },




More information about the mesa-commit mailing list