Flip samples to their correct position

SwANGLE tests detected that SwiftShader's sample positions were 180
degree flipped from Vulkan's exact sample locations. Most multisampling
tests we've run with SwiftShader so far relied on resolved outputs,
so having the samples in the wrong order didn't matter, as long as we
had the correct 4 samples (which we do, since the samples are
essentially rotated by 90 degrees around the center of the pixel from
each other).

Bug: b/170962186
Bug: b/141380498
Change-Id: I65552863e1fe38b321b84995e038984488512e1c
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/52088
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
Kokoro-Result: kokoro <noreply+kokoro@google.com>
diff --git a/src/Device/QuadRasterizer.cpp b/src/Device/QuadRasterizer.cpp
index 62f2253..024be64 100644
--- a/src/Device/QuadRasterizer.cpp
+++ b/src/Device/QuadRasterizer.cpp
@@ -131,7 +131,7 @@
 
 				if(state.enableMultiSampling)
 				{
-					y -= *Pointer<Float4>(constants + OFFSET(Constants, Y) + q * sizeof(float4));
+					y += *Pointer<Float4>(constants + OFFSET(Constants, Y) + q * sizeof(float4));
 				}
 
 				Dz[q] = *Pointer<Float4>(primitive + OFFSET(Primitive, z.C), 16) + y * *Pointer<Float4>(primitive + OFFSET(Primitive, z.B), 16);
diff --git a/src/Pipeline/PixelRoutine.cpp b/src/Pipeline/PixelRoutine.cpp
index 2261c3a..873700e 100644
--- a/src/Pipeline/PixelRoutine.cpp
+++ b/src/Pipeline/PixelRoutine.cpp
@@ -86,7 +86,7 @@
 
 			if(state.enableMultiSampling)
 			{
-				x -= *Pointer<Float4>(constants + OFFSET(Constants, X) + q * sizeof(float4));
+				x += *Pointer<Float4>(constants + OFFSET(Constants, X) + q * sizeof(float4));
 			}
 
 			z[q] = interpolate(x, Dz[q], z[q], primitive + OFFSET(Primitive, z), false, false);