[SCM] blender/master: debian/patches/: patchset updated against v2.73

mfv at users.alioth.debian.org mfv at users.alioth.debian.org
Mon Jan 12 08:32:06 UTC 2015


The following commit has been merged in the master branch:
commit 5dd04a205e149928a287a1ebb5b0c64998252bb0
Author: Matteo F. Vescovi <mfv at debian.org>
Date:   Fri Jan 9 17:40:16 2015 +0100

    debian/patches/: patchset updated against v2.73
    
    - #0001 => #0007 refreshed
    - #0008 => #0011 dropped (applied upstream)

diff --git a/debian/patches/0001-blender_thumbnailer.patch b/debian/patches/0001-blender_thumbnailer.patch
index ca297cb..dfbc974 100644
--- a/debian/patches/0001-blender_thumbnailer.patch
+++ b/debian/patches/0001-blender_thumbnailer.patch
@@ -1,10 +1,10 @@
-From: "Matteo F. Vescovi" <mfvescovi at gmail.com>
-Date: Tue, 7 Oct 2014 15:38:09 +0200
+From: "Matteo F. Vescovi" <mfv at debian.org>
+Date: Thu, 8 Jan 2015 12:35:02 +0100
 Subject: blender_thumbnailer
 
-* Move thumbnailer script to an appropriate destination
 * Add blender.thumbnailer file
-* Change to python 3.3 since lintian is messing around with that
+* Change to python3 since lintian is messing around with that
+* Move thumbnailer script to an appropriate destination
 ---
  blender.thumbnailer                | 4 ++++
  release/bin/blender-thumbnailer.py | 2 +-
@@ -33,14 +33,14 @@ index 779c615..dbcd865 100755
  # ##### BEGIN GPL LICENSE BLOCK #####
  #
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 06c6d0d..80c48cf 100644
+index 21cb41d..a66eabb 100644
 --- a/source/creator/CMakeLists.txt
 +++ b/source/creator/CMakeLists.txt
