DO NOT MERGE: Make the tests permissive for Lollipop MR1
authorrie kanazawa <rie.kanazawa.sd@kyocera.jp>
Fri, 9 Nov 2018 02:07:43 +0000 (11:07 +0900)
committerRie Kanazawa <rie.kanazawa.sd@kyocera.jp>
Wed, 14 Nov 2018 11:12:39 +0000 (11:12 +0000)
dEQP-GLES3.functional.dither.disabled#gradient_white
dEQP-GLES3.functional.dither.disabled#gradient_red
dEQP-GLES3.functional.dither.disabled#gradient_green
dEQP-GLES3.functional.dither.disabled#gradient_blue
dEQP-GLES3.functional.dither.disabled#gradient_alpha

Bug:117302647

Test: Build CTS
Test: run cts --plan CTS-DEQP --disable-reboot

https://android.googlesource.com/platform/external/deqp/+/8c44b09211d253dfc09bc8b7dfbc1f60c277d9f6%5E%21/#F0
modules/gles2/functional/es2fDitheringTests.cpp
modules/gles3/functional/es3fDitheringTests.cpp
Bug: 23219552
+
https://android.googlesource.com/platform/external/deqp/+/085b52b2cda2eb522aa80f207d814dfc96bac84b%5E%21/#F0
Bug: 37477346

Change-Id: I013c970e84e764ce9ac49f1ecc7620369162388c
Signed-off-by: rie kanazawa <rie.kanazawa.sd@kyocera.jp>
modules/gles2/functional/es2fDitheringTests.cpp [changed mode: 0644->0755]
modules/gles3/functional/es3fDitheringTests.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 6fa1e27..8b81e00
@@ -315,12 +315,13 @@ bool DitheringCase::drawAndCheckGradient (const bool isVerticallyIncreasing, con
 
        if (!m_ditheringEnabled)
        {
-               const int increasingDirectionSize       = isVerticallyIncreasing ? renderedImg.getHeight() : renderedImg.getWidth();
-               const int constantDirectionSize         = isVerticallyIncreasing ? renderedImg.getWidth() : renderedImg.getHeight();
+               const int       increasingDirectionSize = isVerticallyIncreasing ? renderedImg.getHeight() : renderedImg.getWidth();
+               const int       constantDirectionSize   = isVerticallyIncreasing ? renderedImg.getWidth() : renderedImg.getHeight();
 
                for (int incrPos = 0; incrPos < increasingDirectionSize; incrPos++)
                {
-                       tcu::RGBA prevConstantDirectionPix;
+                       bool    colorHasChanged     = false;
+                       tcu::RGBA    prevConstantDirectionPix;
                        for (int constPos = 0; constPos < constantDirectionSize; constPos++)
                        {
                                const int                       x               = isVerticallyIncreasing ? constPos : incrPos;
@@ -329,13 +330,20 @@ bool DitheringCase::drawAndCheckGradient (const bool isVerticallyIncreasing, con
 
                                if (constPos > 0 && clr != prevConstantDirectionPix)
                                {
-                                       log << TestLog::Message
-                                               << "Failure: colors should be constant per " << (isVerticallyIncreasing ? "row" : "column")
-                                               << " (since dithering is disabled), but the color at position (" << x << ", " << y << ") is " << clr
-                                               << " and does not equal the color at (" << (isVerticallyIncreasing ? x-1 : x) << ", " << (isVerticallyIncreasing ? y : y-1) << "), which is " << prevConstantDirectionPix
-                                               << TestLog::EndMessage;
+                                       // Allow color to change once to take into account possibly
+                                       // discontinuity between triangles
+                                       if (colorHasChanged)
+                                       {
+                                               log << TestLog::Message
+                                                   << "Failure: colors should be constant per " << (isVerticallyIncreasing ? "row" : "column")
+                                                   << " (since dithering is disabled), but the color at position (" << x << ", " << y << ") is " << clr
+                                                   << " and does not equal the color at (" << (isVerticallyIncreasing ? x-1 : x) << ", " << (isVerticallyIncreasing ? y : y-1) << "), which is " << prevConstantDirectionPix
+                                                   << TestLog::EndMessage;
 
-                                       return false;
+                                               return false;
+                                       }
+                                       else
+                                               colorHasChanged = true;
                                }
 
                                prevConstantDirectionPix = clr;
old mode 100644 (file)
new mode 100755 (executable)
index 8fe1bc8..bda2300
@@ -315,12 +315,13 @@ bool DitheringCase::drawAndCheckGradient (const bool isVerticallyIncreasing, con
 
        if (!m_ditheringEnabled)
        {
-               const int increasingDirectionSize       = isVerticallyIncreasing ? renderedImg.getHeight() : renderedImg.getWidth();
-               const int constantDirectionSize         = isVerticallyIncreasing ? renderedImg.getWidth() : renderedImg.getHeight();
+               const int       increasingDirectionSize = isVerticallyIncreasing ? renderedImg.getHeight() : renderedImg.getWidth();
+               const int       constantDirectionSize   = isVerticallyIncreasing ? renderedImg.getWidth() : renderedImg.getHeight();
 
                for (int incrPos = 0; incrPos < increasingDirectionSize; incrPos++)
                {
-                       tcu::RGBA prevConstantDirectionPix;
+                       bool    colorHasChanged    = false;
+                       tcu::RGBA    prevConstantDirectionPix;
                        for (int constPos = 0; constPos < constantDirectionSize; constPos++)
                        {
                                const int                       x               = isVerticallyIncreasing ? constPos : incrPos;
@@ -329,13 +330,18 @@ bool DitheringCase::drawAndCheckGradient (const bool isVerticallyIncreasing, con
 
                                if (constPos > 0 && clr != prevConstantDirectionPix)
                                {
-                                       log << TestLog::Message
-                                               << "Failure: colors should be constant per " << (isVerticallyIncreasing ? "row" : "column")
-                                               << " (since dithering is disabled), but the color at position (" << x << ", " << y << ") is " << clr
-                                               << " and does not equal the color at (" << (isVerticallyIncreasing ? x-1 : x) << ", " << (isVerticallyIncreasing ? y : y-1) << "), which is " << prevConstantDirectionPix
-                                               << TestLog::EndMessage;
+                                       if (colorHasChanged)
+                                       {
+                                               log << TestLog::Message
+                                                   << "Failure: colors should be constant per " << (isVerticallyIncreasing ? "row" : "column")
+                                                   << " (since dithering is disabled), but the color at position (" << x << ", " << y << ") is " << clr
+                                                   << " and does not equal the color at (" << (isVerticallyIncreasing ? x-1 : x) << ", " << (isVerticallyIncreasing ? y : y-1) << "), which is " << prevConstantDirectionPix
+                                                   << TestLog::EndMessage;
 
-                                       return false;
+                                               return false;
+                                       }
+                                       else
+                                               colorHasChanged = true;
                                }
 
                                prevConstantDirectionPix = clr;