diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-27 17:42:02 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2022-12-27 20:13:24 +0100 |
| commit | 725bd64ec294b23242b721fc5a9b9907f807858b (patch) | |
| tree | 0038a36f32cb0108d8d4e326b4d7f53993a2e54f /Source/Core/VideoBackends/Software/Tev.cpp | |
| parent | 529909fe901ee81cc20fdea453e4fa355b1078f2 (diff) | |
VideoCommon: De-globalize PixelShaderManager class.
Diffstat (limited to 'Source/Core/VideoBackends/Software/Tev.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Tev.cpp | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index f2f903ccfc..9b74684ccf 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -9,6 +9,9 @@ #include "Common/ChunkFile.h" #include "Common/CommonTypes.h" + +#include "Core/System.h" + #include "VideoBackends/Software/EfbInterface.h" #include "VideoBackends/Software/SWBoundingBox.h" #include "VideoBackends/Software/TextureSampler.h" @@ -396,13 +399,16 @@ void Tev::Draw() INCSTAT(g_stats.this_frame.tev_pixels_in); + auto& system = Core::System::GetInstance(); + auto& pixel_shader_manager = system.GetPixelShaderManager(); + // initial color values for (int i = 0; i < 4; i++) { - Reg[static_cast<TevOutput>(i)].r = PixelShaderManager::constants.colors[i][0]; - Reg[static_cast<TevOutput>(i)].g = PixelShaderManager::constants.colors[i][1]; - Reg[static_cast<TevOutput>(i)].b = PixelShaderManager::constants.colors[i][2]; - Reg[static_cast<TevOutput>(i)].a = PixelShaderManager::constants.colors[i][3]; + Reg[static_cast<TevOutput>(i)].r = pixel_shader_manager.constants.colors[i][0]; + Reg[static_cast<TevOutput>(i)].g = pixel_shader_manager.constants.colors[i][1]; + Reg[static_cast<TevOutput>(i)].b = pixel_shader_manager.constants.colors[i][2]; + Reg[static_cast<TevOutput>(i)].a = pixel_shader_manager.constants.colors[i][3]; } for (unsigned int stageNum = 0; stageNum < bpmem.genMode.numindstages; stageNum++) @@ -694,11 +700,14 @@ void Tev::Draw() void Tev::SetKonstColors() { + auto& system = Core::System::GetInstance(); + auto& pixel_shader_manager = system.GetPixelShaderManager(); + for (int i = 0; i < 4; i++) { - KonstantColors[i].r = PixelShaderManager::constants.kcolors[i][0]; - KonstantColors[i].g = PixelShaderManager::constants.kcolors[i][1]; - KonstantColors[i].b = PixelShaderManager::constants.kcolors[i][2]; - KonstantColors[i].a = PixelShaderManager::constants.kcolors[i][3]; + KonstantColors[i].r = pixel_shader_manager.constants.kcolors[i][0]; + KonstantColors[i].g = pixel_shader_manager.constants.kcolors[i][1]; + KonstantColors[i].b = pixel_shader_manager.constants.kcolors[i][2]; + KonstantColors[i].a = pixel_shader_manager.constants.kcolors[i][3]; } } |
