nouveau: explicitly advertise index buffer format support
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> 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
842c514303
commit
cc99c1c762
|
@ -463,6 +463,14 @@ nv30_screen_is_format_supported(struct pipe_screen *pscreen,
|
|||
/* shared is always supported */
|
||||
bindings &= ~PIPE_BIND_SHARED;
|
||||
|
||||
if (bindings & PIPE_BIND_INDEX_BUFFER) {
|
||||
if (format != PIPE_FORMAT_R8_UINT &&
|
||||
format != PIPE_FORMAT_R16_UINT &&
|
||||
format != PIPE_FORMAT_R32_UINT)
|
||||
return false;
|
||||
bindings &= ~PIPE_BIND_INDEX_BUFFER;
|
||||
}
|
||||
|
||||
return (nv30_format_info(pscreen, format)->bindings & bindings) == bindings;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,6 +88,14 @@ nv50_screen_is_format_supported(struct pipe_screen *pscreen,
|
|||
bindings &= ~(PIPE_BIND_LINEAR |
|
||||
PIPE_BIND_SHARED);
|
||||
|
||||
if (bindings & PIPE_BIND_INDEX_BUFFER) {
|
||||
if (format != PIPE_FORMAT_R8_UINT &&
|
||||
format != PIPE_FORMAT_R16_UINT &&
|
||||
format != PIPE_FORMAT_R32_UINT)
|
||||
return false;
|
||||
bindings &= ~PIPE_BIND_INDEX_BUFFER;
|
||||
}
|
||||
|
||||
return (( nv50_format_table[format].usage |
|
||||
nv50_vertex_format[format].usage) & bindings) == bindings;
|
||||
}
|
||||
|
|
|
@ -99,6 +99,14 @@ nvc0_screen_is_format_supported(struct pipe_screen *pscreen,
|
|||
}
|
||||
}
|
||||
|
||||
if (bindings & PIPE_BIND_INDEX_BUFFER) {
|
||||
if (format != PIPE_FORMAT_R8_UINT &&
|
||||
format != PIPE_FORMAT_R16_UINT &&
|
||||
format != PIPE_FORMAT_R32_UINT)
|
||||
return false;
|
||||
bindings &= ~PIPE_BIND_INDEX_BUFFER;
|
||||
}
|
||||
|
||||
return (( nvc0_format_table[format].usage |
|
||||
nvc0_vertex_format[format].usage) & bindings) == bindings;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue