From: Peter Quayle Date: Thu, 5 Dec 2019 11:34:25 +0000 (+0000) Subject: Remove event tests which use illegal behaviour X-Git-Tag: upstream/1.3.5~1353^2~2^2^2^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=01b6a7eccec632acb8ee41d12f359e5aec83f650;hp=0c854e2d8f02f1aab9edeb4998f1f49904928325;p=platform%2Fupstream%2FVK-GL-CTS.git Remove event tests which use illegal behaviour Two event tests were relying on being able to wait on the device for an event to be set on the host. This behaviour is not allowed. Affects: dEQP-VK.synchronization.smoke.events dEQP-VK.synchronization.basic.event.host_set_device_wait Components: Vulkan VK-GL-CTS issue: 2108 Change-Id: Idbb8b4e2468d617b3e47d5055622789a2dd3eb00 (cherry picked from commit b45f4268074897cb4ee7da4b81a17b310301d77b) (cherry picked from commit 8be9e27df3c1e1d9f50e549d7293bc202072d80d) --- diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt index 145dd56..2b2de69 100644 --- a/android/cts/master/vk-master.txt +++ b/android/cts/master/vk-master.txt @@ -373884,7 +373884,6 @@ dEQP-VK.wsi.display.get_display_plane_capabilities2 dEQP-VK.synchronization.smoke.fences dEQP-VK.synchronization.smoke.binary_semaphores dEQP-VK.synchronization.smoke.timeline_semaphores -dEQP-VK.synchronization.smoke.events dEQP-VK.synchronization.basic.fence.one dEQP-VK.synchronization.basic.fence.multi dEQP-VK.synchronization.basic.fence.empty_submit @@ -373899,7 +373898,6 @@ dEQP-VK.synchronization.basic.timeline_semaphore.multi_queue dEQP-VK.synchronization.basic.timeline_semaphore.chain dEQP-VK.synchronization.basic.event.host_set_reset dEQP-VK.synchronization.basic.event.device_set_reset -dEQP-VK.synchronization.basic.event.host_set_device_wait dEQP-VK.synchronization.basic.event.single_submit_multi_command_buffer dEQP-VK.synchronization.basic.event.multi_submit_multi_command_buffer dEQP-VK.synchronization.basic.event.multi_secondary_command_buffer diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicEventTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicEventTests.cpp index c80d24d..c2e76f1 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicEventTests.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationBasicEventTests.cpp @@ -122,52 +122,6 @@ tcu::TestStatus deviceResetSetEventCase (Context& context) return tcu::TestStatus::pass("Device set and reset event tests pass"); } -tcu::TestStatus deviceWaitForEventCase (Context& context) -{ - const DeviceInterface& vk = context.getDeviceInterface(); - const VkDevice device = context.getDevice(); - const VkQueue queue = context.getUniversalQueue(); - const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex(); - const Unique fence (createFence(vk, device)); - const Unique cmdPool (createCommandPool(vk, device, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, queueFamilyIndex)); - const Unique cmdBuffer (makeCommandBuffer(vk, device, *cmdPool)); - const VkSubmitInfo submitInfo = - { - VK_STRUCTURE_TYPE_SUBMIT_INFO, // VkStructureType sType; - DE_NULL, // const void* pNext; - 0u, // deUint32 waitSemaphoreCount; - DE_NULL, // const VkSemaphore* pWaitSemaphores; - DE_NULL, // const VkPipelineStageFlags* pWaitDstStageMask; - 1u, // deUint32 commandBufferCount; - &cmdBuffer.get(), // const VkCommandBuffer* pCommandBuffers; - 0u, // deUint32 signalSemaphoreCount; - DE_NULL, // const VkSemaphore* pSignalSemaphores; - }; - const VkEventCreateInfo eventInfo = - { - VK_STRUCTURE_TYPE_EVENT_CREATE_INFO, - DE_NULL, - 0 - }; - const Unique event (createEvent(vk, device, &eventInfo, DE_NULL)); - - beginCommandBuffer(vk, *cmdBuffer); - vk.cmdWaitEvents(*cmdBuffer, 1u, &event.get(), VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0u, DE_NULL, 0u, DE_NULL, 0u, DE_NULL); - endCommandBuffer(vk, *cmdBuffer); - - VK_CHECK(vk.queueSubmit(queue, 1u, &submitInfo, *fence)); - if (VK_TIMEOUT != vk.waitForFences(device, 1u, &fence.get(), DE_TRUE, SHORT_FENCE_WAIT)) - return tcu::TestStatus::fail("Queue should not end execution"); - - if (VK_SUCCESS != vk.setEvent(device, *event)) - return tcu::TestStatus::fail("Couldn't set event"); - - if (VK_SUCCESS != vk.waitForFences(device, 1u, &fence.get(), DE_TRUE, LONG_FENCE_WAIT)) - return tcu::TestStatus::fail("Queue should end execution"); - - return tcu::TestStatus::pass("Device wait for event tests pass"); -} - tcu::TestStatus singleSubmissionCase (Context& context) { enum {SET=0, WAIT, COUNT}; @@ -347,7 +301,6 @@ tcu::TestCaseGroup* createBasicEventTests (tcu::TestContext& testCtx) de::MovePtr basicTests(new tcu::TestCaseGroup(testCtx, "event", "Basic event tests")); addFunctionCase(basicTests.get(), "host_set_reset", "Basic event tests set and reset on host", hostResetSetEventCase); addFunctionCase(basicTests.get(), "device_set_reset", "Basic event tests set and reset on device", deviceResetSetEventCase); - addFunctionCase(basicTests.get(), "host_set_device_wait", "Wait for event on device test", deviceWaitForEventCase); addFunctionCase(basicTests.get(), "single_submit_multi_command_buffer", "Wait and set event single submission on device", singleSubmissionCase); addFunctionCase(basicTests.get(), "multi_submit_multi_command_buffer", "Wait and set event mutli submission on device", multiSubmissionCase); addFunctionCase(basicTests.get(), "multi_secondary_command_buffer", "Event used on secondary command buffer ", secondaryCommandBufferCase); diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp index 35a594d..59df781 100644 --- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp +++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp @@ -1222,91 +1222,6 @@ tcu::TestStatus testTimelineSemaphores (Context& context) return testSemaphores(context, VK_SEMAPHORE_TYPE_TIMELINE_KHR); } -tcu::TestStatus testEvents (Context& context) -{ - TestLog& log = context.getTestContext().getLog(); - const DeviceInterface& deviceInterface = context.getDeviceInterface(); - VkDevice device = context.getDevice(); - const deUint32 queueFamilyIdx = context.getUniversalQueueFamilyIndex(); - Allocator& allocator = context.getDefaultAllocator(); - VkQueue queue = context.getUniversalQueue(); - VkResult testStatus; - VkResult eventStatus; - TestContext testContext (deviceInterface, device, queueFamilyIdx, context.getBinaryCollection(), allocator); - Unique event (createEvent(deviceInterface, device)); - VkSubmitInfo submitInfo; - void* resultImage; - - const tcu::Vec4 vertices1[] = - { - tcu::Vec4( 0.5f, 0.5f, 0.0f, 1.0f), - tcu::Vec4(-0.5f, 0.5f, 0.0f, 1.0f), - tcu::Vec4( 0.0f, -0.5f, 0.0f, 1.0f) - }; - - testContext.vertices = vertices1; - testContext.numVertices = DE_LENGTH_OF_ARRAY(vertices1); - testContext.renderDimension = tcu::IVec2(256, 256); - testContext.waitEvent = true; - testContext.event = event.get(); - testContext.renderSize = sizeof(deUint32) * testContext.renderDimension.x() * testContext.renderDimension.y(); - - createCommandBuffer(deviceInterface, device, queueFamilyIdx, &testContext.cmdBuffer, &testContext.commandPool); - generateWork(testContext); - - initSubmitInfo(&submitInfo, 1); - submitInfo.pCommandBuffers = &testContext.cmdBuffer.get(); - - // 6.3 An event is initially in the unsignaled state - eventStatus = deviceInterface.getEventStatus(device, event.get()); - if (eventStatus != VK_EVENT_RESET) - { - log << TestLog::Message << "testSynchronizationPrimitives event should be reset but status is " << getResultName(eventStatus) << TestLog::EndMessage; - return tcu::TestStatus::fail("Event in incorrect status"); - } - - // The recorded command buffer should wait at the top of the graphics pipe for an event signaled by the host and so should not - // 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, 10000000); - if (testStatus != VK_TIMEOUT) - { - log << TestLog::Message << "testSynchronizationPrimitives failed to wait for set event from host." << TestLog::EndMessage; - return tcu::TestStatus::fail("failed to wait for event set from host"); - } - - // Should allow the recorded command buffer to finally make progress - VK_CHECK(deviceInterface.setEvent(device, event.get())); - eventStatus = deviceInterface.getEventStatus(device, event.get()); - if (eventStatus != VK_EVENT_SET) - { - log << TestLog::Message << "testEvents failed to transition event to signaled state via setEvent call from host" << TestLog::EndMessage; - return tcu::TestStatus::fail("failed to signal event from host"); - } - - testStatus = deviceInterface.waitForFences(device, 1, &testContext.fences[0], true, ~(0ull)); - if (testStatus != VK_SUCCESS) - { - log << TestLog::Message << "testSynchronizationPrimitives failed to proceed after set event from host." << TestLog::EndMessage; - return tcu::TestStatus::fail("failed to proceed after event set from host"); - } - - invalidateAlloc(deviceInterface, device, *testContext.renderReadBuffer); - resultImage = testContext.renderReadBuffer->getHostPtr(); - - log << TestLog::Image( "result", - "result", - tcu::ConstPixelBufferAccess(tcu::TextureFormat( - tcu::TextureFormat::RGBA, tcu::TextureFormat::UNORM_INT8), - testContext.renderDimension.x(), - testContext.renderDimension.y(), - 1, - resultImage)); - - return tcu::TestStatus::pass("synchronization-events passed"); -} - } // anonymous tcu::TestCaseGroup* createSmokeTests (tcu::TestContext& textCtx) @@ -1316,7 +1231,6 @@ tcu::TestCaseGroup* createSmokeTests (tcu::TestContext& textCtx) addFunctionCaseWithPrograms(synchTests.get(), "fences", "", buildShaders, testFences); addFunctionCaseWithPrograms(synchTests.get(), "binary_semaphores", "", buildShaders, testBinarySemaphores); addFunctionCaseWithPrograms(synchTests.get(), "timeline_semaphores", "", buildShaders, testTimelineSemaphores); - addFunctionCaseWithPrograms(synchTests.get(), "events", "", buildShaders, testEvents); return synchTests.release(); } diff --git a/external/vulkancts/mustpass/master/vk-default-no-waivers.txt b/external/vulkancts/mustpass/master/vk-default-no-waivers.txt index 4de8f82..16886ab 100644 --- a/external/vulkancts/mustpass/master/vk-default-no-waivers.txt +++ b/external/vulkancts/mustpass/master/vk-default-no-waivers.txt @@ -375922,7 +375922,6 @@ dEQP-VK.wsi.display.get_display_plane_capabilities2 dEQP-VK.synchronization.smoke.fences dEQP-VK.synchronization.smoke.binary_semaphores dEQP-VK.synchronization.smoke.timeline_semaphores -dEQP-VK.synchronization.smoke.events dEQP-VK.synchronization.basic.fence.one dEQP-VK.synchronization.basic.fence.multi dEQP-VK.synchronization.basic.fence.empty_submit @@ -375937,7 +375936,6 @@ dEQP-VK.synchronization.basic.timeline_semaphore.multi_queue dEQP-VK.synchronization.basic.timeline_semaphore.chain dEQP-VK.synchronization.basic.event.host_set_reset dEQP-VK.synchronization.basic.event.device_set_reset -dEQP-VK.synchronization.basic.event.host_set_device_wait dEQP-VK.synchronization.basic.event.single_submit_multi_command_buffer dEQP-VK.synchronization.basic.event.multi_submit_multi_command_buffer dEQP-VK.synchronization.basic.event.multi_secondary_command_buffer diff --git a/external/vulkancts/mustpass/master/vk-default.txt b/external/vulkancts/mustpass/master/vk-default.txt index b59c0c5..f01e0f6 100644 --- a/external/vulkancts/mustpass/master/vk-default.txt +++ b/external/vulkancts/mustpass/master/vk-default.txt @@ -375883,7 +375883,6 @@ dEQP-VK.wsi.display.get_display_plane_capabilities2 dEQP-VK.synchronization.smoke.fences dEQP-VK.synchronization.smoke.binary_semaphores dEQP-VK.synchronization.smoke.timeline_semaphores -dEQP-VK.synchronization.smoke.events dEQP-VK.synchronization.basic.fence.one dEQP-VK.synchronization.basic.fence.multi dEQP-VK.synchronization.basic.fence.empty_submit @@ -375898,7 +375897,6 @@ dEQP-VK.synchronization.basic.timeline_semaphore.multi_queue dEQP-VK.synchronization.basic.timeline_semaphore.chain dEQP-VK.synchronization.basic.event.host_set_reset dEQP-VK.synchronization.basic.event.device_set_reset -dEQP-VK.synchronization.basic.event.host_set_device_wait dEQP-VK.synchronization.basic.event.single_submit_multi_command_buffer dEQP-VK.synchronization.basic.event.multi_submit_multi_command_buffer dEQP-VK.synchronization.basic.event.multi_secondary_command_buffer