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 18:34:37 +0000 (13:34 -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

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

index 5a06634df0135faa02b897486beaebb3d8acc28a..78797f5d481cb699bc0afdd3a787f0e35bb4958f 100644 (file)
@@ -6083,7 +6083,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)
                );
@@ -6223,7 +6223,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"
@@ -6318,7 +6318,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"
@@ -6364,7 +6364,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"