[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58947] branches/soc-2011-tomato: Merging r58870 through r58946 from trunk into soc-2011-tomato

Sergey Sharybin sergey.vfx at gmail.com
Tue Aug 6 02:39:22 CEST 2013


Revision: 58947
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58947
Author:   nazgul
Date:     2013-08-06 00:39:21 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
Merging r58870 through r58946 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58870
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58946

Modified Paths:
--------------
    branches/soc-2011-tomato/intern/cycles/CMakeLists.txt
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_accumulate.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_light.h
    branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h
    branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_globals.h
    branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_services.cpp
    branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_shader.cpp
    branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_fresnel.h
    branches/soc-2011-tomato/intern/cycles/render/light.cpp
    branches/soc-2011-tomato/intern/cycles/render/nodes.cpp
    branches/soc-2011-tomato/intern/dualcon/dualcon.h
    branches/soc-2011-tomato/intern/dualcon/intern/GeoCommon.h
    branches/soc-2011-tomato/intern/dualcon/intern/MemoryAllocator.h
    branches/soc-2011-tomato/intern/dualcon/intern/ModelReader.h
    branches/soc-2011-tomato/intern/dualcon/intern/Projections.cpp
    branches/soc-2011-tomato/intern/dualcon/intern/Projections.h
    branches/soc-2011-tomato/intern/dualcon/intern/Queue.h
    branches/soc-2011-tomato/intern/dualcon/intern/cubes.h
    branches/soc-2011-tomato/intern/dualcon/intern/dualcon_c_api.cpp
    branches/soc-2011-tomato/intern/dualcon/intern/manifold_table.h
    branches/soc-2011-tomato/intern/dualcon/intern/marching_cubes_table.h
    branches/soc-2011-tomato/intern/dualcon/intern/octree.cpp
    branches/soc-2011-tomato/intern/dualcon/intern/octree.h
    branches/soc-2011-tomato/intern/guardedalloc/MEM_guardedalloc.h
    branches/soc-2011-tomato/intern/guardedalloc/intern/mallocn.c
    branches/soc-2011-tomato/intern/rigidbody/rb_bullet_api.cpp
    branches/soc-2011-tomato/source/blender/avi/intern/avi_mjpeg.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/constraint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/fmodifier.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/image.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/movieclip.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/navmesh_conversion.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/packedFile.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sketch.c
    branches/soc-2011-tomato/source/blender/blenlib/BLI_math_vector.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_memarena.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_mempool.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_string.h
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_heap.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/BLI_mempool.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/buffer.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/runtime.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/writefile.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_core.c
    branches/soc-2011-tomato/source/blender/bmesh/intern/bmesh_walkers.c
    branches/soc-2011-tomato/source/blender/bmesh/operators/bmo_wireframe.c
    branches/soc-2011-tomato/source/blender/bmesh/tools/bmesh_decimate_dissolve.c
    branches/soc-2011-tomato/source/blender/compositor/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/compositor/COM_compositor.h
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionGroup.cpp
    branches/soc-2011-tomato/source/blender/compositor/intern/COM_ExecutionSystemHelper.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_RenderLayersNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/nodes/COM_SplitViewerNode.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_ViewerOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_ViewerOperation.h
    branches/soc-2011-tomato/source/blender/editors/include/UI_interface.h
    branches/soc-2011-tomato/source/blender/editors/interface/interface_layout.c
    branches/soc-2011-tomato/source/blender/editors/interface/resources.c
    branches/soc-2011-tomato/source/blender/editors/object/object_modifier.c
    branches/soc-2011-tomato/source/blender/editors/render/render_internal.c
    branches/soc-2011-tomato/source/blender/editors/screen/area.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_tree.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/drawobject.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform.c
    branches/soc-2011-tomato/source/blender/freestyle/intern/application/AppView.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/application/Controller.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/blender_interface/BlenderFileLoader.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/blender_interface/BlenderStrokeRenderer.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/blender_interface/BlenderStyleModule.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/blender_interface/BlenderTextureManager.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/BBox.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/FastGrid.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/Grid.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/Noise.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/Polygon.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/SweepLine.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/VecMat.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/geometry/normal_cycle.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/image/GaussianFilter.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/image/Image.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/scene_graph/DrawingStyle.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/scene_graph/FrsMaterial.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/scene_graph/IndexedFaceSet.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/scene_graph/LineRep.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/scene_graph/Node.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/scene_graph/NodeCamera.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/scene_graph/NodeDrawingStyle.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/Module.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/Operators.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/Predicates0D.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/Stroke.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/StrokeRenderer.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/StrokeRep.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/StrokeTesselator.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/stroke/StyleModule.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/BaseIterator.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/BaseObject.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/Exception.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/Id.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/Interpreter.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/ProgressBar.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/PseudoNoise.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/RandGen.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/RenderMonitor.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/TimeStamp.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/system/TimeUtils.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/BoxGrid.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/FEdgeXDetector.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/Functions1D.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/GridDensityProvider.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/Interface1D.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/OccluderSource.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/SphericalGrid.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/SteerableViewMap.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/ViewEdgeXBuilder.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/ViewMap.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/ViewMapBuilder.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/ViewMapIterators.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/view_map/ViewMapTesselator.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/winged_edge/WEdge.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/winged_edge/WFillGrid.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/winged_edge/WSFillGrid.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/winged_edge/WXEdge.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/winged_edge/WXEdgeBuilder.h
    branches/soc-2011-tomato/source/blender/freestyle/intern/winged_edge/WingedEdgeBuilder.h
    branches/soc-2011-tomato/source/blender/imbuf/intern/colormanagement.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/makesrna.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_skin.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvgedit.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_weightvgproximity.c
    branches/soc-2011-tomato/source/blender/render/intern/source/initrender.c
    branches/soc-2011-tomato/source/blender/render/intern/source/render_result.c
    branches/soc-2011-tomato/source/blender/windowmanager/WM_api.h
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_draw.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_subwindow.c
    branches/soc-2011-tomato/source/gameengine/BlenderRoutines/BL_KetsjiEmbedStart.cpp
    branches/soc-2011-tomato/source/gameengine/Converter/BL_ArmatureConstraint.cpp
    branches/soc-2011-tomato/source/gameengine/Converter/KX_BlenderSceneConverter.cpp
    branches/soc-2011-tomato/source/gameengine/Converter/KX_ConvertActuators.cpp
    branches/soc-2011-tomato/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_MeshProxy.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_NavMeshObject.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_ObstacleSimulation.cpp
    branches/soc-2011-tomato/source/gameengine/Ketsji/KX_PolyProxy.h
    branches/soc-2011-tomato/source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
    branches/soc-2011-tomato/source/gameengine/Rasterizer/RAS_2DFilterManager.h

