[PhysX FluidMark] GPU PhysX is Fast But Has Limitations You Must Know

FluidMark - GPU PhysX



PhysX FluidMark has two PhysX paths: GPU and CPU. The GPU path is the hardware accelerated path and is supported on GeForce 8, 9, GTX200 and GTX400 series and, according to NVIDIA docs, only on GPUs with more than 32 cores (I haven’t had yet the opportunity to test this point).

The CPU path is the software mode of PhysX: all computations are done on the CPU and the PhysX engine does not require a GeForce 8+ card. With the CPU path, all graphics cards (GeForce, Radeon, etc.) are valid because… they are not used by PhysX ;)

The GPU path is the fastest way for the rendering of fluids but this high speed has a cost: there is a limitation on the number of particles (a fluid is made up of particles). A hardware fluid (read a fluid simulated on the GPU) can’t have more than 64k particles. This limitation does not exist with CPU PhysX. The only limitations with CPU PhysX are the amount of memory available (not really a limitation today) and the speed of CPU.

So I said a GPU fluid is limited to 64k particles. In FluidMark you can control the number of fluids with the emitters number. Then in theory, if you want 120’000 (120k) or 180’000 (180k) particles for example, just set the particle count to 180’000 and select 3 emitters (because 180k/3 = 60k which is supported). But in practice, you can’t set the number of emitters you want (emitter = fluid in FluidMark) otherwise you’ll get a failure or / and a crash of the application and in the worst case the corruption of the display driver leading to a reboot.

This limitation remains unclear for me and the failure seems to come from the PhysX engine. I’ll try to see the source of the bug (my code or PhysX engine) with NV. Like the previous limitation, this one does not exist with CPU PhysX.

Here are the results of some tests on a GTX 260 + R197.45 + PhysX 9.10.0129 + Win7 64-bit. Each time a failure occurs, the PhysX engine generates a file called memory_failure_log.txt in FluidMark folder.

- 10’000 particles and 11 emitters: OK
- 10’000 particles and 12 emitters: FAILED but no crash
Content of memory_failure_log.txt

GpuHeapMalloc failure of packedBuffer in file 
'd:\sw\physx\physxsdk\2.8.3\trunk\lowlevel\gpu\common\include\PxgPackedArray.h' 
in line 292.

- 120’000 particles and 1 emitters: OK (limited to 64K particles)
- 120’000 particles and 3 emitters: OK (following images)

FluidMark - GPU PhysX

FluidMark - GPU PhysX


- 120’000 particles and 6 emitters: OK
- 120’000 particles and 7 emitters: FAILED + crash (NVIDIA recovery)

NVIDIA display driver recovery message


Content of memory_failure_log.txt

GpuHeapMalloc failure of shapeImpulseOrNormalArray in file 
'd:\sw\physx\physxsdk\2.8.3\trunk\lowlevel\gpu\common\include\PxgFluidParticleCollisionData.h' 
in line 119.

Hehe another kind of error ;)

- 130’000 particles and 3 emitters: OK
- 140’000 particles and 3 emitters: FAILED + crash (NVIDIA recovery)

- 60’000 particles and 8 emitters: OK
- 60’000 particles and 9 emitters: FAILED but no crash
Content of memory_failure_log.txt

GpuHeapMalloc failure of packedBuffer in file 
'd:\sw\physx\physxsdk\2.8.3\trunk\lowlevel\gpu\common\include\PxgPackedArray.h' 
in line 292.

But after the failure, I re-started the previous good test (8 emitters) and after I managed to run the following settings:
- 60’000 particles and 9 emitters: OK

- 60’000 particles and 15 emitters: OK

- 60’000 particles and 20 emitters: OK

And suddenly a lot of artifacts appeared everywhere on the screen:

Artifacts caused by a crash of PhysX drivers


PhysX engine has definitely a problem…

I can’t remember when, but I also had this memory error message:

GpuHeapMalloc failure of stcCapsuleWorkUnitsBatch in file 
'd:\sw\physx\physxsdk\2.8.3\trunk\lowlevel\gpu\common\include\PxgFluidCollision.h' 
in line 154.

For my GPU PhysX tests, I use the following settings:
- particle count = 120’000
- emitters: 3





[ Subscribe to Geeks3D latest news by email ]

Geeks3D.com

↑ Grab this Headline Animator