VideoSW: Drop SetTevReg for colors.

This commit is contained in:
degasus 2016-03-06 11:03:45 +01:00
parent 7a154181b4
commit ab44d2ec5c
5 changed files with 20 additions and 21 deletions

View File

@ -64,9 +64,9 @@ static inline int iround(float x)
return t;
}
void SetTevReg(int reg, int comp, bool konst, s16 color)
void SetTevReg(int reg, int comp, s16 color)
{
tev.SetRegColor(reg, comp, konst, color);
tev.SetRegColor(reg, comp, color);
}
static void Draw(s32 x, s32 y, s32 xi, s32 yi)

View File

@ -14,7 +14,7 @@ namespace Rasterizer
void DrawTriangleFrontFace(OutputVertexData *v0, OutputVertexData *v1, OutputVertexData *v2);
void SetTevReg(int reg, int comp, bool konst, s16 color);
void SetTevReg(int reg, int comp, s16 color);
struct Slope
{

View File

@ -81,14 +81,10 @@ void SWVertexLoader::vFlush(bool useDstAlpha)
// set all states with are stored within video sw
for (int i = 0; i < 4; i++)
{
Rasterizer::SetTevReg(i, Tev::RED_C, false, PixelShaderManager::constants.colors[i][0]);
Rasterizer::SetTevReg(i, Tev::GRN_C, false, PixelShaderManager::constants.colors[i][1]);
Rasterizer::SetTevReg(i, Tev::BLU_C, false, PixelShaderManager::constants.colors[i][2]);
Rasterizer::SetTevReg(i, Tev::ALP_C, false, PixelShaderManager::constants.colors[i][3]);
Rasterizer::SetTevReg(i, Tev::RED_C, true, PixelShaderManager::constants.kcolors[i][0]);
Rasterizer::SetTevReg(i, Tev::GRN_C, true, PixelShaderManager::constants.kcolors[i][1]);
Rasterizer::SetTevReg(i, Tev::BLU_C, true, PixelShaderManager::constants.kcolors[i][2]);
Rasterizer::SetTevReg(i, Tev::ALP_C, true, PixelShaderManager::constants.kcolors[i][3]);
Rasterizer::SetTevReg(i, Tev::RED_C, PixelShaderManager::constants.kcolors[i][0]);
Rasterizer::SetTevReg(i, Tev::GRN_C, PixelShaderManager::constants.kcolors[i][1]);
Rasterizer::SetTevReg(i, Tev::BLU_C, PixelShaderManager::constants.kcolors[i][2]);
Rasterizer::SetTevReg(i, Tev::ALP_C, PixelShaderManager::constants.kcolors[i][3]);
}
for (u32 i = 0; i < IndexGenerator::GetIndexLen(); i++)

View File

@ -13,6 +13,7 @@
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/PerfQueryBase.h"
#include "VideoCommon/PixelShaderManager.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VideoConfig.h"
#include "VideoCommon/XFMemory.h"
@ -513,6 +514,15 @@ void Tev::Draw()
INCSTAT(stats.thisFrame.tevPixelsIn);
// initial color values
for (int i = 0; i < 4; i++)
{
Reg[i][RED_C] = PixelShaderManager::constants.colors[i][0];
Reg[i][GRN_C] = PixelShaderManager::constants.colors[i][1];
Reg[i][BLU_C] = PixelShaderManager::constants.colors[i][2];
Reg[i][ALP_C] = PixelShaderManager::constants.colors[i][3];
}
for (unsigned int stageNum = 0; stageNum < bpmem.genMode.numindstages; stageNum++)
{
int stageNum2 = stageNum >> 1;
@ -800,15 +810,8 @@ void Tev::Draw()
EfbInterface::BlendTev(Position[0], Position[1], output);
}
void Tev::SetRegColor(int reg, int comp, bool konst, s16 color)
void Tev::SetRegColor(int reg, int comp, s16 color)
{
if (konst)
{
KonstantColors[reg][comp] = color;
}
else
{
Reg[reg][comp] = color;
}
KonstantColors[reg][comp] = color;
}

View File

@ -87,5 +87,5 @@ public:
void Draw();
void SetRegColor(int reg, int comp, bool konst, s16 color);
void SetRegColor(int reg, int comp, s16 color);
};