Set the recursion depth for chit and miss cases
authorPiers Daniell <pdaniell@nvidia.com>
Mon, 17 May 2021 19:04:21 +0000 (13:04 -0600)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 3 Jun 2021 08:54:44 +0000 (08:54 +0000)
In the new dEQP-VK.binding_model.descriptor_update.acceleration_structure.ray_tracing.*
group of tests the "chit" and "miss" variants the shaders
generate additional rays, which means their recursion depth needs to be
greater than 1. In both cases "2" covers it.

Affects:

dEQP-VK.binding_model.descriptor_update.acceleration_structure.*

Components: Vulkan

VK-GL-CTS issue: 2924

Change-Id: I7acb1eda10f0ad6c7f2754deaa8451c317b4841b

external/vulkancts/modules/vulkan/binding_model/vktBindingDescriptorUpdateASTests.cpp

index 531c52f..4f02522 100644 (file)
@@ -2103,6 +2103,10 @@ void BindingAcceleratioStructureRayTracingRayTracingTestInstance::initPipeline (
        if (0 != (m_shaders & VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR))             m_rayTracingPipeline->addShader(VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR             , createShaderModule(vkd, device, collection.get("chit"), 0), m_hitShaderGroup);
        if (0 != (m_shaders & VK_SHADER_STAGE_MISS_BIT_KHR))                    m_rayTracingPipeline->addShader(VK_SHADER_STAGE_MISS_BIT_KHR                    , createShaderModule(vkd, device, collection.get("miss"), 0), m_missShaderGroup);
 
+       // The "chit" and "miss" cases both generate more rays from their shaders.
+       if (m_testParams.testType == TEST_TYPE_USING_RAY_TRACING && (m_testParams.stage == VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR || m_testParams.stage == VK_SHADER_STAGE_MISS_BIT_KHR))
+               m_rayTracingPipeline->setMaxRecursionDepth(2u);
+
        if (0 != (shaders0 & VK_SHADER_STAGE_ANY_HIT_BIT_KHR))                  m_rayTracingPipeline->addShader(VK_SHADER_STAGE_ANY_HIT_BIT_KHR                 , createShaderModule(vkd, device, collection.get("ahit0"), 0), m_hitShaderGroup + 1);
        if (0 != (shaders0 & VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR))              m_rayTracingPipeline->addShader(VK_SHADER_STAGE_CLOSEST_HIT_BIT_KHR             , createShaderModule(vkd, device, collection.get("chit0"), 0), m_hitShaderGroup + 1);
        if (0 != (shaders0 & VK_SHADER_STAGE_MISS_BIT_KHR))                             m_rayTracingPipeline->addShader(VK_SHADER_STAGE_MISS_BIT_KHR                    , createShaderModule(vkd, device, collection.get("miss0"), 0), m_missShaderGroup + 1);