Skip to content

[SYCL][Bindless] Fix dx12 interop samples for new external type names #14872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ void DX12InteropTest::importDX12SharedMemoryHandle(size_t allocationSize) {
syclexp::external_mem_handle_type::win32_nt_dx12_resource,
allocationSize};

m_syclInteropMemHandle =
m_syclExternalMemHandle =
syclexp::import_external_memory(extMemDesc, m_syclQueue);

m_syclImageMemHandle = syclexp::map_external_image_memory(
m_syclInteropMemHandle, m_syclImageDesc, m_syclQueue);
m_syclExternalMemHandle, m_syclImageDesc, m_syclQueue);

m_syclImageHandle =
syclexp::create_image(m_syclImageMemHandle, m_syclImageDesc, m_syclQueue);
Expand All @@ -123,15 +123,15 @@ void DX12InteropTest::importDX12SharedSemaphoreHandle() {
extSemDesc{m_sharedSemaphoreHandle,
syclexp::external_semaphore_handle_type::win32_nt_dx12_fence};

m_syclInteropSemaphoreHandle =
m_syclExternalSemaphoreHandle =
syclexp::import_external_semaphore(extSemDesc, m_syclQueue);
}

void DX12InteropTest::callSYCLKernel() {
#ifdef TEST_SEMAPHORE_IMPORT
// Wait for imported semaphore. This semaphore was signalled at the
// end of `populateDX12Texture`.
m_syclQueue.ext_oneapi_wait_external_semaphore(m_syclInteropSemaphoreHandle,
m_syclQueue.ext_oneapi_wait_external_semaphore(m_syclExternalSemaphoreHandle,
m_sharedFenceValue);
#endif

Expand Down Expand Up @@ -168,7 +168,7 @@ void DX12InteropTest::callSYCLKernel() {

// Signal imported semaphore.
m_syclQueue.submit([&](sycl::handler &cgh) {
cgh.ext_oneapi_signal_external_semaphore(m_syclInteropSemaphoreHandle,
cgh.ext_oneapi_signal_external_semaphore(m_syclExternalSemaphoreHandle,
m_sharedFenceValue);
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class DX12InteropTest {
sycl::queue m_syclQueue;
sycl::device m_syclDevice;
syclexp::image_descriptor m_syclImageDesc;
syclexp::interop_mem_handle m_syclInteropMemHandle;
syclexp::interop_semaphore_handle m_syclInteropSemaphoreHandle;
syclexp::external_mem m_syclExternalMemHandle;
syclexp::external_semaphore m_syclExternalSemaphoreHandle;
syclexp::image_mem_handle m_syclImageMemHandle;
syclexp::unsampled_image_handle m_syclImageHandle;
};
Loading