[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [59930] branches/soc-2013-dingto: Merged revision(s) 59906-59929 from trunk/blender into soc-2013-dingto.

Thomas Dinges blender at dingto.org
Mon Sep 9 01:57:18 CEST 2013


Revision: 59930
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=59930
Author:   dingto
Date:     2013-09-08 23:57:17 +0000 (Sun, 08 Sep 2013)
Log Message:
-----------
Merged revision(s) 59906-59929 from trunk/blender into soc-2013-dingto. 

Modified Paths:
--------------
    branches/soc-2013-dingto/build_files/cmake/macros.cmake
    branches/soc-2013-dingto/intern/cycles/kernel/CMakeLists.txt
    branches/soc-2013-dingto/intern/cycles/kernel/kernel_path.h
    branches/soc-2013-dingto/intern/opencolorio/fallback_impl.cc
    branches/soc-2013-dingto/intern/opencolorio/ocio_capi.cc
    branches/soc-2013-dingto/intern/opencolorio/ocio_capi.h
    branches/soc-2013-dingto/intern/opencolorio/ocio_impl.cc
    branches/soc-2013-dingto/intern/opencolorio/ocio_impl.h
    branches/soc-2013-dingto/release/datafiles/startup.blend
    branches/soc-2013-dingto/release/scripts/startup/bl_ui/properties_constraint.py
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_blender.h
    branches/soc-2013-dingto/source/blender/blenkernel/BKE_shrinkwrap.h
    branches/soc-2013-dingto/source/blender/blenkernel/intern/constraint.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/freestyle.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/linestyle.c
    branches/soc-2013-dingto/source/blender/blenkernel/intern/shrinkwrap.c
    branches/soc-2013-dingto/source/blender/blenlib/intern/math_geom.c
    branches/soc-2013-dingto/source/blender/blenloader/intern/readfile.c
    branches/soc-2013-dingto/source/blender/bmesh/bmesh.h
    branches/soc-2013-dingto/source/blender/bmesh/intern/bmesh_opdefines.c
    branches/soc-2013-dingto/source/blender/bmesh/operators/bmo_fill_grid.c
    branches/soc-2013-dingto/source/blender/bmesh/operators/bmo_poke.c
    branches/soc-2013-dingto/source/blender/editors/mesh/editmesh_extrude.c
    branches/soc-2013-dingto/source/blender/editors/mesh/editmesh_tools.c
    branches/soc-2013-dingto/source/blender/editors/object/object_edit.c
    branches/soc-2013-dingto/source/blender/editors/space_node/node_draw.c
    branches/soc-2013-dingto/source/blender/imbuf/intern/bmp.c
    branches/soc-2013-dingto/source/blender/makesdna/DNA_constraint_types.h
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_constraint.c
    branches/soc-2013-dingto/source/blender/makesrna/intern/rna_mesh.c
    branches/soc-2013-dingto/source/blender/render/intern/source/rayshade.c
    branches/soc-2013-dingto/source/blender/render/intern/source/voxeldata.c
    branches/soc-2013-dingto/source/blenderplayer/bad_level_call_stubs/stubs.c
    branches/soc-2013-dingto/source/gameengine/Converter/KX_ConvertActuators.cpp

Added Paths:
-----------
    branches/soc-2013-dingto/intern/cycles/kernel/kernel_path_state.h

Property Changed:
----------------
    branches/soc-2013-dingto/


Property changes on: branches/soc-2013-dingto
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-depsgraph_mt:57516,57900,57939-57940,57945,57958-57961,58151,58155-58156,58169,58277-58279,58282-58283,58711,58787,58789,58796,59086-59087,59163,59166,59170,59181,59259-59260
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57315-57365,57369-58448,58450,58452-58770,58779,58783-58855,58857,58859-59032,59035-59602,59604-59905
   + /branches/ge_dev:58091-58422
/branches/ge_harmony:42255,42279-42282,42286,42302,42338,42349,42616,42620,42698-42699,42739,42753,42773-42774,42832,44568,44597-44598,44793-44794
/branches/soc-2011-cucumber:37517,38166-38167,38177,38179-38180,38187,38242,38384,38387,38403-38404,38407,38968,38970,38973,39045,40845,42997-42998,43439
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801,43872,44130,44141,44147-44149,44151-44152,44229-44230,45623-45625,46037,48089,48092,48551-48552,48679,48790,48792-48793,49076,49087,49292,49294,49466,49894,50052,50126,52854-52856,54573,58822,58989
/branches/soc-2013-depsgraph_mt:57516,57900,57939-57940,57945,57958-57961,58151,58155-58156,58169,58277-58279,58282-58283,58711,58787,58789,58796,59086-59087,59163,59166,59170,59181,59259-59260
/tags/blender-2.67b-release/blender:57122
/trunk/blender:57315-57365,57369-58448,58450,58452-58770,58779,58783-58855,58857,58859-59032,59035-59602,59604-59929

Modified: branches/soc-2013-dingto/build_files/cmake/macros.cmake
===================================================================
--- branches/soc-2013-dingto/build_files/cmake/macros.cmake	2013-09-08 22:52:48 UTC (rev 59929)
+++ branches/soc-2013-dingto/build_files/cmake/macros.cmake	2013-09-08 23:57:17 UTC (rev 59930)
@@ -498,6 +498,7 @@
 		remove_cc_flag("-Wredundant-decls")
 		remove_cc_flag("-Wundef")
 		remove_cc_flag("-Wshadow")
+		remove_cc_flag("-Wdouble-promotion")
 		remove_cc_flag("-Wold-style-definition")
 		remove_cc_flag("-Werror=[^ ]+")
 		remove_cc_flag("-Werror")

Modified: branches/soc-2013-dingto/intern/cycles/kernel/CMakeLists.txt
===================================================================
--- branches/soc-2013-dingto/intern/cycles/kernel/CMakeLists.txt	2013-09-08 22:52:48 UTC (rev 59929)
+++ branches/soc-2013-dingto/intern/cycles/kernel/CMakeLists.txt	2013-09-08 23:57:17 UTC (rev 59930)
@@ -41,6 +41,7 @@
 	kernel_object.h
 	kernel_passes.h
 	kernel_path.h
+	kernel_path_state.h
 	kernel_primitive.h
 	kernel_projection.h
 	kernel_random.h

Modified: branches/soc-2013-dingto/intern/cycles/kernel/kernel_path.h
===================================================================
--- branches/soc-2013-dingto/intern/cycles/kernel/kernel_path.h	2013-09-08 22:52:48 UTC (rev 59929)
+++ branches/soc-2013-dingto/intern/cycles/kernel/kernel_path.h	2013-09-08 23:57:17 UTC (rev 59930)
@@ -34,6 +34,7 @@
 #include "kernel_light.h"
 #include "kernel_emission.h"
 #include "kernel_passes.h"
+#include "kernel_path_state.h"
 
 #ifdef __SUBSURFACE__
 #include "kernel_subsurface.h"
@@ -41,119 +42,6 @@
 
 CCL_NAMESPACE_BEGIN
 
-typedef struct PathState {
-	int flag;
-	int bounce;
-
-	int diffuse_bounce;
-	int glossy_bounce;
-	int transmission_bounce;
-	int transparent_bounce;
-} PathState;
-
-__device_inline void path_state_init(PathState *state)
-{
-	state->flag = PATH_RAY_CAMERA|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
-	state->bounce = 0;
-	state->diffuse_bounce = 0;
-	state->glossy_bounce = 0;
-	state->transmission_bounce = 0;
-	state->transparent_bounce = 0;
-}
-
-__device_inline void path_state_next(KernelGlobals *kg, PathState *state, int label)
-{
-	/* ray through transparent keeps same flags from previous ray and is
-	 * not counted as a regular bounce, transparent has separate max */
-	if(label & LABEL_TRANSPARENT) {
-		state->flag |= PATH_RAY_TRANSPARENT;
-		state->transparent_bounce++;
-
-		if(!kernel_data.integrator.transparent_shadows)
-			state->flag |= PATH_RAY_MIS_SKIP;
-
-		return;
-	}
-
-	state->bounce++;
-
-	/* reflection/transmission */
-	if(label & LABEL_REFLECT) {
-		state->flag |= PATH_RAY_REFLECT;
-		state->flag &= ~(PATH_RAY_TRANSMIT|PATH_RAY_CAMERA|PATH_RAY_TRANSPARENT);
-
-		if(label & LABEL_DIFFUSE)
-			state->diffuse_bounce++;
-		else
-			state->glossy_bounce++;
-	}
-	else {
-		kernel_assert(label & LABEL_TRANSMIT);
-
-		state->flag |= PATH_RAY_TRANSMIT;
-		state->flag &= ~(PATH_RAY_REFLECT|PATH_RAY_CAMERA|PATH_RAY_TRANSPARENT);
-
-		state->transmission_bounce++;
-	}
-
-	/* diffuse/glossy/singular */
-	if(label & LABEL_DIFFUSE) {
-		state->flag |= PATH_RAY_DIFFUSE|PATH_RAY_DIFFUSE_ANCESTOR;
-		state->flag &= ~(PATH_RAY_GLOSSY|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP);
-	}
-	else if(label & LABEL_GLOSSY) {
-		state->flag |= PATH_RAY_GLOSSY|PATH_RAY_GLOSSY_ANCESTOR;
-		state->flag &= ~(PATH_RAY_DIFFUSE|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP);
-	}
-	else {
-		kernel_assert(label & LABEL_SINGULAR);
-
-		state->flag |= PATH_RAY_GLOSSY|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
-		state->flag &= ~PATH_RAY_DIFFUSE;
-	}
-}
-
-__device_inline uint path_state_ray_visibility(KernelGlobals *kg, PathState *state)
-{
-	uint flag = state->flag & PATH_RAY_ALL_VISIBILITY;
-
-	/* for visibility, diffuse/glossy are for reflection only */
-	if(flag & PATH_RAY_TRANSMIT)
-		flag &= ~(PATH_RAY_DIFFUSE|PATH_RAY_GLOSSY);
-	/* for camera visibility, use render layer flags */
-	if(flag & PATH_RAY_CAMERA)
-		flag |= kernel_data.integrator.layer_flag;
-
-	return flag;
-}
-
-__device_inline float path_state_terminate_probability(KernelGlobals *kg, PathState *state, const float3 throughput)
-{
-	if(state->flag & PATH_RAY_TRANSPARENT) {
-		/* transparent rays treated separately */
-		if(state->transparent_bounce >= kernel_data.integrator.transparent_max_bounce)
-			return 0.0f;
-		else if(state->transparent_bounce <= kernel_data.integrator.transparent_min_bounce)
-			return 1.0f;
-	}
-	else {
-		/* other rays */
-		if((state->bounce >= kernel_data.integrator.max_bounce) ||
-		   (state->diffuse_bounce >= kernel_data.integrator.max_diffuse_bounce) ||
-		   (state->glossy_bounce >= kernel_data.integrator.max_glossy_bounce) ||
-		   (state->transmission_bounce >= kernel_data.integrator.max_transmission_bounce))
-		{
-			return 0.0f;
-		}
-		else if(state->bounce <= kernel_data.integrator.min_bounce) {
-			return 1.0f;
-		}
-	}
-
-	/* probalistic termination */
-	return average(throughput); /* todo: try using max here */
-}
-
 __device_inline bool shadow_blocked(KernelGlobals *kg, PathState *state, Ray *ray, float3 *shadow)
 {
 	*shadow = make_float3(1.0f, 1.0f, 1.0f);
@@ -232,7 +120,7 @@
 }
 
 
-#if defined(__BRANCHED_PATH__) || defined(__BSSRDF__)
+#if defined(__BRANCHED_PATH__) || defined(__SUBSURFACE__)
 
 __device void kernel_path_indirect(KernelGlobals *kg, RNG *rng, int sample, Ray ray, __global float *buffer,
 	float3 throughput, int num_samples, int num_total_samples,
@@ -290,7 +178,9 @@
 		shader_setup_from_ray(kg, &sd, &isect, &ray, state.bounce);
 		float rbsdf = path_rng_1D(kg, rng, sample, num_total_samples, rng_offset + PRNG_BSDF);
 		shader_eval_surface(kg, &sd, rbsdf, state.flag, SHADER_CONTEXT_INDIRECT);
+#ifdef __BRANCHED_PATH__
 		shader_merge_closures(kg, &sd);
+#endif
 
 		/* blurring of bsdf after bounces, for rays that have a small likelihood
 		 * of following this particular path (diffuse, rough glossy) */

Copied: branches/soc-2013-dingto/intern/cycles/kernel/kernel_path_state.h (from rev 59929, trunk/blender/intern/cycles/kernel/kernel_path_state.h)
===================================================================
--- branches/soc-2013-dingto/intern/cycles/kernel/kernel_path_state.h	                        (rev 0)
+++ branches/soc-2013-dingto/intern/cycles/kernel/kernel_path_state.h	2013-09-08 23:57:17 UTC (rev 59930)
@@ -0,0 +1,133 @@
+/*
+ * 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
+ */
+
+CCL_NAMESPACE_BEGIN
+
+typedef struct PathState {
+	int flag;
+	int bounce;
+
+	int diffuse_bounce;
+	int glossy_bounce;
+	int transmission_bounce;
+	int transparent_bounce;
+} PathState;
+
+__device_inline void path_state_init(PathState *state)
+{
+	state->flag = PATH_RAY_CAMERA|PATH_RAY_SINGULAR|PATH_RAY_MIS_SKIP;
+	state->bounce = 0;
+	state->diffuse_bounce = 0;
+	state->glossy_bounce = 0;
+	state->transmission_bounce = 0;
+	state->transparent_bounce = 0;
+}
+
+__device_inline void path_state_next(KernelGlobals *kg, PathState *state, int label)
+{
+	/* ray through transparent keeps same flags from previous ray and is
+	 * not counted as a regular bounce, transparent has separate max */
+	if(label & LABEL_TRANSPARENT) {
+		state->flag |= PATH_RAY_TRANSPARENT;
+		state->transparent_bounce++;
+
+		if(!kernel_data.integrator.transparent_shadows)
+			state->flag |= PATH_RAY_MIS_SKIP;
+
+		return;
+	}
+
+	state->bounce++;
+
+	/* reflection/transmission */
+	if(label & LABEL_REFLECT) {
+		state->flag |= PATH_RAY_REFLECT;
+		state->flag &= ~(PATH_RAY_TRANSMIT|PATH_RAY_CAMERA|PATH_RAY_TRANSPARENT);
+
+		if(label & LABEL_DIFFUSE)
+			state->diffuse_bounce++;
+		else
+			state->glossy_bounce++;
+	}
+	else {

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list