radv: implement radv_shader_create_cached()
authorDaniel Schürmann <daniel@schuermann.dev>
Mon, 20 Mar 2023 13:34:35 +0000 (14:34 +0100)
committerMarge Bot <emma+marge@anholt.net>
Tue, 11 Apr 2023 11:38:15 +0000 (11:38 +0000)
commit9b3679aff2adfb4097c4eacd853905bc049c8544
tree8292aeb838472f46fbccd300d0aae998dcc534cc
parent55cc2fb08855a6e3450c62f2b713915136ed559d
radv: implement radv_shader_create_cached()

This function takes a radv_shader_binary and writes it to the
disk cache before creating and returning a radv_shader cache entry.
The key of the cache entry is the full SHA1 hash of the binary.
This way, we will be able to deduplicate identical shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22030>
src/amd/vulkan/radv_pipeline_cache.c
src/amd/vulkan/radv_shader.h