summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/egl/common
diff options
context:
space:
mode:
authorMartin Andersson <[email protected]>2013-12-26 10:33:28 +0100
committerMarek Olšák <[email protected]>2014-01-13 15:25:31 +0100
commitc156d245258842c41d1ffac06a08ee7eeb45b33f (patch)
treeeaf07dbaa92e1d2cc76dfc89a38f41e32bc9cc71 /src/gallium/state_trackers/egl/common
parent99abb87c63a46c2a0ace6c11076e35a0c2d2bc7e (diff)
st/egl: Flush resources before presentation
Fixes wayland regression on r600g due to fast clear introduced by commit edbbfac6. Signed-off-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/egl/common')
-rw-r--r--src/gallium/state_trackers/egl/common/native_helper.c15
-rw-r--r--src/gallium/state_trackers/egl/common/native_helper.h5
2 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/egl/common/native_helper.c b/src/gallium/state_trackers/egl/common/native_helper.c
index 4a77a502e87..856cbb6d675 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.c
+++ b/src/gallium/state_trackers/egl/common/native_helper.c
@@ -341,6 +341,21 @@ resource_surface_throttle(struct resource_surface *rsurf)
}
boolean
+resource_surface_flush_resource(struct resource_surface *rsurf,
+ struct native_display *ndpy,
+ enum native_attachment which)
+{
+ struct pipe_context *pipe = ndpy_get_copy_context(ndpy);
+
+ if (!pipe)
+ return FALSE;
+
+ pipe->flush_resource(pipe, rsurf->resources[which]);
+
+ return TRUE;
+}
+
+boolean
resource_surface_flush(struct resource_surface *rsurf,
struct native_display *ndpy)
{
diff --git a/src/gallium/state_trackers/egl/common/native_helper.h b/src/gallium/state_trackers/egl/common/native_helper.h
index 4c369a7ff1a..0b53b286e2d 100644
--- a/src/gallium/state_trackers/egl/common/native_helper.h
+++ b/src/gallium/state_trackers/egl/common/native_helper.h
@@ -91,6 +91,11 @@ resource_surface_copy_swap(struct resource_surface *rsurf,
boolean
resource_surface_throttle(struct resource_surface *rsurf);
+boolean
+resource_surface_flush_resource(struct resource_surface *rsurf,
+ struct native_display *ndpy,
+ enum native_attachment which);
+
/**
* Flush pending rendering using the copy context. This function saves a
* marker for upcoming throttles.