Hi, I’m having some problems using the cuda_drvapi_dynlink files from C\common\inc in the 4.0 SDK. I ran into a number of problems with this:
- I need the D3D9 integration, but only three functions (cuD3D9GetDevice, cuD3D9CtxCreate and cuGraphicsD3D9RegisterResource) are loaded in the source file.
- Moreover, none of the D3D functions are declared as externals in the header file (cuda_drvapi_dynlink_d3d.h)
- Finally, after fixing these issues, it turns out that a few functions have v2 variants (including cuD3D9CtxCreate) in the 4.0 driver. (This is especially nasty since it seems to work OK but gives invalid context errors on certain function calls.)
What I’m wondering now is if there are better versions of these files available somewhere? Or is this API just a novelty feature not used by anyone?
Another question is what the second argument to cuInit should be? Ideally I want my application (that is dynamically loading nvcuda.dll) to work with both version 3.2 and 4.0 (and as many more as possible) API versions, so how do I do that? If I just hardcode the second argument to 4000 it will break on v3.2 because it tries to load v2 versions of cuCtxDestroy among others. Is it even possible to make my code work with different versions without externally specifying which cuda version is installed on the system?
Sorry for the barrage of questions, I just fail to find any documentation of this, and googling turns up nothing. Any help is appreciated!