loader_dri3/glx/egl: Optionally use a blit context for blitting operations
authorThomas Hellstrom <thellstrom@vmware.com>
Thu, 10 Aug 2017 13:35:39 +0000 (15:35 +0200)
committerThomas Hellstrom <thellstrom@vmware.com>
Thu, 17 Aug 2017 05:39:42 +0000 (07:39 +0200)
commit2db95482964caf872f8f4b0ad6e0c34b3402c774
tree88439f4993669e48a60935719b040d57f18543ab
parent5198e48a0d9a991d897cf4c71fdb82ac0e43b025
loader_dri3/glx/egl: Optionally use a blit context for blitting operations

The code was relying on us always having a current context for client local
image blit operations. Otherwise the blit would be skipped. However,
glxSwapBuffers, for example, doesn't require a current context and that was a
common problem in the dri1 era. It seems the problem has resurfaced with dri3.

If we don't have a current context when we want to blit, try creating a private
dri context and maintain a context cache of a single context.

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