Allow false positive hits from build-in AABBs intersector
authorSlawomir Cygan <slawomir.cygan@intel.com>
Wed, 19 May 2021 16:04:58 +0000 (18:04 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Wed, 26 May 2021 10:02:20 +0000 (10:02 +0000)
This extends the fix from 7ff1f9cd to 'mixed' tests, which
also use AABBs.

This change allows the test to execute any hit shader,
in case of AABB geometry is used and the ray falsely 'intersects'
it.

This is needed, as the test does not calculate the proper
intersection in 'intersection' stage - it uses a shader that always
reports TRUE. Hence the test relies on build-in AABB
intersector, which may report false positives according to the
specification.

VK-GL-CTS Issue: 2848

Components: Vulkan

Affects: dEQP-VK.ray_tracing_pipeline.build.*mix*

Change-Id: Ia962992df866b68f84714dcb6429a1a90499d9b6

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

index ed46093..ef342d8 100644 (file)
@@ -531,7 +531,7 @@ deUint32 RayTracingBuildTestInstance::validateBuffer (de::MovePtr<BufferWithMemo
 
                if (bufferPtr[pos] != expectedValue)
                {
-                       if (m_data.testType == TEST_TYPE_AABBS)
+                       if (m_data.testType == TEST_TYPE_AABBS || m_data.testType == TEST_TYPE_MIXED)
                        {
                                // In the case of AABB geometries, implementations may increase their size in
                                // an acceleration structure in order to mitigate precision issues. This may