Fix resolvable depth difference calculation for triangle near 0
Fix resolvable depth difference calculation for triangle near 0

When all three vertices of a triangle have depth 0, the maximum exponent
e is 0. We can't just use (e - n) << n as the bit pattern for 2^(e - n),
because the exponent field underflows and creates a negative value.

All triangles where all depth values have a bias-adjusted exponent less
than 23 have this issue (note 2^(23 - 127) = 4.9e-32).

The fix is to perform 2^(e - n) as 2^e * 2^(-n). The multiplication
handles the underflow of the exponent either by creating a subnormal, or
zero.

Bug: b/139341727
Change-Id: I44b87feb55f61c5fa18ba235e9ec211926de3b3e
Fixes: b/174051829
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/51148
Kokoro-Result: kokoro <2ac7b1f3fa578934c95181d4272be0d3bca00121@google.com>
Tested-by: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>
Reviewed-by: Alexis Hétu <1c7141772178a7e80858c3db5052b328076f08f4@google.com>
Commit-Queue: Nicolas Capens <51edc787c30f24c4904e8ffbb5523c3a9f7a451d@google.com>

google/swiftshader,google/swiftshader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,bkaradzic/SwiftShader,google/swiftshader