~ubuntu-branches/ubuntu/utopic/blender/utopic-proposed

« back to all changes in this revision

Viewing changes to source/blender/render/intern/raytrace/bvh.h

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-04-28 12:11:12 UTC
  • mto: (14.1.6 experimental) (1.5.1)
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: package-import@ubuntu.com-20120428121112-2zi0vp8b6vejda8i
Tags: upstream-2.63
ImportĀ upstreamĀ versionĀ 2.63

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
#include <xmmintrin.h>
47
47
#endif
48
48
 
49
 
#ifndef RE_RAYTRACE_BVH_H
50
 
#define RE_RAYTRACE_BVH_H
 
49
#ifndef __BVH_H__
 
50
#define __BVH_H__
51
51
 
52
52
#ifdef __SSE__
53
53
inline int test_bb_group4(__m128 *bb_group, const Isect *isec)
97
97
}
98
98
 
99
99
/* bvh tree generics */
100
 
template<class Tree> static int bvh_intersect(Tree *obj, Isect *isec);
101
 
 
102
100
template<class Tree> static void bvh_add(Tree *obj, RayObject *ob)
103
101
{
104
102
        rtbuild_add( obj->builder, ob );
269
267
                        const __m128 Y2Z2Y3Z3 = _mm_shuffle_ps( _mm_load_ps(bb2+4), _mm_load_ps(bb3+4), _MM_SHUFFLE(1,0,1,0) );
270
268
                        t_bb[4] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(2,0,2,0) );
271
269
                        t_bb[5] = _mm_shuffle_ps( Y0Z0Y1Z1, Y2Z2Y3Z3, _MM_SHUFFLE(3,1,3,1) );
272
 
/*                      
 
270
#if 0
273
271
                        for(int i=0; i<4; i++)
274
272
                        {
275
273
                                Node *t = stack[stack_pos+i];
284
282
                                bb[4*5] = t->bb[5];
285
283
                                t_node[i] = t->child;
286
284
                        }
287
 
*/
 
285
#endif
288
286
                        RE_RC_COUNT(isec->raycounter->simd_bb.test);
289
287
                        int res = test_bb_group4( t_bb, isec );
290
288
 
335
333
/*
336
334
 * recursively transverse a BVH looking for a rayhit using system stack
337
335
 */
338
 
/*
 
336
#if 0
339
337
template<class Node>
340
338
static int bvh_node_raycast(Node *node, Isect *isec)
341
339
{
380
378
        }
381
379
        return hit;
382
380
}
383
 
*/
 
381
#endif
384
382
 
385
383
template<class Node,class HintObject>
386
384
void bvh_dfs_make_hint(Node *node, LCTSHint *hint, int reserve_space, HintObject *hintObject)