Mesa (master): r600g: add L4A4 support.

Dave Airlie airlied at kemper.freedesktop.org
Wed Feb 16 05:58:32 UTC 2011


Module: Mesa
Branch: master
Commit: 4016a1b4c634b09ca4b3007d18e5ead1dd57a1bb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4016a1b4c634b09ca4b3007d18e5ead1dd57a1bb

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Feb 16 16:01:36 2011 +1000

r600g: add L4A4 support.

this fixes piglit fbo-generatemipmap-formats on my rv730.

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/r600/eg_state_inlines.h   |    6 ++++++
 src/gallium/drivers/r600/r600_state_inlines.h |    6 ++++++
 2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h
index c2e06c3..3bf0970 100644
--- a/src/gallium/drivers/r600/eg_state_inlines.h
+++ b/src/gallium/drivers/r600/eg_state_inlines.h
@@ -289,6 +289,9 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
 {
 	switch (format) {
 		/* 8-bit buffers. */
+	case PIPE_FORMAT_L4A4_UNORM:
+		return V_028C70_SWAP_ALT;
+
 	case PIPE_FORMAT_A8_UNORM:
 		return V_028C70_SWAP_ALT_REV;
 	case PIPE_FORMAT_I8_UNORM:
@@ -382,6 +385,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
 {
 	switch (format) {
 		/* 8-bit buffers. */
+	case PIPE_FORMAT_L4A4_UNORM:
+		return V_028C70_COLOR_4_4;
+
 	case PIPE_FORMAT_A8_UNORM:
 	case PIPE_FORMAT_I8_UNORM:
 	case PIPE_FORMAT_L8_UNORM:
diff --git a/src/gallium/drivers/r600/r600_state_inlines.h b/src/gallium/drivers/r600/r600_state_inlines.h
index fa6c24c..8cae4f4 100644
--- a/src/gallium/drivers/r600/r600_state_inlines.h
+++ b/src/gallium/drivers/r600/r600_state_inlines.h
@@ -289,6 +289,9 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
 	case PIPE_FORMAT_R8_SNORM:
 		return V_0280A0_SWAP_STD;
 
+	case PIPE_FORMAT_L4A4_UNORM:
+		return V_0280A0_SWAP_ALT;
+
 		/* 16-bit buffers. */
 	case PIPE_FORMAT_B5G6R5_UNORM:
 		return V_0280A0_SWAP_STD_REV;
@@ -374,6 +377,9 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
 static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
 {
 	switch (format) {
+	case PIPE_FORMAT_L4A4_UNORM:
+		return V_0280A0_COLOR_4_4;
+
 		/* 8-bit buffers. */
 	case PIPE_FORMAT_A8_UNORM:
 	case PIPE_FORMAT_I8_UNORM:




More information about the mesa-commit mailing list