Fix bad merge from https://gerrit.khronos.org/#/c/5107/
authorPiers Daniell <pdaniell@nvidia.com>
Wed, 11 Dec 2019 22:19:18 +0000 (15:19 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 20 Dec 2019 12:01:56 +0000 (07:01 -0500)
When https://gerrit.khronos.org/#/c/4874/ was cherry-picked
to the vulkan-cts-1.1.6 branch it would have hit conflicts
with the new VK_EXT_line_rasterization tests from
https://gerrit.khronos.org/#/c/3997/.

This CL fixes a bad conflict resolution in
tcuRasterizationVerifier.cpp that forced the verification
mode of all line types top be scrict, when they should
have got their verification mode from
scene.verificationMode.

This CL also modifies the position of the test lines
for case 2 of LinesTestInstance::generateLines(). The
position of the last line, added with CL 5107, was moved
lower to avoid excessive overlap with the other three
lines. This excessive overlap caused many pixels to
share edges and aggravate a minor flaw in the software
line rasterizer where it always assumes full coverage on
pixels that share edges of two or more triangles.
They may actually still be only partial coverage when
doing smooth or multisample rendering, and forcing it
to full coverage won't match what hardware does.

Affects: dEQP-VK.rasterization.primitives.*

Components: Vulkan

VK-GL-CTS Issue: 2062

Change-Id: Ie865f46c24e8265fd47354faaf9be5efd002b2d4

external/vulkancts/modules/vulkan/rasterization/vktRasterizationTests.cpp
framework/common/tcuRasterizationVerifier.cpp

index 170c156fea9cff2c07d73ec3d1c12e5b703f9914..3ed780861cb88e4106f3e921fedf474380d13632 100644 (file)
@@ -2216,13 +2216,13 @@ void LinesTestInstance::generateLines (int iteration, std::vector<tcu::Vec4>& ou
                case 0:
                        // \note: these values are chosen arbitrarily
                        outData[0] = tcu::Vec4( 0.01f,  0.0f, 0.0f, 1.0f);
-                       outData[1] = tcu::Vec4( 0.5f,   0.2f, 0.0f, 1.0f);
+                       outData[1] = tcu::Vec4(  0.5f,  0.2f, 0.0f, 1.0f);
                        outData[2] = tcu::Vec4( 0.46f,  0.3f, 0.0f, 1.0f);
-                       outData[3] = tcu::Vec4(-0.3f,   0.2f, 0.0f, 1.0f);
-                       outData[4] = tcu::Vec4(-1.5f,  -0.4f, 0.0f, 1.0f);
-                       outData[5] = tcu::Vec4( 0.1f,   0.5f, 0.0f, 1.0f);
+                       outData[3] = tcu::Vec4( -0.3f,  0.2f, 0.0f, 1.0f);
+                       outData[4] = tcu::Vec4( -1.5f, -0.4f, 0.0f, 1.0f);
+                       outData[5] = tcu::Vec4(  0.1f,  0.5f, 0.0f, 1.0f);
                        outData[6] = tcu::Vec4( 0.75f, -0.4f, 0.0f, 1.0f);
-                       outData[7] = tcu::Vec4( 0.3f,   0.8f, 0.0f, 1.0f);
+                       outData[7] = tcu::Vec4(  0.3f,  0.8f, 0.0f, 1.0f);
                        break;
 
                case 1:
@@ -2232,8 +2232,8 @@ void LinesTestInstance::generateLines (int iteration, std::vector<tcu::Vec4>& ou
                        outData[3] = tcu::Vec4(  0.11f,   0.2f, 0.0f, 1.0f);
                        outData[4] = tcu::Vec4(  0.88f,   0.9f, 0.0f, 1.0f);
                        outData[5] = tcu::Vec4(  0.18f,  -0.2f, 0.0f, 1.0f);
-                       outData[6] = tcu::Vec4(  0.0f,   1.0f, 0.0f, 1.0f);
-                       outData[7] = tcu::Vec4(  0.0f,  -1.0f, 0.0f, 1.0f);
+                       outData[6] = tcu::Vec4(   0.0f,   1.0f, 0.0f, 1.0f);
+                       outData[7] = tcu::Vec4(   0.0f,  -1.0f, 0.0f, 1.0f);
                        break;
 
                case 2:
@@ -2243,8 +2243,8 @@ void LinesTestInstance::generateLines (int iteration, std::vector<tcu::Vec4>& ou
                        outData[3] = tcu::Vec4( 0.11f,  0.2f, 0.0f, 1.0f);
                        outData[4] = tcu::Vec4( 0.88f,  0.7f, 0.0f, 1.0f);
                        outData[5] = tcu::Vec4(  0.8f, -0.7f, 0.0f, 1.0f);
-                       outData[6] = tcu::Vec4(  1.0f,   0.0f, 0.0f, 1.0f);
-                       outData[7] = tcu::Vec4(  -1.0f,  0.0f, 0.0f, 1.0f);
+                       outData[6] = tcu::Vec4(  1.0f,  0.7f, 0.0f, 1.0f);
+                       outData[7] = tcu::Vec4( -1.0f,  0.7f, 0.0f, 1.0f);
                        break;
        }
 
index 85a80c953f75356b585d10bab6c47bb5dbd8e222..ad2be996def79231ceadadff42102f6a13d14f09 100644 (file)
@@ -1060,7 +1060,7 @@ bool verifyMultisampleLineGroupRasterization (const tcu::Surface& surface, const
                }
        }
 
-       return verifyTriangleGroupRasterization(surface, triangleScene, args, log, VERIFICATIONMODE_STRICT, logStash, vulkanLinesTest);
+       return verifyTriangleGroupRasterization(surface, triangleScene, args, log, scene.verificationMode, logStash, vulkanLinesTest);
 }
 
 bool verifyMultisampleLineGroupInterpolation (const tcu::Surface& surface, const LineSceneSpec& scene, const RasterizationArguments& args, tcu::TestLog& log)
@@ -2502,10 +2502,10 @@ bool verifyTriangleGroupRasterization (const tcu::Surface& surface, const Triang
                                                                }
                                                        }
                                        }
-                               // anything goes
+                                       // anything goes
                                        if (foundFragment == false)
                                        {
-                               errorMask.setPixel(x, y, partialPixelColor);
+                                               errorMask.setPixel(x, y, partialPixelColor);
                                                if (vulkanLinesTest == true)
                                                        ++missingPixels;
                                        }