Test imported signaled sync fd for VkSemaphore
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Wed, 5 Aug 2020 15:00:37 +0000 (18:00 +0300)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Thu, 10 Sep 2020 14:22:57 +0000 (10:22 -0400)
New tests:
dEQP-VK.api.external.semaphore.sync_fd.import_signaled_temporary

Components: Vulkan

Change-Id: I86937f57d580f62a0bae4f2d06ee28057ca0e27e

android/cts/master/vk-master-2020-03-01.txt
android/cts/master/vk-master.txt
external/vulkancts/modules/vulkan/api/vktApiExternalMemoryTests.cpp
external/vulkancts/mustpass/master/vk-default.txt

index 37496d69f1b998288bdd1eda6147017715a65753..8bd700651fd5d5ef03a4982f0bc910f33cbd8cf1 100644 (file)
@@ -62744,6 +62744,7 @@ dEQP-VK.api.fill_and_update_buffer.dedicated_alloc.fill_buffer_vk_whole_size_3_e
 dEQP-VK.api.fill_and_update_buffer.dedicated_alloc.fill_buffer_vk_whole_size_3_extra_bytes_offset_4
 dEQP-VK.api.fill_and_update_buffer.dedicated_alloc.fill_buffer_vk_whole_size_3_extra_bytes_offset_8
 dEQP-VK.api.fill_and_update_buffer.dedicated_alloc.fill_buffer_vk_whole_size_3_extra_bytes_offset_12
+dEQP-VK.api.external.semaphore.sync_fd.import_signaled_temporary
 dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.d16_unorm
 dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.x8_d24_unorm_pack32
 dEQP-VK.api.external.memory.android_hardware_buffer.image_formats.d24_unorm_s8_uint
index 954ad7557bbfe1f528aa03293f292e94221a4aee..5dac9eca1d7c6ae867376fb8ca73b5fb5c4f4ce0 100644 (file)
@@ -150361,6 +150361,7 @@ dEQP-VK.api.external.semaphore.sync_fd.import_multiple_times_temporary
 dEQP-VK.api.external.semaphore.sync_fd.signal_export_import_wait_temporary
 dEQP-VK.api.external.semaphore.sync_fd.signal_import_temporary
 dEQP-VK.api.external.semaphore.sync_fd.transference_temporary
+dEQP-VK.api.external.semaphore.sync_fd.import_signaled_temporary
 dEQP-VK.api.external.semaphore.sync_fd.export_multiple_times_temporary
 dEQP-VK.api.external.semaphore.sync_fd.dup_temporary
 dEQP-VK.api.external.semaphore.sync_fd.dup2_temporary
index a3e210dcf44784f265158d78e5933e15d5980a07..30e70d92f7ac4db73695079b0a5bceed5a72759a 100644 (file)
@@ -1163,6 +1163,31 @@ tcu::TestStatus testSemaphoreSignalWaitImport (Context&                                          context,
        }
 }
 
+tcu::TestStatus testSemaphoreImportSyncFdSignaled (Context&                                            context,
+                                                                                                  const SemaphoreTestConfig    config)
+{
+       const vk::PlatformInterface&            vkp                                     (context.getPlatformInterface());
+       const CustomInstance                            instance                        (createTestInstance(context, 0u, 0u, config.externalType));
+       const vk::InstanceDriver&                       vki                                     (instance.getDriver());
+       const vk::VkPhysicalDevice                      physicalDevice          (vk::chooseDevice(vki, instance, context.getTestContext().getCommandLine()));
+       const deUint32                                          queueFamilyIndex        (chooseQueueFamilyIndex(vki, physicalDevice, 0u));
+       const vk::VkSemaphoreImportFlags        flags                           = config.permanence == PERMANENCE_TEMPORARY ? vk::VK_SEMAPHORE_IMPORT_TEMPORARY_BIT : (vk::VkSemaphoreImportFlagBits)0u;
+
+       checkSemaphoreSupport(vki, physicalDevice, config.externalType);
+
+       {
+               const vk::Unique<vk::VkDevice>          device          (createTestDevice(context, vkp, instance, vki, physicalDevice, config.externalType, 0u, 0u, queueFamilyIndex));
+               const vk::DeviceDriver                          vkd                     (vkp, instance, *device);
+               const vk::VkQueue                                       queue           (getQueue(vkd, *device, queueFamilyIndex));
+               NativeHandle                                            handle          = -1;
+               const vk::Unique<vk::VkSemaphore>       semaphore       (createAndImportSemaphore(vkd, *device, config.externalType, handle, flags));
+
+               submitDummyWait(vkd, queue, *semaphore);
+
+               return tcu::TestStatus::pass("Pass");
+       }
+}
+
 tcu::TestStatus testSemaphoreMultipleExports (Context&                                 context,
                                                                                          const SemaphoreTestConfig     config)
 {
@@ -4301,6 +4326,12 @@ de::MovePtr<tcu::TestCaseGroup> createSemaphoreTests (tcu::TestContext& testCtx,
                addFunctionCase(semaphoreGroup.get(), std::string("signal_import_") + permanenceName,                           "Test signaling and importing the semaphore.",                                                  testSemaphoreSignalImport,                              config);
                addFunctionCase(semaphoreGroup.get(), std::string("transference_") + permanenceName,                            "Test semaphores transference.",                                                                                testSemaphoreTransference,                              config);
 
+               if (externalType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT)
+               {
+                       addFunctionCase(semaphoreGroup.get(), std::string("import_signaled_") + permanenceName,                 "Test import signaled semaphore fd.",                                                                           testSemaphoreImportSyncFdSignaled,      config);
+               }
+
+
                if (externalType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_SYNC_FD_BIT
                        || externalType == vk::VK_EXTERNAL_SEMAPHORE_HANDLE_TYPE_OPAQUE_FD_BIT)
                {
index bc35bb4b00f1fb23dffff345cfd44378f2a84f52..a94e3f09c4f44bb794f73a7b56f9571b7d7aec8c 100644 (file)
@@ -150360,6 +150360,7 @@ dEQP-VK.api.external.semaphore.sync_fd.import_multiple_times_temporary
 dEQP-VK.api.external.semaphore.sync_fd.signal_export_import_wait_temporary
 dEQP-VK.api.external.semaphore.sync_fd.signal_import_temporary
 dEQP-VK.api.external.semaphore.sync_fd.transference_temporary
+dEQP-VK.api.external.semaphore.sync_fd.import_signaled_temporary
 dEQP-VK.api.external.semaphore.sync_fd.export_multiple_times_temporary
 dEQP-VK.api.external.semaphore.sync_fd.dup_temporary
 dEQP-VK.api.external.semaphore.sync_fd.dup2_temporary