summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_state_inlines.h
diff options
context:
space:
mode:
authorMathias Fröhlich <Mathias.Froehlich@gmx.net>2010-01-30 11:38:21 -0800
committerCorbin Simpson <MostAwesomeDude@gmail.com>2010-01-30 11:40:41 -0800
commit5a64bdaa0150c0d3883953237b7b8a910c98e5b3 (patch)
tree0cd817829db6da9c4b26ace05912dcb8478603c8 /src/gallium/drivers/r300/r300_state_inlines.h
parent7056a74734d078c501d8318d47a364832aa8aeb6 (diff)
downloadexternal_mesa3d-5a64bdaa0150c0d3883953237b7b8a910c98e5b3.zip
external_mesa3d-5a64bdaa0150c0d3883953237b7b8a910c98e5b3.tar.gz
external_mesa3d-5a64bdaa0150c0d3883953237b7b8a910c98e5b3.tar.bz2
r300g: Add alpha render targets.
Signed-off-by: Corbin Simpson <MostAwesomeDude@gmail.com> Tested-by: Mathias Fröhlich <Mathias.Froehlich@gmx.net>
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_inlines.h')
-rw-r--r--src/gallium/drivers/r300/r300_state_inlines.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_state_inlines.h b/src/gallium/drivers/r300/r300_state_inlines.h
index e2180b3..faa0494 100644
--- a/src/gallium/drivers/r300/r300_state_inlines.h
+++ b/src/gallium/drivers/r300/r300_state_inlines.h
@@ -331,7 +331,10 @@ static INLINE uint32_t r300_translate_colorformat(enum pipe_format format)
{
switch (format) {
/* 8-bit buffers */
+ case PIPE_FORMAT_A8_UNORM:
case PIPE_FORMAT_I8_UNORM:
+ case PIPE_FORMAT_L8_UNORM:
+ /* case PIPE_FORMAT_S8_UNORM: ??? */
return R300_COLOR_FORMAT_I8;
/* 16-bit buffers */
case PIPE_FORMAT_R5G6B5_UNORM:
@@ -408,6 +411,16 @@ static INLINE uint32_t r300_translate_out_fmt(enum pipe_format format)
return R300_US_OUT_FMT_C4_8 |
R300_C0_SEL_A | R300_C1_SEL_B |
R300_C2_SEL_G | R300_C3_SEL_R;
+
+ /* 8-bit outputs */
+ case PIPE_FORMAT_A8_UNORM:
+ return R300_US_OUT_FMT_C4_8 |
+ R300_C0_SEL_A;
+ case PIPE_FORMAT_I8_UNORM:
+ case PIPE_FORMAT_L8_UNORM:
+ return R300_US_OUT_FMT_C4_8 |
+ R300_C0_SEL_R;
+ /* R300_OUT_SIGN(x) */
default:
debug_printf("r300: Implementation error: "
"Got unsupported output format %s in %s\n",