summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNayan Deshmukh <nayan26deshmukh@gmail.com>2016-09-20 04:52:11 (GMT)
committerChristian König <christian.koenig@amd.com>2016-09-20 09:18:07 (GMT)
commite4cc2276c1fce9bce81834c348c3fc7e97ed6321 (patch)
treea83075bf305a5000fcea85d7f9900898a7e6d80a
parent853e80f5a09f85477167aac2789a91a2755e23f0 (diff)
downloadmesa-e4cc2276c1fce9bce81834c348c3fc7e97ed6321.tar.gz
mesa-e4cc2276c1fce9bce81834c348c3fc7e97ed6321.tar.xz
st/vdpau: flush the context before calling flush_frontbuffer
so that the texture is rendered to back buffer before calling flush_frontbuffer and can be copied to a different buffer in the function 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/vdpau/presentation.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/vdpau/presentation.c b/src/gallium/state_trackers/vdpau/presentation.c
index 2862eaf..f35d73a 100644
--- a/src/gallium/state_trackers/vdpau/presentation.c
+++ b/src/gallium/state_trackers/vdpau/presentation.c
@@ -271,11 +271,14 @@ vlVdpPresentationQueueDisplay(VdpPresentationQueue presentation_queue,
}
vscreen->set_next_timestamp(vscreen, earliest_presentation_time);
- pipe->screen->flush_frontbuffer(pipe->screen, tex, 0, 0,
- vscreen->get_private(vscreen), NULL);
+ // flush before calling flush_frontbuffer so that rendering is flushed
+ // to back buffer so the texture can be copied in flush_frontbuffer
pipe->screen->fence_reference(pipe->screen, &surf->fence, NULL);
pipe->flush(pipe, &surf->fence, 0);
+ pipe->screen->flush_frontbuffer(pipe->screen, tex, 0, 0,
+ vscreen->get_private(vscreen), NULL);
+
pq->last_surf = surf;
if (dump_window == -1) {