AnsweredAssumed Answered

OpenCL runtime bug when sharing texture with D3D11

Question asked by elad on Sep 7, 2020
Latest reply on Sep 14, 2020 by dipak

I have a program that initializes 2 Direct3D11 textures.
It then extract 2 cl_mem image objects from each texture and download its content to RAM.

 

When using DirectX11 device created via the new D3D11On12 API (WinSDK 10.0.19041.0), the texture memory layout that OpenCL sees is inconsistent with the memory layout DirectX sees. 

 

If I download the textures via OpenCL API I get either a blank image or this weird result:

 

 

 

 

When I download it via DirectX it looks OK:

 

 

Here is a link to a self contained VS2019 solution that reproduce this bug:

 

link

 

Hardware: WX7100, Windows 10 PC. latest drivers.

Outcomes