Fixed constructNormalizedFloat.
authorAndrew Woloszyn <awoloszyn@google.com>
Wed, 13 Jan 2016 14:27:43 +0000 (09:27 -0500)
committerAndrew Woloszyn <awoloszyn@google.com>
Wed, 13 Jan 2016 14:27:43 +0000 (09:27 -0500)
It was starting this significand at the wrong index.

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp

index 457c9cd..2ae83ce 100644 (file)
@@ -2149,7 +2149,7 @@ float constructNormalizedFloat (deInt32 exponent, deUint32 significand)
 
        for (deInt32 idx = 0; idx < 23; ++idx)
        {
-               f += ((significand & 0x800000) == 0) ? 0.f : std::ldexp(1.0f, -idx);
+               f += ((significand & 0x800000) == 0) ? 0.f : std::ldexp(1.0f, -(idx + 1));
                significand <<= 1;
        }