From 8c44b09211d253dfc09bc8b7dfbc1f60c277d9f6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mika=20Isoj=C3=A4rvi?= Date: Tue, 2 Feb 2016 15:22:45 -0800 Subject: [PATCH] Allow color to change once in dithering disabled gradient tests. 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 | 15 ++++++++++++++ android/cts/master/com.drawelements.deqp.gles3.xml | 20 ++++++++++++++++++ android/cts/master/gles2-master.txt | 5 +++++ .../cts/master/gles3-565-no-depth-no-stencil.txt | 5 +++++ android/cts/master/gles3-master.txt | 5 +++++ android/cts/master/src/gles2-test-issues.txt | 7 ------- android/cts/master/src/gles3-test-issues.txt | 7 ------- modules/gles2/functional/es2fDitheringTests.cpp | 24 ++++++++++++++-------- modules/gles3/functional/es3fDitheringTests.cpp | 22 ++++++++++++-------- 9 files changed, 80 insertions(+), 30 deletions(-) diff --git a/android/cts/master/com.drawelements.deqp.gles2.xml b/android/cts/master/com.drawelements.deqp.gles2.xml index 6e8a503..b24db87 100644 --- a/android/cts/master/com.drawelements.deqp.gles2.xml +++ b/android/cts/master/com.drawelements.deqp.gles2.xml @@ -39906,6 +39906,21 @@ + + + + + + + + + + + + + + + diff --git a/android/cts/master/com.drawelements.deqp.gles3.xml b/android/cts/master/com.drawelements.deqp.gles3.xml index 58032fb..ce42d24 100644 --- a/android/cts/master/com.drawelements.deqp.gles3.xml +++ b/android/cts/master/com.drawelements.deqp.gles3.xml @@ -128987,6 +128987,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/android/cts/master/gles2-master.txt b/android/cts/master/gles2-master.txt index 129417a..667f0c8 100644 --- a/android/cts/master/gles2-master.txt +++ b/android/cts/master/gles2-master.txt @@ -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 diff --git a/android/cts/master/gles3-565-no-depth-no-stencil.txt b/android/cts/master/gles3-565-no-depth-no-stencil.txt index c4c7aae..f86d1fb 100644 --- a/android/cts/master/gles3-565-no-depth-no-stencil.txt +++ b/android/cts/master/gles3-565-no-depth-no-stencil.txt @@ -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 diff --git a/android/cts/master/gles3-master.txt b/android/cts/master/gles3-master.txt index 19d052f..abe4ac0 100644 --- a/android/cts/master/gles3-master.txt +++ b/android/cts/master/gles3-master.txt @@ -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 diff --git a/android/cts/master/src/gles2-test-issues.txt b/android/cts/master/src/gles2-test-issues.txt index 6aabd91..30c9b9a 100644 --- a/android/cts/master/src/gles2-test-issues.txt +++ b/android/cts/master/src/gles2-test-issues.txt @@ -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 diff --git a/android/cts/master/src/gles3-test-issues.txt b/android/cts/master/src/gles3-test-issues.txt index 8b68757..31566d3 100644 --- a/android/cts/master/src/gles3-test-issues.txt +++ b/android/cts/master/src/gles3-test-issues.txt @@ -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 diff --git a/modules/gles2/functional/es2fDitheringTests.cpp b/modules/gles2/functional/es2fDitheringTests.cpp index b5d5239..faf9cb0 100644 --- a/modules/gles2/functional/es2fDitheringTests.cpp +++ b/modules/gles2/functional/es2fDitheringTests.cpp @@ -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; diff --git a/modules/gles3/functional/es3fDitheringTests.cpp b/modules/gles3/functional/es3fDitheringTests.cpp index 350b734..ad02947 100644 --- a/modules/gles3/functional/es3fDitheringTests.cpp +++ b/modules/gles3/functional/es3fDitheringTests.cpp @@ -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; -- 2.7.4