summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2019-11-27 20:26:22 +0100
committerGitHub <noreply@github.com>2019-11-27 20:26:22 +0100
commit40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0 (patch)
treef606e543bcc33a9164b0f5841df32bfc78c01a44 /src
parentMerge pull request #3143 from ReinUsesLisp/indexing-bug (diff)
parentvideo_core/const_buffer_locker: Make use of std::tie in HasEqualKeys() (diff)
downloadyuzu-40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0.tar
yuzu-40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0.tar.gz
yuzu-40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0.tar.bz2
yuzu-40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0.tar.lz
yuzu-40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0.tar.xz
yuzu-40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0.tar.zst
yuzu-40ec1c22ce7507c8c9ec68ca9e9d4f6a74ec8fe0.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/const_buffer_locker.cpp10
-rw-r--r--src/video_core/shader/const_buffer_locker.h1
2 files changed, 5 insertions, 6 deletions
diff --git a/src/video_core/shader/const_buffer_locker.cpp b/src/video_core/shader/const_buffer_locker.cpp
index b65399f91..a4a0319eb 100644
--- a/src/video_core/shader/const_buffer_locker.cpp
+++ b/src/video_core/shader/const_buffer_locker.cpp
@@ -2,11 +2,9 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#pragma once
-
#include <algorithm>
-#include <memory>
-#include "common/assert.h"
+#include <tuple>
+
#include "common/common_types.h"
#include "video_core/engines/maxwell_3d.h"
#include "video_core/engines/shader_type.h"
@@ -104,8 +102,8 @@ bool ConstBufferLocker::IsConsistent() const {
}
bool ConstBufferLocker::HasEqualKeys(const ConstBufferLocker& rhs) const {
- return keys == rhs.keys && bound_samplers == rhs.bound_samplers &&
- bindless_samplers == rhs.bindless_samplers;
+ return std::tie(keys, bound_samplers, bindless_samplers) ==
+ std::tie(rhs.keys, rhs.bound_samplers, rhs.bindless_samplers);
}
} // namespace VideoCommon::Shader
diff --git a/src/video_core/shader/const_buffer_locker.h b/src/video_core/shader/const_buffer_locker.h
index 50a8ce42a..d32e2d657 100644
--- a/src/video_core/shader/const_buffer_locker.h
+++ b/src/video_core/shader/const_buffer_locker.h
@@ -4,6 +4,7 @@
#pragma once
+#include <optional>
#include <unordered_map>
#include "common/common_types.h"
#include "common/hash.h"