diff options
author | Grigori Goronzy <[email protected]> | 2013-10-01 20:02:10 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-10-01 21:42:02 +0200 |
commit | 6349b3235cc07d396325863ece9ca6261daf8e77 (patch) | |
tree | 4f12e93bd70a711533e6e69c1d3fb54cdb7509ae /src | |
parent | d99b5b2d8218fee49b2305c95efb9ed386e91f74 (diff) |
st/egl: flush resources before presentation
Fixes regression on r600g due to fast clear introduced by commit
edbbfac6.
Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/state_trackers/egl/x11/native_dri2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/egl/x11/native_dri2.c b/src/gallium/state_trackers/egl/x11/native_dri2.c index 3aa7c17dbc5..3c58979e295 100644 --- a/src/gallium/state_trackers/egl/x11/native_dri2.c +++ b/src/gallium/state_trackers/egl/x11/native_dri2.c @@ -290,6 +290,12 @@ dri2_surface_flush_frontbuffer(struct native_surface *nsurf) { struct dri2_surface *dri2surf = dri2_surface(nsurf); struct dri2_display *dri2dpy = dri2surf->dri2dpy; + struct native_display *ndpy = &dri2dpy->base; + struct pipe_context *pipe = ndpy_get_copy_context(ndpy); + + /* flush buffer */ + pipe->flush_resource(pipe, dri2surf->textures[NATIVE_ATTACHMENT_FRONT_LEFT]); + pipe->flush(pipe, NULL, 0); /* copy to real front buffer */ if (dri2surf->have_fake) @@ -313,9 +319,14 @@ dri2_surface_swap_buffers(struct native_surface *nsurf, int num_rects, { struct dri2_surface *dri2surf = dri2_surface(nsurf); struct dri2_display *dri2dpy = dri2surf->dri2dpy; + struct native_display *ndpy = &dri2dpy->base; + struct pipe_context *pipe = ndpy_get_copy_context(ndpy); /* copy to front buffer */ if (dri2surf->have_back) { + pipe->flush_resource(pipe, dri2surf->textures[NATIVE_ATTACHMENT_BACK_LEFT]); + pipe->flush(pipe, NULL, 0); + if (num_rects > 0) x11_drawable_copy_buffers_region(dri2dpy->xscr, dri2surf->drawable, num_rects, rects, |