|
1 | | -// REQUIRES: aspect-ext_oneapi_external_memory_import |
2 | | -// REQUIRES: windows |
3 | 1 |
|
4 | | -// UNSUPPORTED: gpu-intel-gen12 |
5 | | -// UNSUPPORTED-INTENDED: Unknown issue with integrated GPU failing |
6 | | -// when importing memory |
7 | 2 |
|
8 | 3 | // RUN: %{build} %link-directx -o %t.out |
9 | 4 | // RUN: %{run-unfiltered-devices} env NEOReadDebugKeys=1 UseBindlessMode=1 UseExternalAllocatorForSshAndDsh=1 %t.out |
@@ -248,25 +243,31 @@ int runTest(D3D11ProgramState &d3d11ProgramState, sycl::queue syclQueue, |
248 | 243 | // it is only applicable to 2D textures. |
249 | 244 | texDesc.MiscFlags = D3D11_RESOURCE_MISC_SHARED_NTHANDLE | |
250 | 245 | D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX; |
| 246 | + printf("1\n"); |
251 | 247 | ThrowIfFailed(pDevice->CreateTexture2D(&texDesc, nullptr, &texture)); |
252 | 248 |
|
253 | 249 | // Create the keyed mutex for synchronising the shared resource. |
254 | 250 | ComPtr<IDXGIKeyedMutex> keyedMutex; |
| 251 | + printf("2\n"); |
255 | 252 | ThrowIfFailed(texture.As(&keyedMutex)); |
256 | 253 | d3d11ProgramState.key = 0; |
257 | 254 |
|
258 | 255 | // Create an NT handle to a shared resource referring to our texture. |
259 | 256 | // Opening the shared resource gives access to it for use on the SYCL device. |
260 | 257 | ComPtr<IDXGIResource1> sharedResource; |
| 258 | + printf("3\n"); |
261 | 259 | ThrowIfFailed(texture.As(&sharedResource)); |
262 | 260 | HANDLE sharedHandle = nullptr; |
| 261 | + printf("4\n"); |
263 | 262 | ThrowIfFailed(sharedResource->CreateSharedHandle( |
264 | 263 | nullptr, DXGI_SHARED_RESOURCE_READ | DXGI_SHARED_RESOURCE_WRITE, nullptr, |
265 | 264 | &sharedHandle)); |
266 | 265 |
|
267 | 266 | // Obtain a pointer to the shared resource for use in subsequent operations. |
268 | 267 | ComPtr<ID3D11Device1> device1; |
| 268 | + printf("5\n"); |
269 | 269 | ThrowIfFailed(pDevice->QueryInterface(IID_PPV_ARGS(&device1))); |
| 270 | + printf("6\n"); |
270 | 271 | ThrowIfFailed(device1->OpenSharedResource1( |
271 | 272 | sharedHandle, IID_PPV_ARGS(sharedResource.GetAddressOf()))); |
272 | 273 |
|
@@ -300,10 +301,12 @@ int runTest(D3D11ProgramState &d3d11ProgramState, sycl::queue syclQueue, |
300 | 301 | // When IDXGIKeyedMutex importing into SYCL is implemented, we'll be able to |
301 | 302 | // call it from the SYCL API. All it does is ensuring only one device has |
302 | 303 | // exclusive access. |
| 304 | + printf("7\n"); |
303 | 305 | ThrowIfFailed(keyedMutex->AcquireSync(d3d11ProgramState.key++, INFINITE)); |
304 | 306 | callSyclKernel<NDims, DType, NChannels>(syclQueue, syclImageHandle, |
305 | 307 | globalSize, localSize); |
306 | 308 | // Back to the D3D11 process |
| 309 | + printf("8\n"); |
307 | 310 | ThrowIfFailed(keyedMutex->ReleaseSync(d3d11ProgramState.key)); |
308 | 311 |
|
309 | 312 | // Read-back and verify |
|
0 commit comments