Commit 653b9cba by Nicolas Capens Committed by Nicolas Capens

Remove unnecessary point setup calculations

SetupRoutine uses V0 == V1 == V2 when drawing points, so we don't have to duplicate those vertices explicitly. Bug: b/149537975 Change-Id: I723a7139f5eb5735bedb0c17796c00dc4b414fa7 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/42028 Presubmit-Ready: Nicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 32a7dcdc
......@@ -1146,14 +1146,8 @@ bool DrawCall::setupPoint(Primitive &primitive, Triangle &triangle, const DrawCa
}
}
triangle.v1 = triangle.v0;
triangle.v2 = triangle.v0;
constexpr float subPixF = vk::SUBPIXEL_PRECISION_FACTOR;
triangle.v1.projected.x += iround(subPixF * 0.5f * pSize);
triangle.v2.projected.y -= iround(subPixF * 0.5f * pSize) * (data.HxF[0] > 0.0f ? 1 : -1); // Both Direct3D and OpenGL expect (0, 0) in the top-left corner
primitive.pointSizeInv = 1.0f / pSize;
return draw.setupRoutine(&primitive, &triangle, &polygon, &data);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment