From: Chia-I Wu Date: Tue, 14 May 2019 17:14:03 +0000 (-0700) Subject: virgl: honor DISCARD_WHOLE_RESOURCE in virgl_res_needs_readback X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cdcf38b98a7bfdfda5836d6a4cebb6cca074e5ff;p=mesa.git virgl: honor DISCARD_WHOLE_RESOURCE in virgl_res_needs_readback Signed-off-by: Chia-I Wu Reviewed-by: Alexandros Frantzis --- 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))