[Bf-blender-cvs] [1a3a77cdb91] temp-cycles-denoising: Merge remote-tracking branch 'origin/master' into temp-cycles-denoising

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


Commit: 1a3a77cdb9121a8fb708dd20f118e62306b399df
Author: Lukas Stockner
Date:   Tue Apr 11 19:31:59 2017 +0200
Branches: temp-cycles-denoising
https://developer.blender.org/rB1a3a77cdb9121a8fb708dd20f118e62306b399df

Merge remote-tracking branch 'origin/master' into temp-cycles-denoising

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



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

diff --cc intern/cycles/device/device_cuda.cpp
index aaa8ce88830,4c1a49878f5..7aff8133783
--- a/intern/cycles/device/device_cuda.cpp
+++ b/intern/cycles/device/device_cuda.cpp
@@@ -314,8 -310,8 +314,8 @@@ public
  		                               "-I\"%s\"",
  		                              machine,
  		                              cuda_version,
- 		                              include.c_str());
+ 		                              include_path.c_str());
 -		if(use_adaptive_compilation()) {
 +		if(!filter && use_adaptive_compilation()) {
  			cflags += " " + requested_features.get_build_options();
  		}
  		const char *extra_cflags = getenv("CYCLES_CUDA_EXTRA_CFLAGS");
@@@ -396,11 -379,11 +396,11 @@@
  		}
  
  		const string common_cflags =
 -		        compile_kernel_get_common_cflags(requested_features, split);
 +		        compile_kernel_get_common_cflags(requested_features, filter, split);
  
  		/* Try to use locally compiled kernel. */
- 		const string kernel_path = path_get("source/kernel");
- 		const string kernel_md5 = path_files_md5_hash(kernel_path);
+ 		const string source_path = path_get("source");
+ 		const string kernel_md5 = path_files_md5_hash(source_path);
  
  		/* We include cflags into md5 so changing cuda toolkit or changing other
  		 * compiler command line arguments makes sure cubin gets re-built.
@@@ -440,9 -424,10 +440,10 @@@
  			return "";
  		}
  		const char *nvcc = cuewCompilerPath();
- 		const string kernel = path_join(kernel_path,
- 		                          path_join("kernels",
- 		                                    path_join("cuda", source)));
+ 		const string kernel = path_join(
+ 		        path_join(source_path, "kernel"),
+ 		        path_join("kernels",
 -		                  path_join("cuda", split ? "kernel_split.cu" : "kernel.cu")));
++		                  path_join("cuda", source)));
  		double starttime = time_dt();
  		printf("Compiling CUDA kernel ...\n");
  
diff --cc intern/cycles/device/device_split_kernel.cpp
index 82cbb2a648a,fa641161c05..da02a2f8b34
--- a/intern/cycles/device/device_split_kernel.cpp
+++ b/intern/cycles/device/device_split_kernel.cpp
@@@ -151,16 -151,17 +151,17 @@@ bool DeviceSplitKernel::path_trace(Devi
  		/* Calculate max groups */
  
  		/* Denotes the maximum work groups possible w.r.t. current requested tile size. */
- 		unsigned int max_work_groups = num_global_elements / WORK_POOL_SIZE + 1;
+ 		unsigned int work_pool_size = (device->info.type == DEVICE_CPU) ? WORK_POOL_SIZE_CPU : WORK_POOL_SIZE_GPU;
+ 		unsigned int max_work_groups = num_global_elements / work_pool_size + 1;
  
  		/* Allocate work_pool_wgs memory. */
 -		work_pool_wgs.resize(max_work_groups * sizeof(unsigned int));
 +		work_pool_wgs.resize(max_work_groups);
  		device->mem_alloc("work_pool_wgs", work_pool_wgs, MEM_READ_WRITE);
  
 -		queue_index.resize(NUM_QUEUES * sizeof(int));
 +		queue_index.resize(NUM_QUEUES);
  		device->mem_alloc("queue_index", queue_index, MEM_READ_WRITE);
  
 -		use_queues_flag.resize(sizeof(char));
 +		use_queues_flag.resize(1);
  		device->mem_alloc("use_queues_flag", use_queues_flag, MEM_READ_WRITE);
  
  		ray_state.resize(num_global_elements);




More information about the Bf-blender-cvs mailing list