aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/shader/const_buffer_locker.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-02-26 16:13:47 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-03-09 18:40:06 -0300
commitbd8b9bbcee93549f323352f227ff44d0e79e0ad4 (patch)
tree5c68e7ab171db3f3d31bf27cd573c54a918f0708 /src/video_core/shader/const_buffer_locker.cpp
parent22e825a3bc0d9bfb5f8c29a50724c2887014dc02 (diff)
gl_shader_cache: Rework shader cache and remove post-specializations
Instead of pre-specializing shaders and then post-specializing them, drop the later and only "specialize" the shader while decoding it.
Diffstat (limited to 'src/video_core/shader/const_buffer_locker.cpp')
-rw-r--r--src/video_core/shader/const_buffer_locker.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/shader/const_buffer_locker.cpp b/src/video_core/shader/const_buffer_locker.cpp
index 0638be8cb..c859dd7ca 100644
--- a/src/video_core/shader/const_buffer_locker.cpp
+++ b/src/video_core/shader/const_buffer_locker.cpp
@@ -14,8 +14,9 @@ namespace VideoCommon::Shader {
using Tegra::Engines::SamplerDescriptor;
-ConstBufferLocker::ConstBufferLocker(Tegra::Engines::ShaderType shader_stage)
- : stage{shader_stage} {}
+ConstBufferLocker::ConstBufferLocker(Tegra::Engines::ShaderType shader_stage,
+ VideoCore::GuestDriverProfile stored_guest_driver_profile)
+ : stage{shader_stage}, stored_guest_driver_profile{stored_guest_driver_profile} {}
ConstBufferLocker::ConstBufferLocker(Tegra::Engines::ShaderType shader_stage,
Tegra::Engines::ConstBufferEngineInterface& engine)
@@ -97,7 +98,7 @@ void ConstBufferLocker::SetBoundBuffer(u32 buffer) {
bool ConstBufferLocker::IsConsistent() const {
if (!engine) {
- return false;
+ return true;
}
return std::all_of(keys.begin(), keys.end(),
[this](const auto& pair) {