PixarAnimationStudios/OpenSubdiv — pull request #212 by shengfuintel (2013-08-12 18:56:57+00:00)
Title: Dev

Contributions:

1. Optimized CPU subdivision kernel

2. Added a TBB subdivision kernel

3. Created a new example glMultiMeshViewer to show nested TBB parallel subdivision: The upper level is at mesh level, the lower level is at subdivision kernel level.

4. To take the most advantage of SIMD instructions in CPU, vertex data need be properly aligned and padded to the multiplier of 4. For example, if vertex data is position(3 floats) and normal (3 floats), it need be padded to 8 floats.

5. The following are some performance data with glMultiMeshViewer (adaptive tessellation, tessellation level = 1), CPU is two socket 16 core SandyBridge 3.1GHZ, GPU is NVIDIA Quadro 5000. TBB Subdivion kernel is much faster than CUDA subdivision kernel for glMutliMeshViewer. Comparing with glBatchViwer, TBB kernel is about 2x faster than CUDA kernel. When running subdivision kernel on CPU, data need be transfered to GPU for display, TBB kernel time including the draw time is longer than CUDA version. I am working on porting tessellation shader to CPU/MIC, and will update the performance data after porting and optimization are done.

glMultiMeshViewer
TBB, Adaptive
Kernel Draw
Level 1 0.35ms 4.27ms
Level 2 0.52ms 6.58ms
Level 3 0.85ms 9.87ms
Level 4 1.38ms 13.56ms
Level 5 2.37ms 20.92ms
Level 6 4.36ms 38.99ms

glMultiMeshViewer
CUDA, Adaptive
Kernel Draw
Level 1 3.52ms 5.62ms
Level 2 4.75ms 7.74ms
Level 3 6.29ms 10.44ms
Level 4 8.25ms 13.69ms
Level 5 10.92ms 19.83ms
Level 6 15.14ms 32.19ms

glMultiMeshViewer
CPU, Adaptive
Kernel Draw
Level 1 0.91ms 4.27ms
Level 2 2.56ms 6.68ms
Level 3 6.43ms 9.90ms
Level 4 13.31ms 13.86ms
Level 5 26.12ms 21.16ms
Level 6 52.21ms 36.26ms

glMultiMeshViewergit manual
OpenMP, Adaptive
Kernel Draw
Level 1 0.82ms 4.34ms
Level 2 1.52ms 6.68ms
Level 3 2.55ms 9.92ms
Level 4 13.89ms 13.91ms
Level 5 5.89ms 21.08ms
Level 6 9.54ms 35.82ms

=====================================================================
glBatchViewer:

CUDA, Adaptive,
Kernel Draw
Level 1 0.92ms 1.2ms
Level 2 1.46ms 2.1ms
Level 3 2.07ms 3.75ms
Level 4 2.61ms 7.04ms
Level 5 3.56ms 13.25ms
Level 6 4.97ms 25.65ms