mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
st/egl: Fix eglCopyBuffers.
Flush before presenting.
(cherry picked from commit a31e2e3312)
This commit is contained in:
parent
0dc5b97ddd
commit
55fb7269f0
1 changed files with 5 additions and 6 deletions
|
|
@ -670,14 +670,13 @@ egl_g3d_copy_buffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf,
|
|||
|
||||
ptex = get_pipe_resource(gdpy->native, nsurf, NATIVE_ATTACHMENT_FRONT_LEFT);
|
||||
if (ptex) {
|
||||
struct pipe_resource *psrc = gsurf->render_texture;
|
||||
struct pipe_box src_box;
|
||||
|
||||
u_box_origin_2d(ptex->width0, ptex->height0, &src_box);
|
||||
if (psrc) {
|
||||
gdpy->pipe->resource_copy_region(gdpy->pipe, ptex, 0, 0, 0, 0,
|
||||
gsurf->render_texture, 0, &src_box);
|
||||
nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
|
||||
}
|
||||
gdpy->pipe->resource_copy_region(gdpy->pipe, ptex, 0, 0, 0, 0,
|
||||
gsurf->render_texture, 0, &src_box);
|
||||
gdpy->pipe->flush(gdpy->pipe, PIPE_FLUSH_RENDER_CACHE, NULL);
|
||||
nsurf->present(nsurf, NATIVE_ATTACHMENT_FRONT_LEFT, FALSE, 0);
|
||||
|
||||
pipe_resource_reference(&ptex, NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue