summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/gpu_thread.cpp3
-rw-r--r--src/video_core/shader/const_buffer_locker.cpp10
-rw-r--r--src/video_core/shader/const_buffer_locker.h1
3 files changed, 6 insertions, 8 deletions
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp
index 3efa3d8d0..2cdf1aa7f 100644
--- a/src/video_core/gpu_thread.cpp
+++ b/src/video_core/gpu_thread.cpp
@@ -71,8 +71,7 @@ void ThreadManager::SubmitList(Tegra::CommandList&& entries) {
}
void ThreadManager::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) {
- PushCommand(SwapBuffersCommand(framebuffer ? *framebuffer
- : std::optional<const Tegra::FramebufferConfig>{}));
+ PushCommand(SwapBuffersCommand(framebuffer ? std::make_optional(*framebuffer) : std::nullopt));
}
void ThreadManager::FlushRegion(CacheAddr addr, u64 size) {
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"