summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMaciej Cencora <[email protected]>2009-10-18 18:06:51 +0200
committerCorbin Simpson <[email protected]>2009-10-28 12:15:35 -0700
commite7c8a2763855c35af1d141b67551b364e6579051 (patch)
tree8e8710914aab7949df9926df28131cf24a68f7b8 /src/gallium
parent6007e2e0085d9131b22dc8a98d7500a66a0e4c97 (diff)
r300g: add some 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.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_screen.c b/src/gallium/drivers/r300/r300_screen.c
index 6eaf35bd4b3..6efa17cbaf8 100644
--- a/src/gallium/drivers/r300/r300_screen.c
+++ b/src/gallium/drivers/r300/r300_screen.c
@@ -197,6 +197,8 @@ static boolean check_tex_format(enum pipe_format format, uint32_t usage,
case PIPE_FORMAT_DXT3_RGBA:
case PIPE_FORMAT_DXT5_RGBA:
case PIPE_FORMAT_YCBCR:
+ case PIPE_FORMAT_L8_UNORM:
+ 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 35e06a9acb5..a18e0cbe1a1 100644
--- a/src/gallium/drivers/r300/r300_texture.h
+++ b/src/gallium/drivers/r300/r300_texture.h
@@ -85,6 +85,13 @@ static INLINE uint32_t r300_translate_texformat(enum pipe_format format)
case PIPE_FORMAT_Z24S8_UNORM:
case PIPE_FORMAT_Z24X8_UNORM:
return R300_EASY_TX_FORMAT(X, X, X, X, W24_FP);
+
+ case PIPE_FORMAT_A8L8_UNORM:
+ return R300_EASY_TX_FORMAT(X, X, X, Y, Y8X8);
+
+ case PIPE_FORMAT_L8_UNORM:
+ return R300_EASY_TX_FORMAT(X, X, X, ONE, X8);
+
default:
debug_printf("r300: Implementation error: "
"Got unsupported texture format %s in %s\n",