Reuse binary indices when rebuilding SPIR-V binaries
authorPyry Haulos <phaulos@google.com>
Fri, 28 Oct 2016 22:35:30 +0000 (07:35 +0900)
committerPyry Haulos <phaulos@google.com>
Fri, 11 Nov 2016 17:15:46 +0000 (12:15 -0500)
commitd57bc1191f327c63ab3756f77ad75f54e74d387f
tree33b3f396dd8fe5e5616ad56be6dc63ee25ae3656
parentdbd01fe4d142b71027590dd197371a64c62fc654
Reuse binary indices when rebuilding SPIR-V binaries

When prebuilt SPIR-V binaries are stored in a version control system,
we want to minimize churn (rewritten files) when updating binaries in
response to test or compiler changes.

This change makes vk::BinaryRegistyWriter significantly smarter when
updating binary registry. Old binary files (and thus indices) are
reused if possible. Any newly unused binaries are removed, and new
indices are allocated only for binaries that haven't been present
before.

Change-Id: Ieac61ff32821e4381480dd56ff27dbcdd44e50cb
external/vulkancts/framework/vulkan/vkBinaryRegistry.cpp
external/vulkancts/framework/vulkan/vkBinaryRegistry.hpp
external/vulkancts/modules/vulkan/vktBuildPrograms.cpp