Skip to content

Commit

Permalink
Disabling BuildNEON for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
jbikker committed Dec 19, 2024
1 parent 2a49133 commit dd8dc99
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tiny_bvh.h
Original file line number Diff line number Diff line change
Expand Up @@ -404,21 +404,17 @@ inline float32x4_t SIMD_SETRVEC( float x, float y, float z, float w )
ALIGNED( 64 ) float data[4] = { x, y, z, w };
return vld1q_f32( data );
}

inline uint32x4_t SIMD_SETRVECU( uint32_t x, uint32_t y, uint32_t z, uint32_t w )
{
ALIGNED( 64 ) uint32_t data[4] = { x, y, z, w };
return vld1q_u32( data );
}

#else
typedef bvhvec4 SIMDVEC4;
#define SIMD_SETVEC(a,b,c,d) bvhvec4( d, c, b, a )
#define SIMD_SETRVEC(a,b,c,d) bvhvec4( a, b, c, d )
#endif

#endif

// error handling
#define FATAL_ERROR_IF(c,s) if (c) { fprintf( stderr, \
"Fatal error in tiny_bvh.h, line %i:\n%s\n", __LINE__, s ); exit( 1 ); }
Expand Down Expand Up @@ -567,7 +563,8 @@ class BVH : public BVHBase
#if defined(BVH_USEAVX)
BuildAVX( vertices );
#elif defined(BVH_USENEON)
BuildNEON( vertices );
Build( vertices );
// BuildNEON( vertices ); // TODO: currently not working correctly.
#else
Build( vertices );
#endif
Expand Down Expand Up @@ -969,6 +966,8 @@ static uint32_t __bfind( uint32_t x ) // https://github.com/mackron/refcode/blob
#endif
}

#endif

#ifndef TINYBVH_USE_CUSTOM_VECTOR_TYPES

bvhvec4::bvhvec4( const bvhvec3& a ) { x = a.x; y = a.y; z = a.z; w = 0; }
Expand Down

0 comments on commit dd8dc99

Please sign in to comment.