summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/virgl/virgl_streamout.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_streamout.c b/src/gallium/drivers/virgl/virgl_streamout.c
index 125973d29fb..8fb7f26c868 100644
--- a/src/gallium/drivers/virgl/virgl_streamout.c
+++ b/src/gallium/drivers/virgl/virgl_streamout.c
@@ -76,10 +76,16 @@ static void virgl_set_so_targets(struct pipe_context *ctx,
struct virgl_context *vctx = virgl_context(ctx);
int i;
for (i = 0; i < num_targets; i++) {
- if (targets[i])
+ if (targets[i]) {
+ struct virgl_winsys *vws = virgl_screen(vctx->base.screen)->vws;
+ struct virgl_resource *res = virgl_resource(targets[i]->buffer);
+
pipe_resource_reference(&vctx->so_targets[i].base.buffer, targets[i]->buffer);
- else
+
+ vws->emit_res(vws, vctx->cbuf, res->hw_res, FALSE);
+ } else {
pipe_resource_reference(&vctx->so_targets[i].base.buffer, NULL);
+ }
}
for (i = num_targets; i < vctx->num_so_targets; i++)
pipe_resource_reference(&vctx->so_targets[i].base.buffer, NULL);