Compute gl_FrontFacing using a single float constant.
TRAC #22245
Signed-off-by: Daniel Koch
Signed-off-by: Geoff Lang
Author: Nicolas Capens
git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1580 736b8ea6-26fd-11df-bfd4-992fa37f6226
diff --git a/src/libGLESv2/Context.cpp b/src/libGLESv2/Context.cpp
index c94ba04..f75545f 100644
--- a/src/libGLESv2/Context.cpp
+++ b/src/libGLESv2/Context.cpp
@@ -1734,12 +1734,8 @@
Framebuffer *framebufferObject = getDrawFramebuffer();
GLint frontCCW = programBinary->getDxFrontCCWLocation();
- GLint ccw = (mState.rasterizer.frontFace == GL_CCW);
- programBinary->setUniform1iv(frontCCW, 1, &ccw);
-
- GLint pointsOrLines = programBinary->getDxPointsOrLinesLocation();
- GLint alwaysFront = !isTriangleMode(drawMode);
- programBinary->setUniform1iv(pointsOrLines, 1, &alwaysFront);
+ GLfloat ccw = !isTriangleMode(drawMode) ? 0.0f : (mState.rasterizer.frontFace == GL_CCW ? 1.0f : -1.0f);
+ programBinary->setUniform1fv(frontCCW, 1, &ccw);
mRenderer->setRasterizerState(mState.rasterizer);