summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayan Deshmukh <nayan26deshmukh@gmail.com>2016-09-20 10:22:12 +0530
committerChristian König <christian.koenig@amd.com>2016-09-20 11:18:29 +0200
commit0301858a316af7d831655778cf69bc49b12ee6ac (patch)
tree24e44596429f802a0372542009eba8493a1dd8bb
parente4cc2276c1fce9bce81834c348c3fc7e97ed6321 (diff)
st/va: flush the context before calling flush_frontbuffer(v2)
so that the texture is rendered to back buffer before calling flush_frontbuffer and can be copied to a different buffer in the function v2: change comment style Signed-off-by: Nayan Deshmukh <nayan26deshmukh@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Christian König <christian.koenig@amd.com>
-rw-r--r--src/gallium/state_trackers/va/surface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
index 00df69db72..115db43f79 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -321,10 +321,14 @@ vlVaPutSurface(VADriverContextP ctx, VASurfaceID surface_id, void* draw, short s
return status;
}
+ /* flush before calling flush_frontbuffer so that rendering is flushed
+ * to back buffer so the texture can be copied in flush_frontbuffer
+ */
+ drv->pipe->flush(drv->pipe, NULL, 0);
+
screen->flush_frontbuffer(screen, tex, 0, 0,
vscreen->get_private(vscreen), NULL);
- drv->pipe->flush(drv->pipe, NULL, 0);
pipe_resource_reference(&tex, NULL);
pipe_surface_reference(&surf_draw, NULL);