Revert "Fix subpixel precision for line geometry generation"
authorAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 14 Feb 2019 18:56:07 +0000 (13:56 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 21 Feb 2019 07:48:36 +0000 (02:48 -0500)
This reverts commit 3116016d8e0e4582396d67a1286aa3a6815a3332.

VK-GL-CTS issue: 1582, 1274

Affects:
dEQP-VK.rasterization.*line*
dEQP-GLES*.functional.rasterization.*line*

Components: Framework

Change-Id: I5e1fbc948f5784656523c37924ca746c6b6aa5a8

framework/common/tcuRasterizationVerifier.cpp

index 12de7e8..dd8ff86 100644 (file)
@@ -936,21 +936,15 @@ bool verifyMultisampleLineGroupRasterization (const tcu::Surface& surface, const
                        (lineNormalizedDeviceSpace[1] + tcu::Vec2(1.0f, 1.0f)) * 0.5f * viewportSize,
                };
 
-               const tcu::Vec2 lineScreenSpaceRounded[2] =
-               {
-                       tcu::Vec2(deFloatRound(lineScreenSpace[0].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[0].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits)),
-                       tcu::Vec2(deFloatRound(lineScreenSpace[1].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[1].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits))
-               };
-
-               const tcu::Vec2 lineDir                 = tcu::normalize(lineScreenSpaceRounded[1] - lineScreenSpaceRounded[0]);
+               const tcu::Vec2 lineDir                 = tcu::normalize(lineScreenSpace[1] - lineScreenSpace[0]);
                const tcu::Vec2 lineNormalDir   = tcu::Vec2(lineDir.y(), -lineDir.x());
 
                const tcu::Vec2 lineQuadScreenSpace[4] =
                {
-                       lineScreenSpaceRounded[0] + lineNormalDir * halfLineWidth,
-                       lineScreenSpaceRounded[0] - lineNormalDir * halfLineWidth,
-                       lineScreenSpaceRounded[1] - lineNormalDir * halfLineWidth,
-                       lineScreenSpaceRounded[1] + lineNormalDir * halfLineWidth,
+                       lineScreenSpace[0] + lineNormalDir * halfLineWidth,
+                       lineScreenSpace[0] - lineNormalDir * halfLineWidth,
+                       lineScreenSpace[1] - lineNormalDir * halfLineWidth,
+                       lineScreenSpace[1] + lineNormalDir * halfLineWidth,
                };
                const tcu::Vec2 lineQuadNormalizedDeviceSpace[4] =
                {
@@ -995,21 +989,15 @@ bool verifyMultisampleLineGroupInterpolation (const tcu::Surface& surface, const
                        (lineNormalizedDeviceSpace[1] + tcu::Vec2(1.0f, 1.0f)) * 0.5f * viewportSize,
                };
 
-               const tcu::Vec2 lineScreenSpaceRounded[2] =
-               {
-                       tcu::Vec2(deFloatRound(lineScreenSpace[0].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[0].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits)),
-                       tcu::Vec2(deFloatRound(lineScreenSpace[1].x() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits), deFloatRound(lineScreenSpace[1].y() * (float)(1 << args.subpixelBits)) / (float)(1 << args.subpixelBits))
-               };
-
-               const tcu::Vec2 lineDir                 = tcu::normalize(lineScreenSpaceRounded[1] - lineScreenSpaceRounded[0]);
+               const tcu::Vec2 lineDir                 = tcu::normalize(lineScreenSpace[1] - lineScreenSpace[0]);
                const tcu::Vec2 lineNormalDir   = tcu::Vec2(lineDir.y(), -lineDir.x());
 
                const tcu::Vec2 lineQuadScreenSpace[4] =
                {
-                       lineScreenSpaceRounded[0] + lineNormalDir * halfLineWidth,
-                       lineScreenSpaceRounded[0] - lineNormalDir * halfLineWidth,
-                       lineScreenSpaceRounded[1] - lineNormalDir * halfLineWidth,
-                       lineScreenSpaceRounded[1] + lineNormalDir * halfLineWidth,
+                       lineScreenSpace[0] + lineNormalDir * halfLineWidth,
+                       lineScreenSpace[0] - lineNormalDir * halfLineWidth,
+                       lineScreenSpace[1] - lineNormalDir * halfLineWidth,
+                       lineScreenSpace[1] + lineNormalDir * halfLineWidth,
                };
                const tcu::Vec2 lineQuadNormalizedDeviceSpace[4] =
                {