Added Paths:
-----------
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_SplitOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_SplitOperation.h

Removed Paths:
-------------
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_SplitViewerOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_SplitViewerOperation.h
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_ViewerBaseOperation.cpp
    branches/soc-2011-tomato/source/blender/compositor/operations/COM_ViewerBaseOperation.h

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
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-2013-depsgraph_mt:57516
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835
/branches/vgroup_modifiers:38694-39989
/tags/blender-2.67b-release/blender:57122
/trunk/blender:36831-58869
   + /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-2013-depsgraph_mt:57516
/branches/soc-2013-dingto:57424,57487,57507,57525,57599,57670,57918-57919,57981,58091,58245,58253,58587,58772,58774-58775,58828,58835
/branches/vgroup_modifiers:38694-39989
/tags/blender-2.67b-release/blender:57122
/trunk/blender:36831-58946

Modified: branches/soc-2011-tomato/intern/cycles/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/intern/cycles/CMakeLists.txt	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/CMakeLists.txt	2013-08-06 00:39:21 UTC (rev 58947)
@@ -19,8 +19,8 @@
 
 	set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:fast -D_CRT_SECURE_NO_WARNINGS /Gs-")
 	set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
-	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
-	set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_RELEASE} /Ox")
+	set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /Ox")
+	set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} /Ox")
 elseif(CMAKE_COMPILER_IS_GNUCC)
 	set(CYCLES_SSE2_KERNEL_FLAGS "-ffast-math -msse -msse2 -mfpmath=sse")
 	set(CYCLES_SSE3_KERNEL_FLAGS "-ffast-math -msse -msse2 -msse3 -mssse3 -mfpmath=sse")

