summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_shader_disk_cache.h
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-09-26 02:46:34 +0200
committerFernandoS27 <fsahmkow27@gmail.com>2019-10-25 15:01:31 +0200
commitec85648af3316d5e43c7b57fca55d0dad3d03f96 (patch)
treeb5cc21e8b027a27e69c8197202f98d0c36706978 /src/video_core/renderer_opengl/gl_shader_disk_cache.h
parentconst_buffer_locker: Minor style changes (diff)
downloadyuzu-ec85648af3316d5e43c7b57fca55d0dad3d03f96.tar
yuzu-ec85648af3316d5e43c7b57fca55d0dad3d03f96.tar.gz
yuzu-ec85648af3316d5e43c7b57fca55d0dad3d03f96.tar.bz2
yuzu-ec85648af3316d5e43c7b57fca55d0dad3d03f96.tar.lz
yuzu-ec85648af3316d5e43c7b57fca55d0dad3d03f96.tar.xz
yuzu-ec85648af3316d5e43c7b57fca55d0dad3d03f96.tar.zst
yuzu-ec85648af3316d5e43c7b57fca55d0dad3d03f96.zip
Diffstat (limited to 'src/video_core/renderer_opengl/gl_shader_disk_cache.h')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_disk_cache.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.h b/src/video_core/renderer_opengl/gl_shader_disk_cache.h
index 61b46d728..db23ada93 100644
--- a/src/video_core/renderer_opengl/gl_shader_disk_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.h
@@ -8,6 +8,7 @@
#include <optional>
#include <string>
#include <tuple>
+#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#include <utility>
@@ -19,6 +20,7 @@
#include "common/common_types.h"
#include "core/file_sys/vfs_vector.h"
#include "video_core/renderer_opengl/gl_shader_gen.h"
+#include "video_core/shader/const_buffer_locker.h"
namespace Core {
class System;
@@ -53,6 +55,7 @@ struct BaseBindings {
return !operator==(rhs);
}
};
+static_assert(std::is_trivially_copyable_v<BaseBindings>);
/// Describes the different variants a single program can be compiled.
struct ProgramVariant {
@@ -70,13 +73,20 @@ struct ProgramVariant {
}
};
+static_assert(std::is_trivially_copyable_v<ProgramVariant>);
+
/// Describes how a shader is used.
struct ShaderDiskCacheUsage {
u64 unique_identifier{};
ProgramVariant variant;
+ VideoCommon::Shader::KeyMap keys;
+ VideoCommon::Shader::BoundSamplerMap bound_samplers;
+ VideoCommon::Shader::BindlessSamplerMap bindless_samplers;
bool operator==(const ShaderDiskCacheUsage& rhs) const {
- return std::tie(unique_identifier, variant) == std::tie(rhs.unique_identifier, rhs.variant);
+ return std::tie(unique_identifier, variant, keys, bound_samplers, bindless_samplers) ==
+ std::tie(rhs.unique_identifier, rhs.variant, rhs.keys, rhs.bound_samplers,
+ rhs.bindless_samplers);
}
bool operator!=(const ShaderDiskCacheUsage& rhs) const {