r600g/sb: fix issues cause by GLSL switching to loops for switch
[mesa.git] / src / gallium / drivers / r600 / r600_formats.h
index af6de1cd79762e55019e5b6c6b4b8df34cb15b45..fa374d92e6fac5b7a1abb73cb4ce65fd5a361614 100644 (file)
@@ -87,6 +87,9 @@ static INLINE bool r600_is_vertex_format_supported(enum pipe_format format)
        const struct util_format_description *desc = util_format_description(format);
        unsigned i;
 
+       if (format == PIPE_FORMAT_R11G11B10_FLOAT)
+               return true;
+
        if (!desc)
                return false;
 
@@ -101,11 +104,13 @@ static INLINE bool r600_is_vertex_format_supported(enum pipe_format format)
        /* No fixed, no double. */
        if (desc->layout != UTIL_FORMAT_LAYOUT_PLAIN ||
            (desc->channel[i].size == 64 &&
-            desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT))
+            desc->channel[i].type == UTIL_FORMAT_TYPE_FLOAT) ||
+           desc->channel[i].type == UTIL_FORMAT_TYPE_FIXED)
                return false;
 
        /* No scaled/norm formats with 32 bits per channel. */
        if (desc->channel[i].size == 32 &&
+           !desc->channel[i].pure_integer &&
            (desc->channel[i].type == UTIL_FORMAT_TYPE_SIGNED ||
             desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED))
                return false;