Simplify geometry to reduce AABB precision issues
authorEric Werness <ewerness@nvidia.com>
Thu, 19 Nov 2020 01:16:23 +0000 (17:16 -0800)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 3 Dec 2020 19:45:48 +0000 (14:45 -0500)
AABBs are allowed to hit conservatively for precision reasons, which was
causing failures in some cases. Extremely simplify the geometry to make
it very unlikely that we'll get false hits.

Affects:

dEQP-VK.ray_tracing_pipeline.misc.recursiveTraces*

Components: Vulkan
VK-GL-CTS issue: 2444

Change-Id: Ie8a9ffde2761354a395c6367e6bca8145a22bbf3
(cherry picked from commit 756a198f6f3f5aa63a8b10c3c5fe4cf60fb3b2bb)

external/vulkancts/modules/vulkan/ray_tracing/vktRayTracingMiscTests.cpp

index 352bef33d571d7eae68ecf6aca9feb5739204a0d..4b2549d9fc9ab04d27e1a30939c5c9369c711124 100644 (file)
@@ -6084,7 +6084,7 @@ public:
                std::unique_ptr<GridASProvider> asProviderPtr(
                        new GridASProvider(     tcu::Vec3 (0,                                   0,      0),                             /* gridStartXYZ          */
                                                                tcu::Vec3 (1,                                   1,      1),                             /* gridCellSizeXYZ       */
-                                                               tcu::UVec3(1 + m_depthToUse,    1,      m_nRaysToTest),
+                                                               tcu::UVec3(1,                                   1,      1),
                                                                tcu::Vec3 (2,                                   0,      2),                             /* gridInterCellDeltaXYZ */
                                                                m_geometryType)
                );
@@ -6224,7 +6224,7 @@ public:
                                                "        currentNOriginRay = parentNOriginRay;\n"
                                                "        currentResultItem = nItem;\n"
                                                "\n"
-                                               "        vec3  cellStartXYZ  = vec3(parentDepth * 2.0, 0.0, parentNOriginRay * 2.0);\n"
+                                               "        vec3  cellStartXYZ  = vec3(0.0, 0.0, 0.0);\n"
                                                "        vec3  cellEndXYZ    = cellStartXYZ + vec3(1.0);\n"
                                                "        vec3  targetHit     = mix(cellStartXYZ, cellEndXYZ, vec3(0.5) );\n"
                                                "        vec3  targetMiss    = targetHit + vec3(0, 10, 0);\n"
@@ -6319,7 +6319,7 @@ public:
                                                "        currentNOriginRay = parentNOriginRay;\n"
                                                "        currentResultItem = nItem;\n"
                                                "\n"
-                                               "        vec3  cellStartXYZ  = vec3(parentDepth * 2.0, 0.0, parentNOriginRay * 2.0);\n"
+                                               "        vec3  cellStartXYZ  = vec3(0.0, 0.0, 0.0);\n"
                                                "        vec3  cellEndXYZ    = cellStartXYZ + vec3(1.0);\n"
                                                "        vec3  targetHit     = mix(cellStartXYZ, cellEndXYZ, vec3(0.5) );\n"
                                                "        vec3  targetMiss    = targetHit + vec3(0, 10, 0);\n"
@@ -6365,7 +6365,7 @@ public:
                                "    float tmax         = 9.0;\n"
                                "\n"
                                "    uint  cullMask      = 0xFF;\n"
-                               "    vec3  cellStartXYZ  = vec3(0.0, 0.0, nInvocation * 2.0);\n"
+                               "    vec3  cellStartXYZ  = vec3(0.0, 0.0, 0.0);\n"
                                "    vec3  cellEndXYZ    = cellStartXYZ + vec3(1.0);\n"
                                "    vec3  targetHit     = mix(cellStartXYZ, cellEndXYZ, vec3(0.5) );\n"
                                "    vec3  targetMiss    = targetHit + vec3(0, 10, 0);\n"