From cdcf38b98a7bfdfda5836d6a4cebb6cca074e5ff Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 14 May 2019 10:14:03 -0700 Subject: virgl: honor DISCARD_WHOLE_RESOURCE in virgl_res_needs_readback Signed-off-by: Chia-I Wu Reviewed-by: Alexandros Frantzis --- src/gallium/drivers/virgl/virgl_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/virgl/virgl_resource.c b/src/gallium/drivers/virgl/virgl_resource.c index 52197b80175..5d1ee234ea2 100644 --- a/src/gallium/drivers/virgl/virgl_resource.c +++ b/src/gallium/drivers/virgl/virgl_resource.c @@ -93,7 +93,8 @@ bool virgl_res_needs_readback(struct virgl_context *vctx, struct virgl_resource *res, unsigned usage, unsigned level) { - if (usage & PIPE_TRANSFER_DISCARD_RANGE) + if (usage & (PIPE_TRANSFER_DISCARD_RANGE | + PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE)) return false; if (res->clean_mask & (1 << level)) -- cgit v1.2.3