Allow interchangeable signed zeros in fragment stage frexp.
authorJarkko Pöyry <jpoyry@google.com>
Thu, 18 Jun 2015 18:05:09 +0000 (11:05 -0700)
committerJarkko Pöyry <jpoyry@google.com>
Thu, 18 Jun 2015 18:07:30 +0000 (11:07 -0700)
Bug: 21923324
Change-Id: I2a556e6fcefe43a2bae62b3446fa2cccb4fa7356

modules/gles31/functional/es31fShaderCommonFunctionTests.cpp

index 2eab2e7..71613d2 100644 (file)
@@ -1737,13 +1737,14 @@ public:
 
        bool compare (const void* const* inputs, const void* const* outputs)
        {
-               const glu::DataType             type                    = m_spec.inputs[0].varType.getBasicType();
-               const glu::Precision    precision               = m_spec.inputs[0].varType.getPrecision();
-               const int                               scalarSize              = glu::getDataTypeScalarSize(type);
-               const bool                              signedZero              = supportsSignedZero(precision);
+               const glu::DataType             type                                            = m_spec.inputs[0].varType.getBasicType();
+               const glu::Precision    precision                                       = m_spec.inputs[0].varType.getPrecision();
+               const int                               scalarSize                                      = glu::getDataTypeScalarSize(type);
+               const bool                              transitSupportsSignedZero       = (m_shaderType != glu::SHADERTYPE_FRAGMENT); // executor cannot reliably transit negative zero to fragment stage
+               const bool                              signedZero                                      = supportsSignedZero(precision) && transitSupportsSignedZero;
 
-               const int                               mantissaBits    = getMinMantissaBits(precision);
-               const deUint32                  maxUlpDiff              = getMaxUlpDiffFromBits(mantissaBits);
+               const int                               mantissaBits                            = getMinMantissaBits(precision);
+               const deUint32                  maxUlpDiff                                      = getMaxUlpDiffFromBits(mantissaBits);
 
                for (int compNdx = 0; compNdx < scalarSize; compNdx++)
                {