xwayland/eglstream: Set ALU to GXCopy for blitting
The EGLstream backend's post damage function uses a shader and
glDrawArrays() to copy the data from the glamor's pixmap texture prior
to do the eglSwapBuffers().
However, glDrawArrays() can be affected by the GL state, and therefore
not reliably produce the expected copy, causing the content of the
buffer to be corrupted.
Make sure to set the ALU to GXCopy prior to call glDrawArrays() to get
the expected result.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Suggested-by: Michel Dänzer <mdaenzer@redhat.com>
(cherry picked from commit 012350e3db
)
This commit is contained in:
parent
96febe8ba4
commit
bdb4712da3
|
@ -33,6 +33,7 @@
|
|||
#define EGL_NO_X11
|
||||
#include <glamor_egl.h>
|
||||
#include <glamor.h>
|
||||
#include <glamor_priv.h>
|
||||
#include <glamor_transform.h>
|
||||
#include <glamor_transfer.h>
|
||||
|
||||
|
@ -727,6 +728,8 @@ xwl_glamor_eglstream_post_damage(struct xwl_window *xwl_window,
|
|||
* won't actually draw to it
|
||||
*/
|
||||
xwl_glamor_egl_make_current(xwl_screen);
|
||||
glamor_set_alu(xwl_screen->screen, GXcopy);
|
||||
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
|
||||
if (eglGetCurrentSurface(EGL_READ) != xwl_pixmap->surface ||
|
||||
|
|
Loading…
Reference in New Issue
Block a user