Allow color to change once in dithering disabled gradient tests.
authorMika Isojärvi <misojarvi@google.com>
Tue, 2 Feb 2016 23:22:45 +0000 (15:22 -0800)
committerMika Isojärvi <misojarvi@google.com>
Wed, 3 Feb 2016 17:59:57 +0000 (09:59 -0800)
Instead of requiring that each row or column to have only single color
allow color to change in dithering disabled tests to allow small
discontinuity on edge between triangles.

Bug: 23219552
Change-Id: I8e353187b37ab22fe8ea53985e36d1c9ba53dbc3

android/cts/master/com.drawelements.deqp.gles2.xml
android/cts/master/com.drawelements.deqp.gles3.xml
android/cts/master/gles2-master.txt
android/cts/master/gles3-565-no-depth-no-stencil.txt
android/cts/master/gles3-master.txt
android/cts/master/src/gles2-test-issues.txt
android/cts/master/src/gles3-test-issues.txt
modules/gles2/functional/es2fDitheringTests.cpp
modules/gles3/functional/es3fDitheringTests.cpp

index 6e8a503..b24db87 100644 (file)
                        </TestSuite>
                        <TestSuite name="dither">
                                <TestCase name="disabled">
+                                       <Test name="gradient_white">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_red">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_green">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_blue">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_alpha">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="unicolored_quad_white">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                        </Test>
index 58032fb..ce42d24 100644 (file)
                        </TestSuite>
                        <TestSuite name="dither">
                                <TestCase name="disabled">
+                                       <Test name="gradient_white">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                               <TestInstance glconfig="rgb565d0s0ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_red">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                               <TestInstance glconfig="rgb565d0s0ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_green">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                               <TestInstance glconfig="rgb565d0s0ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_blue">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                               <TestInstance glconfig="rgb565d0s0ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
+                                       <Test name="gradient_alpha">
+                                               <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
+                                               <TestInstance glconfig="rgb565d0s0ms0" rotation="unspecified" surfacetype="window"/>
+                                       </Test>
                                        <Test name="unicolored_quad_white">
                                                <TestInstance glconfig="rgba8888d24s8ms0" rotation="unspecified" surfacetype="window"/>
                                                <TestInstance glconfig="rgb565d0s0ms0" rotation="unspecified" surfacetype="window"/>
index 129417a..667f0c8 100644 (file)
@@ -12968,6 +12968,11 @@ dEQP-GLES2.functional.depth_range.compare.one_to_one
 dEQP-GLES2.functional.depth_range.compare.clamp_near
 dEQP-GLES2.functional.depth_range.compare.clamp_far
 dEQP-GLES2.functional.depth_range.compare.clamp_both
+dEQP-GLES2.functional.dither.disabled.gradient_white
+dEQP-GLES2.functional.dither.disabled.gradient_red
+dEQP-GLES2.functional.dither.disabled.gradient_green
+dEQP-GLES2.functional.dither.disabled.gradient_blue
+dEQP-GLES2.functional.dither.disabled.gradient_alpha
 dEQP-GLES2.functional.dither.disabled.unicolored_quad_white
 dEQP-GLES2.functional.dither.disabled.unicolored_quad_red
 dEQP-GLES2.functional.dither.disabled.unicolored_quad_green
index c4c7aae..f86d1fb 100644 (file)
@@ -2173,6 +2173,11 @@ dEQP-GLES3.functional.read_pixels.skip.choose_0_3
 dEQP-GLES3.functional.read_pixels.skip.choose_3_0
 dEQP-GLES3.functional.read_pixels.skip.choose_3_3
 dEQP-GLES3.functional.read_pixels.skip.choose_3_5
+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
 dEQP-GLES3.functional.dither.disabled.unicolored_quad_white
 dEQP-GLES3.functional.dither.disabled.unicolored_quad_red
 dEQP-GLES3.functional.dither.disabled.unicolored_quad_green
index 19d052f..abe4ac0 100644 (file)
@@ -38968,6 +38968,11 @@ dEQP-GLES3.functional.read_pixels.skip.choose_0_3
 dEQP-GLES3.functional.read_pixels.skip.choose_3_0
 dEQP-GLES3.functional.read_pixels.skip.choose_3_3
 dEQP-GLES3.functional.read_pixels.skip.choose_3_5
+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
 dEQP-GLES3.functional.dither.disabled.unicolored_quad_white
 dEQP-GLES3.functional.dither.disabled.unicolored_quad_red
 dEQP-GLES3.functional.dither.disabled.unicolored_quad_green
index 6aabd91..30c9b9a 100644 (file)
@@ -5,13 +5,6 @@ dEQP-GLES2.functional.texture.size.cube.512x512_rgba4444
 dEQP-GLES2.functional.fbo.completeness.renderable.renderbuffer.color0.rgb16f
 dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgb16f
 
-# Bug 23219552
-dEQP-GLES2.functional.dither.disabled.gradient_white
-dEQP-GLES2.functional.dither.disabled.gradient_red
-dEQP-GLES2.functional.dither.disabled.gradient_green
-dEQP-GLES2.functional.dither.disabled.gradient_blue
-dEQP-GLES2.functional.dither.disabled.gradient_alpha
-
 #Bug 25720457
 dEQP-GLES2.functional.texture.units.2_units.only_cube.9
 
index 8b68757..31566d3 100644 (file)
@@ -139,13 +139,6 @@ dEQP-GLES3.functional.shaders.texture_functions.texturelodoffset.sampler3d_float
 dEQP-GLES3.functional.shaders.builtin_functions.precision.reflect.*mediump*.scalar
 dEQP-GLES3.functional.shaders.builtin_functions.precision.reflect.*highp*.scalar
 
-# Bug 23219552
-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 24068436
 dEQP-GLES3.functional.shaders.texture_functions.texturegrad.samplercubeshadow_vertex
 dEQP-GLES3.functional.shaders.texture_functions.texturegrad.samplercubeshadow_fragment
index b5d5239..faf9cb0 100644 (file)
@@ -315,8 +315,9 @@ 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();
+               bool            colorHasChanged                 = false;
 
                for (int incrPos = 0; incrPos < increasingDirectionSize; 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;
index 350b734..ad02947 100644 (file)
@@ -315,8 +315,9 @@ 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();
+               bool            colorHasChanged                 = false;
 
                for (int incrPos = 0; incrPos < increasingDirectionSize; 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;