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 detached
Status Job ID Name Coverage
  Containers Build
passed #387417
debian

00:00:27

 
  Build+Test
passed #387419
meson-clang

00:07:55

passed #387423
meson-clover

00:09:00

passed #387422
meson-main

00:06:27

passed #387418
meson-swr-glvnd

00:05:39

passed #387424
meson-vulkan

00:02:59

passed #387426
scons-llvm

00:04:02

passed #387425
scons-nollvm

00:06:29

passed #387420
scons-swr

00:04:53

passed #387421
scons-win64

00:06:02