aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Hetu <sugoi@google.com>2019-10-02 10:24:42 -0400
committerAlexis Hétu <sugoi@google.com>2019-10-02 16:25:02 +0000
commit0597afff0763df5cd67890c81f77e5f431516a15 (patch)
tree5f512ed851a9ec44150eb6742aad02e0b377c847
parent4bbb9841e56dc856d42abd761a4be66f42036a75 (diff)
downloadswiftshader-0597afff0763df5cd67890c81f77e5f431516a15.tar.gz
Strict weak ordering for SamplingRoutineCache::Key
Implemented operator< with std::tie to force strict weak ordering. Bug b/141863676 Change-Id: If14328922f0c8c62fd92d74f1bcca0c9a2e77f4c Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/36929 Presubmit-Ready: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Tested-by: Alexis Hétu <sugoi@google.com>
-rw-r--r--src/Vulkan/VkDevice.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Vulkan/VkDevice.hpp b/src/Vulkan/VkDevice.hpp
index 83ce1e999..7dac84bd6 100644
--- a/src/Vulkan/VkDevice.hpp
+++ b/src/Vulkan/VkDevice.hpp
@@ -122,7 +122,7 @@ inline bool vk::Device::SamplingRoutineCache::Key::operator == (const Key& rhs)
inline bool vk::Device::SamplingRoutineCache::Key::operator < (const Key& rhs) const
{
- return instruction < rhs.instruction || sampler < rhs.sampler || imageView < rhs.imageView;
+ return std::tie(instruction, sampler, imageView) < std::tie(rhs.instruction, rhs.sampler, rhs.imageView);
}
inline std::size_t vk::Device::SamplingRoutineCache::Key::Hash::operator() (const Key& key) const noexcept