mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-09 03:50:34 +01:00
glamor: Force to flush when copying an exporting pixmap
Consider the following scenario involving egl-create-pbuffer-surface in Piglit:
egl-create-pbuffer-surface(Mesa) Xorg
eglCreatePbufferSurface();
ProcCreatePixmap()
xcb_dri3_buffers_from_pixmap();
proc_dri3_buffers_from_pixmap()
glamor_egl_fds_from_pixmap()
glamor_make_pixmap_exportable()
glamor_copy_fbo_fbo_draw()
( no flush )
eglBindTexImage();
draw();
glReadPixels(); BlockHandler()
(flush) (flush)
In this case, there is no guarantee which command stream will go into GPU first.
There is a small chance that pixmap BO importer's render buffer could be overwritten
by glamor.
v2: perform the flush at the highest level possible (Michel)
Signed-off-by: Luc Ma <luc@sietium.com>
This commit is contained in:
parent
bdacb100bf
commit
dd78a6969c
1 changed files with 5 additions and 0 deletions
|
|
@ -359,6 +359,11 @@ glamor_make_pixmap_exportable(PixmapPtr pixmap, Bool modifiers_ok)
|
|||
0, 0, width, height, 0, 0);
|
||||
FreeScratchGC(scratch_gc);
|
||||
|
||||
/* In case that the pixmap backing BO importer's command stream accidentally
|
||||
* gets flushed first.
|
||||
*/
|
||||
glFlush();
|
||||
|
||||
/* Now, swap the tex/gbm/EGLImage/etc. of the exported pixmap into
|
||||
* the original pixmap struct.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue