summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2014-03-04 12:52:07 +0800
committerChia-I Wu <[email protected]>2014-03-06 10:59:25 +0800
commit6d23ca1621cf2c68b0bab02374061ec026cb6ef3 (patch)
treef1e9fc53dbaf5855248a55d6848588dc7ad8d1e1 /src
parent5a27491a760c64e885110605ff0e5c8021382864 (diff)
st/mesa: add mappings for MESA_FORMAT_B8G8R8X8_SRGB
The format is mapped to PIPE_FORMAT_B8G8R8X8_SRGB. Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_format.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 5f951eb0270..25577ac55d0 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -393,6 +393,9 @@ st_mesa_format_to_pipe_format(mesa_format mesaFormat)
case MESA_FORMAT_RGBX_SINT32:
return PIPE_FORMAT_R32G32B32X32_SINT;
+ case MESA_FORMAT_B8G8R8X8_SRGB:
+ return PIPE_FORMAT_B8G8R8X8_SRGB;
+
default:
return PIPE_FORMAT_NONE;
}
@@ -748,6 +751,9 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
case PIPE_FORMAT_R32G32B32X32_SINT:
return MESA_FORMAT_RGBX_SINT32;
+ case PIPE_FORMAT_B8G8R8X8_SRGB:
+ return MESA_FORMAT_B8G8R8X8_SRGB;
+
default:
assert(0);
return MESA_FORMAT_NONE;
@@ -1006,7 +1012,8 @@ static const struct format_mapping format_map[] = {
/* sRGB formats */
{
{ GL_SRGB_EXT, GL_SRGB8_EXT, 0 },
- { PIPE_FORMAT_R8G8B8X8_SRGB, DEFAULT_SRGBA_FORMATS }
+ { PIPE_FORMAT_R8G8B8X8_SRGB, PIPE_FORMAT_B8G8R8X8_SRGB,
+ DEFAULT_SRGBA_FORMATS }
},
{
{ GL_SRGB_ALPHA_EXT, GL_SRGB8_ALPHA8_EXT, 0 },
@@ -1015,7 +1022,7 @@ static const struct format_mapping format_map[] = {
{
{ GL_COMPRESSED_SRGB_EXT, GL_COMPRESSED_SRGB_S3TC_DXT1_EXT, 0 },
{ PIPE_FORMAT_DXT1_SRGB, PIPE_FORMAT_R8G8B8X8_SRGB,
- DEFAULT_SRGBA_FORMATS }
+ PIPE_FORMAT_B8G8R8X8_SRGB, DEFAULT_SRGBA_FORMATS }
},
{
{ GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT, 0 },