mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
VideoCommon: De-globalize PixelShaderManager class.
This commit is contained in:
@ -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];
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user