mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
r600: explicitly advertise index buffer format support
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11132>
This commit is contained in:
parent
de9c66d749
commit
aea35a5ac2
3 changed files with 23 additions and 0 deletions
|
|
@ -307,6 +307,11 @@ bool evergreen_is_format_supported(struct pipe_screen *screen,
|
|||
retval |= PIPE_BIND_VERTEX_BUFFER;
|
||||
}
|
||||
|
||||
if (usage & PIPE_BIND_INDEX_BUFFER &&
|
||||
r600_is_index_format_supported(format)) {
|
||||
retval |= PIPE_BIND_INDEX_BUFFER;
|
||||
}
|
||||
|
||||
if ((usage & PIPE_BIND_LINEAR) &&
|
||||
!util_format_is_compressed(format) &&
|
||||
!(usage & PIPE_BIND_DEPTH_STENCIL))
|
||||
|
|
|
|||
|
|
@ -122,4 +122,17 @@ static inline bool r600_is_vertex_format_supported(enum pipe_format format)
|
|||
return true;
|
||||
}
|
||||
|
||||
static inline bool r600_is_index_format_supported(enum pipe_format format)
|
||||
{
|
||||
switch (format) {
|
||||
case PIPE_FORMAT_R8_UINT:
|
||||
case PIPE_FORMAT_R16_UINT:
|
||||
case PIPE_FORMAT_R32_UINT:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -236,6 +236,11 @@ bool r600_is_format_supported(struct pipe_screen *screen,
|
|||
retval |= PIPE_BIND_VERTEX_BUFFER;
|
||||
}
|
||||
|
||||
if (usage & PIPE_BIND_INDEX_BUFFER &&
|
||||
r600_is_index_format_supported(format)) {
|
||||
retval |= PIPE_BIND_INDEX_BUFFER;
|
||||
}
|
||||
|
||||
if ((usage & PIPE_BIND_LINEAR) &&
|
||||
!util_format_is_compressed(format) &&
|
||||
!(usage & PIPE_BIND_DEPTH_STENCIL))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue