From 8f7177e0de06877ae717250ccaa3ac292340b7be Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 2 Oct 2010 23:13:12 +0200 Subject: [PATCH] r300g: add support for L8A8 colorbuffers Blending with DST_ALPHA is undefined. SRC_ALPHA works, though. I bet some other formats have similar limitations too. --- src/gallium/drivers/r300/r300_texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c index a084bdff11c..cee56bccdcd 100644 --- a/src/gallium/drivers/r300/r300_texture.c +++ b/src/gallium/drivers/r300/r300_texture.c @@ -369,6 +369,7 @@ static uint32_t r300_translate_colorformat(enum pipe_format format) return R300_COLOR_FORMAT_I8; /* 16-bit buffers. */ + case PIPE_FORMAT_L8A8_UNORM: case PIPE_FORMAT_R8G8_UNORM: case PIPE_FORMAT_R8G8_SNORM: return R300_COLOR_FORMAT_UV88; @@ -504,6 +505,8 @@ static uint32_t r300_translate_out_fmt(enum pipe_format format) /* 16-bit outputs, two channels. * COLORFORMAT_UV88 stores C2 and C0. */ + case PIPE_FORMAT_L8A8_UNORM: + return modifier | R300_C0_SEL_A | R300_C2_SEL_R; case PIPE_FORMAT_R8G8_UNORM: case PIPE_FORMAT_R8G8_SNORM: return modifier | R300_C0_SEL_G | R300_C2_SEL_R; -- 2.30.2