Improve shader cache hashing
authorJari Komppa <jari.komppa@siru.fi>
Wed, 6 Mar 2019 08:41:25 +0000 (10:41 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 20 Mar 2019 09:10:57 +0000 (05:10 -0400)
commitf6abb160c141cce3fa86153176ccb800ba0b0218
treef0baae5bd88d237259279db3030d885f5ce00a4d
parent1225d4ab8375e88b39f73bc946a7afcb51aa8156
Improve shader cache hashing

This change adds FNV-1 hash algorithm and a check whether a shader is
already in the cache before writing it there. In multi-threaded shader
compilation the cache might have written multiple copies of the same
shader into the cache, wasting disk space.

Affects:

None

Components: Vulkan

VK-GL-CTS issue: 1641

Change-Id: Ideaed34f49994f5da50b75066e611e60023eccb1
external/vulkancts/framework/vulkan/vkPrograms.cpp