Lines Matching refs:fence

21  * \brief Synchronization fence basic tests
72 const Unique<VkFence> fence (createFence(vk, device, &fenceInfo));
87 if (VK_NOT_READY != vk.getFenceStatus(device, *fence))
88 return tcu::TestStatus::fail("Created fence should be in unsignaled state");
90 if (VK_TIMEOUT != vk.waitForFences(device, 1u, &fence.get(), VK_TRUE, SHORT_FENCE_WAIT))
93 if (VK_NOT_READY != vk.getFenceStatus(device, *fence))
94 return tcu::TestStatus::fail("Created fence should be in unsignaled state");
99 VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, *fence));
101 if (VK_SUCCESS != vk.waitForFences(device, 1u, &fence.get(), DE_TRUE, LONG_FENCE_WAIT))
104 if (VK_SUCCESS != vk.getFenceStatus(device, *fence))
107 if (VK_SUCCESS != vk.resetFences(device, 1u, &fence.get()))
108 return tcu::TestStatus::fail("Couldn't reset the fence");
110 if (VK_NOT_READY != vk.getFenceStatus(device, *fence))
113 return tcu::TestStatus::pass("Basic one fence tests passed");
194 const VkFence fence[2] =
224 VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, fence[FIRST_FENCE]));
226 if (VK_SUCCESS != vk.waitForFences(device, 1u, &fence[FIRST_FENCE], DE_FALSE, LONG_FENCE_WAIT))
229 if (VK_SUCCESS != vk.resetFences(device, 1u, &fence[FIRST_FENCE]))
230 return tcu::TestStatus::fail("Couldn't reset the fence");
232 VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, fence[FIRST_FENCE]));
234 if (VK_TIMEOUT != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_TRUE, SHORT_FENCE_WAIT))
237 VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, fence[SECOND_FENCE]));
239 if (VK_SUCCESS != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_TRUE, LONG_FENCE_WAIT))
242 return tcu::TestStatus::pass("Basic multi fence tests passed");
259 const Unique<VkFence> fence (createFence(vk, device, &fenceCreateInfo));
261 VK_CHECK(vk.queueSubmit(queue, 0u, DE_NULL, *fence));
263 if (VK_SUCCESS != vk.waitForFences(device, 1u, &fence.get(), DE_TRUE, LONG_FENCE_WAIT))
298 const VkFence fence[2] =
329 if (VK_TIMEOUT != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_FALSE, SHORT_FENCE_WAIT))
330 return tcu::TestStatus::fail("vkWaitForFences should return VK_TIMEOUT for case: Wait for any fence (No fence has been signaled)");
332 if (VK_TIMEOUT != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_TRUE, SHORT_FENCE_WAIT))
333 return tcu::TestStatus::fail("vkWaitForFences should return VK_TIMEOUT for case: Wait for all fences (No fence has been signaled)");
335 VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, fence[SECOND_FENCE]));
337 if (VK_SUCCESS != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_FALSE, LONG_FENCE_WAIT))
338 return tcu::TestStatus::fail("vkWaitForFences should return VK_SUCCESS for case: Wait for any fence (Only second fence signaled)");
340 if (VK_TIMEOUT != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_TRUE, SHORT_FENCE_WAIT))
341 return tcu::TestStatus::fail("vkWaitForFences should return VK_TIMEOUT for case: Wait for all fences (Only second fence signaled)");
343 VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, fence[FIRST_FENCE]));
345 if (VK_SUCCESS != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_FALSE, LONG_FENCE_WAIT))
346 return tcu::TestStatus::fail("vkWaitForFences should return VK_SUCCESS for case: Wait for any fence (All fences signaled)");
348 if (VK_SUCCESS != vk.waitForFences(device, 2u, &fence[FIRST_FENCE], DE_TRUE, LONG_FENCE_WAIT))
351 return tcu::TestStatus::pass("Basic multi fence test without waitAll passed");
358 // Basic fence tests
359 de::MovePtr<tcu::TestCaseGroup> basicFenceTests(new tcu::TestCaseGroup(testCtx, "fence"));
361 // Basic one fence tests
363 // Basic multi fence tests
365 // Signal a fence after an empty queue submission
367 // Basic multi fence test without waitAll
369 // Create a single signaled fence and wait on it