[Bf-blender-cvs] [5030daf] master: Cycles: Remove redundant calculation of w in recent cubic commit

Sergey Sharybin noreply at git.blender.org
Mon Feb 2 13:36:07 CET 2015


Commit: 5030daf2a8a31b1a74740d8bc17389c06f246636
Author: Sergey Sharybin
Date:   Mon Feb 2 17:34:34 2015 +0500
Branches: master
https://developer.blender.org/rB5030daf2a8a31b1a74740d8bc17389c06f246636

Cycles: Remove redundant calculation of w in recent cubic commit

Was rather harmless since compiler will optimize it out, but nice to get
rid of this anyway.

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

M	intern/cycles/kernel/kernel_compat_cpu.h

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

diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h
index cef94d1..992d287 100644
--- a/intern/cycles/kernel/kernel_compat_cpu.h
+++ b/intern/cycles/kernel/kernel_compat_cpu.h
@@ -193,7 +193,7 @@ template<typename T> struct texture_image  {
 			                   width * iy,
 			                   width * niy,
 			                   width * nniy};
-			float u[4], v[4], w[4];
+			float u[4], v[4];
 			/* Some helper macro to keep code reasonable size,
 			 * let compiler to inline all the matrix multiplications.
 			 */
@@ -206,7 +206,6 @@ template<typename T> struct texture_image  {
 
 			SET_CUBIC_SPLINE_WEIGHTS(u, tx);
 			SET_CUBIC_SPLINE_WEIGHTS(v, ty);
-			SET_CUBIC_SPLINE_WEIGHTS(w, 0.0f);
 
 			/* Actual interpolation. */
 			return TERM(0) + TERM(1) + TERM(2) + TERM(3);




More information about the Bf-blender-cvs mailing list