Raycounters fix
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -189,6 +189,7 @@ static int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *is)
|
||||
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 @@ static int intersect_rayface(RayObject *hit_obj, RayFace *face, Isect *is)
|
||||
if(rayface_check_cullface(face, is) == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
*/
|
||||
RE_RC_COUNT(is->raycounter->faces.test);
|
||||
|
||||
//Load coords
|
||||
|
||||
@@ -243,9 +243,9 @@ void shade_input_do_shade(ShadeInput *shi, ShadeResult *shr)
|
||||
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);
|
||||
}
|
||||
|
||||
/* **************************************************************************** */
|
||||
|
||||
Reference in New Issue
Block a user