Creating Texture2D with OpenCL

Started by
2 comments, last by MJP 11 years, 4 months ago
Hello everyone, I have a further question. Is it possible to Transfer a Image to the gpu with OpenCL and use it as a Texture2D with DirectX11? And if, who can I manage this?
Advertisement
Why aren't you using DX compute shader? Probably the only way to get OpenCL/D3D11 interop is using a CPU copy
Nope, interop is part of the extension specs, for DX 11 look here: OpenCL 1.2 Extensions.

Do you have an NVidia card ? My card reports only OpenCL 1.1 but has the vendor extension cl_nv_d3d11_sharing. The functions look quite the same.

The OpenCL Programming Guide code samples come with a DX 10 interop example (dynamically changing a vertex buffer and a Texture2D), maybe you can adapt this to DX 11.
Yeah, it's possible using vendor-specific extensions. But your life will be much easier if you can just use a compute shader instead.

This topic is closed to new replies.

Advertisement