Mesa (master): r600g: Support the PIPE_FORMAT_R16_FLOAT colorformat.

Henri Verbeet hverbeet at kemper.freedesktop.org
Sun Jul 3 14:03:51 PDT 2011


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

Author: Henri Verbeet <hverbeet at gmail.com>
Date:   Sun Jul  3 22:29:34 2011 +0200

r600g: Support the PIPE_FORMAT_R16_FLOAT colorformat.

NOTE: This is a candidate for the 7.11 branch.

---

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

diff --git a/src/gallium/drivers/r600/eg_state_inlines.h b/src/gallium/drivers/r600/eg_state_inlines.h
index af2ec56..b559011 100644
--- a/src/gallium/drivers/r600/eg_state_inlines.h
+++ b/src/gallium/drivers/r600/eg_state_inlines.h
@@ -327,6 +327,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
 		return V_028C70_SWAP_STD;
 
 	case PIPE_FORMAT_R16_UNORM:
+	case PIPE_FORMAT_R16_FLOAT:
 		return V_028C70_SWAP_STD;
 
 	/* 32-bit buffers. */
@@ -430,6 +431,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
 	case PIPE_FORMAT_R16_UNORM:
 		return V_028C70_COLOR_16;
 
+	case PIPE_FORMAT_R16_FLOAT:
+		return V_028C70_COLOR_16_FLOAT;
+
 	/* 32-bit buffers. */
 	case PIPE_FORMAT_A8B8G8R8_SRGB:
 	case PIPE_FORMAT_A8B8G8R8_UNORM:
diff --git a/src/gallium/drivers/r600/r600_state_inlines.h b/src/gallium/drivers/r600/r600_state_inlines.h
index 5418570..eb6fb65 100644
--- a/src/gallium/drivers/r600/r600_state_inlines.h
+++ b/src/gallium/drivers/r600/r600_state_inlines.h
@@ -319,6 +319,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
 		return V_0280A0_SWAP_STD;
 
 	case PIPE_FORMAT_R16_UNORM:
+	case PIPE_FORMAT_R16_FLOAT:
 		return V_0280A0_SWAP_STD;
 
 	/* 32-bit buffers. */
@@ -423,6 +424,9 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
 	case PIPE_FORMAT_R16_UNORM:
 		return V_0280A0_COLOR_16;
 
+	case PIPE_FORMAT_R16_FLOAT:
+		return V_0280A0_COLOR_16_FLOAT;
+
 	/* 32-bit buffers. */
 	case PIPE_FORMAT_A8B8G8R8_SRGB:
 	case PIPE_FORMAT_A8B8G8R8_UNORM:



More information about the mesa-commit mailing list