mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
virgl: honor DISCARD_WHOLE_RESOURCE in virgl_res_needs_readback
Signed-off-by: Chia-I Wu <olvaffe@gmail.com> Reviewed-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
This commit is contained in:
parent
a62ab178ce
commit
cdcf38b98a
1 changed files with 2 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue