Anyone have problems switching to Cuda 5.0?

Discussion in 'GPGPU Technology & Programming' started by Commenter, Jun 20, 2013.

  1. Commenter

    Newcomer

    Joined:
    Jan 9, 2010
    Messages:
    234
    Likes Received:
    17
    I have written a simple app that works fine in Cuda 4.2 but doesn't in 5.0. It's basically a raycasting program that copies data back and forth between gpu and host using cudamemcpy. Thinking about it, I wonder if there is a way to render an image directly from memory on the GPU as well?
     
    #1 Commenter, Jun 20, 2013
    Last edited by a moderator: Jun 23, 2013
  2. Dade

    Newcomer

    Joined:
    Dec 20, 2009
    Messages:
    206
    Likes Received:
    20
    OpenCL has OpenCL/OpenGL and OpenCL/DX11 interoperability extensions for this kind problems. I'm pretty sure CUDA has something similar.
     
  3. Commenter

    Newcomer

    Joined:
    Jan 9, 2010
    Messages:
    234
    Likes Received:
    17
    Yeah, I've decided I'm going to convert to OpenCL when I have the time, so I'll look into it.
     
  4. Xalion

    Regular

    Joined:
    May 26, 2007
    Messages:
    310
    Likes Received:
    19
    CUDA also has an opengl interop. Basically, you register the buffer with CUDA, map it, and then return a pointer to it. That pointer can be used just like any other device array. You can then use the buffer as any of the buffer types (vertex buffer, color buffer, etc) and render from it directly.

    There are a couple of examples in the SDK, or I have a few laying around if you want.
     
  5. Commenter

    Newcomer

    Joined:
    Jan 9, 2010
    Messages:
    234
    Likes Received:
    17
    I have found out about that. Would that work for DirectX as well? It shouldn't be too much trouble to rewrite using OpenGl though.

    P.S. Yes, there is a DirectX interop as well.
     
    #5 Commenter, Jul 5, 2013
    Last edited by a moderator: Jul 8, 2013
Loading...

Share This Page

  • About Us

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...