vulkan: Add a vk_pipeline_hash_shader_stage() helper
authorBoris Brezillon <boris.brezillon@collabora.com>
Wed, 22 Jun 2022 11:14:38 +0000 (04:14 -0700)
committerMarge Bot <emma+marge@anholt.net>
Tue, 28 Jun 2022 09:07:32 +0000 (09:07 +0000)
commit542538cf0212c4e24db01cda59b9ece55f51615e
treecc41d853064d348222b4732fce6dc18b5d4a0a38
parent5e5b54c9d1c3e724507f0f2fbd7d5e6381c1225e
vulkan: Add a vk_pipeline_hash_shader_stage() helper

All drivers implement some sort of shader hashing, but each of
them does it slightly differently. Let's provide a generic helper
to avoid new copies of the same logic and encourage new drivers
to use one of the already implemented function.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17186>
src/vulkan/runtime/vk_pipeline.c
src/vulkan/runtime/vk_pipeline.h