Hi All,

I try to use OpenCL for updating indirect ID3D11buffer, but during calling clCreateFromD3D11BufferNV, i got error CL_INVALID_D3D11_RESOURCE_NV.

simple code:
Code :
D3D11_BUFFER_DESC bufDesc;
bufDesc.ByteWidth = sizeof(D3D11_DRAW_INDEXED_INSTANCED_INDIRECT_ARGS); // 20 bytes
bufDesc.Usage = D3D11_USAGE_DEFAULT;
bufDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
bufDesc.MiscFlags = D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS; // Indirect Buffer
bufDesc.StructureByteStride = 0;
ID3D11Buffer* pVertexBufPtr = NULL;[url][/url]
HRESULT hr = hrStatus = pD3D11Device->CreateBuffer(&bufDesc, NULL, &pVertexBufPtr); // pVertexBufPtr - OK
cl_int ret = 0;
cl_mem clBuffer = clCreateFromD3D11BufferNV(context, CL_MEM_WRITE_ONLY, pVertexBufPtr, &ret);

It working fine on any AMD/Intel GPU with OpenCL 1.2 and Direct3D11 with D3D_FEATURE_LEVEL_11_X.

i attached simpe project with executable file.

It happens for example on nVidia GTX 760, nVidia 610

Also, i submitted this issue on nVidia forum: clCreateFromD3D11BufferNV returns CL_INVALID_D3D11_RESOURCE_NV for buffer with D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS

What do i do wrong ?