virgl: Deduplicate checks for resource caching
authorAlexandros Frantzis <alexandros.frantzis@collabora.com>
Tue, 4 Jun 2019 13:40:33 +0000 (16:40 +0300)
committerChia-I Wu <olvaffe@gmail.com>
Sat, 8 Jun 2019 04:45:20 +0000 (21:45 -0700)
commit8eb8222c102ee6cd38a01e7df952ea87e1ca4f42
tree526c56871cdaa5fa697227e1553ad3af58afcef8
parente0ffcdf16a61a41f2a2e4e2c0dca94cf506ba17e
virgl: Deduplicate checks for resource caching

Also fixes a missed check for VIRGL_BIND_CUSTOM in one of the duplicate
code snippets.

Note that legacy fences also use VIRGL_BIND_CUSTOM, but we ensured they
don't go through the cache in the previous commit.

Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
src/gallium/winsys/virgl/drm/virgl_drm_winsys.c
src/gallium/winsys/virgl/drm/virgl_drm_winsys.h
src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.c
src/gallium/winsys/virgl/vtest/virgl_vtest_winsys.h