[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41657] branches/cycles: Cycles:

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Nov 8 15:10:33 CET 2011


Revision: 41657
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41657
Author:   blendix
Date:     2011-11-08 14:10:33 +0000 (Tue, 08 Nov 2011)
Log Message:
-----------
Cycles:
* Disable precompiled cuda binaries, always do at run time
* Change preview samples default to 10
* Hide volume panels since they don't do anything yet

Modified Paths:
--------------
    branches/cycles/CMakeLists.txt
    branches/cycles/intern/cycles/CMakeLists.txt
    branches/cycles/intern/cycles/blender/addon/properties.py
    branches/cycles/intern/cycles/blender/addon/ui.py
    branches/cycles/intern/cycles/blender/blender_util.h
    branches/cycles/intern/cycles/cmake/external_libs.cmake
    branches/cycles/intern/cycles/kernel/CMakeLists.txt
    branches/cycles/intern/cycles/kernel/svm/svm_gradient.h
    branches/cycles/intern/cycles/util/util_cuda.cpp

Modified: branches/cycles/CMakeLists.txt
===================================================================
--- branches/cycles/CMakeLists.txt	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/CMakeLists.txt	2011-11-08 14:10:33 UTC (rev 41657)
@@ -215,11 +215,6 @@
 
 # Cycles
 option(WITH_CYCLES			"Enable Cycles Render Engine" ON)
-OPTION(WITH_CYCLES_OSL		"Build with Open Shading Language support" OFF)
-OPTION(WITH_CYCLES_CUDA		"Build with CUDA binaries" OFF)
-OPTION(WITH_CYCLES_BLENDER	"Build Blender Python extension" ON)
-OPTION(WITH_CYCLES_PARTIO	"Build with Partio point cloud support (unfinished)" OFF)
-OPTION(WITH_CYCLES_NETWORK	"Build with network rendering support (unfinished)" OFF)
 OPTION(WITH_CYCLES_TEST		"Build cycles test application" OFF)
 
 # disable for now, but plan to support on all platforms eventually
@@ -954,6 +949,9 @@
 			set(PYTHON_LIBRARIES  "${PYTHON_LIBRARY}")
 		endif()
 
+		# disable for now, not building yet
+		set(WITH_CYCLES OFF)
+
 		if(WITH_BOOST)
 			set(BOOST ${LIBDIR}/boost)
 			set(BOOST_INCLUDE_DIR ${BOOST}/include)

Modified: branches/cycles/intern/cycles/CMakeLists.txt
===================================================================
--- branches/cycles/intern/cycles/CMakeLists.txt	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/CMakeLists.txt	2011-11-08 14:10:33 UTC (rev 41657)
@@ -41,10 +41,6 @@
   add_definitions(-DWITH_NETWORK)
 endif()
 
-if(WITH_CYCLES_CUDA)
-  add_definitions(-DWITH_CUDA_BINARIES)
-endif()
-
 if(WITH_CYCLES_OSL)
   add_definitions(-DWITH_OSL)
 endif()
@@ -64,6 +60,8 @@
 
 # Subdirectories
 
+SET(WITH_CYCLES_BLENDER ON)
+
 if(WITH_CYCLES_BLENDER)
 	add_subdirectory(blender)
 endif(WITH_CYCLES_BLENDER)

Modified: branches/cycles/intern/cycles/blender/addon/properties.py
===================================================================
--- branches/cycles/intern/cycles/blender/addon/properties.py	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/blender/addon/properties.py	2011-11-08 14:10:33 UTC (rev 41657)
@@ -40,7 +40,7 @@
         cls.samples = IntProperty(name="Samples", description="Number of samples to render for each pixel",
             default=10, min=1, max=2147483647)
         cls.preview_samples = IntProperty(name="Preview Samples", description="Number of samples to render in the viewport, unlimited if 0",
-            default=0, min=0, max=2147483647)
+            default=10, min=0, max=2147483647)
         cls.preview_pause = BoolProperty(name="Pause Preview", description="Pause all viewport preview renders",
             default=False)
 

Modified: branches/cycles/intern/cycles/blender/addon/ui.py
===================================================================
--- branches/cycles/intern/cycles/blender/addon/ui.py	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/blender/addon/ui.py	2011-11-08 14:10:33 UTC (rev 41657)
@@ -436,7 +436,7 @@
     @classmethod
     def poll(cls, context):
         world = context.world
-        return world and world.node_tree and CyclesButtonsPanel.poll(context)
+        return False # world and world.node_tree and CyclesButtonsPanel.poll(context)
 
     def draw(self, context):
         layout = self.layout
@@ -467,7 +467,7 @@
     @classmethod
     def poll(cls, context):
         mat = context.material
-        return mat and mat.node_tree and CyclesButtonsPanel.poll(context)
+        return False #mat and mat.node_tree and CyclesButtonsPanel.poll(context)
 
     def draw(self, context):
         layout = self.layout

