[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [57602] branches/soc-2013-depsgraph_mt: Merging r57570 through r57601 from trunk into soc-2013-depsgraph_mt

Sergey Sharybin sergey.vfx at gmail.com
Thu Jun 20 13:05:47 CEST 2013


Revision: 57602
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57602
Author:   nazgul
Date:     2013-06-20 11:05:47 +0000 (Thu, 20 Jun 2013)
Log Message:
-----------
Merging r57570 through r57601 from trunk into soc-2013-depsgraph_mt

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57570
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=57601

Modified Paths:
--------------
    branches/soc-2013-depsgraph_mt/CMakeLists.txt
    branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_Sequencer.cpp
    branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_SequencerReader.cpp
    branches/soc-2013-depsgraph_mt/intern/cycles/CMakeLists.txt
    branches/soc-2013-depsgraph_mt/intern/cycles/SConscript
    branches/soc-2013-depsgraph_mt/intern/cycles/device/device_cuda.cpp
    branches/soc-2013-depsgraph_mt/intern/cycles/device/device_opencl.cpp
    branches/soc-2013-depsgraph_mt/intern/cycles/kernel/CMakeLists.txt
    branches/soc-2013-depsgraph_mt/intern/cycles/kernel/SConscript
    branches/soc-2013-depsgraph_mt/intern/cycles/kernel/kernel_bvh_traversal.h
    branches/soc-2013-depsgraph_mt/intern/cycles/kernel/kernel_jitter.h
    branches/soc-2013-depsgraph_mt/intern/cycles/kernel/kernel_shader.h
    branches/soc-2013-depsgraph_mt/intern/cycles/util/util_cuda.cpp
    branches/soc-2013-depsgraph_mt/intern/cycles/util/util_cuda.h
    branches/soc-2013-depsgraph_mt/intern/cycles/util/util_types.h
    branches/soc-2013-depsgraph_mt/release/scripts/startup/bl_ui/__init__.py
    branches/soc-2013-depsgraph_mt/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/displist.c
    branches/soc-2013-depsgraph_mt/source/blender/blenkernel/intern/editmesh_bvh.c
    branches/soc-2013-depsgraph_mt/source/blender/blenlib/intern/BLI_heap.c
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/bmesh_class.h
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_marking.c
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/intern/bmesh_mesh.c
    branches/soc-2013-depsgraph_mt/source/blender/bmesh/tools/bmesh_path.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/include/ED_mesh.h
    branches/soc-2013-depsgraph_mt/source/blender/editors/include/UI_interface.h
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface_handlers.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface_intern.h
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface_layout.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface_regions.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/editmesh_select.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/editmesh_utils.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/mesh_intern.h
    branches/soc-2013-depsgraph_mt/source/blender/editors/mesh/mesh_ops.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/object/object_vgroup.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_buttons/CMakeLists.txt
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_buttons/buttons_intern.h
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_buttons/space_buttons.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_file/file_intern.h
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_file/filesel.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/drawmesh.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_view3d/view3d_iterators.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/transform/transform.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/transform/transform.h
    branches/soc-2013-depsgraph_mt/source/blender/editors/transform/transform_conversions.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/transform/transform_snap.c
    branches/soc-2013-depsgraph_mt/source/blender/makesrna/intern/rna_space.c
    branches/soc-2013-depsgraph_mt/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2013-depsgraph_mt/source/gameengine/Converter/BL_BlenderDataConversion.cpp
    branches/soc-2013-depsgraph_mt/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    branches/soc-2013-depsgraph_mt/source/gameengine/GameLogic/SCA_IInputDevice.h
    branches/soc-2013-depsgraph_mt/source/gameengine/GamePlayer/ghost/GPG_KeyboardDevice.cpp
    branches/soc-2013-depsgraph_mt/source/gameengine/Ketsji/KX_KetsjiEngine.cpp
    branches/soc-2013-depsgraph_mt/source/gameengine/Ketsji/KX_KetsjiEngine.h
    branches/soc-2013-depsgraph_mt/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/soc-2013-depsgraph_mt/source/gameengine/Ketsji/KX_Scene.cpp
    branches/soc-2013-depsgraph_mt/source/gameengine/Ketsji/KX_Scene.h
    branches/soc-2013-depsgraph_mt/source/gameengine/VideoTexture/ImageRender.cpp

Added Paths:
-----------
    branches/soc-2013-depsgraph_mt/release/scripts/startup/bl_ui/space_properties.py

Removed Paths:
-------------
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_buttons/buttons_header.c

Property Changed:
----------------
    branches/soc-2013-depsgraph_mt/
    branches/soc-2013-depsgraph_mt/source/blender/editors/interface/interface.c
    branches/soc-2013-depsgraph_mt/source/blender/editors/space_outliner/


Property changes on: branches/soc-2013-depsgraph_mt
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-57569
   + /branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57395-57601

Modified: branches/soc-2013-depsgraph_mt/CMakeLists.txt
===================================================================
--- branches/soc-2013-depsgraph_mt/CMakeLists.txt	2013-06-20 11:00:35 UTC (rev 57601)
+++ branches/soc-2013-depsgraph_mt/CMakeLists.txt	2013-06-20 11:05:47 UTC (rev 57602)
@@ -562,12 +562,12 @@
 if(UNIX AND NOT APPLE)
 	macro(find_package_wrapper)
 		string(TOUPPER ${ARGV0} _NAME_UPPER)
-		if(${WITH_STATIC_LIBS})
+		if(WITH_STATIC_LIBS)
 			set(_cmake_find_library_suffixes_back ${CMAKE_FIND_LIBRARY_SUFFIXES})
 			set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
 		endif()
 		find_package(${ARGV})
-		if(${WITH_STATIC_LIBS})
+		if(WITH_STATIC_LIBS)
 			set(CMAKE_FIND_LIBRARY_SUFFIXES ${_cmake_find_library_suffixes_back})
 			unset(_cmake_find_library_suffixes_back)
 		endif()
@@ -707,7 +707,7 @@
 	if(WITH_BOOST)
 		# uses in build instructions to override include and library variables
 		if(NOT BOOST_CUSTOM)
-			if(${WITH_STATIC_LIBS})
+			if(WITH_STATIC_LIBS)
 				set(Boost_USE_STATIC_LIBS ON)
 			endif()
 			set(Boost_USE_MULTITHREADED ON)

Modified: branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_Sequencer.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_Sequencer.cpp	2013-06-20 11:00:35 UTC (rev 57601)
+++ branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_Sequencer.cpp	2013-06-20 11:05:47 UTC (rev 57602)
@@ -161,7 +161,7 @@
 
 	boost::shared_ptr<AUD_SequencerEntry> entry = boost::shared_ptr<AUD_SequencerEntry>(new AUD_SequencerEntry(sound, begin, end, skip, m_id++));
 
-	m_entries.push_front(entry);
+	m_entries.push_back(entry);
 	m_entry_status++;
 
 	return entry;

Modified: branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_SequencerReader.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_SequencerReader.cpp	2013-06-20 11:00:35 UTC (rev 57601)
+++ branches/soc-2013-depsgraph_mt/intern/audaspace/intern/AUD_SequencerReader.cpp	2013-06-20 11:05:47 UTC (rev 57602)
@@ -112,7 +112,7 @@
 				try
 				{
 					handle = boost::shared_ptr<AUD_SequencerHandle>(new AUD_SequencerHandle(entry, m_device));
-					handles.push_front(handle);
+					handles.push_back(handle);
 				}
 				catch(AUD_Exception&)
 				{
@@ -143,7 +143,7 @@
 			try
 			{
 				handle = boost::shared_ptr<AUD_SequencerHandle>(new AUD_SequencerHandle(*eit, m_device));
-				handles.push_front(handle);
+				handles.push_back(handle);
 			}
 			catch(AUD_Exception&)
 			{

Modified: branches/soc-2013-depsgraph_mt/intern/cycles/CMakeLists.txt
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/CMakeLists.txt	2013-06-20 11:00:35 UTC (rev 57601)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/CMakeLists.txt	2013-06-20 11:05:47 UTC (rev 57602)
@@ -13,10 +13,14 @@
 endif()
 
 if(WIN32 AND MSVC)
-	set(CYCLES_SSE2_KERNEL_FLAGS "/arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc /Ox /GS-")
 	# there is no /arch:SSE3, but intrinsics are available anyway
-	set(CYCLES_SSE3_KERNEL_FLAGS "/arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc /Ox /GS-")
-	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast -D_CRT_SECURE_NO_WARNINGS /EHsc /Ox /GS-")
+	set(CYCLES_SSE2_KERNEL_FLAGS "/arch:SSE2 /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+	set(CYCLES_SSE3_KERNEL_FLAGS "/arch:SSE2 /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+
+	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
+	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
+	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
+	set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
 elseif(CMAKE_COMPILER_IS_GNUCC)
 	set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2 -mfpmath=sse")
 	set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3 -mfpmath=sse")

Modified: branches/soc-2013-depsgraph_mt/intern/cycles/SConscript
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/SConscript	2013-06-20 11:00:35 UTC (rev 57601)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/SConscript	2013-06-20 11:05:47 UTC (rev 57602)
@@ -79,12 +79,12 @@
     sse3_cxxflags = Split(env['CXXFLAGS'])
 
     if env['OURPLATFORM'] == 'win32-vc':
-        sse2_cxxflags.append('/arch:SSE /arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc /Ox /Gs-'.split())
         # there is no /arch:SSE3, but intrinsics are available anyway
-        sse3_cxxflags.append('/arch:SSE /arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc /Ox /Gs-'.split())
+        sse2_cxxflags.append('/arch:SSE /arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast /Ox /Gs-'.split())
+        sse3_cxxflags.append('/arch:SSE /arch:SSE2 -D_CRT_SECURE_NO_WARNINGS /fp:fast /Ox /Gs-'.split())
     elif env['OURPLATFORM'] == 'win64-vc':
-        sse2_cxxflags.append('-D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc /Ox /Gs-'.split())
-        sse3_cxxflags.append('-D_CRT_SECURE_NO_WARNINGS /fp:fast /EHsc /Ox /Gs-'.split())
+        sse2_cxxflags.append('-D_CRT_SECURE_NO_WARNINGS /fp:fast /Ox /Gs-'.split())
+        sse3_cxxflags.append('-D_CRT_SECURE_NO_WARNINGS /fp:fast /Ox /Gs-'.split())
     else:
         sse2_cxxflags.append('-ffast-math -msse -msse2 -mfpmath=sse'.split())
         sse3_cxxflags.append('-ffast-math -msse -msse2 -msse3 -mssse3 -mfpmath=sse'.split())

Modified: branches/soc-2013-depsgraph_mt/intern/cycles/device/device_cuda.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/device/device_cuda.cpp	2013-06-20 11:00:35 UTC (rev 57601)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/device/device_cuda.cpp	2013-06-20 11:05:47 UTC (rev 57602)
@@ -271,21 +271,65 @@
 			return "";
 		}
 
+		int cuda_version = cuCompilerVersion();
+
+		if(cuda_version == 0) {
+			cuda_error_message("CUDA nvcc compiler version could not be parsed.");
+			return "";
+		}
+
+		if(cuda_version != 50)
+			printf("CUDA version %d.%d detected, build may succeed but only CUDA 5.0 is officially supported.\n", cuda_version/10, cuda_version%10);
+
 		/* compile */
 		string kernel = path_join(kernel_path, "kernel.cu");
 		string include = kernel_path;
 		const int machine = system_cpu_bits();
-		const int maxreg = 24;
+		string arch_flags;
 
+		/* build flags depending on CUDA version and arch */
+		if(cuda_version < 50) {
+			/* CUDA 4.x */
+			if(major == 1) {
+				/* sm_1x */
+				arch_flags = "--maxrregcount=24 --opencc-options -OPT:Olimit=0";
+			}
+			else if(major == 2) {
+				/* sm_2x */
+				arch_flags = "--maxrregcount=24";
+			}
+			else {
+				/* sm_3x */
+				arch_flags = "--maxrregcount=32";
+			}
+		}
+		else {
+			/* CUDA 4.x */
+			if(major == 1) {
+				/* sm_1x */
+				arch_flags = "--maxrregcount=24 --opencc-options -OPT:Olimit=0 --use_fast_math";
+			}
+			else if(major == 2) {
+				/* sm_2x */
+				arch_flags = "--maxrregcount=32 --use_fast_math";
+			}
+			else {
+				/* sm_3x */
+				arch_flags = "--maxrregcount=32 --use_fast_math";
+			}
+		}
+
 		double starttime = time_dt();
 		printf("Compiling CUDA kernel ...\n");
 
 		path_create_directories(cubin);
 
 		string command = string_printf("\"%s\" -arch=sm_%d%d -m%d --cubin \"%s\" "
-			"-o \"%s\" --ptxas-options=\"-v\" --maxrregcount=%d --opencc-options -OPT:Olimit=0 -I\"%s\" -DNVCC",
-			nvcc.c_str(), major, minor, machine, kernel.c_str(), cubin.c_str(), maxreg, include.c_str());
+			"-o \"%s\" --ptxas-options=\"-v\" %s -I\"%s\" -DNVCC -D__KERNEL_CUDA_VERSION__=%d",
+			nvcc.c_str(), major, minor, machine, kernel.c_str(), cubin.c_str(), arch_flags.c_str(), include.c_str(), cuda_version);
 
+		printf("%s\n", command.c_str());
+
 		if(system(command.c_str()) == -1) {
 			cuda_error_message("Failed to execute compilation command, see console for details.");
 			return "";

Modified: branches/soc-2013-depsgraph_mt/intern/cycles/device/device_opencl.cpp
===================================================================
--- branches/soc-2013-depsgraph_mt/intern/cycles/device/device_opencl.cpp	2013-06-20 11:00:35 UTC (rev 57601)
+++ branches/soc-2013-depsgraph_mt/intern/cycles/device/device_opencl.cpp	2013-06-20 11:05:47 UTC (rev 57602)
@@ -85,7 +85,7 @@
 	string build_options = " -cl-fast-relaxed-math ";
 
 	if(platform == "NVIDIA CUDA")
-		build_options += "-D__KERNEL_OPENCL_NVIDIA__ -cl-nv-maxrregcount=24 -cl-nv-verbose ";
+		build_options += "-D__KERNEL_OPENCL_NVIDIA__ -cl-nv-maxrregcount=32 -cl-nv-verbose ";
 
 	else if(platform == "Apple")
 		build_options += "-D__KERNEL_OPENCL_APPLE__ -Wno-missing-prototypes ";


@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list