With PxGpuDispatcher: "Assertion failed: *mClothSolvers"

Hi,

today I added a Cuda GPU dispatcher to my PhysX setup to accelerate the particle simulation:

PxCudaContextManagerDesc cudaContextManagerDesc;
m_pCudaContextManager = PxCreateCudaContextManager(*m_pFoundation, cudaContextManagerDesc, m_pProfileZoneManager);
if(!m_pCudaContextManager || !m_pCudaContextManager->contextIsValid())
{
    IG_WARNING("CUDA context manager creation for PhysX failed.");
    SAFE_rELEASE(m_pCudaContextManager);
}

And for my scene:

if(!desc.gpuDispatcher)
{
    desc.gpuDispatcher = g_pPhysXLayer->GetGPUDispatcher();
}

where GetGPUDispatcher() just does

return m_pCudaContextManager ? m_pCudaContextManager->getGpuDispatcher() : 0;

But when I start my program I get an assertion failure “Assertion failed: *mClothSolvers” during simulate(). I don’t even have clothes in my scene and without the gpu dispatcher everything works fine.

I’m working with PhysX 3.3.2 under Windows 8.1 (VS2013).

Did you solve that problem ?

Got same error . ( PhysX 3.3.2 )

I believe this issue relates to the version of CUDA being used in PhysX 3.3.2. PhysX 3.3.2 uses CUDA 6.0, which does not support VS2013. VS2013 support was introduced in CUDA 6.5, which PhysX 3.3.3 uses. If you build PhysX 3.3.2 using VS2013, GPU-acceleration is not available and this assert fires if the GPU dispatcher is set because it failed to instantiate the GPU cloth solver.

Recommended solution: either use PhysX 3.3.3/3.3.4 or use VC11 instead of VC12. Either should fix the issue. Please note that CUDA 6.5 does not support VS2015 so PhysX 3.3.3 will not support GPU acceleration in VS2015. PhysX 3.4 will introduce VS2015 support for GPU-accelerated features.