[Bf-blender-cvs] [2218e9927b2] temp-cycles-denoising: Cycles Denoising: Move back into the kernel/ folder

Lukas Stockner noreply at git.blender.org
Fri Apr 14 00:57:40 CEST 2017


Commit: 2218e9927b2e5f0ce80026fa147abae6a792b272
Author: Lukas Stockner
Date:   Thu Apr 13 22:25:20 2017 +0200
Branches: temp-cycles-denoising
https://developer.blender.org/rB2218e9927b2e5f0ce80026fa147abae6a792b272

Cycles Denoising: Move back into the kernel/ folder

===================================================================

M	build_files/cmake/macros.cmake
M	intern/cycles/CMakeLists.txt
M	intern/cycles/app/CMakeLists.txt
M	intern/cycles/device/device_cpu.cpp
M	intern/cycles/device/device_cuda.cpp
M	intern/cycles/device/device_denoising.cpp
M	intern/cycles/device/device_denoising.h
D	intern/cycles/filter/CMakeLists.txt
D	intern/cycles/filter/kernels/cuda/kernel_config.h
M	intern/cycles/kernel/CMakeLists.txt
R079	intern/cycles/filter/filter.h	intern/cycles/kernel/filter/filter.h
R100	intern/cycles/filter/filter_compat_cpu.h	intern/cycles/kernel/filter/filter_compat_cpu.h
R100	intern/cycles/filter/filter_compat_cuda.h	intern/cycles/kernel/filter/filter_compat_cuda.h
R100	intern/cycles/filter/filter_compat_opencl.h	intern/cycles/kernel/filter/filter_compat_opencl.h
R100	intern/cycles/filter/filter_defines.h	intern/cycles/kernel/filter/filter_defines.h
R100	intern/cycles/filter/filter_features.h	intern/cycles/kernel/filter/filter_features.h
R100	intern/cycles/filter/filter_features_sse.h	intern/cycles/kernel/filter/filter_features_sse.h
R077	intern/cycles/filter/filter_kernel.h	intern/cycles/kernel/filter/filter_kernel.h
R100	intern/cycles/filter/filter_nlm_cpu.h	intern/cycles/kernel/filter/filter_nlm_cpu.h
R100	intern/cycles/filter/filter_nlm_gpu.h	intern/cycles/kernel/filter/filter_nlm_gpu.h
R100	intern/cycles/filter/filter_prefilter.h	intern/cycles/kernel/filter/filter_prefilter.h
R100	intern/cycles/filter/filter_reconstruction.h	intern/cycles/kernel/filter/filter_reconstruction.h
R100	intern/cycles/filter/filter_transform.h	intern/cycles/kernel/filter/filter_transform.h
R100	intern/cycles/filter/filter_transform_gpu.h	intern/cycles/kernel/filter/filter_transform_gpu.h
R100	intern/cycles/filter/filter_transform_sse.h	intern/cycles/kernel/filter/filter_transform_sse.h
M	intern/cycles/kernel/kernel_compat_cpu.h
M	intern/cycles/kernel/kernel_compat_cuda.h
M	intern/cycles/kernel/kernel_compat_opencl.h
R094	intern/cycles/filter/kernels/cpu/filter.cpp	intern/cycles/kernel/kernels/cpu/filter.cpp
R093	intern/cycles/filter/kernels/cpu/filter_avx.cpp	intern/cycles/kernel/kernels/cpu/filter_avx.cpp
R094	intern/cycles/filter/kernels/cpu/filter_avx2.cpp	intern/cycles/kernel/kernels/cpu/filter_avx2.cpp
R100	intern/cycles/filter/kernels/cpu/filter_cpu.h	intern/cycles/kernel/kernels/cpu/filter_cpu.h
R099	intern/cycles/filter/kernels/cpu/filter_cpu_impl.h	intern/cycles/kernel/kernels/cpu/filter_cpu_impl.h
R093	intern/cycles/filter/kernels/cpu/filter_sse2.cpp	intern/cycles/kernel/kernels/cpu/filter_sse2.cpp
R093	intern/cycles/filter/kernels/cpu/filter_sse3.cpp	intern/cycles/kernel/kernels/cpu/filter_sse3.cpp
R093	intern/cycles/filter/kernels/cpu/filter_sse41.cpp	intern/cycles/kernel/kernels/cpu/filter_sse41.cpp
R099	intern/cycles/filter/kernels/cuda/filter.cu	intern/cycles/kernel/kernels/cuda/filter.cu
R099	intern/cycles/filter/kernels/opencl/filter.cl	intern/cycles/kernel/kernels/opencl/filter.cl

