diff options
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r-- | intern/cycles/kernel/CMakeLists.txt | 27 | ||||
-rw-r--r-- | intern/cycles/kernel/svm/svm_gradient.h | 2 |
2 files changed, 1 insertions, 28 deletions
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; |