qbsp: parallelize PartitionSurfaces
This commit is contained in:
parent
1a161b3ad5
commit
d083f0f87f
|
|
@ -23,6 +23,8 @@
|
||||||
|
|
||||||
#include <qbsp/qbsp.hh>
|
#include <qbsp/qbsp.hh>
|
||||||
|
|
||||||
|
#include "tbb/task_group.h"
|
||||||
|
|
||||||
int splitnodes;
|
int splitnodes;
|
||||||
|
|
||||||
static int leaffaces;
|
static int leaffaces;
|
||||||
|
|
@ -970,8 +972,10 @@ PartitionSurfaces(surface_t *surfaces, node_t *node)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PartitionSurfaces(frontlist, node->children[0]);
|
tbb::task_group g;
|
||||||
PartitionSurfaces(backlist, node->children[1]);
|
g.run([&](){ PartitionSurfaces(frontlist, node->children[0]); });
|
||||||
|
g.run([&](){ PartitionSurfaces(backlist, node->children[1]); });
|
||||||
|
g.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue