* [gentoo-commits] gentoo-x86 commit in media-gfx/blender/files: blender-2.70a-openmp.patch
@ 2014-04-18 22:00 Julian Ospald (hasufell)
0 siblings, 0 replies; only message in thread
From: Julian Ospald (hasufell) @ 2014-04-18 22:00 UTC (permalink / raw
To: gentoo-commits
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 <hasufell@gentoo.org>
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-04-18 22:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-18 22:00 [gentoo-commits] gentoo-x86 commit in media-gfx/blender/files: blender-2.70a-openmp.patch Julian Ospald (hasufell)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox