mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 15:31:17 +01:00
Merge pull request #2861 from lioncash/param
VideoCommon: Remove unused parameters
This commit is contained in:
commit
ff95fa8a6d
@ -148,7 +148,7 @@ static void WriteToBitDepth(char*& p, u8 depth, const char* src, const char* des
|
|||||||
WRITE(p, " %s = floor(%s * 255.0 / exp2(8.0 - %d.0));\n", dest, src, depth);
|
WRITE(p, " %s = floor(%s * 255.0 / exp2(8.0 - %d.0));\n", dest, src, depth);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteEncoderEnd(char*& p, API_TYPE ApiType)
|
static void WriteEncoderEnd(char*& p)
|
||||||
{
|
{
|
||||||
WRITE(p, "}\n");
|
WRITE(p, "}\n");
|
||||||
IntensityConstantAdded = false;
|
IntensityConstantAdded = false;
|
||||||
@ -173,7 +173,7 @@ static void WriteI8Encoder(char*& p, API_TYPE ApiType)
|
|||||||
|
|
||||||
WRITE(p, " ocol0.rgba += IntensityConst.aaaa;\n"); // see WriteColorToIntensity
|
WRITE(p, " ocol0.rgba += IntensityConst.aaaa;\n"); // see WriteColorToIntensity
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
static void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
||||||
@ -214,7 +214,7 @@ static void WriteI4Encoder(char*& p, API_TYPE ApiType)
|
|||||||
WriteToBitDepth(p, 4, "color1", "color1");
|
WriteToBitDepth(p, 4, "color1", "color1");
|
||||||
|
|
||||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
static void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
||||||
@ -232,7 +232,7 @@ static void WriteIA8Encoder(char*& p,API_TYPE ApiType)
|
|||||||
|
|
||||||
WRITE(p, " ocol0.ga += IntensityConst.aa;\n");
|
WRITE(p, " ocol0.ga += IntensityConst.aa;\n");
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
static void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
||||||
@ -264,7 +264,7 @@ static void WriteIA4Encoder(char*& p,API_TYPE ApiType)
|
|||||||
WriteToBitDepth(p, 4, "color1", "color1");
|
WriteToBitDepth(p, 4, "color1", "color1");
|
||||||
|
|
||||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
static void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
||||||
@ -287,7 +287,7 @@ static void WriteRGB565Encoder(char*& p,API_TYPE ApiType)
|
|||||||
WRITE(p, " ocol0.ga = ocol0.ga + gLower * 32.0;\n");
|
WRITE(p, " ocol0.ga = ocol0.ga + gLower * 32.0;\n");
|
||||||
|
|
||||||
WRITE(p, " ocol0 = ocol0 / 255.0;\n");
|
WRITE(p, " ocol0 = ocol0 / 255.0;\n");
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
static void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
||||||
@ -353,7 +353,7 @@ static void WriteRGB5A3Encoder(char*& p,API_TYPE ApiType)
|
|||||||
WRITE(p, "}\n");
|
WRITE(p, "}\n");
|
||||||
|
|
||||||
WRITE(p, " ocol0 = ocol0 / 255.0;\n");
|
WRITE(p, " ocol0 = ocol0 / 255.0;\n");
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
static void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
||||||
@ -378,7 +378,7 @@ static void WriteRGBA8Encoder(char*& p,API_TYPE ApiType)
|
|||||||
|
|
||||||
WRITE(p, " ocol0 = first ? color0 : color1;\n");
|
WRITE(p, " ocol0 = first ? color0 : color1;\n");
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
static void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||||
@ -400,7 +400,7 @@ static void WriteC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
|||||||
WriteToBitDepth(p, 4, "color1", "color1");
|
WriteToBitDepth(p, 4, "color1", "color1");
|
||||||
|
|
||||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
static void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||||
@ -412,7 +412,7 @@ static void WriteC8Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
|||||||
WriteSampleColor(p, comp, "ocol0.r", 2, ApiType);
|
WriteSampleColor(p, comp, "ocol0.r", 2, ApiType);
|
||||||
WriteSampleColor(p, comp, "ocol0.a", 3, ApiType);
|
WriteSampleColor(p, comp, "ocol0.a", 3, ApiType);
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
static void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
||||||
@ -442,7 +442,7 @@ static void WriteCC4Encoder(char*& p, const char* comp,API_TYPE ApiType)
|
|||||||
WriteToBitDepth(p, 4, "color1", "color1");
|
WriteToBitDepth(p, 4, "color1", "color1");
|
||||||
|
|
||||||
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
WRITE(p, " ocol0 = (color0 * 16.0 + color1) / 255.0;\n");
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
static void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
||||||
@ -452,7 +452,7 @@ static void WriteCC8Encoder(char*& p, const char* comp, API_TYPE ApiType)
|
|||||||
WriteSampleColor(p, comp, "ocol0.bg", 0, ApiType);
|
WriteSampleColor(p, comp, "ocol0.bg", 0, ApiType);
|
||||||
WriteSampleColor(p, comp, "ocol0.ra", 1, ApiType);
|
WriteSampleColor(p, comp, "ocol0.ra", 1, ApiType);
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
static void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
||||||
@ -477,7 +477,7 @@ static void WriteZ8Encoder(char*& p, const char* multiplier,API_TYPE ApiType)
|
|||||||
if (ApiType == API_D3D) WRITE(p, "depth = 1.0f - depth;\n");
|
if (ApiType == API_D3D) WRITE(p, "depth = 1.0f - depth;\n");
|
||||||
WRITE(p, "ocol0.a = frac(depth * %s);\n", multiplier);
|
WRITE(p, "ocol0.a = frac(depth * %s);\n", multiplier);
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
||||||
@ -511,7 +511,7 @@ static void WriteZ16Encoder(char*& p,API_TYPE ApiType)
|
|||||||
WRITE(p, " ocol0.r = expanded.g / 255.0;\n");
|
WRITE(p, " ocol0.r = expanded.g / 255.0;\n");
|
||||||
WRITE(p, " ocol0.a = expanded.r / 255.0;\n");
|
WRITE(p, " ocol0.a = expanded.r / 255.0;\n");
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
||||||
@ -549,7 +549,7 @@ static void WriteZ16LEncoder(char*& p,API_TYPE ApiType)
|
|||||||
WRITE(p, " ocol0.r = expanded.b / 255.0;\n");
|
WRITE(p, " ocol0.r = expanded.b / 255.0;\n");
|
||||||
WRITE(p, " ocol0.a = expanded.g / 255.0;\n");
|
WRITE(p, " ocol0.a = expanded.g / 255.0;\n");
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
static void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
||||||
@ -591,7 +591,7 @@ static void WriteZ24Encoder(char*& p, API_TYPE ApiType)
|
|||||||
WRITE(p, " ocol0.a = expanded1.r / 255.0;\n");
|
WRITE(p, " ocol0.a = expanded1.r / 255.0;\n");
|
||||||
WRITE(p, " }\n");
|
WRITE(p, " }\n");
|
||||||
|
|
||||||
WriteEncoderEnd(p, ApiType);
|
WriteEncoderEnd(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *GenerateEncodingShader(u32 format,API_TYPE ApiType)
|
const char *GenerateEncodingShader(u32 format,API_TYPE ApiType)
|
||||||
|
@ -683,7 +683,7 @@ void VertexShaderManager::SetProjectionChanged()
|
|||||||
bProjectionChanged = true;
|
bProjectionChanged = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VertexShaderManager::SetMaterialColorChanged(int index, u32 color)
|
void VertexShaderManager::SetMaterialColorChanged(int index)
|
||||||
{
|
{
|
||||||
nMaterialsChanged[index] = true;
|
nMaterialsChanged[index] = true;
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ public:
|
|||||||
static void SetTexMatrixChangedB(u32 value);
|
static void SetTexMatrixChangedB(u32 value);
|
||||||
static void SetViewportChanged();
|
static void SetViewportChanged();
|
||||||
static void SetProjectionChanged();
|
static void SetProjectionChanged();
|
||||||
static void SetMaterialColorChanged(int index, u32 color);
|
static void SetMaterialColorChanged(int index);
|
||||||
|
|
||||||
static void TranslateView(float x, float y, float z = 0.0f);
|
static void TranslateView(float x, float y, float z = 0.0f);
|
||||||
static void RotateView(float x, float y);
|
static void RotateView(float x, float y);
|
||||||
|
@ -62,7 +62,7 @@ static void XFRegWritten(int transferSize, u32 baseAddress, DataReader src)
|
|||||||
if (xfmem.ambColor[chan] != newValue)
|
if (xfmem.ambColor[chan] != newValue)
|
||||||
{
|
{
|
||||||
VertexManager::Flush();
|
VertexManager::Flush();
|
||||||
VertexShaderManager::SetMaterialColorChanged(chan, newValue);
|
VertexShaderManager::SetMaterialColorChanged(chan);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -74,7 +74,7 @@ static void XFRegWritten(int transferSize, u32 baseAddress, DataReader src)
|
|||||||
if (xfmem.matColor[chan] != newValue)
|
if (xfmem.matColor[chan] != newValue)
|
||||||
{
|
{
|
||||||
VertexManager::Flush();
|
VertexManager::Flush();
|
||||||
VertexShaderManager::SetMaterialColorChanged(chan + 2, newValue);
|
VertexShaderManager::SetMaterialColorChanged(chan + 2);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user