summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-02-05 05:01:14 +0100
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-02-06 23:25:29 -0800
commitf02aec35e77b1d3944506e7622a4212dc88f84b5 (patch)
tree786e037132be3949dbe08fa607ecdd22f3772fcd /src/gallium
parent198e810a200eab06c662888c7ec85ae2459ec85a (diff)
r300g: add L8_SRGB and A8L8_SRGB texture formats
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/r300/r300_screen.c2
-rw-r--r--src/gallium/drivers/r300/r300_texture.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 18eecf7c13..2e04e31376 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -236,6 +236,8 @@ static boolean r300_is_format_supported(struct pipe_screen* screen,
case PIPE_FORMAT_DXT3_RGBA:
case PIPE_FORMAT_DXT5_RGBA:
case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_L8_SRGB:
+ case PIPE_FORMAT_A8L8_SRGB:
case PIPE_FORMAT_A8L8_UNORM:
retval = usage & PIPE_TEXTURE_USAGE_SAMPLER;
break;
diff --git a/src/gallium/drivers/r300/r300_texture.h b/src/gallium/drivers/r300/r300_texture.h
index b37be26133..961bdcc5b3 100644
--- a/src/gallium/drivers/r300/r300_texture.h
+++ b/src/gallium/drivers/r300/r300_texture.h
@@ -55,6 +55,9 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
return R300_EASY_TX_FORMAT(X, X, X, X, X8);
case PIPE_FORMAT_L8_UNORM:
return R300_EASY_TX_FORMAT(X, X, X, ONE, X8);
+ case PIPE_FORMAT_L8_SRGB:
+ return R300_EASY_TX_FORMAT(X, X, X, ONE, X8) |
+ R300_TX_FORMAT_GAMMA;
/* X16 */
case PIPE_FORMAT_R16_UNORM:
case PIPE_FORMAT_Z16_UNORM:
@@ -65,6 +68,9 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
/* Y8X8 */
case PIPE_FORMAT_A8L8_UNORM:
return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8);
+ case PIPE_FORMAT_A8L8_SRGB:
+ return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8) |
+ R300_TX_FORMAT_GAMMA;
/* W8Z8Y8X8 */
case PIPE_FORMAT_A8R8G8B8_UNORM:
return R300_EASY_TX_FORMAT(X, Y, Z, W, W8Z8Y8X8);