r600g: support textures with scaled number formats
authorChristian König <deathsimple@vodafone.de>
Sun, 10 Apr 2011 22:49:28 +0000 (00:49 +0200)
committerChristian König <deathsimple@vodafone.de>
Sun, 10 Apr 2011 22:49:28 +0000 (00:49 +0200)
src/gallium/drivers/r600/eg_state_inlines.h
src/gallium/drivers/r600/r600_state_inlines.h
src/gallium/drivers/r600/r600_texture.c

index cae3888051bc6ecf6aef070901c83221bb84af1f..487adddcb726e462ea34baf0345b9746fe1dbf01 100644 (file)
@@ -373,6 +373,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
                /* 64-bit buffers. */
        case PIPE_FORMAT_R16G16B16A16_UNORM:
        case PIPE_FORMAT_R16G16B16A16_SNORM:
+       case PIPE_FORMAT_R16G16B16A16_SSCALED:
        case PIPE_FORMAT_R16G16B16A16_FLOAT:
 
                /* 128-bit buffers. */
index 9e6ae2952393b5b3793ac273dbe1ec587b75c2e0..2a40f41bbf553f51b6028297cac1a774b67a3971 100644 (file)
@@ -368,6 +368,7 @@ static inline uint32_t r600_translate_colorswap(enum pipe_format format)
                /* 64-bit buffers. */
        case PIPE_FORMAT_R16G16B16A16_UNORM:
        case PIPE_FORMAT_R16G16B16A16_SNORM:
+       case PIPE_FORMAT_R16G16B16A16_SSCALED:
        case PIPE_FORMAT_R16G16B16A16_FLOAT:
 
                /* 128-bit buffers. */
index d079b571156312c234f89076ab3ad75036a31d93..690aeafcc52361edc766397511dee6802bb8efab 100644 (file)
@@ -996,7 +996,7 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
        case UTIL_FORMAT_TYPE_SIGNED:
                if (!desc->channel[i].normalized &&
                    desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB) {
-                       goto out_unknown;
+                       word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_SCALED);
                }
 
                switch (desc->channel[i].size) {