xiangaodielian / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

OpenCL and Direct Compute GPU cloth needs to be optimized for NVIDIA, AMD, Intel and Apple platforms #426

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Right now we have a basic implementation that runs on all OpenCL and Direct 
Compute (DX11) platforms, but it hasn't been optimize for any platform yet.

We should profile, tune and optimize for various DC and OpenCL implementors 
such as NVIDIA, AMD, Intel and Apple.

Original issue reported on code.google.com by erwin.coumans on 13 Sep 2010 at 5:58

GoogleCodeExporter commented 9 years ago
Issue 419 has been merged into this issue.

Original comment by erwin.coumans on 13 Sep 2010 at 6:01

GoogleCodeExporter commented 9 years ago
The current GPU cloth implementation isn't optimized or tuned for any hardware.

Apparently people are still doing benchmarks with it:
http://forum.beyond3d.com/showpost.php?p=1475537&postcount=2

Original comment by erwin.coumans on 24 Sep 2010 at 6:30

GoogleCodeExporter commented 9 years ago
The numbers quoted in that topic are a little strange.

The situation with optimisation is that the DX version is optimised to a 
reasonable degree. It carefully blocks solver work into wavefront-sized units 
and iterates through aligned data to process these. It's set by default to use 
a wavefront of 32 because this works on all current DX11 GPUs (and on my test 
cases 64 was actually slower because of the effect it has on blocking 
efficiency).

The CL version is not very well optimised at all. The wavefront structuring 
seen in the DX code should easily port across to CL and I'd like to do that in 
the near future.

Original comment by lee.ho...@amd.com on 24 Sep 2010 at 6:46

GoogleCodeExporter commented 9 years ago

It would be great to enable OpenCL-OpenGL interoperability in the OpenCL demo 
too.

Does the DirectCompute demo enable interoperability at the moment in the 
current Bullet/svn/trunk?

Original comment by erwin.coumans on 24 Sep 2010 at 6:54

GoogleCodeExporter commented 9 years ago
The numbers are different here on a same machine, Dell XPS420 with Intel Core 
Quad, Q6600 at 2.4Ghz:

DirectX11 cloth demo on NVIDIA GTX 470, 1920x1200: 723 FPS
DirectX11 cloth demo on Radeon 5870, 1920x1200: 1126 FPS

Original comment by erwin.coumans on 24 Sep 2010 at 8:08

GoogleCodeExporter commented 9 years ago
The DirectCompute demo is entirely GPU-side, so if that's what you mean by 
interoperability then yes.

Original comment by lee.ho...@amd.com on 25 Sep 2010 at 8:22

GoogleCodeExporter commented 9 years ago
Indeed.

It would be good to add the option to the OpenCL cloth demo to be entirely 
GPU-side too (avoiding copy of buffers between GPU and main memory)

Original comment by erwin.coumans on 2 Oct 2010 at 12:12

GoogleCodeExporter commented 9 years ago
Done. OpenCL cloth demo in the AMD branch now has OpenGL interop support 
through an additional output target.

Original comment by lee.ho...@amd.com on 1 Dec 2010 at 1:20

GoogleCodeExporter commented 9 years ago
Intel released a cloth demo optimized for AVX/Sandy Bridge. This could help 
some Intel-specific optimizations.

See http://software.intel.com/en-us/articles/avx-cloth and
http://software.intel.com/en-us/articles/intel-graphics-developers-guides/

Original comment by erwin.coumans on 10 Jan 2011 at 10:07

GoogleCodeExporter commented 9 years ago
The AMD branch changes are copied to trunk, and this includes OpenGL interop 
support and GPU collision detection between cloth and capsule:

http://code.google.com/p/bullet/source/detail?r=2310

Original comment by erwin.coumans on 27 Feb 2011 at 9:15

GoogleCodeExporter commented 9 years ago
We disabled wavefront/warp synchronization for better compatibility with 
hardware with different wavefront sizes:
http://code.google.com/p/bullet/source/detail?r=2344

The basic cloth simulation should be equally well optimized for most modern GPU 
hardware.

Let's close the issue for now, and open a new issue if there are new 
patches/contributions.

Original comment by erwin.coumans on 16 Mar 2011 at 5:51