Results 1 to 2 of 2

Thread: clCreateFromD3D10Texture2DKHR returning CL_INVALID_OPERATION

  1. #1

    clCreateFromD3D10Texture2DKHR returning CL_INVALID_OPERATION

    I'm trying to do postprocessing of a DirectX 10 scene in OpenCL

    Right now I'm creating the DX10 texture from the back buffer like so

    Code :
    swapChain->GetBuffer(0, __uuidof( ID3D10Texture2D ), (LPVOID*)&pBackBuffer );

    and then creating the cl resource using

    Code :
    cl_tex2DScreenTex = clCreateFromD3D10Texture2DKHR(context, CL_MEM_READ_ONLY, pBackBuffer, 	0, &status)

    and status returns error code for CL_INVALID_OPERATION.

    According to the documentation (, this error code shouldn't even come up. Also, this same code worked fine for clCreateFromD3D10BufferKHR.

    I'm on an ATI 5870 with the Stream SDK (cl_khr_d3d10_sharing verified as a valid extension )

  2. #2

    Re: clCreateFromD3D10Texture2DKHR returning CL_INVALID_OPERA

    oops, silly mistake. Was using CL_DEVICE_TYPE_CPU, and my cpu OCL implementation does not support images currently.

    for anyone else with the error, make sure (CL_DEVICE_IMAGE_SUPPORT == Yes) to use DX10 textures

Similar Threads

  1. CL_INVALID_OPERATION in clCreateContextFromType
    By Carlos.Reig in forum OpenCL
    Replies: 0
    Last Post: 07-25-2012, 06:10 AM
  2. Replies: 14
    Last Post: 01-27-2011, 05:48 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean