[Bf-blender-cvs] [10b3092] opensubdiv-modifier: Enable threading on the CCG evaluation

Sergey Sharybin noreply at git.blender.org
Wed Apr 30 10:13:14 CEST 2014


Commit: 10b30928904fbdc586964f3d984a7b3b00ef0562
Author: Sergey Sharybin
Date:   Wed Apr 30 14:06:25 2014 +0600
https://developer.blender.org/rB10b30928904fbdc586964f3d984a7b3b00ef0562

Enable threading on the CCG evaluation

Makes it so OSD SS modifier is about 10% slower than the
legacy one. This might be speed up further by skipping
all the tricks with CCGVert/Edge/Face intemediate storage
i guess.

Anyway, consider the current implementation not that bad.

NOTE: You need latest development version of OpenSubdiv,
otherwise threaded evaluation wouldn't work at all.

===================================================================

M	source/blender/blenkernel/intern/CCGSubSurf.c

===================================================================

diff --git a/source/blender/blenkernel/intern/CCGSubSurf.c b/source/blender/blenkernel/intern/CCGSubSurf.c
index 5cf1fc8..16eb780 100644
--- a/source/blender/blenkernel/intern/CCGSubSurf.c
+++ b/source/blender/blenkernel/intern/CCGSubSurf.c
@@ -2565,6 +2565,7 @@ static void opensubdiv_evaluateQuadFaceGrids(CCGSubSurf *ss,
 	int vertDataSize = ss->meshIFC.vertDataSize;
 	int S;
 
+#pragma omp parallel for
 	for (S = 0; S < face->numVerts; S++) {
 		int x, y, k;
 		CCGEdge *edge = NULL;
@@ -2663,6 +2664,7 @@ static void opensubdiv_evaluateNGonFaceGrids(CCGSubSurf *ss,
 	int S;
 
 	/* Evaluate face grids. */
+#pragma omp parallel for
 	for (S = 0; S < face->numVerts; S++) {
 		int x, y;
 		for (x = 0; x < gridSize; x++) {




More information about the Bf-blender-cvs mailing list