summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/state_tracker/st_extensions.c4
-rw-r--r--src/mesa/state_tracker/st_format.c8
2 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index 798ee60875a..16889074f66 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -889,6 +889,10 @@ void st_init_extensions(struct pipe_screen *screen,
PIPE_FORMAT_R8G8B8A8_SRGB},
GL_TRUE }, /* at least one format must be supported */
+ { { o(EXT_texture_sRGB_R8) },
+ { PIPE_FORMAT_R8_SRGB },
+ GL_TRUE },
+
{ { o(EXT_texture_type_2_10_10_10_REV) },
{ PIPE_FORMAT_R10G10B10A2_UNORM,
PIPE_FORMAT_B10G10R10A2_UNORM },
diff --git a/src/mesa/state_tracker/st_format.c b/src/mesa/state_tracker/st_format.c
index 16a18c272dc..caddd76c5da 100644
--- a/src/mesa/state_tracker/st_format.c
+++ b/src/mesa/state_tracker/st_format.c
@@ -169,6 +169,8 @@ st_mesa_format_to_pipe_format(const struct st_context *st,
return PIPE_FORMAT_AL88_SRGB;
case MESA_FORMAT_L_SRGB8:
return PIPE_FORMAT_L8_SRGB;
+ case MESA_FORMAT_R_SRGB8:
+ return PIPE_FORMAT_R8_SRGB;
case MESA_FORMAT_BGR_SRGB8:
return PIPE_FORMAT_R8G8B8_SRGB;
case MESA_FORMAT_A8B8G8R8_SRGB:
@@ -719,6 +721,8 @@ st_pipe_format_to_mesa_format(enum pipe_format format)
return MESA_FORMAT_A8L8_SRGB;
case PIPE_FORMAT_L8_SRGB:
return MESA_FORMAT_L_SRGB8;
+ case PIPE_FORMAT_R8_SRGB:
+ return MESA_FORMAT_R_SRGB8;
case PIPE_FORMAT_R8G8B8_SRGB:
return MESA_FORMAT_BGR_SRGB8;
case PIPE_FORMAT_ABGR8888_SRGB:
@@ -1423,6 +1427,10 @@ static const struct format_mapping format_map[] = {
0 },
{ PIPE_FORMAT_L8_SRGB, DEFAULT_SRGBA_FORMATS }
},
+ {
+ { GL_SR8_EXT, 0 },
+ { PIPE_FORMAT_R8_SRGB, 0 }
+ },
/* 16-bit float formats */
{