vulkan: Add a pipeline cache
authorBenjamin Otte <otte@redhat.com>
Mon, 26 Jun 2023 03:10:16 +0000 (05:10 +0200)
committerBenjamin Otte <otte@redhat.com>
Mon, 26 Jun 2023 18:28:11 +0000 (20:28 +0200)
commit684a015c9852ede9d57103852217b428546fe472
tree8c3e846fe79f55cc48c4ce9550277be4806a37f0
parentc6c637fe2156d6433b708b7dae6a6b9e8fb25162
vulkan: Add a pipeline cache

Make the display handle the cache, because we only need one.

We store the cache in
  $CACHE_DIR/gtk-4.0/vulkan-pipeline-cache/$UUID.$VERSION
so we regenerate caches for each different device (different UUID) and
each different driver version.

We also keep track of the etag of the cache file, so if 2 different
applications update the cache, we can detect that.
Vulkan allows merging caches, so the 2nd app reloads the new cache file
and merges it into its cache before saving.
gdk/gdkdisplayprivate.h
gdk/gdkvulkancontext.c
gdk/gdkvulkancontextprivate.h
gsk/vulkan/gskvulkanpipeline.c