Add missing cull flags when counting intersections of rays with triangle-based cubes
authorSÅ‚awomir Cygan <slawomir.cygan@intel.com>
Fri, 4 Jun 2021 15:49:38 +0000 (17:49 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 11 Jun 2021 09:23:07 +0000 (09:23 +0000)
Add a cull flags, so each convex geometry is counted once, instead of twice.

Components: Vulkan

VK-GL-CTS Issue: 2890

Affects:
    dEQP-VK.ray_tracing_pipeline.misc.*stress*
    dEQP-VK.ray_tracing_pipeline.misc.cullmask*
    dEQP-VK.ray_tracing_pipeline.misc.mixedPrimTL

Change-Id: Ie2e74149be8bb710c7ae3afb77f5854dca247aca

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

index 40cb7eb..341cf96 100644 (file)
@@ -1264,7 +1264,7 @@ public:
                                "void main()\n"
                                "{\n"
                                "    uint  nInvocation  = gl_LaunchIDEXT.z * gl_LaunchSizeEXT.x * gl_LaunchSizeEXT.y + gl_LaunchIDEXT.y * gl_LaunchSizeEXT.x + gl_LaunchIDEXT.x;\n"
-                               "    uint  rayFlags     = 0;\n"
+                               "    uint  rayFlags     = gl_RayFlagsCullBackFacingTrianglesEXT;\n"
                                "    float tmin         = 0.001;\n"
                                "    float tmax         = 9.0;\n"
                                "\n"
@@ -1586,7 +1586,7 @@ public:
                                "void main()\n"
                                "{\n"
                                "    uint  nInvocation  = gl_LaunchIDEXT.z * gl_LaunchSizeEXT.x * gl_LaunchSizeEXT.y + gl_LaunchIDEXT.y * gl_LaunchSizeEXT.x + gl_LaunchIDEXT.x;\n"
-                               "    uint  rayFlags     = 0;\n"
+                               "    uint  rayFlags     = gl_RayFlagsCullBackFacingTrianglesEXT;\n"
                                "    float tmin         = 0.001;\n"
                                "    float tmax         = 9.0;\n"
                                "\n"
@@ -2556,7 +2556,7 @@ public:
                                "    const uint nRaysPerInvocation = " + de::toString(m_nRaysPerInvocation) + ";\n"
                                "\n"
                                "    uint  nInvocation  = gl_LaunchIDEXT.z * gl_LaunchSizeEXT.x * gl_LaunchSizeEXT.y + gl_LaunchIDEXT.y * gl_LaunchSizeEXT.x + gl_LaunchIDEXT.x;\n"
-                               "    uint  rayFlags     = 0;\n"
+                               "    uint  rayFlags     = gl_RayFlagsCullBackFacingTrianglesEXT;\n"
                                "    float tmin         = 0.001;\n"
                                "    float tmax         = 4.0;\n"
                                "\n"