Fix border comparison with depth 16

In SamplerCore::sampleTexel(), if we have "state.compareEnable" and
"!hasFloatTexture()", a normalization of the input value "c.x" will
occur. Is it then expected that the input value should already be
scaled.

In SamplerCore::replaceBorderTexel(), we need to take this into
account and make sure the border pixels are in the same scale as the
other pixel of the same texture and output scaled borders when we
have those same conditions ("state.compareEnable" and
"!hasFloatTexture()")

Bug: b/227518327
Change-Id: Iefd5f27fbee5b7a0ca1a9eb3852ff3085e6848fe
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/66148
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
diff --git a/src/Pipeline/SamplerCore.cpp b/src/Pipeline/SamplerCore.cpp
index 9f69fc8..d700a5d 100644
--- a/src/Pipeline/SamplerCore.cpp
+++ b/src/Pipeline/SamplerCore.cpp
@@ -2141,7 +2141,7 @@
 {
 	Vector4i border;
 
-	const bool scaled = hasNormalizedFormat() && !state.compareEnable;
+	const bool scaled = hasNormalizedFormat();
 	const sw::float4 scaleComp = scaled ? getComponentScale() : sw::float4(1.0f, 1.0f, 1.0f, 1.0f);
 
 	switch(state.border)