CUDA integration Integrating CUDA into a DX game engine

Hi everyone,
I am currently trying to integrate CUDA computations into an existing game engine (Virtools 4.0) in the form of a plugin that gets invoked before any rendering takes place. After going through the manuals there are some open questions left:

  • The game engine using DX9 for rendering. Does this mean that I have to use the “interop” mode between DX and CUDA? I do not necessarily need to access DX9 data structures, so I could also live with the “stand-alone” method (that is used in the transpose sample from the SDK)
  • I have tried to get the interop mode to work and execute the CUDA code from the transpose sample. Here are the steps I followed:
  • get the DX9 device from the game engine and register it with CUDA
  • remove the CUT_DEVICE_INIT and _EXIT calls
  • the rest of the code remains the same
  • When I run the code, the SetD3DDevice function returns ok, but calls to cudaMalloc and executing kernels fail. Did I forget something? Or is my whole approach flawed?

Thanks for your help
Jerome Thoma
research & development
rmh new media gmbh