diff --git a/CMakeLists.txt b/CMakeLists.txt index 99a44efdb0d..daf3940eab7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -215,11 +215,6 @@ option(WITH_PYTHON_INSTALL "Copy system python into the blender install fo # 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 @@ elseif(WIN32) 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) diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt index d0b24c879a1..0debe10747b 100644 --- a/intern/cycles/CMakeLists.txt +++ b/intern/cycles/CMakeLists.txt @@ -41,10 +41,6 @@ if(WITH_CYCLES_NETWORK) 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 @@ include_directories( # Subdirectories +SET(WITH_CYCLES_BLENDER ON) + if(WITH_CYCLES_BLENDER) add_subdirectory(blender) endif(WITH_CYCLES_BLENDER) diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py index a58e4dfd154..5a56240865a 100644 --- a/intern/cycles/blender/addon/properties.py +++ b/intern/cycles/blender/addon/properties.py @@ -40,7 +40,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup): 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) diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py index 58852edce88..dfbfb769170 100644 --- a/intern/cycles/blender/addon/ui.py +++ b/intern/cycles/blender/addon/ui.py @@ -436,7 +436,7 @@ class CyclesWorld_PT_volume(CyclesButtonsPanel, Panel): @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 @@ class CyclesMaterial_PT_volume(CyclesButtonsPanel, Panel): @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 diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h index bcca028dc2a..c5cceff6242 100644 --- a/intern/cycles/blender/blender_util.h +++ b/intern/cycles/blender/blender_util.h @@ -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" { diff --git a/intern/cycles/cmake/external_libs.cmake b/intern/cycles/cmake/external_libs.cmake index 0915d4d92c8..b6b8b351e13 100644 --- a/intern/cycles/cmake/external_libs.cmake +++ b/intern/cycles/cmake/external_libs.cmake @@ -85,18 +85,3 @@ if(WITH_CYCLES_BLENDER) 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() - diff --git a/intern/cycles/kernel/CMakeLists.txt b/intern/cycles/kernel/CMakeLists.txt index 893c4bb6081..99427e02c54 100644 --- a/intern/cycles/kernel/CMakeLists.txt +++ b/intern/cycles/kernel/CMakeLists.txt @@ -74,33 +74,6 @@ set(util_headers ../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) diff --git a/intern/cycles/kernel/svm/svm_gradient.h b/intern/cycles/kernel/svm/svm_gradient.h index 79298f5f581..c7013800d6b 100644 --- a/intern/cycles/kernel/svm/svm_gradient.h +++ b/intern/cycles/kernel/svm/svm_gradient.h @@ -48,7 +48,7 @@ __device float svm_gradient(float3 p, NodeBlendType type) 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; diff --git a/intern/cycles/util/util_cuda.cpp b/intern/cycles/util/util_cuda.cpp index 14e3f9a159b..bd5583b9718 100644 --- a/intern/cycles/util/util_cuda.cpp +++ b/intern/cycles/util/util_cuda.cpp @@ -373,10 +373,8 @@ bool cuLibraryInit() /* cuda 4.0 */ CUDA_LIBRARY_FIND(cuCtxSetCurrent); -#ifndef WITH_CUDA_BINARIES if(cuCompilerPath() == "") return false; -#endif /* success */ result = true;