Fix resetting command buffer in ray tracing tests
authorziga-lunarg <ziga@lunarg.com>
Sat, 17 Sep 2022 19:46:02 +0000 (21:46 +0200)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 6 Oct 2022 21:07:26 +0000 (21:07 +0000)
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT must be set to reset
command buffer and add missing reset

Components: Vulkan

VK-GL-CTS issue: 3960

Affected tests:
dEQP-VK.ray_tracing_pipeline.acceleration_structures.*

Change-Id: Icc5029fc796bff7cf095cbb78832483463cdaaaa

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

index db49077..5862bd5 100644 (file)
@@ -2773,7 +2773,7 @@ tcu::TestStatus RayTracingHeaderBottomAddressTestInstance::iterate (void)
        const VkQueue                                                                           queue                   = m_context.getUniversalQueue();
        Allocator&                                                                                      allocator               = m_context.getDefaultAllocator();
 
-       const Move<VkCommandPool>                                                       cmdPool                 = createCommandPool(vkd, device, 0, familyIndex);
+       const Move<VkCommandPool>                                                       cmdPool                 = createCommandPool(vkd, device, vk::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, familyIndex);
        const Move<VkCommandBuffer>                                                     cmdBuffer               = allocateCommandBuffer(vkd, device, *cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
 
        beginCommandBuffer(vkd, *cmdBuffer, 0);
@@ -2790,6 +2790,7 @@ tcu::TestStatus RayTracingHeaderBottomAddressTestInstance::iterate (void)
        SerialStorage                                                                           deepStorage             (vkd, device, allocator, m_params->buildType, serialInfo);
 
        // make deep serialization - top-level AS width bottom-level structures that it owns
+       vkd.resetCommandBuffer(*cmdBuffer, 0);
        beginCommandBuffer(vkd, *cmdBuffer, 0);
        src->serialize(vkd, device, *cmdBuffer, &deepStorage);
        endCommandBuffer(vkd, *cmdBuffer);