-@@ -478,7 +478,7 @@ if(UNIX AND NOT APPLE)
+@@ -484,7 +484,7 @@ if(UNIX AND NOT APPLE)
  		)
  		install(
  			PROGRAMS ${CMAKE_SOURCE_DIR}/release/bin/blender-thumbnailer.py
--			DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
+-			DESTINATION bin
 +			DESTINATION ${CMAKE_INSTALL_PREFIX}/share/blender/scripts
  		)
  		install(
diff --git a/debian/patches/0002-install_in_usr_share.patch b/debian/patches/0002-install_in_usr_share.patch
index c956431..1fd9c8a 100644
--- a/debian/patches/0002-install_in_usr_share.patch
+++ b/debian/patches/0002-install_in_usr_share.patch
@@ -1,5 +1,5 @@
-From: "Matteo F. Vescovi" <mfvescovi at gmail.com>
-Date: Mon, 24 Feb 2014 17:45:50 +0100
+From: "Matteo F. Vescovi" <mfv at debian.org>
+Date: Thu, 8 Jan 2015 11:45:50 +0100
 Subject: install_in_usr_share
 
 * Arch-specific files go to /usr/share
@@ -9,10 +9,10 @@ Subject: install_in_usr_share
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 80c48cf..d38cf25 100644
+index a66eabb..2771eb9 100644
 --- a/source/creator/CMakeLists.txt
 +++ b/source/creator/CMakeLists.txt
-@@ -308,8 +308,8 @@ if(WITH_PYTHON)
+@@ -312,8 +312,8 @@ if(WITH_PYTHON)
  	endif()
  
  	install(
diff --git a/debian/patches/0003-filter_docs_to_install.patch b/debian/patches/0003-filter_docs_to_install.patch
index b63e045..0a402b8 100644
--- a/debian/patches/0003-filter_docs_to_install.patch
+++ b/debian/patches/0003-filter_docs_to_install.patch
@@ -1,5 +1,5 @@
-From: Kevin Roy <kiniou at gmail.com>
-Date: Tue, 5 Nov 2013 17:14:41 +0100
+From: "Matteo F. Vescovi" <mfv at debian.org>
+Date: Thu, 8 Jan 2015 12:39:04 +0100
 Subject: filter_docs_to_install
 
 Install only relevant documentation.
@@ -8,11 +8,11 @@ Install only relevant documentation.
  1 file changed, 2 deletions(-)
 
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index d38cf25..3cd9cdf 100644
+index 2771eb9..d7ea8ad 100644
 --- a/source/creator/CMakeLists.txt
 +++ b/source/creator/CMakeLists.txt
-@@ -238,8 +238,6 @@ else()
- endif()
+@@ -242,8 +242,6 @@ endif()
+ # Post build steps for bundling/packaging.
  
  set(BLENDER_TEXT_FILES
 -	${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt
diff --git a/debian/patches/0004-locales_directory_install.patch b/debian/patches/0004-locales_directory_install.patch
index bf9a062..cb1fcbd 100644
--- a/debian/patches/0004-locales_directory_install.patch
+++ b/debian/patches/0004-locales_directory_install.patch
@@ -1,37 +1,34 @@
-From: Kevin Roy <kiniou at gmail.com>
-Date: Wed, 26 Feb 2014 14:46:09 +0100
+From: "Matteo F. Vescovi" <mfv at debian.org>
+Date: Thu, 8 Jan 2015 15:12:42 +0100
 Subject: locales_directory_install
 
 Change where locales are installed.
 
 Contributions by:
  Antonio Ospite <ospite at studenti.unina.it>
-
-Signed-off-by: Matteo F. Vescovi <mfvescovi at gmail.com>
 ---
  source/blender/blenfont/intern/blf_lang.c | 10 +++++-----
- source/blender/blenlib/BLI_path_util.h    |  1 +
- source/blender/blenlib/intern/path_util.c |  3 +++
+ source/blender/blenkernel/BKE_appdir.h    |  1 +
  source/creator/CMakeLists.txt             |  4 ++--
- 4 files changed, 11 insertions(+), 7 deletions(-)
+ 3 files changed, 8 insertions(+), 7 deletions(-)
 
 diff --git a/source/blender/blenfont/intern/blf_lang.c b/source/blender/blenfont/intern/blf_lang.c
-index 12d7182..ebe2859 100644
+index 10614e8..776afc5 100644
 --- a/source/blender/blenfont/intern/blf_lang.c
 +++ b/source/blender/blenfont/intern/blf_lang.c
-@@ -77,9 +77,9 @@ static void free_locales(void)
+@@ -78,9 +78,9 @@ static void free_locales(void)
  	num_locales = num_locales_menu = 0;
  }
  
 -static void fill_locales(void)
 +static void fill_locales(char *locale_path)
  {
--	const char * const languages_path = BLI_get_folder(BLENDER_DATAFILES, "locale");
+-	const char * const languages_path = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale");
 +	const char * const languages_path = locale_path;
  	char languages[FILE_MAX];
  	LinkNode *lines = NULL, *line;
  	char *str;
-@@ -87,7 +87,7 @@ static void fill_locales(void)
+@@ -88,7 +88,7 @@ static void fill_locales(void)
  
  	free_locales();
  
@@ -40,12 +37,12 @@ index 12d7182..ebe2859 100644
  	line = lines = BLI_file_read_as_lines(languages);
  
  	/* This whole "parsing" code is a bit weak, in that it expects strictly formated input file...
-@@ -187,11 +187,11 @@ EnumPropertyItem *BLF_RNA_lang_enum_properties(void)
+@@ -188,11 +188,11 @@ EnumPropertyItem *BLF_RNA_lang_enum_properties(void)
  void BLF_lang_init(void)
  {
  #ifdef WITH_INTERNATIONAL
--	const char * const messagepath = BLI_get_folder(BLENDER_DATAFILES, "locale");
-+	const char * const messagepath = BLI_get_folder(BLENDER_SYSTEM_LOCALE, NULL);
+-	const char * const messagepath = BKE_appdir_folder_id(BLENDER_DATAFILES, "locale");
++	const char * const messagepath = BKE_appdir_folder_id(BLENDER_SYSTEM_LOCALE, NULL);
  
  	if (messagepath) {
  		bl_locale_init(messagepath, TEXT_DOMAIN_NAME);
@@ -54,37 +51,23 @@ index 12d7182..ebe2859 100644
  	}
  	else {
  		printf("%s: 'locale' data path for translations not found, continuing\n", __func__);
-diff --git a/source/blender/blenlib/BLI_path_util.h b/source/blender/blenlib/BLI_path_util.h
-index 3d82480..660d8e8 100644
---- a/source/blender/blenlib/BLI_path_util.h
-+++ b/source/blender/blenlib/BLI_path_util.h
-@@ -62,6 +62,7 @@ const char *BLI_get_folder_version(const int id, const int ver, const bool do_ch
- #define BLENDER_SYSTEM_DATAFILES    52
- #define BLENDER_SYSTEM_SCRIPTS      53
- #define BLENDER_SYSTEM_PYTHON       54
-+#define BLENDER_SYSTEM_LOCALE       55
- 
- /* for BLI_get_folder_version only */
- #define BLENDER_RESOURCE_PATH_USER      0
-diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
-index d5af980..2d0fd11 100644
---- a/source/blender/blenlib/intern/path_util.c
-+++ b/source/blender/blenlib/intern/path_util.c
-@@ -1376,6 +1376,9 @@ const char *BLI_get_folder(int folder_id, const char *subfolder)
- 			if (get_path_system(path, "python", subfolder, "BLENDER_SYSTEM_PYTHON", ver)) break;
- 			return NULL;
+diff --git a/source/blender/blenkernel/BKE_appdir.h b/source/blender/blenkernel/BKE_appdir.h
+index 5e42f17..d6838bc 100644
+--- a/source/blender/blenkernel/BKE_appdir.h
++++ b/source/blender/blenkernel/BKE_appdir.h
+@@ -62,6 +62,7 @@ enum {
+ 	BLENDER_SYSTEM_DATAFILES    = 52,
+ 	BLENDER_SYSTEM_SCRIPTS      = 53,
+ 	BLENDER_SYSTEM_PYTHON       = 54,
++	BLENDER_SYSTEM_LOCALE       = 55,
+ };
  
-+		case BLENDER_SYSTEM_LOCALE:
-+			BLI_strncpy(path, "/usr/share/locale", FILE_MAX); break;
-+
- 		default:
- 			BLI_assert(0);
- 			break;
+ /* for BKE_appdir_folder_id_version only */
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 3cd9cdf..37791fe 100644
+index d7ea8ad..a12f3d9 100644
 --- a/source/creator/CMakeLists.txt
 +++ b/source/creator/CMakeLists.txt
-@@ -323,11 +323,11 @@ if(WITH_INTERNATIONAL)
+@@ -327,11 +327,11 @@ if(WITH_INTERNATIONAL)
  	install(
  		DIRECTORY
  			${CMAKE_SOURCE_DIR}/release/datafiles/fonts
diff --git a/debian/patches/0005-update_manpages.patch b/debian/patches/0005-update_manpages.patch
index a7f387e..8b06c57 100644
--- a/debian/patches/0005-update_manpages.patch
+++ b/debian/patches/0005-update_manpages.patch
@@ -1,9 +1,9 @@
-From: "Matteo F. Vescovi" <mfvescovi at gmail.com>
-Date: Tue, 7 Oct 2014 15:45:47 +0200
+From: "Matteo F. Vescovi" <mfv at debian.org>
+Date: Thu, 8 Jan 2015 15:21:01 +0100
 Subject: update_manpages
 
-* Update blender manpage.
 * Add blenderplayer manpage.
+* Update blender manpage.
 ---
  doc/manpage/blenderplayer.1   | 131 ++++++++++++++++++++++++++++++++++++++++++
  source/creator/CMakeLists.txt |   5 ++
@@ -148,25 +148,25 @@ index 0000000..d15b0c9
 +.SH AUTHORS
 +This manpage was written for a Debian GNU/Linux by Kevin Roy <kiniou at gmail.com>.
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 37791fe..27a9b62 100644
+index a12f3d9..89695c7 100644
 --- a/source/creator/CMakeLists.txt
 +++ b/source/creator/CMakeLists.txt
-@@ -412,6 +412,7 @@ if(UNIX AND NOT APPLE)
+@@ -425,6 +425,7 @@ if(UNIX AND NOT APPLE)
  			FILES
  				${CMAKE_SOURCE_DIR}/release/freedesktop/blender.desktop
  				${CMAKE_SOURCE_DIR}/release/freedesktop/icons/scalable/apps/blender.svg
 +				${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1
- 			DESTINATION ${TARGETDIR}
+ 			DESTINATION "."
  		)
  
-@@ -444,6 +445,10 @@ if(UNIX AND NOT APPLE)
- 				FILES ${TARGETDIR}/blender.1
- 				DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
- 			)
-+            install(
-+				FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1
-+				DESTINATION ${CMAKE_INSTALL_PREFIX}/share/man/man1
-+			)
+@@ -457,6 +458,10 @@ if(UNIX AND NOT APPLE)
+ 					FILES ${CMAKE_CURRENT_BINARY_DIR}/blender.1
+ 					DESTINATION share/man/man1
+ 				)
++				install(
++					FILES ${CMAKE_SOURCE_DIR}/doc/manpage/blenderplayer.1
++					DESTINATION share/man/man1
++				)
+ 			endif()
  		endif()
  
- 
diff --git a/debian/patches/0006-do_not_use_version_number_in_system_path.patch b/debian/patches/0006-do_not_use_version_number_in_system_path.patch
index 899c657..ee65f2a 100644
--- a/debian/patches/0006-do_not_use_version_number_in_system_path.patch
+++ b/debian/patches/0006-do_not_use_version_number_in_system_path.patch
@@ -1,5 +1,5 @@
-From: Kevin Roy <kiniou at gmail.com>
-Date: Tue, 5 Nov 2013 17:42:18 +0100
+From: "Matteo F. Vescovi" <mfv at debian.org>
+Date: Thu, 8 Jan 2015 15:34:28 +0100
 Subject: do_not_use_version_number_in_system_path
 
 Global installation expects system path to be
@@ -8,8 +8,6 @@ without version numbers.
 
 Contributions by:
  Antonio Ospite <ospite at studenti.unina.it>
-
-Signed-off-by: Matteo F. Vescovi <mfvescovi at gmail.com>
 ---
  intern/ghost/intern/GHOST_SystemPathsX11.cpp | 3 +++
  source/creator/CMakeLists.txt                | 2 +-
@@ -30,15 +28,15 @@ index e2d9733..ec0e691 100644
  	if (static_path) {
  		static string system_path = string(static_path) + "/blender/" + versionstr;
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 27a9b62..5b9b390 100644
+index 89695c7..86970e8 100644
 --- a/source/creator/CMakeLists.txt
 +++ b/source/creator/CMakeLists.txt
-@@ -261,7 +261,7 @@ if(UNIX AND NOT APPLE)
+@@ -265,7 +265,7 @@ if(UNIX AND NOT APPLE)
  		if(WITH_PYTHON_MODULE)
  			set(TARGETDIR_VER ${PYTHON_LIBPATH}/python${PYTHON_VERSION}/site-packages/${BLENDER_VERSION})
  		else()
--			set(TARGETDIR_VER ${CMAKE_INSTALL_PREFIX}/share/blender/${BLENDER_VERSION})
-+			set(TARGETDIR_VER ${CMAKE_INSTALL_PREFIX}/share/blender)
+-			set(TARGETDIR_VER share/blender/${BLENDER_VERSION})
++			set(TARGETDIR_VER share/blender)
  		endif()
  	endif()
  
diff --git a/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch b/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch
index e78a1e9..e3ce47c 100644
--- a/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch
+++ b/debian/patches/0007-look_for_droid_ttf_with_fontconfig.patch
@@ -1,12 +1,10 @@
-From: Kevin Roy <kiniou at gmail.com>
-Date: Wed, 23 Jul 2014 12:07:04 +0200
+From: "Matteo F. Vescovi" <mfv at debian.org>
+Date: Thu, 8 Jan 2015 16:04:37 +0100
 Subject: look_for_droid_ttf_with_fontconfig
 
 * Remove bad installation of fonts directory into locales.
 * Avoid using the droid font shipped with upstream source
   and use fontconfig to get it.
-
-Signed-off-by: Matteo F. Vescovi <mfvescovi at gmail.com>
 ---
  CMakeLists.txt                                   |  7 ++++
  build_files/cmake/macros.cmake                   |  3 ++
@@ -18,10 +16,10 @@ Signed-off-by: Matteo F. Vescovi <mfvescovi at gmail.com>
  7 files changed, 85 insertions(+), 6 deletions(-)
 
 diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 1dd9721..c305805 100644
+index 4ee277b..ffe4c53 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -679,6 +679,13 @@ if(UNIX AND NOT APPLE)
+@@ -864,6 +864,13 @@ if(UNIX AND NOT APPLE)
  		endif()
  	endif()
  
@@ -36,12 +34,12 @@ index 1dd9721..c305805 100644
  	if(WITH_CODEC_SNDFILE)
  		find_package_wrapper(SndFile)
 diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
-index adbba81..0a01f06 100644
+index 40bea5e..b295857 100644
 --- a/build_files/cmake/macros.cmake
 +++ b/build_files/cmake/macros.cmake
-@@ -307,6 +307,9 @@ macro(setup_liblinks
+@@ -306,6 +306,9 @@ macro(setup_liblinks
  	if(WITH_SYSTEM_GLEW)
- 		target_link_libraries(${target} ${GLEW_LIBRARY})
+ 		target_link_libraries(${target} ${BLENDER_GLEW_LIBRARIES})
  	endif()
 +	if(WITH_FONTCONFIG)
 +		target_link_libraries(${target} ${FONTCONFIG_LIBRARIES})
@@ -50,10 +48,10 @@ index adbba81..0a01f06 100644
  		target_link_libraries(${target} ${BULLET_LIBRARIES})
  	endif()
 diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
-index 2debe51..b75cf9d 100644
+index 346d5bc..f5132e9 100644
 --- a/source/blender/blenfont/CMakeLists.txt
 +++ b/source/blender/blenfont/CMakeLists.txt
-@@ -58,6 +58,13 @@ if(WITH_INTERNATIONAL)
+@@ -60,6 +60,13 @@ if(WITH_INTERNATIONAL)
  	add_definitions(-DWITH_INTERNATIONAL)
  endif()
  
@@ -64,14 +62,14 @@ index 2debe51..b75cf9d 100644
 +	add_definitions(-DWITH_FONTCONFIG)
 +endif()
 +
- add_definitions(-DGLEW_STATIC)
+ add_definitions(${GL_DEFINITIONS})
  
  blender_add_lib(bf_blenfont "${SRC}" "${INC}" "${INC_SYS}")
 diff --git a/source/blender/blenfont/intern/blf_translation.c b/source/blender/blenfont/intern/blf_translation.c
-index 150ff1b..477c735 100644
+index e7d2c14..21f2d00 100644
 --- a/source/blender/blenfont/intern/blf_translation.c
 +++ b/source/blender/blenfont/intern/blf_translation.c
-@@ -50,7 +50,11 @@
+@@ -52,7 +52,11 @@
  
  #include "boost_locale_wrapper.h"
  
@@ -83,7 +81,7 @@ index 150ff1b..477c735 100644
  static unsigned char *unifont_ttf = NULL;
  static int unifont_size = 0;
  static const char unifont_mono_filename[] = "bmonofont-i18n.ttf.gz";
-@@ -62,6 +66,24 @@ unsigned char *BLF_get_unifont(int *r_unifont_size)
+@@ -64,6 +68,24 @@ unsigned char *BLF_get_unifont(int *r_unifont_size)
  {
  #ifdef WITH_INTERNATIONAL
  	if (unifont_ttf == NULL) {
@@ -105,10 +103,10 @@ index 150ff1b..477c735 100644
 +			printf("%s: 'Droid Sans Regular' font not found with fontconfig\n",__func__);
 +		}
 +#else
- 		const char * const fontpath = BLI_get_folder(BLENDER_DATAFILES, "fonts");
+ 		const char * const fontpath = BKE_appdir_folder_id(BLENDER_DATAFILES, "fonts");
  		if (fontpath) {
  			char unifont_path[1024];
-@@ -72,6 +94,7 @@ unsigned char *BLF_get_unifont(int *r_unifont_size)
+@@ -74,6 +96,7 @@ unsigned char *BLF_get_unifont(int *r_unifont_size)
  		}
  		else {
  			printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);
@@ -184,10 +182,10 @@ index f6bbd32..91b4070 100644
   * Returns true if the file with the specified name can be written.
   * This implementation uses access(2), which makes the check according
 diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
-index 5b9b390..f9a451e 100644
+index 86970e8..7aaaa92 100644
 --- a/source/creator/CMakeLists.txt
 +++ b/source/creator/CMakeLists.txt
-@@ -320,12 +320,6 @@ endif()
+@@ -324,12 +324,6 @@ endif()
  
  # localization
  if(WITH_INTERNATIONAL)
diff --git a/debian/patches/0008-use_cuda_pointer_arithmetic_in_integers.patch b/debian/patches/0008-use_cuda_pointer_arithmetic_in_integers.patch
deleted file mode 100644
index 85045a8..0000000
--- a/debian/patches/0008-use_cuda_pointer_arithmetic_in_integers.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Sergey Sharybin <sergey.vfx at gmail.com>
-Date: Wed, 15 Oct 2014 09:20:38 +0200
-Subject: use_cuda_pointer_arithmetic_in_integers
-
-This should hopefully fix #765187
-
-Signed-off-by: Matteo F. Vescovi <mfvescovi at gmail.com>
----
- intern/cycles/device/device_cuda.cpp | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
-index 5de2efa..967a260 100644
---- a/intern/cycles/device/device_cuda.cpp
-+++ b/intern/cycles/device/device_cuda.cpp
-@@ -355,7 +355,7 @@ public:
- 		cuda_push_context();
- 		if(mem.device_pointer) {
- 			cuda_assert(cuMemcpyDtoH((uchar*)mem.data_pointer + offset,
--			                         (CUdeviceptr)((uchar*)mem.device_pointer + offset), size));
-+			                         (CUdeviceptr)(mem.device_pointer + offset), size));
- 		}
- 		else {
- 			memset((char*)mem.data_pointer + offset, 0, size);
diff --git a/debian/patches/0009-add_flag_disabling_SSE-SSE2_intrinsics.patch b/debian/patches/0009-add_flag_disabling_SSE-SSE2_intrinsics.patch
deleted file mode 100644
index 2e836ae..0000000
--- a/debian/patches/0009-add_flag_disabling_SSE-SSE2_intrinsics.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From: Sergey Sharybin <sergey.vfx at gmail.com>
-Date: Wed, 15 Oct 2014 14:53:52 +0200
-Subject: add_flag_disabling_SSE-SSE2_intrinsics
-
-The flag is called WITH_CPU_SSE, it is ON by default
-so no one should be affected by the change really.
-
-This should hopefully fix #763755
-
-Signed-off-by: Matteo F. Vescovi <mfvescovi at gmail.com>
----
- CMakeLists.txt                 | 10 +++++++++-
- build_files/cmake/macros.cmake |  2 ++
- intern/cycles/CMakeLists.txt   |  4 +++-
- 3 files changed, 14 insertions(+), 2 deletions(-)
-
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c305805..5e63f6d 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -264,6 +264,8 @@ option(WITH_PYTHON_INSTALL       "Copy system python into the blender install fo
- option(WITH_PYTHON_INSTALL_NUMPY "Copy system numpy into the blender install folder"  ON)
- set(PYTHON_NUMPY_PATH            "" CACHE PATH "Path to python site-packages or dist-packages containing 'numpy' module")
- mark_as_advanced(PYTHON_NUMPY_PATH)
-+option(WITH_CPU_SSE              "Enable SIMD instruction if they're detected on the host machine" ON)
-+mark_as_advanced(WITH_CPU_SSE)
- 
- if(UNIX AND NOT APPLE)
- 	option(WITH_PYTHON_INSTALL_REQUESTS "Copy system requests into the blender install folder" ON)
-@@ -518,7 +520,13 @@ if(WITH_GHOST_SDL OR WITH_HEADLESS)
- 	set(WITH_X11_XINPUT OFF)
- endif()
- 
--TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
-+if(WITH_CPU_SSE)
-+	TEST_SSE_SUPPORT(COMPILER_SSE_FLAG COMPILER_SSE2_FLAG)
-+else()
-+	message(STATUS "SSE and SSE2 optimizations are DISABLED!")
-+	set(COMPILER_SSE_FLAG)
-+	set(COMPILER_SSE2_FLAG)
-+endif()
- 
- TEST_STDBOOL_SUPPORT()
- if(HAVE_STDBOOL_H)
-diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
-index 0a01f06..179738f 100644
---- a/build_files/cmake/macros.cmake
-+++ b/build_files/cmake/macros.cmake
-@@ -721,6 +721,8 @@ macro(TEST_SSE_SUPPORT
- endmacro()
- 
- macro(TEST_STDBOOL_SUPPORT)
-+	include(CheckCSourceRuns)
-+
- 	# This program will compile correctly if and only if
- 	# this C compiler supports C99 stdbool.
- 	check_c_source_runs("
-diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
-index ccf6aac..a3f251d 100644
---- a/intern/cycles/CMakeLists.txt
-+++ b/intern/cycles/CMakeLists.txt
-@@ -14,7 +14,9 @@ include(cmake/external_libs.cmake)
- # todo: refactor this code to match scons
- # note: CXX_HAS_SSE is needed in case passing SSE flags fails altogether (gcc-arm)
- 
--if(WIN32 AND MSVC)
-+if(NOT WITH_CPU_SSE)
-+	set(CXX_HAS_SSE FALSE)
-+elseif(WIN32 AND MSVC)
- 	set(CXX_HAS_SSE TRUE)
- 
- 	# /arch:AVX for VC2012 and above
diff --git a/debian/patches/0010-fix_atomic_issue.patch b/debian/patches/0010-fix_atomic_issue.patch
deleted file mode 100644
index a8322d5..0000000
--- a/debian/patches/0010-fix_atomic_issue.patch
+++ /dev/null
@@ -1,521 +0,0 @@
-From: Sergey Sharybin <sergey.vfx at gmail.com>
-Date: Wed, 3 Dec 2014 10:48:03 +0100
-Subject: fix_atomic_issue
-
-Closes: #771042
-
-Signed-off-by: Matteo F. Vescovi <mfv at debian.org>
----
- intern/atomic/atomic_ops.h          | 202 +++++++++++++++++++++++++++++-------
- intern/cycles/CMakeLists.txt        |   4 +
- intern/cycles/SConscript            |   2 +-
- intern/cycles/kernel/osl/SConscript |   1 +
- intern/cycles/util/CMakeLists.txt   |   1 +
- intern/cycles/util/util_atomic.h    |  33 ++++++
- intern/cycles/util/util_stats.h     |   9 +-
- 7 files changed, 210 insertions(+), 42 deletions(-)
- create mode 100644 intern/cycles/util/util_atomic.h
-
-diff --git a/intern/atomic/atomic_ops.h b/intern/atomic/atomic_ops.h
-index 127552f..06a5c8d 100644
---- a/intern/atomic/atomic_ops.h
-+++ b/intern/atomic/atomic_ops.h
-@@ -34,6 +34,11 @@
- #if defined (__APPLE__)
- #  include <libkern/OSAtomic.h>
- #elif defined(_MSC_VER)
-+#  define NOGDI
-+#  ifndef NOMINMAX
-+#    define NOMINMAX
-+#  endif
-+#  define WIN32_LEAN_AND_MEAN
- #  include <windows.h>
- #elif defined(__arm__)
- /* Attempt to fix compilation error on Debian armel kernel.
-@@ -79,37 +84,57 @@
- ATOMIC_INLINE uint64_t
- atomic_add_uint64(uint64_t *p, uint64_t x)
- {
--	return (__sync_add_and_fetch(p, x));
-+	return __sync_add_and_fetch(p, x);
- }
- 
- ATOMIC_INLINE uint64_t
- atomic_sub_uint64(uint64_t *p, uint64_t x)
- {
--	return (__sync_sub_and_fetch(p, x));
-+	return __sync_sub_and_fetch(p, x);
-+}
-+
-+ATOMIC_INLINE uint64_t
-+atomic_cas_uint64(uint64_t *v, uint64_t old, uint64_t _new)
-+{
-+	return __sync_val_compare_and_swap(v, old, _new);
- }
- #elif (defined(_MSC_VER))
- ATOMIC_INLINE uint64_t
- atomic_add_uint64(uint64_t *p, uint64_t x)
- {
--	return (InterlockedExchangeAdd64(p, x));
-+	return InterlockedExchangeAdd64((int64_t *)p, (int64_t)x);
- }
- 
- ATOMIC_INLINE uint64_t
- atomic_sub_uint64(uint64_t *p, uint64_t x)
- {
--	return (InterlockedExchangeAdd64(p, -((int64_t)x)));
-+	return InterlockedExchangeAdd64((int64_t *)p, -((int64_t)x));
-+}
-+
-+ATOMIC_INLINE uint64_t
-+atomic_cas_uint64(uint64_t *v, uint64_t old, uint64_t _new)
-+{
-+	return InterlockedCompareExchange64((int64_t *)v, _new, old);
- }
- #elif (defined(__APPLE__))
- ATOMIC_INLINE uint64_t
- atomic_add_uint64(uint64_t *p, uint64_t x)
- {
--	return (uint64_t)(OSAtomicAdd64((int64_t)x, (int64_t *)p));
-+	return (uint64_t)OSAtomicAdd64((int64_t)x, (int64_t *)p);
- }
- 
- ATOMIC_INLINE uint64_t
- atomic_sub_uint64(uint64_t *p, uint64_t x)
- {
--	return (uint64_t)(OSAtomicAdd64(-((int64_t)x), (int64_t *)p));
-+	return (uint64_t)OSAtomicAdd64(-((int64_t)x), (int64_t *)p);
-+}
-+
-+ATOMIC_INLINE uint64_t
-+atomic_cas_uint64(uint64_t *v, uint64_t old, uint64_t _new)
-+{
-+	uint64_t init_val = *v;
-+	OSAtomicCompareAndSwap64((int64_t)old, (int64_t)_new, (int64_t *)v);
-+	return init_val;
- }
- #  elif (defined(__amd64__) || defined(__x86_64__))
- ATOMIC_INLINE uint64_t
-@@ -120,7 +145,7 @@ atomic_add_uint64(uint64_t *p, uint64_t x)
- 	    : "+r" (x), "=m" (*p) /* Outputs. */
- 	    : "m" (*p) /* Inputs. */
- 	    );
--	return (x);
-+	return x;
- }
- 
- ATOMIC_INLINE uint64_t
-@@ -132,8 +157,21 @@ atomic_sub_uint64(uint64_t *p, uint64_t x)
- 	    : "+r" (x), "=m" (*p) /* Outputs. */
- 	    : "m" (*p) /* Inputs. */
- 	    );
--	return (x);
-+	return x;
-+}
-+
-+ATOMIC_INLINE uint64_t
-+atomic_cas_uint64(uint64_t *v, uint64_t old, uint64_t _new)
-+{
-+	uint64_t ret;
-+	asm volatile (
-+	    "lock; cmpxchgq %2,%1"
-+	    : "=a" (ret), "+m" (*v)
-+	    : "r" (_new), "0" (old)
-+	    : "memory");
-+	return ret;
- }
-+
- #  elif (defined(JEMALLOC_ATOMIC9))
- ATOMIC_INLINE uint64_t
- atomic_add_uint64(uint64_t *p, uint64_t x)
-@@ -144,7 +182,7 @@ atomic_add_uint64(uint64_t *p, uint64_t x)
- 	 */
- 	assert(sizeof(uint64_t) == sizeof(unsigned long));
- 
--	return (atomic_fetchadd_long(p, (unsigned long)x) + x);
-+	return atomic_fetchadd_long(p, (unsigned long)x) + x;
- }
- 
- ATOMIC_INLINE uint64_t
-@@ -152,19 +190,33 @@ atomic_sub_uint64(uint64_t *p, uint64_t x)
- {
- 	assert(sizeof(uint64_t) == sizeof(unsigned long));
- 
--	return (atomic_fetchadd_long(p, (unsigned long)(-(long)x)) - x);
-+	return atomic_fetchadd_long(p, (unsigned long)(-(long)x)) - x;
-+}
-+
-+ATOMIC_INLINE uint64_t
-+atomic_cas_uint32(uint64_t *v, uint64_t old, uint64_t _new)
-+{
-+	assert(sizeof(uint64_t) == sizeof(unsigned long));
-+
-+	return atomic_cmpset_long(v, old, _new);
- }
- #  elif (defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_8))
- ATOMIC_INLINE uint64_t
- atomic_add_uint64(uint64_t *p, uint64_t x)
- {
--	return (__sync_add_and_fetch(p, x));
-+	return __sync_add_and_fetch(p, x);
- }
- 
- ATOMIC_INLINE uint64_t
- atomic_sub_uint64(uint64_t *p, uint64_t x)
- {
--	return (__sync_sub_and_fetch(p, x));
-+	return __sync_sub_and_fetch(p, x);
-+}
-+
-+ATOMIC_INLINE uint64_t
-+atomic_cas_uint32(uint64_t *v, uint64_t old, uint64_t _new)
-+{
-+	return __sync_val_compare_and_swap(v, old, _new);
- }
- #  else
- #    error "Missing implementation for 64-bit atomic operations"
-@@ -177,37 +229,57 @@ atomic_sub_uint64(uint64_t *p, uint64_t x)
- ATOMIC_INLINE uint32_t
- atomic_add_uint32(uint32_t *p, uint32_t x)
- {
--	return (__sync_add_and_fetch(p, x));
-+	return __sync_add_and_fetch(p, x);
- }
- 
- ATOMIC_INLINE uint32_t
- atomic_sub_uint32(uint32_t *p, uint32_t x)
- {
--	return (__sync_sub_and_fetch(p, x));
-+	return __sync_sub_and_fetch(p, x);
-+}
-+
-+ATOMIC_INLINE uint32_t
-+atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
-+{
-+   return __sync_val_compare_and_swap(v, old, _new);
- }
- #elif (defined(_MSC_VER))
- ATOMIC_INLINE uint32_t
- atomic_add_uint32(uint32_t *p, uint32_t x)
- {
--	return (InterlockedExchangeAdd(p, x));
-+	return InterlockedExchangeAdd(p, x);
- }
- 
- ATOMIC_INLINE uint32_t
- atomic_sub_uint32(uint32_t *p, uint32_t x)
- {
--	return (InterlockedExchangeAdd(p, -((int32_t)x)));
-+	return InterlockedExchangeAdd(p, -((int32_t)x));
-+}
-+
-+ATOMIC_INLINE uint32_t
-+atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
-+{
-+	return InterlockedCompareExchange((long *)v, _new, old);
- }
- #elif (defined(__APPLE__))
- ATOMIC_INLINE uint32_t
- atomic_add_uint32(uint32_t *p, uint32_t x)
- {
--	return (uint32_t)(OSAtomicAdd32((int32_t)x, (int32_t *)p));
-+	return (uint32_t)OSAtomicAdd32((int32_t)x, (int32_t *)p);
- }
- 
- ATOMIC_INLINE uint32_t
- atomic_sub_uint32(uint32_t *p, uint32_t x)
- {
--	return (uint32_t)(OSAtomicAdd32(-((int32_t)x), (int32_t *)p));
-+	return (uint32_t)OSAtomicAdd32(-((int32_t)x), (int32_t *)p);
-+}
-+
-+ATOMIC_INLINE uint32_t
-+atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
-+{
-+	uint32_t init_val = *v;
-+	OSAtomicCompareAndSwap32((int32_t)old, (int32_t)_new, (int32_t *)v);
-+	return init_val;
- }
- #elif (defined(__i386__) || defined(__amd64__) || defined(__x86_64__))
- ATOMIC_INLINE uint32_t
-@@ -218,7 +290,7 @@ atomic_add_uint32(uint32_t *p, uint32_t x)
- 	    : "+r" (x), "=m" (*p) /* Outputs. */
- 	    : "m" (*p) /* Inputs. */
- 	    );
--	return (x);
-+	return x;
- }
- 
- ATOMIC_INLINE uint32_t
-@@ -230,31 +302,55 @@ atomic_sub_uint32(uint32_t *p, uint32_t x)
- 	    : "+r" (x), "=m" (*p) /* Outputs. */
- 	    : "m" (*p) /* Inputs. */
- 	    );
--	return (x);
-+	return x;
-+}
-+
-+ATOMIC_INLINE uint32_t
-+atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
-+{
-+	uint32_t ret;
-+	asm volatile (
-+	    "lock; cmpxchgl %2,%1"
-+	    : "=a" (ret), "+m" (*v)
-+	    : "r" (_new), "0" (old)
-+	    : "memory");
-+	return ret;
- }
- #elif (defined(JEMALLOC_ATOMIC9))
- ATOMIC_INLINE uint32_t
- atomic_add_uint32(uint32_t *p, uint32_t x)
- {
--	return (atomic_fetchadd_32(p, x) + x);
-+	return atomic_fetchadd_32(p, x) + x;
- }
- 
- ATOMIC_INLINE uint32_t
- atomic_sub_uint32(uint32_t *p, uint32_t x)
- {
--	return (atomic_fetchadd_32(p, (uint32_t)(-(int32_t)x)) - x);
-+	return atomic_fetchadd_32(p, (uint32_t)(-(int32_t)x)) - x;
-+}
-+
-+ATOMIC_INLINE uint32_t
-+atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
-+{
-+	return atomic_cmpset_32(v, old, _new);
- }
--#elif (defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4))
-+#elif defined(JE_FORCE_SYNC_COMPARE_AND_SWAP_4)
- ATOMIC_INLINE uint32_t
- atomic_add_uint32(uint32_t *p, uint32_t x)
- {
--	return (__sync_add_and_fetch(p, x));
-+	return __sync_add_and_fetch(p, x);
- }
- 
- ATOMIC_INLINE uint32_t
- atomic_sub_uint32(uint32_t *p, uint32_t x)
- {
--	return (__sync_sub_and_fetch(p, x));
-+	return __sync_sub_and_fetch(p, x);
-+}
-+
-+ATOMIC_INLINE uint32_t
-+atomic_cas_uint32(uint32_t *v, uint32_t old, uint32_t _new)
-+{
-+	return __sync_val_compare_and_swap(v, old, _new);
- }
- #else
- #  error "Missing implementation for 32-bit atomic operations"
-@@ -268,9 +364,9 @@ atomic_add_z(size_t *p, size_t x)
- 	assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
- 
- #if (LG_SIZEOF_PTR == 3)
--	return ((size_t)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
-+	return (size_t)atomic_add_uint64((uint64_t *)p, (uint64_t)x);
- #elif (LG_SIZEOF_PTR == 2)
--	return ((size_t)atomic_add_uint32((uint32_t *)p, (uint32_t)x));
-+	return (size_t)atomic_add_uint32((uint32_t *)p, (uint32_t)x);
- #endif
- }
- 
-@@ -280,11 +376,27 @@ atomic_sub_z(size_t *p, size_t x)
- 	assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
- 
- #if (LG_SIZEOF_PTR == 3)
--	return ((size_t)atomic_add_uint64((uint64_t *)p,
--	    (uint64_t)-((int64_t)x)));
-+	return (size_t)atomic_add_uint64((uint64_t *)p,
-+	                                 (uint64_t)-((int64_t)x));
- #elif (LG_SIZEOF_PTR == 2)
--	return ((size_t)atomic_add_uint32((uint32_t *)p,
--	    (uint32_t)-((int32_t)x)));
-+	return (size_t)atomic_add_uint32((uint32_t *)p,
-+	                                 (uint32_t)-((int32_t)x));
-+#endif
-+}
-+
-+ATOMIC_INLINE size_t
-+atomic_cas_z(size_t *v, size_t old, size_t _new)
-+{
-+	assert(sizeof(size_t) == 1 << LG_SIZEOF_PTR);
-+
-+#if (LG_SIZEOF_PTR == 3)
-+	return (size_t)atomic_cas_uint64((uint64_t *)v,
-+	                                 (uint64_t)old,
-+	                                 (uint64_t)_new);
-+#elif (LG_SIZEOF_PTR == 2)
-+	return (size_t)atomic_cas_uint32((uint32_t *)v,
-+	                                 (uint32_t)old,
-+	                                 (uint32_t)_new);
- #endif
- }
- 
-@@ -296,9 +408,9 @@ atomic_add_u(unsigned *p, unsigned x)
- 	assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
- 
- #if (LG_SIZEOF_INT == 3)
--	return ((unsigned)atomic_add_uint64((uint64_t *)p, (uint64_t)x));
-+	return (unsigned)atomic_add_uint64((uint64_t *)p, (uint64_t)x);
- #elif (LG_SIZEOF_INT == 2)
--	return ((unsigned)atomic_add_uint32((uint32_t *)p, (uint32_t)x));
-+	return (unsigned)atomic_add_uint32((uint32_t *)p, (uint32_t)x);
- #endif
- }
- 
-@@ -308,11 +420,27 @@ atomic_sub_u(unsigned *p, unsigned x)
- 	assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
- 
- #if (LG_SIZEOF_INT == 3)
--	return ((unsigned)atomic_add_uint64((uint64_t *)p,
--	    (uint64_t)-((int64_t)x)));
-+	return (unsigned)atomic_add_uint64((uint64_t *)p,
-+	                                   (uint64_t)-((int64_t)x));
- #elif (LG_SIZEOF_INT == 2)
--	return ((unsigned)atomic_add_uint32((uint32_t *)p,
--	    (uint32_t)-((int32_t)x)));
-+	return (unsigned)atomic_add_uint32((uint32_t *)p,
-+	                                   (uint32_t)-((int32_t)x));
-+#endif
-+}
-+
-+ATOMIC_INLINE unsigned
-+atomic_cas_u(unsigned *v, unsigned old, unsigned _new)
-+{
-+	assert(sizeof(unsigned) == 1 << LG_SIZEOF_INT);
-+
-+#if (LG_SIZEOF_PTR == 3)
-+	return (unsigned)atomic_cas_uint64((uint64_t *)v,
-+	                                   (uint64_t)old,
-+	                                   (uint64_t)_new);
-+#elif (LG_SIZEOF_PTR == 2)
-+	return (unsigned)atomic_cas_uint32((uint32_t *)v,
-+	                                   (uint32_t)old,
-+	                                   (uint32_t)_new);
- #endif
- }
- 
-diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
-index a3f251d..2b64eac 100644
---- a/intern/cycles/CMakeLists.txt
-+++ b/intern/cycles/CMakeLists.txt
-@@ -139,6 +139,10 @@ include_directories(
- 	${OPENEXR_INCLUDE_DIRS}
- )
- 
-+# TODO(sergey): Adjust so standalone repository is also happy.
-+include_directories(
-+	../atomic
-+)
- 
- # Warnings
- if(CMAKE_COMPILER_IS_GNUCXX)
-diff --git a/intern/cycles/SConscript b/intern/cycles/SConscript
-index a6c947b..53278b7 100644
---- a/intern/cycles/SConscript
-+++ b/intern/cycles/SConscript
-@@ -60,7 +60,7 @@ if env['WITH_BF_CYCLES_OSL']:
-     incs.append(cycles['BF_OSL_INC'])
- 
- incs.extend('. bvh render device kernel kernel/osl kernel/svm util subd'.split())
--incs.extend('#intern/guardedalloc #source/blender/makesrna #source/blender/makesdna #source/blender/blenlib'.split())
-+incs.extend('#intern/guardedalloc #intern/atomic #source/blender/makesrna #source/blender/makesdna #source/blender/blenlib'.split())
- incs.extend('#source/blender/blenloader ../../source/blender/makesrna/intern'.split())
- incs.extend('#extern/glew/include #extern/clew/include #extern/cuew/include #intern/mikktspace'.split())
- incs.append(cycles['BF_OIIO_INC'])
-diff --git a/intern/cycles/kernel/osl/SConscript b/intern/cycles/kernel/osl/SConscript
-index 4685bb7..e4329de 100644
---- a/intern/cycles/kernel/osl/SConscript
-+++ b/intern/cycles/kernel/osl/SConscript
-@@ -38,6 +38,7 @@ incs.append(env['BF_OIIO_INC'])
- incs.append(env['BF_BOOST_INC'])
- incs.append(env['BF_OSL_INC'])
- incs.append(env['BF_OPENEXR_INC'].split())
-+incs.append('#/intern/atomic')
- 
- defs.append('CCL_NAMESPACE_BEGIN=namespace ccl {')
- defs.append('CCL_NAMESPACE_END=}')
-diff --git a/intern/cycles/util/CMakeLists.txt b/intern/cycles/util/CMakeLists.txt
-index d9b97a7..4caa1e1 100644
---- a/intern/cycles/util/CMakeLists.txt
-+++ b/intern/cycles/util/CMakeLists.txt
-@@ -30,6 +30,7 @@ endif()
- set(SRC_HEADERS
- 	util_algorithm.h
- 	util_args.h
-+	util_atomic.h
- 	util_boundbox.h
- 	util_cache.h
- 	util_debug.h
-diff --git a/intern/cycles/util/util_atomic.h b/intern/cycles/util/util_atomic.h
-new file mode 100644
-index 0000000..1bbb0a8
---- /dev/null
-+++ b/intern/cycles/util/util_atomic.h
-@@ -0,0 +1,33 @@
-+/*
-+ * Copyright 2014 Blender Foundation
-+ *
-+ * Licensed under the Apache License, Version 2.0 (the "License");
-+ * you may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ * Unless required by applicable law or agreed to in writing, software
-+ * distributed under the License is distributed on an "AS IS" BASIS,
-+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-+ * See the License for the specific language governing permissions and
-+ * limitations under the License
-+ */
-+
-+#ifndef __UTIL_ATOMIC_H__
-+#define __UTIL_ATOMIC_H__
-+
-+/* Using atomic ops header from Blender. */
-+#include "atomic_ops.h"
-+
-+ATOMIC_INLINE void atomic_update_max_z(size_t *maximum_value, size_t value)
-+{
-+	size_t prev_value = *maximum_value;
-+	while (prev_value < value) {
-+		if (atomic_cas_z(maximum_value, prev_value, value) != prev_value) {
-+			break;
-+		}
-+	}
-+}
-+
-+#endif /* __UTIL_ATOMIC_H__ */
-diff --git a/intern/cycles/util/util_stats.h b/intern/cycles/util/util_stats.h
-index 8758b82..fe6c162 100644
---- a/intern/cycles/util/util_stats.h
-+++ b/intern/cycles/util/util_stats.h
-@@ -17,6 +17,8 @@
- #ifndef __UTIL_STATS_H__
- #define __UTIL_STATS_H__
- 
-+#include "util_atomic.h"
-+
- CCL_NAMESPACE_BEGIN
- 
- class Stats {
-@@ -24,14 +26,13 @@ public:
- 	Stats() : mem_used(0), mem_peak(0) {}
- 
- 	void mem_alloc(size_t size) {
--		mem_used += size;
--		if(mem_used > mem_peak)
--			mem_peak = mem_used;
-+		atomic_add_z(&mem_used, size);
-+		atomic_update_max_z(&mem_peak, mem_used);
- 	}
- 
- 	void mem_free(size_t size) {
- 		assert(mem_used >= size);
--		mem_used -= size;
-+		atomic_sub_z(&mem_used, size);
- 	}
- 
- 	size_t mem_used;
diff --git a/debian/patches/0011-set_SSL_version_to_v23.patch b/debian/patches/0011-set_SSL_version_to_v23.patch
deleted file mode 100644
index 0041840..0000000
--- a/debian/patches/0011-set_SSL_version_to_v23.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From: "Matteo F. Vescovi" <mfv at debian.org>
-Date: Wed, 3 Dec 2014 14:34:55 +0100
-Subject: set_SSL_version_to_v23
-
-Closes: #770447
----
- release/scripts/addons/netrender/master.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/release/scripts/addons/netrender/master.py b/release/scripts/addons/netrender/master.py
-index 3c087e5..30f09a6 100644
---- a/release/scripts/addons/netrender/master.py
-+++ b/release/scripts/addons/netrender/master.py
-@@ -1158,7 +1158,7 @@ def runMaster(address, broadcast, clear, force, path, update_stats, test_break,u
-     httpd.stats = update_stats
-     if use_ssl:
-         import ssl
--        httpd.socket=ssl.wrap_socket(httpd.socket,certfile=cert_path,server_side=True,keyfile=key_path,ciphers="ALL",ssl_version=ssl.PROTOCOL_SSLv3)
-+        httpd.socket=ssl.wrap_socket(httpd.socket,certfile=cert_path,server_side=True,keyfile=key_path,ciphers="ALL",ssl_version=ssl.PROTOCOL_SSLv23)
-     if broadcast:
-         s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
-         s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
diff --git a/debian/patches/series b/debian/patches/series
index 85dec38..5a75c11 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,7 +5,3 @@
 0005-update_manpages.patch
 0006-do_not_use_version_number_in_system_path.patch
 0007-look_for_droid_ttf_with_fontconfig.patch
-0008-use_cuda_pointer_arithmetic_in_integers.patch
-0009-add_flag_disabling_SSE-SSE2_intrinsics.patch
-0010-fix_atomic_issue.patch
-0011-set_SSL_version_to_v23.patch

-- 
blender packaging



More information about the pkg-multimedia-commits mailing list