diff options
author | Chia-I Wu <[email protected]> | 2019-05-08 14:33:28 -0700 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2019-05-24 17:37:40 +0000 |
commit | 424ec2356b5c8db416a6a79f23e6e9ffddc9521d (patch) | |
tree | c6a0a256b5769ffc472b936de87c3936dac079bd /src/gallium | |
parent | d4e8a44bf6403109f0e6e22650b0379d305712db (diff) |
virgl: add missing emit_res for SO targets
Signed-off-by: Chia-I Wu <[email protected]>
Reviewed-by: Gurchetan Singh <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_streamout.c | 10 |
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); |