# clCreateContext fails when using CL\_CONTEXT\_D3D9\_DEVICE\_NV

**URL:** <https://forums.developer.nvidia.com/t/clcreatecontext-fails-when-using-cl-context-d3d9-device-nv/20619>\
**Category:** CUDA Programming and Performance\
**Created:** [January 19, 2011, 1:44pm UTC](https://forums.developer.nvidia.com/t/clcreatecontext-fails-when-using-cl-context-d3d9-device-nv/20619 "2011-01-19T13:44:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rene\_Z](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@Rene\_Z](https://forums.developer.nvidia.com/u/Rene_Z)\
**Post date:** [January 19, 2011, 1:44pm UTC](https://forums.developer.nvidia.com/t/clcreatecontext-fails-when-using-cl-context-d3d9-device-nv/20619/1 "2011-01-19T13:44:58Z")

</div>

Hi,

I’m trying to get the D3D9 interop to work using the cl\_nv\_d3d9\_sharing extension, but the call to clCreateContext fails with CL\_INVALID\_DEVICE as error code. The call is successful when I don’t specify D3D9 interop in the properties. What’s strange is that the extension spec doesn’t mention CL\_INVALID\_DEVICE as a possible error caused by the extension, so I think this is a bug in the driver.

After searching around on the internet and this forum I haven’t been able to find a solution to this problem, or even what might cause it. Does anyone here know the answers to those questions?

Thanks in advance!

Rene
