summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-12-17 11:08:42 +0100
committerGitHub <noreply@github.com>2017-12-17 11:08:42 +0100
commitd9c730e13822fad18e89faa85a3d6a2062ef5b63 (patch)
tree571f2e7664fcccfc8694c57ea531a74052b35b46
parentf1683a290b7261e9bb099aa8f4548809218b31b7 (diff)
parenta402efeb72fbf46f26ec4ef02ed9a5a26c26fec7 (diff)
Merge pull request #14762 from hpvb/tweak-openmp-parameters-for-lightbaker
Tweak OpenMP parameters for lightbaker
-rw-r--r--scene/3d/voxel_light_baker.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp
index 98dc1590d8..c05dfddeca 100644
--- a/scene/3d/voxel_light_baker.cpp
+++ b/scene/3d/voxel_light_baker.cpp
@@ -1781,7 +1781,7 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh
//print_line("bake line " + itos(i) + " / " + itos(height));
#ifdef _OPENMP
-#pragma omp parallel for
+#pragma omp parallel for schedule(dynamic, 1)
#endif
for (int j = 0; j < width; j++) {
@@ -1878,12 +1878,14 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh
LightMap *lightmap_ptr = lightmap.ptrw();
const Cell *cells = bake_cells.ptr();
const Light *light = bake_light.ptr();
-
+#ifdef _OPENMP
+#pragma omp parallel
+#endif
for (int i = 0; i < height; i++) {
//print_line("bake line " + itos(i) + " / " + itos(height));
#ifdef _OPENMP
-#pragma omp parallel for
+#pragma omp parallel for schedule(dynamic, 1)
#endif
for (int j = 0; j < width; j++) {