Make the number of vertex outputs configurable.

Change-Id: I17ae53e5274232e9e3b482daac56d507788e822c
Reviewed-on: https://swiftshader-review.googlesource.com/5383
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/D3D9/Capabilities.hpp b/src/D3D9/Capabilities.hpp
index 321160b..1421c80 100644
--- a/src/D3D9/Capabilities.hpp
+++ b/src/D3D9/Capabilities.hpp
@@ -15,6 +15,9 @@
 #ifndef D3D9_Capabilities_hpp
 #define D3D9_Capabilities_hpp
 
+#include "Config.hpp"
+#include "MetaMacro.hpp"
+
 #include <d3d9.h>
 
 namespace D3D9
@@ -465,6 +468,23 @@
 
 	extern unsigned int textureMemory;
 	extern unsigned int maxAnisotropy;
+
+	enum
+	{
+		MAX_VERTEX_SHADER_CONST = 256,
+		MAX_PIXEL_SHADER_CONST = 224,
+		MAX_VERTEX_OUTPUTS = 12,
+	};
+
+	// Shader Model 3.0 requirements
+	META_ASSERT(MAX_VERTEX_SHADER_CONST >= 256);
+	META_ASSERT(MAX_PIXEL_SHADER_CONST == 224);
+	META_ASSERT(MAX_VERTEX_OUTPUTS == 12);
+
+	// Back-end minimum requirements
+	META_ASSERT(sw::VERTEX_UNIFORM_VECTORS >= MAX_VERTEX_SHADER_CONST);
+	META_ASSERT(sw::FRAGMENT_UNIFORM_VECTORS >= MAX_PIXEL_SHADER_CONST);
+	META_ASSERT(sw::MAX_VERTEX_OUTPUTS >= MAX_VERTEX_OUTPUTS);
 }
 
 #endif   // D3D9_Capabilities_hpp