mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 17:10:26 +01:00
r600: Allow eight bit, three channel formats for vertex buffers
While using three component texture formats results in CTs failures, three component vertex attributes are fine, and not allowing them results in significant performance regressisons. Fixes:e41958e344r600: Disable eight bit three channel formats Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6399 v2: rename function to is_buffer_format_supported (Emma) Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16267> (cherry picked from commit4a2ff9eb86)
This commit is contained in:
parent
9fdb834853
commit
01345ad5e9
4 changed files with 8 additions and 8 deletions
|
|
@ -364,7 +364,7 @@
|
|||
"description": "r600: Allow eight bit, three channel formats for vertex buffers",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "e41958e344cb4b15d01008140a1ee08817104334"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue