diff options
| author | Markus Wick <degasus@users.noreply.github.com> | 2017-03-08 11:01:17 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-03-08 11:01:17 +0100 |
| commit | a911d256a7c30ba68e6f81dda82b1b70c21516f6 (patch) | |
| tree | 6ed482a010effeea012b46b81a1c374599cea578 /Source/Core/VideoCommon/PixelShaderGen.cpp | |
| parent | 7cc5604a2cb34e93a799a215116496e2cc1589c2 (diff) | |
| parent | 8a72e84ece81da83b46a747601c22e1146771213 (diff) | |
Merge pull request #5018 from Tilka/trunc
VideoCommon: remove unnecessary trunc()
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/PixelShaderGen.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 3c09e200f0..608248fab8 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -379,11 +379,6 @@ ShaderCode GeneratePixelShaderCode(APIType ApiType, const pixel_shader_uid_data* "int3 iround(float3 x) { return int3(round(x)); }\n" "int4 iround(float4 x) { return int4(round(x)); }\n\n"); - out.Write("int itrunc(float x) { return int (trunc(x)); }\n" - "int2 itrunc(float2 x) { return int2(trunc(x)); }\n" - "int3 itrunc(float3 x) { return int3(trunc(x)); }\n" - "int4 itrunc(float4 x) { return int4(trunc(x)); }\n\n"); - if (ApiType == APIType::OpenGL) { out.Write("SAMPLER_BINDING(0) uniform sampler2DArray samp[8];\n"); @@ -661,7 +656,7 @@ ShaderCode GeneratePixelShaderCode(APIType ApiType, const pixel_shader_uid_data* out.SetConstantsUsed(C_TEXDIMS, C_TEXDIMS + uid_data->genMode_numtexgens - 1); for (unsigned int i = 0; i < uid_data->genMode_numtexgens; ++i) { - out.Write("\tint2 fixpoint_uv%d = itrunc(", i); + out.Write("\tint2 fixpoint_uv%d = int2(", i); out.Write("(uv%d.z == 0.0 ? uv%d.xy : uv%d.xy / uv%d.z)", i, i, i, i); out.Write(" * " I_TEXDIMS "[%d].zw);\n", i); // TODO: S24 overflows here? |
