dri3: Only update number of back buffers in loader_dri3_get_buffers
authorMichel Dänzer <michel.daenzer@amd.com>
Fri, 27 Apr 2018 15:41:48 +0000 (17:41 +0200)
committerMichel Dänzer <michel@daenzer.net>
Wed, 9 May 2018 13:40:41 +0000 (15:40 +0200)
commit6f81e07ecb8c0793dc482307d5d96fd3df95b7d2
tree46f575f04144dede779d525369ab9d97fecd0d6e
parent2cf64fdb4623cb145e51f615cf0baf85de23234d
dri3: Only update number of back buffers in loader_dri3_get_buffers

And only free no longer needed back buffers there as well.

We want to stick to the same back buffer throughout a frame, otherwise
we can run into various issues.

Bugzilla: https://bugs.freedesktop.org/105906
Bugzilla: https://bugs.freedesktop.org/106399
Fixes: 3160cb86aa92 "egl/x11: Re-allocate buffers if format is suboptimal"
Reported-by: Sergii Romantsov <sergii.romantsov@globallogic.com>
Tested-by: Eero Tamminen <eero.t.tamminen@intel.com>
Acked-by: Daniel Stone <daniels@collabora.com>
src/loader/loader_dri3_helper.c