diff options
author | Dave Airlie <airlied@gmail.com> | 2015-03-18 15:18:28 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-06-16 12:34:27 +1000 |
commit | 5af87dabffe58f8256a1190a80c1e62fedc3c975 (patch) | |
tree | 5756081bae08a7fcd034f30fe6b93a8cbbf3afa7 | |
parent | fa9e4b13e16df29e332cdd1cfcfcd1e52ad099a8 (diff) |
virgl: flush if reading back tfb buffer.
Since these can remain bound across cmd bufs, we should
flush if we want to read it back.
-rw-r--r-- | src/gallium/drivers/virgl/virgl_buffer.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/virgl/virgl_buffer.c b/src/gallium/drivers/virgl/virgl_buffer.c index 82313918ae1..ac68a471cdc 100644 --- a/src/gallium/drivers/virgl/virgl_buffer.c +++ b/src/gallium/drivers/virgl/virgl_buffer.c @@ -33,6 +33,8 @@ static void *virgl_buffer_transfer_map(struct pipe_context *ctx, ctx->flush(ctx, NULL, 0); else if ((usage & PIPE_TRANSFER_READ) && (vbuf->on_list == TRUE)) ctx->flush(ctx, NULL, 0); + else if ((usage & PIPE_TRANSFER_READ) && (resource->bind == PIPE_BIND_STREAM_OUTPUT)) + ctx->flush(ctx, NULL, 0); trans = util_slab_alloc(&vctx->texture_transfer_pool); if (trans == NULL) |