Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: which format supported in clCreateFromD3D10Texture2DKHR?

  1. #1

    which format supported in clCreateFromD3D10Texture2DKHR?

    Hi, All
    Code :
    cl_mem clCreateFromD3D10Texture2DKHR(  cl_context context,  
      cl_mem_flags flags,  
      ID3D10Texture2D *resource,  
      uint subresource,  
      cl_int  *errcode_ret )
    which type of ID3D10Texture2D can be supported by this function?
    I can not find the information in the specification. Only DXGI_FORMAT_R8G8B8A8_UNORM?

  2. #2

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    I'm also very interested in this.

    I'm guessing the format can be any of the DXGI available formats, as long as you receive the correct input from your OCL kernel, i.e. __global char4* inputImage for DXGI_FORMAT_R8G8B8A8_UNORM. Count the bytes (R8 == 8 bits == 1 byte == 1 char) and use OCL input types appropriately.

    Can anyone verify this? are there any limitations on texture formats?

  3. #3

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    After some experimenting, looks like clCreateFromD3D10Texture2DKHR creates an image, so must be accessed using the image sampling built-in functions, and the image formats available can be queried by clGetSupportedImageFormats
    http://<br /> <a href="http://www.kh...html</a><br />

  4. #4

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    Hi, chai
    You may have used clEnqueueReleaseD3D10ObjectsKHR. Does this function cause a GPU memory leak? thank you!

  5. #5

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    Have used it, but with no memory leaks :P...

    I was working off of the SimpleDX10 sample in the ATI Stream SDK, on ATI 5870, and played with another skeleton I was making.

    Are you completing all command queues/waiting for events to finish before trying to release the D3D10 objects?

  6. #6

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    Thanks chai!
    I used Nvidia sample and found that even clEnqueueReleaseD3D10ObjectsKHR return 0, the reference count of the surface had not been reduced. maybe I should check ATI sample.

  7. #7

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    very strange
    clGetSupportedImageFormats displays my card support CL_BGRA
    But I use DXGI_FORMAT_B8G8R8A8_UNORM texture to clCreateFromD3D10Texture2DKHR, I got an error!
    why?

  8. #8

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    Can you provide more information on the error? I'm playing with CL_RGBA and getting no errors, but also no functionality at this point :P... Trying to run a simple kernel on the swapchain backbuffer, but it doesn't affect the backbuffer at all...

  9. #9

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    Quote Originally Posted by chai
    Can you provide more information on the error? I'm playing with CL_RGBA and getting no errors, but also no functionality at this point :P... Trying to run a simple kernel on the swapchain backbuffer, but it doesn't affect the backbuffer at all...
    I mean if you create a texture(its format is DXGI_FORMAT_B8G8R8A8_UNORM). Then use this texture in clCreateFromD3D10Texture2DKHR. I got an error!
    maybe you can try this...

  10. #10

    Re: which format supported in clCreateFromD3D10Texture2DKHR?

    Actually, I have a very very urgent question. Whether clEnqueueReleaseD3D10ObjectsKHR cause GPU memory leak?
    code]err =clEnqueueReleaseD3D10ObjectsKHR(m_Command_queue, 1, &m_Src_mem, NULL, NULL, NULL);[/code]
    suppose m_Src_mem share the same memory with textureMem.
    before invoking clEnqueueReleaseD3D10ObjectsKHR, we can get the reference count of textureMem(use addref/release). after clEnqueueReleaseD3D10ObjectsKHR, we also get the reference count of textureMem. I found even clEnqueueReleaseD3D10ObjectsKHR return 0. the reference count of textureMem does not reduced!
    so what is wrong?

Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 1
    Last Post: 01-03-2011, 12:26 PM
  2. Supported Hardware
    By lwd7237 in forum OpenML Coding & Technical Issues
    Replies: 3
    Last Post: 04-01-2005, 03:37 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
  •