Fix polygon offset depth clamp and units resolution.

OpenGL requires depth values to be clamped to the [0, 1] range. Due to
frustum clipping already limiting the range, this can only happen when
non-zero polygon offset parameters are active.

Also fix the 'minimum resolvable difference' for the 32-bit floating-
point internal depth format that we use.

Bug swiftshader:82

Change-Id: Ic9ebcac182a2bc81ab51d79cfe0bb451d340bd1e
Reviewed-on: https://swiftshader-review.googlesource.com/12108
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Renderer/PixelProcessor.cpp b/src/Renderer/PixelProcessor.cpp
index db11aed..abf6593 100644
--- a/src/Renderer/PixelProcessor.cpp
+++ b/src/Renderer/PixelProcessor.cpp
@@ -990,6 +990,7 @@
 		state.pixelFogMode = context->pixelFogActive();
 		state.wBasedFog = context->wBasedFog && context->pixelFogActive() != FOG_NONE;
 		state.perspective = context->perspectiveActive();
+		state.depthClamp = (context->depthBias != 0.0f) || (context->slopeDepthBias != 0.0f);
 
 		if(context->alphaBlendActive())
 		{