Bug Fix: Corrected result check in test dEQP-VK.api.command_buffers.submit_null_fence
authorArkadiusz Sarwa <arkadiusz.sarwa@mobica.com>
Tue, 19 Apr 2016 12:41:10 +0000 (14:41 +0200)
committerArkadiusz Sarwa <arkadiusz.sarwa@mobica.com>
Tue, 19 Apr 2016 12:41:10 +0000 (14:41 +0200)
external/vulkancts/modules/vulkan/api/vktApiCommandBuffersTests.cpp

index b770d4f..0154d36 100644 (file)
@@ -3332,13 +3332,20 @@ tcu::TestStatus submitBufferNullFence(Context& context)
        // Wait for the queue
        VK_CHECK(vk.waitForFences(vkDevice, 1u, &fence.get(), VK_TRUE, INFINITE_TIMEOUT));
 
+
        tcu::TestStatus testResult = tcu::TestStatus::incomplete();
 
-       if (vk.getEventStatus(vkDevice, events[0]->get()) != VK_EVENT_SET)
-               testResult = tcu::TestStatus::fail("The first event was not signaled -> the buffer was not executed.");
+       //Fence guaranteed that all buffers submited before fence were executed
+       if (vk.getEventStatus(vkDevice, events[0]->get()) != VK_EVENT_SET || vk.getEventStatus(vkDevice, events[1]->get()) != VK_EVENT_SET)
+       {
+               testResult = tcu::TestStatus::fail("One of the buffers was not executed.");
+       }
        else
-               testResult = tcu::TestStatus::pass("The first event was signaled -> the buffer with null fence submitted and executed correctly.");
+       {
+               testResult = tcu::TestStatus::pass("Buffers have been submitted and executed correctly.");
+       }
 
+       vk.queueWaitIdle(queue);
        return testResult;
 }