loader_dri3: Make sure we have an updated back v3
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 11 Aug 2017 07:49:54 +0000 (09:49 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 17 Aug 2017 05:39:42 +0000 (07:39 +0200)
commit0cc4c7e33ed7700fc20b6a642a74599a241e0811
tree734bb3e5619007026d1d4caeef3eab6b36301510
parent7c3e3c0faf7dfff61762fb7bc3299f5d7528b91e
loader_dri3: Make sure we have an updated back v3

With GLX_SWAP_COPY_OML and GLX_SWAP_EXCHANGE_OML it may happen in situations
when glXSwapBuffers() is immediately followed by for example another
glXSwapBuffers() or glXCopyBuffers() or back buffer age querying, that we
haven't yet allocated and initialized a new back buffer because there was
no GL rendering in between.

Make sure that we have a back buffer in those situations.

v2: Eliminate the drawable have_back_format member.
v3: Make sure we re-initialize the back even if it exists.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/loader/loader_dri3_helper.c
src/loader/loader_dri3_helper.h