I’m moving from 2.x to 3.x of the API and for the life of me have not been able to get GPU acceleration working in my app.
Per the SDK User Guid:Tasks there is a note about no context without an nVidia assigned appGUID ?
There are suggestions in the readme’s that GPU acceleration is only applied to particle and cloth libraries.
Hopefully GPU acceleration applies to the entire library. I’ve yet to see how it is initialized though. From the 3.2 samples, in PhysXSample.cpp we have:
mCudaContextManager = pxtask::createCudaContextManager(*mFoundation, cudaContextManagerDesc, mProfileZoneManager);
if( mCudaContextManager )
if( !mCudaContextManager->contextIsValid() )
mCudaContextManager = NULL;
While debugging the sample app (under VS2012) and choosing the particle sample the variable mCreateCudaCtxManager is false yet the code flow continues as if true so there are debugger issues. Several lines down it turns true /shrug. The code block creates a context and all is well.
The same code in my app returns NULL from creating a context and all is not well. This is the same for my older laptop with 8800M and a newer machine with a GTX570 and driver 310.90. The app works fine with the CPU dispatcher, I’m just looking to enable any GPU acceleration.
So, I’m looking for advice on the minimal best practice to initialize the GPU. I’ve read the manual, tried working it out with the VS2012 debugger but have yet to find the true mechanism. I’m guessing there is another configuration flag or some such but am not seeing it.
Thank you nVidia for sharing your SDK !