summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/virgl/virgl_texture.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2019-05-15 15:34:44 -0700
committerChia-I Wu <olvaffe@gmail.com>2019-06-17 09:36:31 -0700
commit7e0508d9aa9575db7f608eae0c5337e2a0634197 (patch)
tree2f4f30cd93a09c2c90af6452c2c0de04bf6f7fe2 /src/gallium/drivers/virgl/virgl_texture.c
parentad1ef35dc1e7a0f905e856648727e00219a48ebe (diff)
virgl: save virgl_hw_res in virgl_transfer
When PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE is properly supported, virgl_transfer might refer to a different virgl_hw_res than virgl_resource does. We need to save the virgl_hw_res and use the saved one. Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Diffstat (limited to 'src/gallium/drivers/virgl/virgl_texture.c')
-rw-r--r--src/gallium/drivers/virgl/virgl_texture.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c
index 6e26493cb61..1de6d4f17db 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -296,7 +296,7 @@ static void flush_data(struct pipe_context *ctx,
const struct pipe_box *box)
{
struct virgl_winsys *vws = virgl_screen(ctx->screen)->vws;
- vws->transfer_put(vws, virgl_resource(trans->base.resource)->hw_res, box,
+ vws->transfer_put(vws, trans->hw_res, box,
trans->base.stride, trans->l_stride, trans->offset,
trans->base.level);
}