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.BindFlags = D3D11_BIND_VERTEX_BUFFER | D3D11_BIND_SHADER_RESOURCE;
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_INVALID_D3D11_RESOURCE_NV
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.
https://www.dropbox.com/s/6g9gr1b0o1...eD3D11.7z?dl=0

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 ?