16 #include "smmintrin.h" 23 #define LOAD_128 _mm_load_si128 25 #define LOAD_128 _mm_loadu_si128 31 const __m128i mask_ptest = _mm_setr_epi8(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0);
34 while (psd != psdvend) {
64 __m128i ps1_max = LOAD_128((__m128i*) &ps->
xmax);
65 __m128i ps2_min = LOAD_128((__m128i*) &ps2->
xmin);
66 __m128i rslt1 = _mm_cmplt_epi32(ps1_max, ps2_min);
67 if (!_mm_testz_si128(mask_ptest, rslt1))
70 __m128i ps1_min = LOAD_128((__m128i*) &ps->
xmin);
71 __m128i ps2_max = LOAD_128((__m128i*) &ps2->
xmax);
72 __m128i rslt2 = _mm_cmplt_epi32(ps2_max, ps1_min);
73 if (_mm_testz_si128(mask_ptest, rslt2)) {
100 bool ViewportSortParentSpritesSSE41Checker()
int32 zmin
minimal world Z coordinate of bounding box
int32 zmax
maximal world Z coordinate of bounding box
const T * Begin() const
Get the pointer to the first item (const)
const T * End() const
Get the pointer behind the last valid item (const)
int32 ymin
minimal world Y coordinate of bounding box
Definition of base types and functions in a cross-platform compatible way.
A number of safeguards to prevent using unsafe methods.
int32 xmin
minimal world X coordinate of bounding box
Functions related to CPU specific instructions.
Parent sprite that should be drawn.
int32 ymax
maximal world Y coordinate of bounding box
int32 xmax
maximal world X coordinate of bounding box
bool HasCPUIDFlag(uint type, uint index, uint bit)
Check whether the current CPU has the given flag.
Types related to sprite sorting.
bool comparison_done
Used during sprite sorting: true if sprite has been compared with all other sprites.