Hello.
I’d like to use GPU to accelerate my rigid body simulation program.
So I reference the sample program to study using GPU.
I think that sample program use GPU in SampleParticles and SampleCharacterCloth.
However, that sample programs can’t run on my PC.
It quit forcibly when I choose SampleParticles or SampleCharacterCloth.(other samples can move)
Then, I debug sample program, and I could find the crash point.
In PhysXSample.cpp line 915~
#if PX_SUPPORT_GPU_PHYSX
if(mCreateCudaCtxManager)
{
PxCudaContextManagerDesc cudaContextManagerDesc;
#if defined(RENDERER_ENABLE_CUDA_INTEROP)
if (!mApplication.getCommandLine().hasSwitch("nointerop"))
{
switch (getRenderer()->getDriverType())
{
case Renderer::DRIVER_DIRECT3D9:
cudaContextManagerDesc.interopMode = PxCudaInteropMode::D3D9_INTEROP;
break;
case Renderer::DRIVER_DIRECT3D11:
cudaContextManagerDesc.interopMode = PxCudaInteropMode::D3D11_INTEROP;
break;
case Renderer::DRIVER_OPENGL:
cudaContextManagerDesc.interopMode = PxCudaInteropMode::OGL_INTEROP;
break;
};
cudaContextManagerDesc.graphicsDevice = getRenderer()->getDevice();
}
#endif
---------->crash mCudaContextManager = PxCreateCudaContextManager(*mFoundation, cudaContextManagerDesc, mProfileZoneManager);
if( mCudaContextManager )
{
if( !mCudaContextManager->contextIsValid() )
{
mCudaContextManager->release();
mCudaContextManager = NULL;
}
}
}
#endif
interopMode is set D3D9_INTEROP.
The program is crash when the program execute PxCreateCudaContexManager.
*Development environment
OS : Windows 7
IDE: Visual Studio 2012
GPU: Quadro 600
CUDA: I install CUDA 7
My GPU is too old to use CUDA on PhysX?
If you have a good advice, please teach me.
Sorry for my poor English.