[Mesa-dev] [PATCH] st/mesa: use new MESA_FORMAT_R8G8B8A8_SRGB

Brian Paul brianp at vmware.com
Thu Mar 6 10:39:16 PST 2014


To fix the problem that Jose worked around in 1d8e3067fd9.
---
 src/mesa/state_tracker/st_format.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 0311a2b..0be900e7 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -147,6 +147,8 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat)
       return PIPE_FORMAT_A8B8G8R8_SRGB;
    case MESA_FORMAT_B8G8R8A8_SRGB:
       return PIPE_FORMAT_B8G8R8A8_SRGB;
+   case MESA_FORMAT_R8G8B8A8_SRGB:
+      return PIPE_FORMAT_R8G8B8A8_SRGB;
    case MESA_FORMAT_RGBA_FLOAT32:
       return PIPE_FORMAT_R32G32B32A32_FLOAT;
    case MESA_FORMAT_RGBA_FLOAT16:
@@ -754,7 +756,7 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
    case PIPE_FORMAT_B8G8R8X8_SRGB:
       return MESA_FORMAT_B8G8R8X8_SRGB;
    case PIPE_FORMAT_R8G8B8A8_SRGB:
-      return MESA_FORMAT_B8G8R8A8_SRGB;
+      return MESA_FORMAT_R8G8B8A8_SRGB;
 
    default:
       assert(0);
-- 
1.7.10.4



More information about the mesa-dev mailing list