Fix gl_FrontFacing to take GL_FRONT_FACE into account.

Bug swiftshader:113

Change-Id: Ia1cbcdbb396eaabaa79e4c8651d7c025f73d028a
Reviewed-on: https://swiftshader-review.googlesource.com/20068
Reviewed-by: Alexis Hétu <sugoi@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Renderer/PixelProcessor.cpp b/src/Renderer/PixelProcessor.cpp
index 3903701..8bc40c2 100644
--- a/src/Renderer/PixelProcessor.cpp
+++ b/src/Renderer/PixelProcessor.cpp
@@ -586,9 +586,10 @@
 		context->alphaTestEnable = alphaTestEnable;
 	}
 
-	void PixelProcessor::setCullMode(CullMode cullMode)
+	void PixelProcessor::setCullMode(CullMode cullMode, bool frontFacingCCW)
 	{
 		context->cullMode = cullMode;
+		context->frontFacingCCW = frontFacingCCW;
 	}
 
 	void PixelProcessor::setColorWriteMask(int index, int rgbaMask)
@@ -1041,6 +1042,8 @@
 			state.centroid = context->pixelShader->containsCentroid();
 		}
 
+		state.frontFaceCCW = context->frontFacingCCW;
+
 		if(!context->pixelShader)
 		{
 			for(unsigned int i = 0; i < 8; i++)