Only do centroid sampling if multisampling

Previously if sample count were 1, we would skip the setup for the
centroid 1/w, and then blindly use it, leading to NaN in all interpolants marked `centroid`.

Bug: b/118386749
Test: dEQP-VK.glsl.linkage.varying.*
Change-Id: I4f5d0b052f2defaad86706b85790ef14cd42f53f
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29650
Tested-by: Chris Forbes <chrisforbes@google.com>
Presubmit-Ready: Chris Forbes <chrisforbes@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Pipeline/PixelRoutine.cpp b/src/Pipeline/PixelRoutine.cpp
index 72fc0ac..116f2d7 100644
--- a/src/Pipeline/PixelRoutine.cpp
+++ b/src/Pipeline/PixelRoutine.cpp
@@ -156,7 +156,7 @@
 				auto const & input = spirvShader->inputs[interpolant];
 				if (input.Type != SpirvShader::ATTRIBTYPE_UNUSED)
 				{
-					if (input.Centroid)
+					if (input.Centroid && state.multiSample > 1)
 					{
 						routine.inputs[interpolant] =
 								interpolateCentroid(XXXX, YYYY, rhwCentroid,