*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)
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -112,7 +112,7 @@ template<class Node> static inline int bvh_node_hit_test(Node *node, Isect *isec
|
||||
|
||||
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -76,7 +76,7 @@ inline void bvh_node_push_childs<SVBVHNode>(SVBVHNode *node, Isect *isec, SVBVHN
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
|
||||
@@ -181,6 +181,7 @@ void freeraytree(Render *re)
|
||||
#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 @@ void makeraytree(Render *re)
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user