aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/texstore.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/main/texstore.c')
-rw-r--r--mesalib/src/mesa/main/texstore.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/mesalib/src/mesa/main/texstore.c b/mesalib/src/mesa/main/texstore.c
index 3e22a0b46..557703d01 100644
--- a/mesalib/src/mesa/main/texstore.c
+++ b/mesalib/src/mesa/main/texstore.c
@@ -3290,10 +3290,20 @@ _mesa_texstore_sargb8(TEXSTORE_PARAMS)
mesa_format newDstFormat;
GLboolean k;
- ASSERT(dstFormat == MESA_FORMAT_B8G8R8A8_SRGB);
-
- /* reuse normal rgba texstore code */
- newDstFormat = MESA_FORMAT_B8G8R8A8_UNORM;
+ switch (dstFormat) {
+ case MESA_FORMAT_B8G8R8A8_SRGB:
+ newDstFormat = MESA_FORMAT_B8G8R8A8_UNORM;
+ break;
+ case MESA_FORMAT_R8G8B8A8_SRGB:
+ newDstFormat = MESA_FORMAT_R8G8B8A8_UNORM;
+ break;
+ case MESA_FORMAT_B8G8R8X8_SRGB:
+ newDstFormat = MESA_FORMAT_B8G8R8X8_UNORM;
+ break;
+ default:
+ ASSERT(0);
+ return GL_FALSE;
+ }
k = _mesa_texstore_argb8888(ctx, dims, baseInternalFormat,
newDstFormat,
@@ -3859,6 +3869,8 @@ _mesa_get_texstore_func(mesa_format format)
table[MESA_FORMAT_G8R8_SNORM] = _mesa_texstore_snorm88;
table[MESA_FORMAT_G16R16_SNORM] = _mesa_texstore_snorm1616;
+ table[MESA_FORMAT_B8G8R8X8_SRGB] = _mesa_texstore_sargb8;
+
initialized = GL_TRUE;
}