diff options
| author | Markus Wick <markus+github@selfnet.de> | 2014-10-14 12:34:37 +0200 |
|---|---|---|
| committer | Markus Wick <markus+github@selfnet.de> | 2014-10-14 12:34:37 +0200 |
| commit | 1227bd2ba6f6d5ba984751bc5985879b3c19ce4f (patch) | |
| tree | 135e23b09c2669726c04311d33862c1e62200766 /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | a64b0bf4990fe4bbcd3e94c1376273b8d1aa2058 (diff) | |
PixelShaderGen: replace multiplication with shift
iirc both nvidia and i965 doesn't optimize this
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 8e90713fd0..fd125c565e 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -894,7 +894,7 @@ static inline void WriteTevRegular(T& out, const char* components, int bias, int // - a rounding bias is added before dividing by 256 out.Write("(((tevin_d.%s%s)%s)", components, tevBiasTable[bias], tevScaleTableLeft[shift]); out.Write(" %s ", tevOpTable[op]); - out.Write("((((tevin_a.%s*256 + (tevin_b.%s-tevin_a.%s)*(tevin_c.%s+(tevin_c.%s>>7)))%s)%s)>>8)", + out.Write("(((((tevin_a.%s<<8) + (tevin_b.%s-tevin_a.%s)*(tevin_c.%s+(tevin_c.%s>>7)))%s)%s)>>8)", components, components, components, components, components, tevScaleTableLeft[shift], tevLerpBias[2*op+(shift!=3)]); out.Write(")%s", tevScaleTableRight[shift]); |
