Replacing numbers by constants

In order to be able to easily modify
values in between OpenGL ES versions,
some constants were added to replace
hardcoded numbers.

Change-Id: Ic35bf8e45341addf5315acaa9ffac01095b8907c
Reviewed-on: https://swiftshader-review.googlesource.com/2761
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/Shader/PixelRoutine.cpp b/src/Shader/PixelRoutine.cpp
index 45b614f..7c0f931 100644
--- a/src/Shader/PixelRoutine.cpp
+++ b/src/Shader/PixelRoutine.cpp
@@ -53,7 +53,7 @@
 
 	PixelRoutine::~PixelRoutine()
 	{
-		for(int i = 0; i < 16; i++)
+		for(int i = 0; i < TEXTURE_IMAGE_UNITS; i++)
 		{
 			delete sampler[i];
 		}
@@ -65,7 +65,7 @@
 			Long pipeTime = Ticks();
 		#endif
 
-		for(int i = 0; i < 16; i++)
+		for(int i = 0; i < TEXTURE_IMAGE_UNITS; i++)
 		{
 			sampler[i] = new SamplerCore(r.constants, state.sampler[i]);
 		}
@@ -2078,7 +2078,7 @@
 		{
 			Int index = As<Int>(Float(reg(r, sampler).x.x));
 
-			for(int i = 0; i < 16; i++)
+			for(int i = 0; i < TEXTURE_IMAGE_UNITS; i++)
 			{
 				if(shader->usesSampler(i))
 				{