virgl: Add simple disk cache
authorStéphane Marchesin <marcheu@chromium.org>
Tue, 13 Apr 2021 04:26:26 +0000 (06:26 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 14 Apr 2021 07:37:34 +0000 (07:37 +0000)
commitd6db4d2e08100b12fe6ac539f419768b3b412643
tree93b49f01f429885b666369c2f5012a4585f7fd56
parenta86450e00a224efe3999411064fcdd791411d434
virgl: Add simple disk cache

Since virgl has no backend compilation, this is just a disk cache for the
frontend. As such it is very simple and only implements enough for
get_disk_shader_cache() to work.

With portal2 apitrace:
Before: 100.65 fps
After: 129.051 fps

Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10200>
src/gallium/drivers/virgl/virgl_screen.c
src/gallium/drivers/virgl/virgl_screen.h