Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (1 posts)

How can I create a new ID3D11Buffer object from a existing ID3D11Texture2D object.

Last post 11/4/2016 3:26 AM by Peng Huan Hung. 0 replies.
  • 11/4/2016 3:26 AM

    How can I create a new ID3D11Buffer object from a existing ID3D11Texture2D object.

    Hi,

    I am investigating about how to share the data between OpenCL & DirectX11.
    Dues to I am using ID3D11Texture2D to do video streaming & applied some video effects. I use

    D3D11_TEXTURE2D_DESC textureDesc;
    textureDesc.Usage = D3D11_USAGE_DYNAMIC;
    textureDesc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
    textureDesc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
    ..

    to create texture because I need update texture data by map function for every frame I received.

    But for OpenCL & DirectX sharing.

    I need a raw texture's buffer, I need to use OpenCL API:

    clCreateFromD3D11BufferKHR

    to create the OpenCL buffer that will use to apply opencl video effect by our current implementation.

    But this API require the input type:

    ID3D11Buffer

    So I need to find a way to convert between ID3D11Texture2D  & ID3D11Buffer.

    Is it possible to do this conversion?

    If you have any idea, please give me some suggestions.

    Any suggestion is appreciated.

    Thank you~~

    Eric





Page 1 of 1 (1 posts) Previous Discussion Next Discussion