diff options
| author | Mai <mai.iam2048@gmail.com> | 2022-12-28 00:59:03 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-28 00:59:03 +0000 |
| commit | 0900e68986a4fa2254fb3c459f73af4815979e45 (patch) | |
| tree | 1c69cbfcc29dba6cb354823c23c75c546bb0b57a /Source/Core/VideoBackends/Software | |
| parent | 9e9910df8b0c965e1a496d479ad94bc78f918817 (diff) | |
| parent | 4549fb4acb1ab520dc6481fe4443cdd3d46bd8c2 (diff) | |
Merge pull request #11384 from AdmiralCurtiss/globals-pixelshadermanager
VideoCommon: De-globalize PixelShaderManager class.
Diffstat (limited to 'Source/Core/VideoBackends/Software')
| -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]; } } |
