Revision: 23524 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=23524 Author: jaguarandi Date: 2009-09-28 12:25:12 +0200 (Mon, 28 Sep 2009)
Log Message: ----------- Raycounters fix Modified Paths: -------------- branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h branches/soc-2009-jaguarandi/source/blender/render/intern/include/raycounter.h branches/soc-2009-jaguarandi/source/blender/render/intern/raytrace/rayobject.cpp branches/soc-2009-jaguarandi/source/blender/render/intern/source/shadeinput.c Modified: branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h =================================================================== --- branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h 2009-09-28 10:19:20 UTC (rev 23523) +++ branches/soc-2009-jaguarandi/source/blender/render/extern/include/RE_raytrace.h 2009-09-28 10:25:12 UTC (rev 23524) @@ -35,20 +35,31 @@ 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 */ //#define RT_USE_HINT /* last hit object is reused before raycasting on whole tree */ +#ifdef RE_RAYCOUNTER +typedef struct RayCounter RayCounter; +struct RayCounter +{ + struct + { + unsigned long long test, hit; + + } faces, bb, simd_bb, raycast, raytrace_hint, rayshadow_last_hit; +}; +#endif + /* Internals about raycasting structures can be found on intern/raytree.h */ typedef struct RayObject RayObject; typedef struct Isect Isect; typedef struct RayHint RayHint; typedef struct RayTraceHint RayTraceHint; -typedef struct RayCounter RayCounter; struct DerivedMesh; struct Mesh; Modified: branches/soc-2009-jaguarandi/source/blender/render/intern/include/raycounter.h =================================================================== --- branches/soc-2009-jaguarandi/source/blender/render/intern/include/raycounter.h 2009-09-28 10:19:20 UTC (rev 23523) +++ branches/soc-2009-jaguarandi/source/blender/render/intern/include/raycounter.h 2009-09-28 10:25:12 UTC (rev 23524) @@ -34,17 +34,6 @@ #ifdef RE_RAYCOUNTER -typedef struct RayCounter RayCounter; -struct RayCounter -{ - - struct - { - unsigned long long test, hit; - - } faces, bb, simd_bb, raycast, raytrace_hint, rayshadow_last_hit; -}; - /* #define RE_RC_INIT(isec, shi) (isec).count = re_rc_counter+(shi).thread */ #define RE_RC_INIT(isec, shi) (isec).raycounter = &((shi).raycounter) void RE_RC_INFO (RayCounter *rc); Modified: branches/soc-2009-jaguarandi/source/blender/render/intern/raytrace/rayobject.cpp =================================================================== --- branches/soc-2009-jaguarandi/source/blender/render/intern/raytrace/rayobject.cpp 2009-09-28 10:19:20 UTC (rev 23523) +++ branches/soc-2009-jaguarandi/source/blender/render/intern/raytrace/rayobject.cpp 2009-09-28 10:25:12 UTC (rev 23524) @@ -189,6 +189,7 @@ if(is->orig.ob == face->ob && is->orig.face == face->face) return 0; +/* if(is->skip & RE_SKIP_VLR_RENDER_CHECK) { if(vlr_check_intersect(is, (ObjectInstanceRen*)face->ob, (VlakRen*)face->face ) == 0) @@ -204,7 +205,7 @@ if(rayface_check_cullface(face, is) == 0) return 0; } - +*/ RE_RC_COUNT(is->raycounter->faces.test); //Load coords Modified: branches/soc-2009-jaguarandi/source/blender/render/intern/source/shadeinput.c =================================================================== --- branches/soc-2009-jaguarandi/source/blender/render/intern/source/shadeinput.c 2009-09-28 10:19:20 UTC (rev 23523) +++ branches/soc-2009-jaguarandi/source/blender/render/intern/source/shadeinput.c 2009-09-28 10:25:12 UTC (rev 23524) @@ -243,9 +243,9 @@ shr->rayhits[1] = (float)shi->raycounter.bb.hit; shr->rayhits[2] = 0.0; shr->rayhits[3] = 1.0; - RE_RC_MERGE(&re_rc_counter[shi->thread], &shi->raycounter); } */ + RE_RC_MERGE(&re_rc_counter[shi->thread], &shi->raycounter); } /* **************************************************************************** */ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs