r600g: add z16 to color setup
authorDave Airlie <airlied@redhat.com>
Mon, 20 Sep 2010 02:04:52 +0000 (12:04 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 20 Sep 2010 02:04:52 +0000 (12:04 +1000)
src/gallium/drivers/r600/eg_state_inlines.h
src/gallium/drivers/r600/r600_state_inlines.h

index 4e3514638b734bb607cb6a3dd19324581c95f912..bee2a8adcffc5fe256f5fe960f5c4e241267dbb6 100644 (file)
@@ -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:
index b4c21d9e12647e563c88c27c9290f7a93210be2d..9ffdd75582894ae6d01ef996b0a39db6ffe42414 100644 (file)
@@ -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: