Revert "gallium/hud: don't use user vertex buffers"
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 10 Jun 2020 17:56:49 +0000 (19:56 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 16 Jun 2020 08:02:29 +0000 (08:02 +0000)
commit7b86920ae2e206ea2f3dc44e110483460cb2936b
tree74b0c0d1687ecbfe14a7cd8712516e958a451453
parent167fa2887f0928042dcb21bbc2fa89ae9a29897d
Revert "gallium/hud: don't use user vertex buffers"

The approach taken in this commit only works on drivers that expose
the PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT capability. For drivers
that don't, the buffer has been unmapped by the time we get to
hud_draw_colored_prims, leading to crashes.

It's not easy to fix the code, but drivers that do support coherent
mapping will most likely do the right think themseleves, so let's just
go back to using user-buffers here.

This reverts commit 4fe1fd4df40ac91b2783e3604fd81e6a6faf0cd2.

Fixes: 4fe1fd4df40 ("gallium/hud: don't use user vertex buffers")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3106
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5417>
src/gallium/auxiliary/hud/hud_context.c
src/gallium/auxiliary/hud/hud_private.h