diff options
author | Jonathan Marek <[email protected]> | 2019-12-08 11:54:31 -0500 |
---|---|---|
committer | Jonathan Marek <[email protected]> | 2019-12-13 09:10:28 -0500 |
commit | 017cbab5b05d714e9c83474decce1946fa10e011 (patch) | |
tree | 1459360010b4719eb2203a59b9f01fac04ed8a34 /src/gallium/drivers/etnaviv/etnaviv_screen.c | |
parent | d34705c89139d5a6917dbfbafd537809e39fdf8c (diff) |
etnaviv: disable integer vertex formats on pre-HALTI2 hardware
Signed-off-by: Jonathan Marek <[email protected]>
Reviewed-by: Christian Gmeiner <[email protected]>
Diffstat (limited to 'src/gallium/drivers/etnaviv/etnaviv_screen.c')
-rw-r--r-- | src/gallium/drivers/etnaviv/etnaviv_screen.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gallium/drivers/etnaviv/etnaviv_screen.c b/src/gallium/drivers/etnaviv/etnaviv_screen.c index 823042a1f25..cec94cc333d 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_screen.c +++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c @@ -435,6 +435,18 @@ gpu_supports_render_format(struct etna_screen *screen, enum pipe_format format, } static bool +gpu_supports_vertex_format(struct etna_screen *screen, enum pipe_format format) +{ + if (translate_vertex_format_type(format) == ETNA_NO_MATCH) + return false; + + if (util_format_is_pure_integer(format)) + return VIV_FEATURE(screen, chipMinorFeatures4, HALTI2); + + return true; +} + +static bool etna_screen_is_format_supported(struct pipe_screen *pscreen, enum pipe_format format, enum pipe_texture_target target, @@ -472,7 +484,7 @@ etna_screen_is_format_supported(struct pipe_screen *pscreen, } if (usage & PIPE_BIND_VERTEX_BUFFER) { - if (translate_vertex_format_type(format) != ETNA_NO_MATCH) + if (gpu_supports_vertex_format(screen, format)) allowed |= PIPE_BIND_VERTEX_BUFFER; } |