diff options
author | Alexis Hetu <sugoi@google.com> | 2019-10-02 10:24:42 -0400 |
---|---|---|
committer | Alexis Hétu <sugoi@google.com> | 2019-10-02 16:25:02 +0000 |
commit | 0597afff0763df5cd67890c81f77e5f431516a15 (patch) | |
tree | 5f512ed851a9ec44150eb6742aad02e0b377c847 | |
parent | 4bbb9841e56dc856d42abd761a4be66f42036a75 (diff) | |
download | swiftshader-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.hpp | 2 |
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 |