Remove residue of texcoord replacement

Change-Id: I063e3590d4ea79b2d28cc1af3a213ab37b76723d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/31248
Tested-by: Chris Forbes <chrisforbes@google.com>
Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/src/Device/SetupProcessor.cpp b/src/Device/SetupProcessor.cpp
index c285905f..b8fb74c 100644
--- a/src/Device/SetupProcessor.cpp
+++ b/src/Device/SetupProcessor.cpp
@@ -84,7 +84,6 @@
 		state.cullMode = context->cullMode;
 		state.twoSidedStencil = context->stencilActive() && context->twoSidedStencil;
 		state.slopeDepthBias = context->slopeDepthBias != 0.0f;
-		state.vFace = context->pixelShader && context->pixelShader->hasBuiltinInput(spv::BuiltInFrontFacing);
 
 		state.multiSample = context->sampleCount;
 		state.rasterizerDiscard = context->rasterizerDiscard;
diff --git a/src/Device/SetupProcessor.hpp b/src/Device/SetupProcessor.hpp
index 628b607..f3dac16 100644
--- a/src/Device/SetupProcessor.hpp
+++ b/src/Device/SetupProcessor.hpp
@@ -45,7 +45,6 @@
 			VkCullModeFlags cullMode       : BITS(VK_CULL_MODE_FLAG_BITS_MAX_ENUM);
 			bool twoSidedStencil           : 1;
 			bool slopeDepthBias            : 1;
-			bool vFace                     : 1;
 			unsigned int multiSample       : 3;   // 1, 2 or 4
 			bool rasterizerDiscard         : 1;
 
diff --git a/src/Pipeline/SetupRoutine.cpp b/src/Pipeline/SetupRoutine.cpp
index c697411..aed68d5 100644
--- a/src/Pipeline/SetupRoutine.cpp
+++ b/src/Pipeline/SetupRoutine.cpp
@@ -444,15 +444,11 @@
 
 			for (int interpolant = 0; interpolant < MAX_INTERFACE_COMPONENTS; interpolant++)
 			{
-				// Note: `sprite` mode controls whether to replace this interpolant with the point sprite PointCoord value.
-				// This was an interesting thing to support for old GL because any texture coordinate could be replaced in this way.
-				// In modern GL and in Vulkan, the [gl_]PointCoord builtin variable to the fragment shader is used instead.
 				if (state.gradient[interpolant].Type != SpirvShader::ATTRIBTYPE_UNUSED)
 					setupGradient(primitive, tri, w012, M, v0, v1, v2,
 							OFFSET(Vertex, v[interpolant]),
 							OFFSET(Primitive, V[interpolant]),
 							state.gradient[interpolant].Flat,
-							false /* is pointcoord */,
 							!state.gradient[interpolant].NoPerspective, 0);
 			}
 
@@ -462,38 +458,15 @@
 		routine = function("SetupRoutine");
 	}
 
-	void SetupRoutine::setupGradient(Pointer<Byte> &primitive, Pointer<Byte> &triangle, Float4 &w012, Float4 (&m)[3], Pointer<Byte> &v0, Pointer<Byte> &v1, Pointer<Byte> &v2, int attribute, int planeEquation, bool flat, bool sprite, bool perspective, int component)
+	void SetupRoutine::setupGradient(Pointer<Byte> &primitive, Pointer<Byte> &triangle, Float4 &w012, Float4 (&m)[3], Pointer<Byte> &v0, Pointer<Byte> &v1, Pointer<Byte> &v2, int attribute, int planeEquation, bool flat, bool perspective, int component)
 	{
-		Float4 i;
-
 		if(!flat)
 		{
-			if(!sprite)
-			{
-				i.x = *Pointer<Float>(v0 + attribute);
-				i.y = *Pointer<Float>(v1 + attribute);
-				i.z = *Pointer<Float>(v2 + attribute);
-				i.w = 0;
-			}
-			else
-			{
-				if(component == 0) i.x = 0.5f;
-				if(component == 1) i.x = 0.5f;
-				if(component == 2) i.x = 0.0f;
-				if(component == 3) i.x = 1.0f;
-
-				if(component == 0) i.y = 1.0f;
-				if(component == 1) i.y = 0.5f;
-				if(component == 2) i.y = 0.0f;
-				if(component == 3) i.y = 1.0f;
-
-				if(component == 0) i.z = 0.5f;
-				if(component == 1) i.z = 1.0f;
-				if(component == 2) i.z = 0.0f;
-				if(component == 3) i.z = 1.0f;
-
-				i.w = 0;
-			}
+			Float4 i;
+			i.x = *Pointer<Float>(v0 + attribute);
+			i.y = *Pointer<Float>(v1 + attribute);
+			i.z = *Pointer<Float>(v2 + attribute);
+			i.w = 0;
 
 			if(!perspective)
 			{
diff --git a/src/Pipeline/SetupRoutine.hpp b/src/Pipeline/SetupRoutine.hpp
index b43dd7a..0ea0c71 100644
--- a/src/Pipeline/SetupRoutine.hpp
+++ b/src/Pipeline/SetupRoutine.hpp
@@ -33,7 +33,7 @@
 		Routine *getRoutine();
 
 	private:
-		void setupGradient(Pointer<Byte> &primitive, Pointer<Byte> &triangle, Float4 &w012, Float4 (&m)[3], Pointer<Byte> &v0, Pointer<Byte> &v1, Pointer<Byte> &v2, int attribute, int planeEquation, bool flatShading, bool sprite, bool perspective, int component);
+		void setupGradient(Pointer<Byte> &primitive, Pointer<Byte> &triangle, Float4 &w012, Float4 (&m)[3], Pointer<Byte> &v0, Pointer<Byte> &v1, Pointer<Byte> &v2, int attribute, int planeEquation, bool flatShading, bool perspective, int component);
 		void edge(Pointer<Byte> &primitive, Pointer<Byte> &data, const Int &Xa, const Int &Ya, const Int &Xb, const Int &Yb, Int &q);
 		void conditionalRotate1(Bool condition, Pointer<Byte> &v0, Pointer<Byte> &v1, Pointer<Byte> &v2);
 		void conditionalRotate2(Bool condition, Pointer<Byte> &v0, Pointer<Byte> &v1, Pointer<Byte> &v2);