* 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
This commit is contained in:
Brecht Van Lommel 2011-11-08 14:10:33 +00:00
parent 64ab414026
commit a56c6e18a8
9 changed files with 11 additions and 58 deletions

@ -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)

@ -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)

@ -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)

@ -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

@ -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" {

@ -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()

@ -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)

@ -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;

@ -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;