Skip to content

Commit

Permalink
Update multi-import tests to use new semaphore types
Browse files Browse the repository at this point in the history
  • Loading branch information
joshqti committed Sep 28, 2023
1 parent c0a8adf commit ee567e6
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions test_conformance/vulkan/test_vulkan_interop_buffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,8 @@ run_test_with_one_queue(cl_context &context, cl_command_queue &cmd_queue1, cl_ke

int run_test_with_multi_import_same_ctx(cl_context &context, cl_command_queue &cmd_queue1, cl_kernel *kernel,
cl_kernel &verify_kernel, VulkanDevice &vkDevice, uint32_t numBuffers,
uint32_t bufferSize, bool use_fence)
uint32_t bufferSize, bool use_fence,
VulkanExternalSemaphoreHandleType vkExternalSemaphoreHandleType)
{
size_t global_work_size[1];
uint8_t *error_2;
Expand All @@ -687,8 +688,6 @@ int run_test_with_multi_import_same_ctx(cl_context &context, cl_command_queue &c
const std::vector<VulkanExternalMemoryHandleType>
vkExternalMemoryHandleTypeList =
getSupportedVulkanExternalMemoryHandleTypeList();
VulkanExternalSemaphoreHandleType vkExternalSemaphoreHandleType =
getSupportedVulkanExternalSemaphoreHandleTypeList(vkDevice)[0];
VulkanSemaphore vkVk2CLSemaphore(vkDevice, vkExternalSemaphoreHandleType);
VulkanSemaphore vkCl2VkSemaphore(vkDevice, vkExternalSemaphoreHandleType);
std::shared_ptr<VulkanFence> fence = nullptr;
Expand Down Expand Up @@ -996,7 +995,8 @@ int run_test_with_multi_import_same_ctx(cl_context &context, cl_command_queue &c
int run_test_with_multi_import_diff_ctx(cl_context &context, cl_context &context2, cl_command_queue &cmd_queue1,
cl_command_queue &cmd_queue2, cl_kernel *kernel1, cl_kernel *kernel2,
cl_kernel &verify_kernel, cl_kernel verify_kernel2, VulkanDevice &vkDevice,
uint32_t numBuffers, uint32_t bufferSize, bool use_fence)
uint32_t numBuffers, uint32_t bufferSize, bool use_fence,
VulkanExternalSemaphoreHandleType vkExternalSemaphoreHandleType)
{
size_t global_work_size[1];
uint8_t *error_3;
Expand All @@ -1017,8 +1017,6 @@ int run_test_with_multi_import_diff_ctx(cl_context &context, cl_context &context
const std::vector<VulkanExternalMemoryHandleType>
vkExternalMemoryHandleTypeList =
getSupportedVulkanExternalMemoryHandleTypeList();
VulkanExternalSemaphoreHandleType vkExternalSemaphoreHandleType =
getSupportedVulkanExternalSemaphoreHandleTypeList(vkDevice)[0];
VulkanSemaphore vkVk2CLSemaphore(vkDevice, vkExternalSemaphoreHandleType);
VulkanSemaphore vkCl2VkSemaphore(vkDevice, vkExternalSemaphoreHandleType);
std::shared_ptr<VulkanFence> fence = nullptr;
Expand Down Expand Up @@ -1671,12 +1669,12 @@ int test_buffer_common(cl_device_id device_, cl_context context_,
if (multiImport && !multiCtx) {
errNum = run_test_with_multi_import_same_ctx(
context, cmd_queue1, kernel, verify_kernel, vkDevice,
numBuffers, bufferSize, use_fence);
numBuffers, bufferSize, use_fence, semaphoreType);
} else if (multiImport && multiCtx) {
errNum = run_test_with_multi_import_diff_ctx(
context, context2, cmd_queue1, cmd_queue3, kernel, kernel2,
verify_kernel, verify_kernel2, vkDevice, numBuffers,
bufferSize, use_fence);
bufferSize, use_fence, semaphoreType);
} else if (numCQ == 2) {
errNum = run_test_with_two_queue(
context, cmd_queue1, cmd_queue2, kernel, verify_kernel,
Expand Down

0 comments on commit ee567e6

Please sign in to comment.