diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-26 16:13:47 -0300 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-03-09 18:40:06 -0300 |
commit | bd8b9bbcee93549f323352f227ff44d0e79e0ad4 (patch) | |
tree | 5c68e7ab171db3f3d31bf27cd573c54a918f0708 /src/video_core/shader/track.cpp | |
parent | 22e825a3bc0d9bfb5f8c29a50724c2887014dc02 (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/track.cpp')
-rw-r--r-- | src/video_core/shader/track.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/video_core/shader/track.cpp b/src/video_core/shader/track.cpp index 15e22b9fac..b1a0aa00c3 100644 --- a/src/video_core/shader/track.cpp +++ b/src/video_core/shader/track.cpp @@ -94,13 +94,10 @@ std::tuple<Node, TrackSampler> ShaderIR::TrackBindlessSampler(Node tracked, cons } auto [gpr, base_offset] = *pair; const auto offset_inm = std::get_if<ImmediateNode>(&*base_offset); - auto gpu_driver = locker.AccessGuestDriverProfile(); - if (gpu_driver == nullptr) { - return {}; - } + const auto& gpu_driver = locker.AccessGuestDriverProfile(); const u32 bindless_cv = NewCustomVariable(); - const Node op = Operation(OperationCode::UDiv, NO_PRECISE, gpr, - Immediate(gpu_driver->GetTextureHandlerSize())); + const Node op = + Operation(OperationCode::UDiv, gpr, Immediate(gpu_driver.GetTextureHandlerSize())); const Node cv_node = GetCustomVariable(bindless_cv); Node amend_op = Operation(OperationCode::Assign, cv_node, std::move(op)); |