X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fr600%2Fr600_formats.h;h=9533aaa137853e2d1070088682f4c6d72eb1d8a6;hb=3bd885d09cea6ecf19ddfd948c8dd74f5e3ea600;hp=1c1089d89d2d2b52454edd9afaedc7e9ee783eac;hpb=4683529048ee133481b2d8f1cae1685aa1736f9a;p=mesa.git diff --git a/src/gallium/drivers/r600/r600_formats.h b/src/gallium/drivers/r600/r600_formats.h index 1c1089d89d2..9533aaa1378 100644 --- a/src/gallium/drivers/r600/r600_formats.h +++ b/src/gallium/drivers/r600/r600_formats.h @@ -1,6 +1,7 @@ #ifndef R600_FORMATS_H #define R600_FORMATS_H +#include "util/u_format.h" #include "r600_pipe.h" /* list of formats from R700 ISA document - apply across GPUs in different registers */ @@ -63,7 +64,7 @@ #define ENDIAN_8IN32 2 #define ENDIAN_8IN64 3 -static INLINE unsigned r600_endian_swap(unsigned size) +static inline unsigned r600_endian_swap(unsigned size) { if (R600_BIG_ENDIAN) { switch (size) { @@ -81,11 +82,14 @@ static INLINE unsigned r600_endian_swap(unsigned size) } } -static INLINE bool r600_is_vertex_format_supported(enum pipe_format format) +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; @@ -99,13 +103,14 @@ 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].type == UTIL_FORMAT_TYPE_FIXED || (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;