===================================================================

diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake
index 6ac3dcf9de9..b7f6649e507 100644
--- a/build_files/cmake/macros.cmake
+++ b/build_files/cmake/macros.cmake
@@ -536,7 +536,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
 			cycles_bvh
 			cycles_device
 			cycles_kernel
-			cycles_filter
 			cycles_util
 			cycles_subd)
 		if(WITH_CYCLES_OSL)
@@ -652,7 +651,6 @@ function(SETUP_BLENDER_SORTED_LIBS)
 		cycles_bvh
 		cycles_device
 		cycles_kernel
-		cycles_filter
 		cycles_util
 		cycles_subd
 		bf_intern_opencolorio
diff --git a/intern/cycles/CMakeLists.txt b/intern/cycles/CMakeLists.txt
index 06374dcff75..806a8660e8c 100644
--- a/intern/cycles/CMakeLists.txt
+++ b/intern/cycles/CMakeLists.txt
@@ -250,7 +250,6 @@ endif()
 add_subdirectory(bvh)
 add_subdirectory(device)
 add_subdirectory(doc)
-add_subdirectory(filter)
 add_subdirectory(graph)
 add_subdirectory(kernel)
 add_subdirectory(render)
diff --git a/intern/cycles/app/CMakeLists.txt b/intern/cycles/app/CMakeLists.txt
index dec1219d1f5..aabb8f63640 100644
--- a/intern/cycles/app/CMakeLists.txt
+++ b/intern/cycles/app/CMakeLists.txt
@@ -10,7 +10,6 @@ set(INC_SYS
 set(LIBRARIES
 	cycles_device
 	cycles_kernel
-	cycles_filter
 	cycles_render
 	cycles_bvh
 	cycles_subd
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp
index d75a8c6152e..0a75dff9383 100644
--- a/intern/cycles/device/device_cpu.cpp
+++ b/intern/cycles/device/device_cpu.cpp
@@ -35,7 +35,7 @@
 #include "kernel/split/kernel_split_data.h"
 #include "kernel/kernel_globals.h"
 
-#include "filter/filter.h"
+#include "kernel/filter/filter.h"
 
 #include "kernel/osl/osl_shader.h"
 #include "kernel/osl/osl_globals.h"
diff --git a/intern/cycles/device/device_cuda.cpp b/intern/cycles/device/device_cuda.cpp
index 1151302c49b..3dbf4100c24 100644
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@ -27,7 +27,7 @@
 
 #include "render/buffers.h"
 
-#include "filter/filter_defines.h"
+#include "kernel/filter/filter_defines.h"
 
 #ifdef WITH_CUDA_DYNLOAD
 #  include "cuew.h"
diff --git a/intern/cycles/device/device_denoising.cpp b/intern/cycles/device/device_denoising.cpp
index 4b6a0097604..92ceb75673c 100644
--- a/intern/cycles/device/device_denoising.cpp
+++ b/intern/cycles/device/device_denoising.cpp
@@ -16,7 +16,7 @@
 
 #include "device/device_denoising.h"
 
-#include "filter/filter_defines.h"
+#include "kernel/filter/filter_defines.h"
 
 CCL_NAMESPACE_BEGIN
 
diff --git a/intern/cycles/device/device_denoising.h b/intern/cycles/device/device_denoising.h
index 090e3be70b5..72b7ba721cf 100644
--- a/intern/cycles/device/device_denoising.h
+++ b/intern/cycles/device/device_denoising.h
@@ -21,7 +21,7 @@
 
 #include "render/buffers.h"
 
-#include "filter/filter_defines.h"
+#include "kernel/filter/filter_defines.h"
 
 CCL_NAMESPACE_BEGIN
 
diff --git a/intern/cycles/filter/CMakeLists.txt b/intern/cycles/filter/CMakeLists.txt
deleted file mode 100644
index adea2cf1e26..00000000000
--- a/intern/cycles/filter/CMakeLists.txt
+++ /dev/null
@@ -1,175 +0,0 @@
-remove_extra_strict_flags()
-
-set(INC
-	..
-)
-
-set(INC_SYS
-
-)
-
-set(SRC
-	kernels/cpu/filter.cpp
-	kernels/cpu/filter_sse2.cpp
-	kernels/cpu/filter_sse3.cpp
-	kernels/cpu/filter_sse41.cpp
-	kernels/cpu/filter_avx.cpp
-	kernels/cpu/filter_avx2.cpp
-	kernels/cuda/filter.cu
-)
-
-set(SRC_HEADERS
-	filter.h
-	filter_compat_cpu.h
-	filter_compat_cuda.h
-	filter_compat_opencl.h
-	filter_defines.h
-	filter_features.h
-	filter_features_sse.h
-	filter_kernel.h
-	filter_nlm_cpu.h
-	filter_nlm_gpu.h
-	filter_prefilter.h
-	filter_reconstruction.h
-	filter_transform.h
-	filter_transform_gpu.h
-	filter_transform_sse.h
-)
-
-set(SRC_KERNELS_CPU_HEADERS
-	kernels/cpu/filter_cpu.h
-	kernels/cpu/filter_cpu_impl.h
-)
-
-set(SRC_KERNELS_CUDA_HEADERS
-	kernels/cuda/kernel_config.h
-)
-
-set(SRC_UTIL_HEADERS
-	../util/util_atomic.h
-	../util/util_color.h
-	../util/util_half.h
-	../util/util_hash.h
-	../util/util_math.h
-	../util/util_math_fast.h
-	../util/util_math_matrix.h
-	../util/util_static_assert.h
-	../util/util_transform.h
-	../util/util_texture.h
-	../util/util_types.h
-)
-
-# CUDA module
-
-if(WITH_CYCLES_CUDA_BINARIES)
-	# 32 bit or 64 bit
-	if(CUDA_64_BIT_DEVICE_CODE)
-		set(CUDA_BITS 64)
-	else()
-		set(CUDA_BITS 32)
-	endif()
-
-	# CUDA version
-	execute_process(COMMAND ${CUDA_NVCC_EXECUTABLE} "--version" OUTPUT_VARIABLE NVCC_OUT)
-	string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\1" CUDA_VERSION_MAJOR "${NVCC_OUT}")
-	string(REGEX REPLACE ".*release ([0-9]+)\\.([0-9]+).*" "\\2" CUDA_VERSION_MINOR "${NVCC_OUT}")
-	set(CUDA_VERSION "${CUDA_VERSION_MAJOR}${CUDA_VERSION_MINOR}")
-
-	# warn for other versions
-	if(CUDA_VERSION MATCHES "80")
-	else()
-		message(WARNING
-			"CUDA version ${CUDA_VERSION_MAJOR}.${CUDA_VERSION_MINOR} detected, "
-			"build may succeed but only CUDA 8.0 is officially supported")
-	endif()
-
-	# build for each arch
-	set(cuda_sources kernels/cuda/filter.cu
-		${SRC_HEADERS}
-		${SRC_UTIL_HEADERS}
-		${SRC_KERNELS_CUDA_HEADERS}
-	)
-	set(cuda_cubins)
-
-	macro(CYCLES_CUDA_KERNEL_ADD arch)
-		set(cuda_extra_flags "")
-		set(cuda_cubin kernel_filter_${arch}.cubin)
-
-		set(cuda_nvcc_command ${CUDA_NVCC_EXECUTABLE})
-		set(cuda_nvcc_version ${CUDA_VERSION})
-
-		set(cuda_version_flags "-D__KERNEL_CUDA_VERSION__=${cuda_nvcc_version}")
-		set(cuda_math_flags "--use_fast_math")
-
-		add_custom_command(
-			OUTPUT ${cuda_cubin}
-			COMMAND ${cuda_nvcc_command}
-					-arch=${arch}
-					${CUDA_NVCC_FLAGS}
-					-m${CUDA_BITS}
-					--cubin ${CMAKE_CURRENT_SOURCE_DIR}/kernels/cuda/filter.cu
-					-o ${CMAKE_CURRENT_BINARY_DIR}/${cuda_cubin}
-					--ptxas-options="-v"
-					${cuda_arch_flags}
-					${cuda_version_flags}
-					${cuda_math_flags}
-					${cuda_extra_flags}
-					-I${CMAKE_CURRENT_SOURCE_DIR}/..
-					-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})
-
-		unset(cuda_extra_flags)
-		unset(cuda_debug_flags)
-
-		unset(cuda_nvcc_command)
-		unset(cuda_nvcc_version)
-	endmacro()
-
-	foreach(arch ${CYCLES_CUDA_BINARIES_ARCH})
-		# Compile regular kernel
-		CYCLES_CUDA_KERNEL_ADD(${arch})
-	endforeach()
-
-	add_custom_target(cycles_filter_cuda ALL DEPENDS ${cuda_cubins})
-endif()
-
-# CPU module
-
-include_directories(${INC})
-include_directories(SYSTEM ${INC_SYS})
-
-if(CXX_HAS_SSE)
-	set_source_files_properties(kernels/cpu/filter_sse2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE2_KERNEL_FLAGS}")
-	set_source_files_properties(kernels/cpu/filter_sse3.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE3_KERNEL_FLAGS}")
-	set_source_files_properties(kernels/cpu/filter_sse41.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_SSE41_KERNEL_FLAGS}")
-endif()
-
-if(CXX_HAS_AVX)
-	set_source_files_properties(kernels/cpu/filter_avx.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX_KERNEL_FLAGS}")
-endif()
-
-if(CXX_HAS_AVX2)
-	set_source_files_properties(kernels/cpu/filter_avx2.cpp PROPERTIES COMPILE_FLAGS "${CYCLES_AVX2_KERNEL_FLAGS}")
-endif()
-
-add_library(cycles_filter
-	${SRC}
-	${SRC_HEADERS}
-	${SRC_KERNELS_CPU_HEADERS}
-	${SRC_KERNELS_CUDA_HEADERS}
-)
-
-if(WITH_CYCLES_CUDA)
-	add_dependencies(cycles_filter cycles_filter_cuda)
-endif()
-
-# OpenCL kernel
-
-delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "kernels/opencl/filter.cl" ${CYCLES_INSTALL_PATH}/source/kernel/kernels/opencl)
-delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "kernels/cuda/filter.cu" ${CYCLES_INSTALL_PATH}/source/kernel/kernels/cuda)
-delayed_install(${CMAKE_CURRENT_SOURCE_DIR} "${SRC_HEADERS}" ${CYCLES_INSTALL_PATH}/source/filter)
diff --git a/intern/cycles/filter/kernels/cuda/kernel_config.h b/intern/cycles/filter/kernels/cuda/kernel_config.h
deleted file mode 100644
index 9fa39dc9ebb..00000000000
--- a/intern/cycles/filter/kernels/cuda/kernel_config.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright 2011-2013 Blender Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* device data taken from CUDA occupancy calculator */
-
-/* 2.0 and 2.1 */
-#if __CUDA_ARCH__ == 200 || __CUDA_ARCH__ == 210
-#  define CUDA_MULTIPRESSOR_MAX_REGISTERS 32768
-#  define CUDA_MULTIPROCESSOR_MAX_BLOCKS 8
-#  define CUDA_BLOCK_MAX_THREADS 1024
-#  define CUDA_THREAD_MAX_REGISTERS 63
-
-/* tunable parameters */
-#  define CUDA_THREADS_BLOCK_WIDTH 16
-#  define CUDA_KERNEL_MAX_REGISTERS 32
-#  define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 40
-
-/* 3.0 and 3.5 */
-#elif __CUDA_ARCH__ == 300 || __CUDA_ARCH__ == 350
-#  define CUDA_MULTIPRESSOR_MAX_REGISTERS 65536
-#  define CUDA_MULTIPROCESSOR_MAX_BLOCKS 16
-#  define CUDA_BLOCK_MAX_THREADS 1024
-#  define CUDA_THREAD_MAX_REGISTERS 63
-
-/* tunable parameters */
-#  define CUDA_THREADS_BLOCK_WIDTH 16
-#  define CUDA_KERNEL_MAX_REGISTERS 63
-#  define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 63
-
-/* 3.2 */
-#elif __CUDA_ARCH__ == 320
-#  define CUDA_MULTIPRESSOR_MAX_REGISTERS 32768
-#  define CUDA_MULTIPROCESSOR_MAX_BLOCKS 16
-#  define CUDA_BLOCK_MAX_THREADS 1024
-#  define CUDA_THREAD_MAX_REGISTERS 63
-
-/* tunable parameters */
-#  define CUDA_THREADS_BLOCK_WIDTH 16
-#  define CUDA_KERNEL_MAX_REGISTERS 63
-#  define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 63
-
-/* 3.7 */
-#elif __CUDA_ARCH__ == 370
-#  define CUDA_MULTIPRESSOR_MAX_REGISTERS 65536
-#  define CUDA_MULTIPROCESSOR_MAX_BLOCKS 16
-#  define CUDA_BLOCK_MAX_THREADS 1024
-#  define CUDA_THREAD_MAX_REGISTERS 255
-
-/* tunable parameters */
-#  define CUDA_THREADS_BLOCK_WIDTH 16
-#  define CUDA_KERNEL_MAX_REGISTERS 63
-#  define CUDA_KERNEL_BRANCHED_MAX_REGISTERS 63
-
-/* 5.0, 

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list