diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index e3f80929b03..65a4fd8b3cc 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -273,7 +273,7 @@ bool evergreen_is_format_supported(struct pipe_screen *screen, if (usage & PIPE_BIND_SAMPLER_VIEW) { if (target == PIPE_BUFFER) { - if (r600_is_vertex_format_supported(format)) + if (r600_is_buffer_format_supported(format, false)) retval |= PIPE_BIND_SAMPLER_VIEW; } else { if (r600_is_sampler_format_supported(screen, format)) @@ -303,7 +303,7 @@ bool evergreen_is_format_supported(struct pipe_screen *screen, } if ((usage & PIPE_BIND_VERTEX_BUFFER) && - r600_is_vertex_format_supported(format)) { + r600_is_buffer_format_supported(format, true)) { retval |= PIPE_BIND_VERTEX_BUFFER; } diff --git a/src/gallium/drivers/r600/r600_formats.h b/src/gallium/drivers/r600/r600_formats.h index 3ff12ddf8c7..c5899424c6c 100644 --- a/src/gallium/drivers/r600/r600_formats.h +++ b/src/gallium/drivers/r600/r600_formats.h @@ -82,7 +82,7 @@ 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_buffer_format_supported(enum pipe_format format, bool for_vbo) { const struct util_format_description *desc = util_format_description(format); unsigned i; @@ -115,9 +115,9 @@ static inline bool r600_is_vertex_format_supported(enum pipe_format format) desc->channel[i].type == UTIL_FORMAT_TYPE_UNSIGNED)) return false; - /* No 8 bit 3 channel formats */ + /* No 8 bit 3 channel formats for TBOs */ if (desc->channel[i].size == 8 && desc->nr_channels == 3) - return false; + return for_vbo; return true; } diff --git a/src/gallium/drivers/r600/r600_state.c b/src/gallium/drivers/r600/r600_state.c index 274978e5f85..144ef549be8 100644 --- a/src/gallium/drivers/r600/r600_state.c +++ b/src/gallium/drivers/r600/r600_state.c @@ -202,7 +202,7 @@ bool r600_is_format_supported(struct pipe_screen *screen, if (usage & PIPE_BIND_SAMPLER_VIEW) { if (target == PIPE_BUFFER) { - if (r600_is_vertex_format_supported(format)) + if (r600_is_buffer_format_supported(format, false)) retval |= PIPE_BIND_SAMPLER_VIEW; } else { if (r600_is_sampler_format_supported(screen, format)) @@ -232,7 +232,7 @@ bool r600_is_format_supported(struct pipe_screen *screen, } if ((usage & PIPE_BIND_VERTEX_BUFFER) && - r600_is_vertex_format_supported(format)) { + r600_is_buffer_format_supported(format, true)) { retval |= PIPE_BIND_VERTEX_BUFFER; }