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/Shader/SetupRoutine.cpp b/src/Shader/SetupRoutine.cpp
index 36753bd..630fbf4 100644
--- a/src/Shader/SetupRoutine.cpp
+++ b/src/Shader/SetupRoutine.cpp
@@ -144,7 +144,7 @@
If(m != 0 || Bool(!solidTriangle)) // Clipped triangle; reproject
{
Pointer<Byte> V = polygon + OFFSET(Polygon,P) + m * sizeof(void*) * 16;
-
+
Int i = 0;
Do
@@ -166,9 +166,9 @@
// Vertical range
Int yMin = Y[0];
Int yMax = Y[0];
-
+
Int i = 1;
-
+
Do
{
yMin = Min(Y[i], yMin);
@@ -196,7 +196,7 @@
yMin = Max(yMin, *Pointer<Int>(data + OFFSET(DrawData,scissorY0)));
yMax = Min(yMax, *Pointer<Int>(data + OFFSET(DrawData,scissorY1)));
-
+
For(Int q = 0, q < state.multiSample, q++)
{
Array<Int> Xq(16);
@@ -510,7 +510,7 @@
if(component == 1) i.z = 1.0f;
if(component == 2) i.z = 0.0f;
if(component == 3) i.z = 1.0f;
-
+
i.w = 0;
}
@@ -597,7 +597,7 @@
Int ceil = -d >> 31; // Ceiling division: remainder <= 0
x -= ceil;
d -= ceil & FDY12;
-
+
Int Q = FDX12 / FDY12; // Edge-step
Int R = FDX12 % FDY12; // Error-step
Int floor = R >> 31; // Flooring division: remainder >= 0
@@ -615,7 +615,7 @@
d += R;
Int overflow = -d >> 31;
-
+
d -= D & overflow;
x -= overflow;
@@ -632,7 +632,7 @@
If(condition)
{
Pointer<Byte> vX;
-
+
vX = v0;
v0 = v1;
v1 = v2;
@@ -652,7 +652,7 @@
If(condition)
{
Pointer<Byte> vX;
-
+
vX = v2;
v2 = v1;
v1 = v0;