// 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;
}