Modified: branches/soc-2011-tomato/intern/cycles/kernel/kernel_accumulate.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/kernel_accumulate.h	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/kernel/kernel_accumulate.h	2013-08-06 00:39:21 UTC (rev 58947)
@@ -286,7 +286,7 @@
 #ifdef __PASSES__
 	/* this division is a bit ugly, but means we only have to keep track of
 	 * only a single throughput further along the path, here we recover just
-	 * the indirect parth that is not influenced by any particular BSDF type */
+	 * the indirect path that is not influenced by any particular BSDF type */
 	if(L->use_light_pass) {
 		L->direct_emission = safe_divide_color(L->direct_emission, L->direct_throughput);
 		L->direct_diffuse += L->path_diffuse*L->direct_emission;

Modified: branches/soc-2011-tomato/intern/cycles/kernel/kernel_light.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/kernel_light.h	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/kernel/kernel_light.h	2013-08-06 00:39:21 UTC (rev 58947)
@@ -375,7 +375,7 @@
 		ls->pdf = invarea;
 
 		if(type == LIGHT_SPOT) {
-			/* spot light attentuation */
+			/* spot light attenuation */
 			float4 data2 = kernel_tex_fetch(__light_data, lamp*LIGHT_SIZE + 2);
 			ls->eval_fac *= spot_light_attenuation(data1, data2, ls);
 

Modified: branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/kernel/kernel_types.h	2013-08-06 00:39:21 UTC (rev 58947)
@@ -832,7 +832,7 @@
 typedef struct KernelBlackbody {
 	int table_offset;
 	int pad1, pad2, pad3;
-} KernelBLACKBODY;
+} KernelBlackbody;
 
 
 typedef struct KernelData {

Modified: branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_globals.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_globals.h	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_globals.h	2013-08-06 00:39:21 UTC (rev 58947)
@@ -87,9 +87,10 @@
 /* thread key for thread specific data lookup */
 struct OSLThreadData {
 	OSL::ShaderGlobals globals;
-	OSL::PerThreadInfo *thread_info;
+	OSL::PerThreadInfo *osl_thread_info;
 	OSLTraceData tracedata;
 	OSL::ShadingContext *context[SHADER_CONTEXT_NUM];
+	OIIO::TextureSystem::Perthread *oiio_thread_info;
 };
 
 CCL_NAMESPACE_END

Modified: branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_services.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_services.cpp	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_services.cpp	2013-08-06 00:39:21 UTC (rev 58947)
@@ -775,8 +775,16 @@
                                 float dsdy, float dtdy, float *result)
 {
 	OSL::TextureSystem *ts = osl_ts;
-	bool status = ts->texture(filename, options, s, t, dsdx, dtdx, dsdy, dtdy, result);
+	ShaderData *sd = (ShaderData *)(sg->renderstate);
+	KernelGlobals *kg = sd->osl_globals;
+	OSLThreadData *tdata = kg->osl_tdata;
+	OIIO::TextureSystem::Perthread *thread_info = tdata->oiio_thread_info;
 
+	OIIO::TextureSystem::TextureHandle *th = ts->get_texture_handle(filename, thread_info);
+
+	bool status = ts->texture(th, thread_info,
+	                          options, s, t, dsdx, dtdx, dsdy, dtdy, result);
+
 	if(!status) {
 		if(options.nchannels == 3 || options.nchannels == 4) {
 			result[0] = 1.0f;
@@ -797,8 +805,16 @@
                                   const OSL::Vec3 &dPdz, float *result)
 {
 	OSL::TextureSystem *ts = osl_ts;
-	bool status = ts->texture3d(filename, options, P, dPdx, dPdy, dPdz, result);
+	ShaderData *sd = (ShaderData *)(sg->renderstate);
+	KernelGlobals *kg = sd->osl_globals;
+	OSLThreadData *tdata = kg->osl_tdata;
+	OIIO::TextureSystem::Perthread *thread_info = tdata->oiio_thread_info;
 
+	OIIO::TextureSystem::TextureHandle *th =  ts->get_texture_handle(filename, thread_info);
+
+	bool status = ts->texture3d(th, thread_info,
+	                            options, P, dPdx, dPdy, dPdz, result);
+
 	if(!status) {
 		if(options.nchannels == 3 || options.nchannels == 4) {
 			result[0] = 1.0f;
@@ -819,8 +835,15 @@
                                     const OSL::Vec3 &dRdx, const OSL::Vec3 &dRdy, float *result)
 {
 	OSL::TextureSystem *ts = osl_ts;
-	bool status = ts->environment(filename, options, R, dRdx, dRdy, result);
+	ShaderData *sd = (ShaderData *)(sg->renderstate);
+	KernelGlobals *kg = sd->osl_globals;
+	OSLThreadData *tdata = kg->osl_tdata;
+	OIIO::TextureSystem::Perthread *thread_info = tdata->oiio_thread_info;
 
+	OIIO::TextureSystem::TextureHandle *th =  ts->get_texture_handle(filename, thread_info);
+	bool status = ts->environment(th, thread_info,
+	                              options, R, dRdx, dRdy, result);
+
 	if(!status) {
 		if(options.nchannels == 3 || options.nchannels == 4) {
 			result[0] = 1.0f;

Modified: branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_shader.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_shader.cpp	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/kernel/osl/osl_shader.cpp	2013-08-06 00:39:21 UTC (rev 58947)
@@ -55,11 +55,13 @@
 	memset(&tdata->globals, 0, sizeof(OSL::ShaderGlobals));
 	tdata->globals.tracedata = &tdata->tracedata;
 	tdata->globals.flipHandedness = false;
-	tdata->thread_info = ss->create_thread_info();
+	tdata->osl_thread_info = ss->create_thread_info();
 
 	for(int i = 0; i < SHADER_CONTEXT_NUM; i++)
-		tdata->context[i] = ss->get_context(tdata->thread_info);
+		tdata->context[i] = ss->get_context(tdata->osl_thread_info);
 
+	tdata->oiio_thread_info = osl_globals->ts->get_perthread_info();
+
 	kg->osl_ss = (OSLShadingSystem*)ss;
 	kg->osl_tdata = tdata;
 }
@@ -75,7 +77,7 @@
 	for(int i = 0; i < SHADER_CONTEXT_NUM; i++)
 		ss->release_context(tdata->context[i]);
 
-	ss->destroy_thread_info(tdata->thread_info);
+	ss->destroy_thread_info(tdata->osl_thread_info);
 
 	delete tdata;
 

Modified: branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_fresnel.h
===================================================================
--- branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_fresnel.h	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/kernel/svm/svm_fresnel.h	2013-08-06 00:39:21 UTC (rev 58947)
@@ -31,7 +31,7 @@
 	stack_store_float(stack, out_offset, f);
 }
 
-/* Blend Weight Node */
+/* Layer Weight Node */
 
 __device void svm_node_layer_weight(ShaderData *sd, float *stack, uint4 node)
 {

Modified: branches/soc-2011-tomato/intern/cycles/render/light.cpp
===================================================================
--- branches/soc-2011-tomato/intern/cycles/render/light.cpp	2013-08-06 00:08:33 UTC (rev 58946)
+++ branches/soc-2011-tomato/intern/cycles/render/light.cpp	2013-08-06 00:39:21 UTC (rev 58947)
@@ -517,7 +517,6 @@
 	for(size_t i = 0; i < scene->lights.size(); i++) {
 		Light *light = scene->lights[i];
 		float3 co = light->co;
-		float3 dir = normalize(light->dir);
 		int shader_id = scene->shader_manager->get_shader_id(scene->lights[i]->shader);
 		float samples = __int_as_float(light->samples);
 
@@ -559,6 +558,10 @@
 			float cosangle = cosf(angle);
 			float area = M_PI_F*radius*radius;
 			float invarea = (area > 0.0f)? 1.0f/area: 1.0f;
+			float3 dir = light->dir;
+			
+			if(len(dir) > 0.0f)
+				dir = normalize(dir);
 
 			if(light->use_mis && area > 0.0f)
 				shader_id |= SHADER_USE_MIS;
@@ -597,6 +600,10 @@
 			float3 axisv = light->axisv*(light->sizev*light->size);
 			float area = len(axisu)*len(axisv);
 			float invarea = (area > 0.0f)? 1.0f/area: 1.0f;
+			float3 dir = light->dir;
+			

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list