hostsupport/hostopenvg/src/riRasterizer.cpp
branchbug235_bringup_0
changeset 69 3f914c77c2e9
parent 53 c2ef9095503a
equal deleted inserted replaced
68:8d4efe9fa1cf 69:3f914c77c2e9
    31  * \note
    31  * \note
    32  *//*-------------------------------------------------------------------*/
    32  *//*-------------------------------------------------------------------*/
    33 
    33 
    34 #include "riRasterizer.h"
    34 #include "riRasterizer.h"
    35 
    35 
       
    36 #if defined(RI_COMPILE_LLVM_BYTECODE)
    36 // TEMP!
    37 // TEMP!
    37 #ifndef __SFCOMPILER_H
    38 #ifndef __SFCOMPILER_H
    38 #   include "sfCompiler.h"
    39 #   include "sfCompiler.h"
       
    40 #endif
    39 #endif
    41 #endif
    40 
    42 
    41 
    43 
    42 namespace OpenVGRI
    44 namespace OpenVGRI
    43 {
    45 {
   448 #endif
   450 #endif
   449 
   451 
   450 #if defined(USE_SSE2)
   452 #if defined(USE_SSE2)
   451 RI_INLINE static __m128i mm_mul4x32(const __m128i a, const __m128i b) {
   453 RI_INLINE static __m128i mm_mul4x32(const __m128i a, const __m128i b) {
   452      __m128i res;
   454      __m128i res;
   453 #if (_MSC_VER > 1400 )
   455 #if defined(__GNUG__)
       
   456      __m128i m0 = _mm_mul_epu32(a, _mm_shuffle_epi32(b, _MM_SHUFFLE(1, 1, 0, 0)));
       
   457      __m128i m1 = _mm_mul_epu32(a, _mm_shuffle_epi32(b, _MM_SHUFFLE(3, 3, 2, 2)));
       
   458 
       
   459      res = _mm_cvtps_epi32(_mm_shuffle_ps(_mm_cvtepi32_ps(m0), _mm_cvtepi32_ps(m1), _MM_SHUFFLE(2, 0, 2, 0)));
       
   460 #elif (_MSC_VER > 1400)
   454      // \todo Simpler way to do this on intel?
   461      // \todo Simpler way to do this on intel?
   455      __m128i m0 = _mm_mul_epu32(a, _mm_shuffle_epi32(b, _MM_SHUFFLE(1, 1, 0, 0)));
   462      __m128i m0 = _mm_mul_epu32(a, _mm_shuffle_epi32(b, _MM_SHUFFLE(1, 1, 0, 0)));
   456      __m128i m1 = _mm_mul_epu32(a, _mm_shuffle_epi32(b, _MM_SHUFFLE(3, 3, 2, 2)));
   463      __m128i m1 = _mm_mul_epu32(a, _mm_shuffle_epi32(b, _MM_SHUFFLE(3, 3, 2, 2)));
   457 
   464 
   458      res = _mm_castps_si128(_mm_shuffle_ps(_mm_castsi128_ps(m0), _mm_castsi128_ps(m1), _MM_SHUFFLE(2, 0, 2, 0)));
   465      res = _mm_castps_si128(_mm_shuffle_ps(_mm_castsi128_ps(m0), _mm_castsi128_ps(m1), _MM_SHUFFLE(2, 0, 2, 0)));
   783         }
   790         }
   784         dump = false;
   791         dump = false;
   785     }
   792     }
   786 
   793 
   787 #endif
   794 #endif
   788     int debugMagic = 0;
       
   789 
       
   790     m_aet.clear();
   795     m_aet.clear();
   791 
   796 
   792 #if defined(RI_DEBUG)
   797 #if defined(RI_DEBUG)
   793     maybeDumpEdges(m_edgePool);
   798     maybeDumpEdges(m_edgePool);
   794 #endif
   799 #endif