Depth related fixes

- Depth output should write to the 1st (Red) channel only
- Depth image load should be clamped in the [0, 1] range

Change-Id: Ic7c3ac09c86d5457ec3c59bf9666e2b168226c5e
Reviewed-on: https://swiftshader-review.googlesource.com/13988
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Shader/SamplerCore.cpp b/src/Shader/SamplerCore.cpp
index 194e35a..c51dbf9 100644
--- a/src/Shader/SamplerCore.cpp
+++ b/src/Shader/SamplerCore.cpp
@@ -520,9 +520,9 @@
 				case FORMAT_D32F_LOCKABLE:
 				case FORMAT_D32FS8_TEXTURE:
 				case FORMAT_D32FS8_SHADOW:
-					c.y = c.x;
-					c.z = c.x;
-					c.w = c.x;
+					c.y = Float4(0.0f);
+					c.z = Float4(0.0f);
+					c.w = Float4(1.0f);
 					break;
 				default:
 					ASSERT(false);