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

Author: Dave Airlie <[email protected]>
Date:   Mon Sep 20 12:04:52 2010 +1000

r600g: add z16 to color setup

---

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

diff --git a/src/gallium/drivers/r600/eg_state_inlines.h 
b/src/gallium/drivers/r600/eg_state_inlines.h
index 4e35146..bee2a8a 100644
--- a/src/gallium/drivers/r600/eg_state_inlines.h
+++ b/src/gallium/drivers/r600/eg_state_inlines.h
@@ -283,6 +283,9 @@ static inline uint32_t r600_translate_colorswap(enum 
pipe_format format)
        case PIPE_FORMAT_B4G4R4A4_UNORM:
        case PIPE_FORMAT_B4G4R4X4_UNORM:
                return V_028C70_SWAP_ALT;
+
+       case PIPE_FORMAT_Z16_UNORM:
+               return V_028C70_SWAP_STD;
                /* 32-bit buffers. */
 
        case PIPE_FORMAT_A8B8G8R8_SRGB:
@@ -357,6 +360,9 @@ static INLINE uint32_t r600_translate_colorformat(enum 
pipe_format format)
        case PIPE_FORMAT_B4G4R4X4_UNORM:
                return V_028C70_COLOR_4_4_4_4;
 
+       case PIPE_FORMAT_Z16_UNORM:
+               return V_028C70_COLOR_16;
+
                /* 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 b4c21d9..9ffdd75 100644
--- a/src/gallium/drivers/r600/r600_state_inlines.h
+++ b/src/gallium/drivers/r600/r600_state_inlines.h
@@ -283,6 +283,10 @@ static inline uint32_t r600_translate_colorswap(enum 
pipe_format format)
        case PIPE_FORMAT_B4G4R4A4_UNORM:
        case PIPE_FORMAT_B4G4R4X4_UNORM:
                return V_0280A0_SWAP_ALT;
+
+       case PIPE_FORMAT_Z16_UNORM:
+               return V_0280A0_SWAP_STD;
+
                /* 32-bit buffers. */
 
        case PIPE_FORMAT_A8B8G8R8_SRGB:
@@ -357,6 +361,9 @@ static INLINE uint32_t r600_translate_colorformat(enum 
pipe_format format)
        case PIPE_FORMAT_B4G4R4X4_UNORM:
                return V_0280A0_COLOR_4_4_4_4;
 
+       case PIPE_FORMAT_Z16_UNORM:
+               return V_0280A0_COLOR_16;
+
                /* 32-bit buffers. */
        case PIPE_FORMAT_A8B8G8R8_SRGB:
        case PIPE_FORMAT_A8B8G8R8_UNORM:

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to