Mesa (master): st/egl: Fix eglCopyBuffers.
Chia-I Wu
olv at kemper.freedesktop.org
Wed Dec 22 06:22:41 UTC 2010
Module: Mesa
Branch: master
Commit: a31e2e3312cae5c4253a47dc30926ceb8c821ce3
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a31e2e3312cae5c4253a47dc30926ceb8c821ce3
Author: Chia-I Wu <olv at lunarg.com>
Date: Wed Dec 22 14:21:21 2010 +0800
st/egl: Fix eglCopyBuffers.
Flush before presenting.
---
.../state_trackers/egl/common/egl_g3d_api.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_api.c b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
index 07ea6dc..bce901a 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_api.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_api.c
@@ -665,14 +665,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);
}
More information about the mesa-commit
mailing list