hasufell    14/04/18 22:00:34

  Added:                blender-2.70a-openmp.patch
  Log:
  fix building with -openmp wrt #507738
  
  (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 
BDEED020)

Revision  Changes    Path
1.1                  media-gfx/blender/files/blender-2.70a-openmp.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/blender/files/blender-2.70a-openmp.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/blender/files/blender-2.70a-openmp.patch?rev=1.1&content-type=text/plain

Index: blender-2.70a-openmp.patch
===================================================================
From: Julian Ospald <[email protected]>
Date: Fri Apr 18 21:42:45 UTC 2014
Subject: fix unguarded calls to omp_get_thread_num()

--- blender-v2.70a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ blender-v2.70a/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -248,8 +248,13 @@ static int load_tex(Brush *br, ViewConte
 
                                        if (col) {
                                                float rgba[4];
-
-                                               paint_get_tex_pixel_col(mtex, 
x, y, rgba, pool, omp_get_thread_num());
+                                               int thread_num;
+#ifdef _OPENMP
+                                               thread_num = 
omp_get_thread_num();
+#else
+                                               thread_num = 0;
+#endif
+                                               paint_get_tex_pixel_col(mtex, 
x, y, rgba, pool, thread_num);
 
                                                buffer[index * 4]     = rgba[0] 
* 255;
                                                buffer[index * 4 + 1] = rgba[1] 
* 255;
@@ -257,7 +262,14 @@ static int load_tex(Brush *br, ViewConte
                                                buffer[index * 4 + 3] = rgba[3] 
* 255;
                                        }
                                        else {
-                                               float avg = 
paint_get_tex_pixel(mtex, x, y, pool, omp_get_thread_num());
+                                               float avg;
+                                               int thread_num;
+#ifdef _OPENMP
+                                               thread_num = 
omp_get_thread_num();
+#else
+                                               thread_num = 0;
+#endif
+                                               avg = paint_get_tex_pixel(mtex, 
x, y, pool, thread_num);
 
                                                avg += br->texture_sample_bias;
 




Reply via email to