st/dri: use st->flush callback to flush the backbuffer
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Wed, 27 Nov 2019 10:25:40 +0000 (11:25 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Tue, 10 Dec 2019 08:25:28 +0000 (09:25 +0100)
commit87f7ec8a2ca393100bddb37f0b83488d7c158d4d
tree674f22460a7ca67cd4fbb33a6f5a52b25b924494
parentcc0d0afe3b06e628fdd5576da07c50a15f859e98
st/dri: use st->flush callback to flush the backbuffer

Previously the flush was done before the call to st->flush but
could lead to problems as FLUSH_VERTICES could push some work
that would change the backbuffer (or modify it).

With this commit, all the backbuffer flushing code is executed
right before the call to st_flush.

Closes: https://gitlab.freedesktop.org/drm/amd/issues/842
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=205049

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/state_trackers/dri/dri_drawable.c