summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorMai <mai.iam2048@gmail.com>2022-12-28 00:59:03 +0000
committerGitHub <noreply@github.com>2022-12-28 00:59:03 +0000
commit0900e68986a4fa2254fb3c459f73af4815979e45 (patch)
tree1c69cbfcc29dba6cb354823c23c75c546bb0b57a /Source/Core/VideoCommon/TextureCacheBase.cpp
parent9e9910df8b0c965e1a496d479ad94bc78f918817 (diff)
parent4549fb4acb1ab520dc6481fe4443cdd3d46bd8c2 (diff)
Merge pull request #11384 from AdmiralCurtiss/globals-pixelshadermanager
VideoCommon: De-globalize PixelShaderManager class.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index e6fa4f6fbe..14cf207034 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -1054,18 +1054,22 @@ static void SetSamplerState(u32 index, float custom_tex_scale, bool custom_tex,
}
g_renderer->SetSamplerState(index, state);
- PixelShaderManager::SetSamplerState(index, state.tm0.hex, state.tm1.hex);
+ auto& system = Core::System::GetInstance();
+ auto& pixel_shader_manager = system.GetPixelShaderManager();
+ pixel_shader_manager.SetSamplerState(index, state.tm0.hex, state.tm1.hex);
}
void TextureCacheBase::BindTextures(BitSet32 used_textures)
{
+ auto& system = Core::System::GetInstance();
+ auto& pixel_shader_manager = system.GetPixelShaderManager();
for (u32 i = 0; i < bound_textures.size(); i++)
{
const TCacheEntry* tentry = bound_textures[i];
if (used_textures[i] && tentry)
{
g_renderer->SetTexture(i, tentry->texture.get());
- PixelShaderManager::SetTexDims(i, tentry->native_width, tentry->native_height);
+ pixel_shader_manager.SetTexDims(i, tentry->native_width, tentry->native_height);
const float custom_tex_scale = tentry->GetWidth() / float(tentry->native_width);
SetSamplerState(i, custom_tex_scale, tentry->is_custom_tex, tentry->has_arbitrary_mips);