Modified: branches/cycles/intern/cycles/blender/blender_util.h
===================================================================
--- branches/cycles/intern/cycles/blender/blender_util.h	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/blender/blender_util.h	2011-11-08 14:10:33 UTC (rev 41657)
@@ -26,7 +26,8 @@
 #include "util_types.h"
 #include "util_vector.h"
 
-/* Hacks to hook into Blender API */
+/* Hacks to hook into Blender API
+   todo: clean this up ... */
 
 extern "C" {
 

Modified: branches/cycles/intern/cycles/cmake/external_libs.cmake
===================================================================
--- branches/cycles/intern/cycles/cmake/external_libs.cmake	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/cmake/external_libs.cmake	2011-11-08 14:10:33 UTC (rev 41657)
@@ -85,18 +85,3 @@
 	add_definitions(-DBLENDER_PLUGIN)
 endif()
 
-###########################################################################
-# CUDA
-
-if(WITH_CYCLES_CUDA)
-	find_package(CUDA) # Try to auto locate CUDA toolkit
-	if(CUDA_FOUND)
-		message(STATUS "CUDA nvcc = ${CUDA_NVCC_EXECUTABLE}")
-		set(CYCLES_CUDA_ARCH sm_10 sm_11 sm_12 sm_13 sm_20 sm_21 CACHE STRING "CUDA architectures to build for")
-		set(CYCLES_CUDA_MAXREG 24 CACHE STRING "CUDA maximum number of register to use")
-	else()
-		message(STATUS "CUDA compiler not found, disabling WITH_CYCLES_CUDA")
-		set(WITH_CYCLES_CUDA OFF)
-	endif()
-endif()
-

Modified: branches/cycles/intern/cycles/kernel/CMakeLists.txt
===================================================================
--- branches/cycles/intern/cycles/kernel/CMakeLists.txt	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/kernel/CMakeLists.txt	2011-11-08 14:10:33 UTC (rev 41657)
@@ -74,33 +74,6 @@
 	../util/util_transform.h
 	../util/util_types.h)
 
-# CUDA module
-
-if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
-	set(CUDA_BITS 64)
-else()
-	set(CUDA_BITS 32)
-endif()
-
-if(WITH_CYCLES_CUDA)
-	set(cuda_sources kernel.cu ${headers} ${svm_headers})
-	set(cuda_cubins)
-
-	foreach(arch ${CYCLES_CUDA_ARCH})
-		set(cuda_cubin kernel_${arch}.cubin)
-
-		add_custom_command(
-			OUTPUT ${cuda_cubin}
-			COMMAND ${CUDA_NVCC_EXECUTABLE} -arch=${arch} -m${CUDA_BITS} --cubin ${CMAKE_CURRENT_SOURCE_DIR}/kernel.cu --use_fast_math -o ${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin} --ptxas-options="-v" --maxrregcount=${CYCLES_CUDA_MAXREG} --opencc-options -OPT:Olimit=0 -I${CMAKE_CURRENT_SOURCE_DIR}/../util -I${CMAKE_CURRENT_SOURCE_DIR}/svm -DCCL_NAMESPACE_BEGIN= -DCCL_NAMESPACE_END= -DNVCC
-			DEPENDS ${cuda_sources})
-
-		delayed_install("${CMAKE_CURRENT_BINARY_DIR}" "${cuda_cubin}" ${CYCLES_INSTALL_PATH}/lib)
-		list(APPEND cuda_cubins ${cuda_cubin})
-	endforeach()
-
-	add_custom_target(cycles_kernel_cuda ALL DEPENDS ${cuda_cubins})
-endif()
-
 # OSL module
 
 if(WITH_CYCLES_OSL)

Modified: branches/cycles/intern/cycles/kernel/svm/svm_gradient.h
===================================================================
--- branches/cycles/intern/cycles/kernel/svm/svm_gradient.h	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/kernel/svm/svm_gradient.h	2011-11-08 14:10:33 UTC (rev 41657)
@@ -48,7 +48,7 @@
 		return atan2(y, x)/(2.0f*M_PI_F) + 0.5f;
 	}
 	else {
-		float r = fmaxf(1.0f - sqrtf(x*x + y*y + p.z*p.z), 0.0f);
+		float r = fmaxf(1.0f - sqrtf(x*x + y*y + z*z), 0.0f);
 
 		if(type == NODE_BLEND_QUADRATIC_SPHERE)
 			return r*r;

Modified: branches/cycles/intern/cycles/util/util_cuda.cpp
===================================================================
--- branches/cycles/intern/cycles/util/util_cuda.cpp	2011-11-08 14:03:16 UTC (rev 41656)
+++ branches/cycles/intern/cycles/util/util_cuda.cpp	2011-11-08 14:10:33 UTC (rev 41657)
@@ -373,10 +373,8 @@
 	/* cuda 4.0 */
 	CUDA_LIBRARY_FIND(cuCtxSetCurrent);
 
-#ifndef WITH_CUDA_BINARIES
 	if(cuCompilerPath() == "")
 		return false;
-#endif
 
 	/* success */
 	result = true;




More information about the Bf-blender-cvs mailing list