Fix improper use of vkCmdWaitEvents
authorPeter Quayle <peter.quayle@imgtec.com>
Wed, 28 Mar 2018 17:18:28 +0000 (18:18 +0100)
committerAlex Walters <alex.walters@imgtec.com>
Wed, 4 Apr 2018 13:18:34 +0000 (09:18 -0400)
dEQP-VK.synchronization.smoke.events was calling vkCmdWaitEvents inside
a render-pass, which is not allowed if the event is later triggerd using
vkSetEvent. Additionally, the test was only waiting 1ns to determine if
a queue had made forward progress, which is too short to give the
implementation a chance to do any work.

Affects:

dEQP-VK.synchronization.smoke.events

Components: Vulkan

VK-GL-CTS issue: 1089

Change-Id: I6d9c9a635d82840f49fd3d9ed3736f91c4b6f88d

external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp

index 4bc8ed0..5bd4d74 100644 (file)
@@ -477,9 +477,9 @@ void  recordRenderPass (const DeviceInterface& deviceInterface, const RenderInfo
        renderPassBeginState.clearValueCount                    = 1;
        renderPassBeginState.pClearValues                               = &clearValue;
 
-       deviceInterface.cmdBeginRenderPass(renderInfo.commandBuffer, &renderPassBeginState, VK_SUBPASS_CONTENTS_INLINE);
        if (renderInfo.waitEvent)
                deviceInterface.cmdWaitEvents(renderInfo.commandBuffer, 1, &renderInfo.event, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, 0, DE_NULL, 0, DE_NULL, 0, DE_NULL);
+       deviceInterface.cmdBeginRenderPass(renderInfo.commandBuffer, &renderPassBeginState, VK_SUBPASS_CONTENTS_INLINE);
        deviceInterface.cmdBindPipeline(renderInfo.commandBuffer, VK_PIPELINE_BIND_POINT_GRAPHICS, renderInfo.pipeline);
        deviceInterface.cmdBindVertexBuffers(renderInfo.commandBuffer, 0u, 1u, &renderInfo.vertexBuffer, &bindingOffset);
        deviceInterface.cmdDraw(renderInfo.commandBuffer, renderInfo.vertexBufferSize, 1, 0, 0);
@@ -1272,7 +1272,7 @@ tcu::TestStatus testEvents (Context& context)
        // make forward progress as long as the event is not signaled
        VK_CHECK(deviceInterface.queueSubmit(queue, 1, &submitInfo, testContext.fences[0]));
 
-       testStatus  = deviceInterface.waitForFences(device, 1, &testContext.fences[0], true, 1);
+       testStatus  = deviceInterface.waitForFences(device, 1, &testContext.fences[0], true, 10000000);
        if (testStatus != VK_TIMEOUT)
        {
                log << TestLog::Message << "testSynchronizationPrimitives failed to wait for set event from host." << TestLog::EndMessage;