virgl: Clear the valid buffer range when possible

If we are discarding the whole resource in a synchronized way, the
resource storage is now unused, either because we have created new
resource storage, or because we have waited for the existing resource
storage to become unused. We can thus mark the storage as uninitialized,
but only if the resource is not host writable (in which case we can't
clear the valid range, since that would result in missed readbacks in
future transfers).

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
10 jobs for !1159 with virgl-invalidate-buffer in 15 minutes and 8 seconds (queued for 15 seconds)
latest merge request