radeonsi: Expose pure integer vertex formats
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 29 Aug 2013 14:39:16 +0000 (16:39 +0200)
committerMichel Dänzer <michel@daenzer.net>
Mon, 2 Sep 2013 15:25:27 +0000 (17:25 +0200)
Fixes 20 piglit tests with MESA_GL_VERSION_OVERRIDE=3.0.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_state.c

index 3c4197ca5489718c177b2a17e90225ad2bde8036..6426033fcf96ee3eeb56a58cab60b73b1bd03964 100644 (file)
@@ -1630,7 +1630,12 @@ static uint32_t si_translate_vertexformat(struct pipe_screen *screen,
                }
                break;
        case 32:
-               if (type != UTIL_FORMAT_TYPE_FLOAT)
+               /* From the Southern Islands ISA documentation about MTBUF:
+                * 'Memory reads of data in memory that is 32 or 64 bits do not
+                * undergo any format conversion.'
+                */
+               if (type != UTIL_FORMAT_TYPE_FLOAT &&
+                   !desc->channel[first_non_void].pure_integer)
                        return V_008F0C_BUF_DATA_FORMAT_INVALID;
 
                switch (desc->nr_channels) {