r600g: add color/texture support for more depth formats.
authorDave Airlie <airlied@redhat.com>
Mon, 20 Sep 2010 02:21:35 +0000 (12:21 +1000)
committerDave Airlie <airlied@redhat.com>
Mon, 20 Sep 2010 02:21:35 +0000 (12:21 +1000)
src/gallium/drivers/r600/eg_state_inlines.h
src/gallium/drivers/r600/r600_state_inlines.h
src/gallium/drivers/r600/r600_texture.c

index bee2a8adcffc5fe256f5fe960f5c4e241267dbb6..0a42abcdf2b34c4af8519bd25020895804206460 100644 (file)
@@ -313,6 +313,10 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                return V_028C70_SWAP_STD;
 
+       case PIPE_FORMAT_X8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+               return V_028C70_SWAP_STD;
+
        case PIPE_FORMAT_R10G10B10A2_UNORM:
        case PIPE_FORMAT_R10G10B10X2_SNORM:
        case PIPE_FORMAT_B10G10R10A2_UNORM:
@@ -389,6 +393,10 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                return V_028C70_COLOR_8_24;
 
+       case PIPE_FORMAT_X8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+               return V_028C70_COLOR_24_8;
+
        case PIPE_FORMAT_R32_FLOAT:
                return V_028C70_COLOR_32_FLOAT;
 
index 9ffdd75582894ae6d01ef996b0a39db6ffe42414..283f1e59b330a9ea5ee80834e38c50764a6643c3 100644 (file)
@@ -314,6 +314,10 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
        case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                return V_0280A0_SWAP_STD;
 
+       case PIPE_FORMAT_X8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+               return V_0280A0_SWAP_STD;
+
        case PIPE_FORMAT_R10G10B10A2_UNORM:
        case PIPE_FORMAT_R10G10B10X2_SNORM:
        case PIPE_FORMAT_B10G10R10A2_UNORM:
@@ -390,6 +394,10 @@ static INLINE uint32_t r600_translate_colorformat(enum pipe_format format)
        case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                return V_0280A0_COLOR_8_24;
 
+       case PIPE_FORMAT_X8Z24_UNORM:
+       case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+               return V_0280A0_COLOR_24_8;
+
        case PIPE_FORMAT_R32_FLOAT:
                return V_0280A0_COLOR_32_FLOAT;
 
index d41150c93841e7cbaf5b1d19fcef18b0724c26f0..369e5d28d0c95e5a2e3b55ef8acc70641718298b 100644 (file)
@@ -467,11 +467,13 @@ uint32_t r600_translate_texformat(enum pipe_format format,
                        result = V_0280A0_COLOR_16;
                        goto out_word4;
                case PIPE_FORMAT_Z24X8_UNORM:
-                       result = V_0280A0_COLOR_8_24;
-                       goto out_word4;
                case PIPE_FORMAT_Z24_UNORM_S8_USCALED:
                        result = V_0280A0_COLOR_8_24;
                        goto out_word4;
+               case PIPE_FORMAT_X8Z24_UNORM:
+               case PIPE_FORMAT_S8_USCALED_Z24_UNORM:
+                       result = V_0280A0_COLOR_24_8;
+                       goto out_word4;
                default:
                        goto out_unknown;
                }