Revision: 23656
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23656
Author:   jaguarandi
Date:     2009-10-06 12:52:14 +0200 (Tue, 06 Oct 2009)

Log Message:
-----------
*Added memset's to make sure counters start on zero
*Disabled ray counter (can be enabled on render/extern/include/RE_raytrace.h by 
commenting out the define)
*marked bvh_node_merge() as static inline (hopping it now compiles on gcc and 
mingw)

Modified Paths:
--------------
    trunk/blender/source/blender/render/extern/include/RE_raytrace.h
    trunk/blender/source/blender/render/intern/raytrace/bvh.h
    trunk/blender/source/blender/render/intern/raytrace/svbvh.h
    trunk/blender/source/blender/render/intern/source/rayshade.c

Modified: trunk/blender/source/blender/render/extern/include/RE_raytrace.h
===================================================================
--- trunk/blender/source/blender/render/extern/include/RE_raytrace.h    
2009-10-06 10:32:07 UTC (rev 23655)
+++ trunk/blender/source/blender/render/extern/include/RE_raytrace.h    
2009-10-06 10:52:14 UTC (rev 23656)
@@ -35,7 +35,7 @@
 extern "C" {
 #endif
 
-#define RE_RAYCOUNTER                  /* enable counters per ray, usefull for 
measuring raytrace structures performance */
+// #define RE_RAYCOUNTER                       /* enable counters per ray, 
usefull for measuring raytrace structures performance */
 
 #define RE_RAY_LCTS_MAX_SIZE   256
 #define RT_USE_LAST_HIT                        /* last shadow hit is reused 
before raycasting on whole tree */

Modified: trunk/blender/source/blender/render/intern/raytrace/bvh.h
===================================================================
--- trunk/blender/source/blender/render/intern/raytrace/bvh.h   2009-10-06 
10:32:07 UTC (rev 23655)
+++ trunk/blender/source/blender/render/intern/raytrace/bvh.h   2009-10-06 
10:52:14 UTC (rev 23656)
@@ -112,7 +112,7 @@
 
 
 template<class Node>
-static void bvh_node_merge_bb(Node *node, float *min, float *max)
+static inline void bvh_node_merge_bb(Node *node, float *min, float *max)
 {
        if(is_leaf(node))
        {

Modified: trunk/blender/source/blender/render/intern/raytrace/svbvh.h
===================================================================
--- trunk/blender/source/blender/render/intern/raytrace/svbvh.h 2009-10-06 
10:32:07 UTC (rev 23655)
+++ trunk/blender/source/blender/render/intern/raytrace/svbvh.h 2009-10-06 
10:52:14 UTC (rev 23656)
@@ -76,7 +76,7 @@
 }
 
 template<>
-static void bvh_node_merge_bb<SVBVHNode>(SVBVHNode *node, float *min, float 
*max)
+void bvh_node_merge_bb<SVBVHNode>(SVBVHNode *node, float *min, float *max)
 {
        if(is_leaf(node))
        {

Modified: trunk/blender/source/blender/render/intern/source/rayshade.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/rayshade.c        
2009-10-06 10:32:07 UTC (rev 23655)
+++ trunk/blender/source/blender/render/intern/source/rayshade.c        
2009-10-06 10:52:14 UTC (rev 23656)
@@ -181,6 +181,7 @@
 #ifdef RE_RAYCOUNTER
        {
                RayCounter sum;
+               memset( &sum, 0, sizeof(sum) );
                int i;
                for(i=0; i<BLENDER_MAX_THREADS; i++)
                        RE_RC_MERGE(&sum, re_rc_counter+i);
@@ -444,8 +445,14 @@
                re->i.infostr= "Raytree finished";
                re->stats_draw(re->sdh, &re->i);
        }
+
+#ifdef RE_RAYCOUNTER
+       memset( re_rc_counter, 0, sizeof(re_rc_counter) );
+#endif
 }
 
+
+
 void shade_ray(Isect *is, ShadeInput *shi, ShadeResult *shr)
 {
        ObjectInstanceRen *obi= (ObjectInstanceRen*)is->hit.ob;


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to