Derive VertexRoutine from Function<>.

Bug 22652760

Change-Id: I48e9e1f3ff677429eff1aea2f80b1e384a537a14
Reviewed-on: https://swiftshader-review.googlesource.com/4557
Tested-by: Nicolas Capens <capn@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Renderer/VertexProcessor.cpp b/src/Renderer/VertexProcessor.cpp
index 30e8cd5..5517820 100644
--- a/src/Renderer/VertexProcessor.cpp
+++ b/src/Renderer/VertexProcessor.cpp
@@ -73,7 +73,7 @@
 		P = 0;
 		PB = 0;
 		PBV = 0;
-		
+
 		for(int i = 0; i < 12; i++)
 		{
 			PBVM[i] = 0;
@@ -271,7 +271,7 @@
 	{
 		if(light < 8)
 		{
-			ff.attenuationConstant[light] = replicate(constant);			
+			ff.attenuationConstant[light] = replicate(constant);
 			ff.attenuationLinear[light] = replicate(linear);
 			ff.attenuationQuadratic[light] = replicate(quadratic);
 		}
@@ -707,7 +707,7 @@
 		{
 			PB = P * B;
 			PBV = PB * V;
-			
+
 			for(int i = 0; i < activeMatrices; i++)
 			{
 				PBVM[i] = PBV * M[i];
@@ -723,7 +723,7 @@
 		{
 			PB = P * B;
 			PBV = PB * V;
-			
+
 			for(int i = 0; i < activeMatrices; i++)
 			{
 				PBVM[i] = PBV * M[i];
@@ -737,7 +737,7 @@
 		if(updateViewMatrix)
 		{
 			PBV = PB * V;
-			
+
 			for(int i = 0; i < activeMatrices; i++)
 			{
 				PBVM[i] = PBV * M[i];
@@ -808,7 +808,7 @@
 		state.shaderContainsTexldl = context->vertexShader ? context->vertexShader->containsTexldl() : false;
 		state.positionRegister = context->vertexShader ? context->vertexShader->positionRegister : Pos;
 		state.pointSizeRegister = context->vertexShader ? context->vertexShader->pointSizeRegister : Pts;
-		
+
 		state.vertexBlendMatrixCount = context->vertexBlendMatrixCountActive();
 		state.indexedVertexBlendEnable = context->indexedVertexBlendActive();
 		state.vertexNormalActive = context->vertexNormalActive();
@@ -888,7 +888,7 @@
 			{
 				state.output[D0].write = 0xF;
 			}
-			
+
 			if(context->specularActive())
 			{
 				state.output[D1].write = 0xF;
@@ -968,7 +968,7 @@
 			}
 
 			generator->generate();
-			routine = generator->getRoutine();
+			routine = (*generator)(L"VertexRoutine_%0.8X", state.shaderID);
 			delete generator;
 
 			routineCache->add(state, routine);