diff options
author | Christian König <christian.koenig@amd.com> | 2014-01-28 15:22:05 +0100 |
---|---|---|
committer | Christian König <christian.koenig@amd.com> | 2014-01-28 15:59:10 +0100 |
commit | bb3022d8bee65357021e4be153e18da47de46245 (patch) | |
tree | 4b616d7f07f5af89bf214027c1b37221b7c9d399 | |
parent | c61d1d5f09f82c38c66762eb881c8023b94c35e3 (diff) |
st/vdpau: add flush on unmapxbmc-test
Flush the context when we unmap a buffer, otherwise VDPAU might
start rendering the next frame while we still reference that buffer.
Signed-off-by: Christian König <christian.koenig@amd.com>
-rw-r--r-- | src/mesa/state_tracker/st_vdpau.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_vdpau.c b/src/mesa/state_tracker/st_vdpau.c index 4317b9e347..c5b4780ce5 100644 --- a/src/mesa/state_tracker/st_vdpau.c +++ b/src/mesa/state_tracker/st_vdpau.c @@ -47,6 +47,7 @@ #include "st_context.h" #include "st_texture.h" #include "st_format.h" +#include "st_cb_flush.h" static void st_vdpau_map_surface(struct gl_context *ctx, GLenum target, GLenum access, @@ -163,6 +164,7 @@ st_vdpau_unmap_surface(struct gl_context *ctx, GLenum target, GLenum access, struct gl_texture_image *texImage, const GLvoid *vdpSurface, GLuint index) { + struct st_context *st = st_context(ctx); struct st_texture_object *stObj = st_texture_object(texObj); struct st_texture_image *stImage = st_texture_image(texImage); @@ -171,6 +173,8 @@ st_vdpau_unmap_surface(struct gl_context *ctx, GLenum target, GLenum access, pipe_resource_reference(&stImage->pt, NULL); _mesa_dirty_texobj(ctx, texObj); + + st_flush(st, NULL, 0); } void |