From cdcf38b98a7bfdfda5836d6a4cebb6cca074e5ff Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 14 May 2019 10:14:03 -0700 Subject: [PATCH] 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(-) 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)) -- 2.30.2