diff options
author | Chia-I Wu <[email protected]> | 2019-05-14 10:14:03 -0700 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2019-05-15 20:51:28 +0000 |
commit | cdcf38b98a7bfdfda5836d6a4cebb6cca074e5ff (patch) | |
tree | ba623b9f23f0b15c137460a2b0279dea7ba6f6f3 /src | |
parent | a62ab178cecadae8ead16c0910707c2218e856e7 (diff) |
virgl: honor DISCARD_WHOLE_RESOURCE in virgl_res_needs_readback
Signed-off-by: Chia-I Wu <[email protected]>
Reviewed-by: Alexandros Frantzis <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/virgl/virgl_resource.c | 3 |
1 files changed, 2 insertions, 1 deletions
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)) |