r600g: fix depth texture tests
authorDave Airlie <airlied@redhat.com>
Thu, 2 Sep 2010 05:51:23 +0000 (15:51 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 2 Sep 2010 05:51:23 +0000 (15:51 +1000)
src/gallium/drivers/r600/r600_texture.c

index 83fd01e8a1ea675923fcd5d4af412c49a70e9d48..b6698e3885ce0d74c660efb4aeb4487a9f99138c 100644 (file)
@@ -455,6 +455,8 @@ uint32_t r600_translate_texformat(enum pipe_format format,
        };
        desc = util_format_description(format);
 
+       word4 |= r600_get_swizzle_combined(desc->swizzle, swizzle_view);
+
        /* Colorspace (return non-RGB formats directly). */
        switch (desc->colorspace) {
                /* Depth stencil formats */
@@ -493,8 +495,6 @@ uint32_t r600_translate_texformat(enum pipe_format format,
                break;
        }
        
-       word4 |= r600_get_swizzle_combined(desc->swizzle, swizzle_view);
-
        /* S3TC formats. TODO */
        if (desc->layout == UTIL_FORMAT_LAYOUT_S3TC) {
                goto out_unknown;