r600g: add int support for 2/10/10/10 format.
authorDave Airlie <airlied@redhat.com>
Sun, 27 Nov 2011 16:24:26 +0000 (16:24 +0000)
committerDave Airlie <airlied@redhat.com>
Sun, 27 Nov 2011 19:32:05 +0000 (19:32 +0000)
integer wasn't set properly for the non-uniform types.

Signed-off-by: Dave Airlie <airlied@redhat.com>
src/gallium/drivers/r600/r600_texture.c

index 8fe1118d19d9bf9526f535543951cb9e16e1880e..2d041b04e49cdd3465374f488b6a73c8c22a83aa 100644 (file)
@@ -1012,6 +1012,9 @@ uint32_t r600_translate_texformat(struct pipe_screen *screen,
 
        /* Non-uniform formats. */
        if (!uniform) {
+               if (desc->colorspace != UTIL_FORMAT_COLORSPACE_SRGB &&
+                   desc->channel[0].pure_integer)
+                       word4 |= S_038010_NUM_FORMAT_ALL(V_038010_SQ_NUM_FORMAT_INT);
                switch(desc->nr_channels) {
                case 3:
                        if (desc->channel[0].size == 5 &&