[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54498] trunk/blender/intern/cycles/device /device_cpu.cpp: Fix cycles not using SSE3 kernel after recent, order with SSE2 should be switched,

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Feb 12 15:58:46 CET 2013


Revision: 54498
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54498
Author:   blendix
Date:     2013-02-12 14:58:46 +0000 (Tue, 12 Feb 2013)
Log Message:
-----------
Fix cycles not using SSE3 kernel after recent, order with SSE2 should be switched,
pointed out by Chad Fraleigh.

Modified Paths:
--------------
    trunk/blender/intern/cycles/device/device_cpu.cpp

Modified: trunk/blender/intern/cycles/device/device_cpu.cpp
===================================================================
--- trunk/blender/intern/cycles/device/device_cpu.cpp	2013-02-12 14:45:59 UTC (rev 54497)
+++ trunk/blender/intern/cycles/device/device_cpu.cpp	2013-02-12 14:58:46 UTC (rev 54498)
@@ -171,7 +171,7 @@
 			int end_sample = tile.start_sample + tile.num_samples;
 
 #ifdef WITH_OPTIMIZED_KERNEL
-			if(system_cpu_support_sse2()) {
+			if(system_cpu_support_sse3()) {
 				for(int sample = start_sample; sample < end_sample; sample++) {
 					if (task.get_cancel() || task_pool.cancelled()) {
 						if(task.need_finish_queue == false)
@@ -180,7 +180,7 @@
 
 					for(int y = tile.y; y < tile.y + tile.h; y++) {
 						for(int x = tile.x; x < tile.x + tile.w; x++) {
-							kernel_cpu_sse2_path_trace(&kg, render_buffer, rng_state,
+							kernel_cpu_sse3_path_trace(&kg, render_buffer, rng_state,
 								sample, x, y, tile.offset, tile.stride);
 						}
 					}
@@ -190,7 +190,7 @@
 					task.update_progress(tile);
 				}
 			}
-			else if(system_cpu_support_sse3()) {
+			else if(system_cpu_support_sse2()) {
 				for(int sample = start_sample; sample < end_sample; sample++) {
 					if (task.get_cancel() || task_pool.cancelled()) {
 						if(task.need_finish_queue == false)
@@ -199,7 +199,7 @@
 
 					for(int y = tile.y; y < tile.y + tile.h; y++) {
 						for(int x = tile.x; x < tile.x + tile.w; x++) {
-							kernel_cpu_sse3_path_trace(&kg, render_buffer, rng_state,
+							kernel_cpu_sse2_path_trace(&kg, render_buffer, rng_state,
 								sample, x, y, tile.offset, tile.stride);
 						}
 					}
@@ -247,16 +247,16 @@
 	void thread_tonemap(DeviceTask& task)
 	{
 #ifdef WITH_OPTIMIZED_KERNEL
-		if(system_cpu_support_sse2()) {
+		if(system_cpu_support_sse3()) {
 			for(int y = task.y; y < task.y + task.h; y++)
 				for(int x = task.x; x < task.x + task.w; x++)
-					kernel_cpu_sse2_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
+					kernel_cpu_sse3_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
 						task.sample, task.resolution, x, y, task.offset, task.stride);
 		}
-		else if(system_cpu_support_sse3()) {
+		else if(system_cpu_support_sse2()) {
 			for(int y = task.y; y < task.y + task.h; y++)
 				for(int x = task.x; x < task.x + task.w; x++)
-					kernel_cpu_sse3_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
+					kernel_cpu_sse2_tonemap(&kernel_globals, (uchar4*)task.rgba, (float*)task.buffer,
 						task.sample, task.resolution, x, y, task.offset, task.stride);
 		}
 		else
@@ -278,17 +278,17 @@
 #endif
 
 #ifdef WITH_OPTIMIZED_KERNEL
-		if(system_cpu_support_sse2()) {
+		if(system_cpu_support_sse3()) {
 			for(int x = task.shader_x; x < task.shader_x + task.shader_w; x++) {
-				kernel_cpu_sse2_shader(&kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
+				kernel_cpu_sse3_shader(&kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
 
 				if(task_pool.cancelled())
 					break;
 			}
 		}
-		else if(system_cpu_support_sse3()) {
+		else if(system_cpu_support_sse2()) {
 			for(int x = task.shader_x; x < task.shader_x + task.shader_w; x++) {
-				kernel_cpu_sse3_shader(&kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
+				kernel_cpu_sse2_shader(&kg, (uint4*)task.shader_input, (float4*)task.shader_output, task.shader_eval_type, x);
 
 				if(task_pool.cancelled())
 					break;




More information about the Bf-blender-cvs mailing list