@ -873,9 +873,9 @@ bool IntersectRayWithBoxBrush( TraceInfo_t *pTraceInfo, const cbrush_t *pBrush,
@@ -873,9 +873,9 @@ bool IntersectRayWithBoxBrush( TraceInfo_t *pTraceInfo, const cbrush_t *pBrush,
FPExceptionDisabler hideExceptions ;
// Load the unaligned ray/box parameters into SIMD registers
fltx4 start = LoadUnaligned3 SIMD ( pTraceInfo - > m_start . Base ( ) ) ;
fltx4 extents = LoadUnaligned3 SIMD ( pTraceInfo - > m_extents . Base ( ) ) ;
fltx4 delta = LoadUnaligned3 SIMD ( pTraceInfo - > m_delta . Base ( ) ) ;
fltx4 start = LoadAligned SIMD ( pTraceInfo - > m_start . Base ( ) ) ;
fltx4 extents = LoadAligned SIMD ( pTraceInfo - > m_extents . Base ( ) ) ;
fltx4 delta = LoadAligned SIMD ( pTraceInfo - > m_delta . Base ( ) ) ;
fltx4 boxMins = LoadAlignedSIMD ( pBox - > mins . Base ( ) ) ;
fltx4 boxMaxs = LoadAlignedSIMD ( pBox - > maxs . Base ( ) ) ;
@ -899,7 +899,7 @@ bool IntersectRayWithBoxBrush( TraceInfo_t *pTraceInfo, const cbrush_t *pBrush,
@@ -899,7 +899,7 @@ bool IntersectRayWithBoxBrush( TraceInfo_t *pTraceInfo, const cbrush_t *pBrush,
fltx4 crossPlane = OrSIMD ( XorSIMD ( startOutMins , endOutMins ) , XorSIMD ( startOutMaxs , endOutMaxs ) ) ;
// now build the per-axis interval of t for intersections
fltx4 invDelta = LoadUnaligned3 SIMD ( pTraceInfo - > m_invDelta . Base ( ) ) ;
fltx4 invDelta = LoadAligned SIMD ( pTraceInfo - > m_invDelta . Base ( ) ) ;
fltx4 tmins = MulSIMD ( offsetMinsExpanded , invDelta ) ;
fltx4 tmaxs = MulSIMD ( offsetMaxsExpanded , invDelta ) ;
// now sort the interval per axis
@ -1037,9 +1037,9 @@ bool IntersectRayWithBox( const Ray_t &ray, const VectorAligned &inInvDelta, con
@@ -1037,9 +1037,9 @@ bool IntersectRayWithBox( const Ray_t &ray, const VectorAligned &inInvDelta, con
pTrace - > fraction = 1.0f ;
// Load the unaligned ray/box parameters into SIMD registers
fltx4 start = LoadUnaligned3 SIMD ( ray . m_Start . Base ( ) ) ;
fltx4 extents = LoadUnaligned3 SIMD ( ray . m_Extents . Base ( ) ) ;
fltx4 delta = LoadUnaligned3 SIMD ( ray . m_Delta . Base ( ) ) ;
fltx4 start = LoadAligned SIMD ( ray . m_Start . Base ( ) ) ;
fltx4 extents = LoadAligned SIMD ( ray . m_Extents . Base ( ) ) ;
fltx4 delta = LoadAligned SIMD ( ray . m_Delta . Base ( ) ) ;
fltx4 boxMins = LoadAlignedSIMD ( inBoxMins . Base ( ) ) ;
fltx4 boxMaxs = LoadAlignedSIMD ( inBoxMaxs . Base ( ) ) ;
@ -1372,9 +1372,9 @@ void FASTCALL CM_ClipBoxToBrush( TraceInfo_t * RESTRICT pTraceInfo, const cbrush
@@ -1372,9 +1372,9 @@ void FASTCALL CM_ClipBoxToBrush( TraceInfo_t * RESTRICT pTraceInfo, const cbrush
inline bool IsTraceBoxIntersectingBoxBrush ( TraceInfo_t * pTraceInfo , cboxbrush_t * pBox )
{
fltx4 start = LoadUnaligned3 SIMD ( pTraceInfo - > m_start . Base ( ) ) ;
fltx4 mins = LoadUnaligned3 SIMD ( pTraceInfo - > m_mins . Base ( ) ) ;
fltx4 maxs = LoadUnaligned3 SIMD ( pTraceInfo - > m_maxs . Base ( ) ) ;
fltx4 start = LoadAligned SIMD ( pTraceInfo - > m_start . Base ( ) ) ;
fltx4 mins = LoadAligned SIMD ( pTraceInfo - > m_mins . Base ( ) ) ;
fltx4 maxs = LoadAligned SIMD ( pTraceInfo - > m_maxs . Base ( ) ) ;
fltx4 boxMins = LoadAlignedSIMD ( pBox - > mins . Base ( ) ) ;
fltx4 boxMaxs = LoadAlignedSIMD ( pBox - > maxs . Base ( ) ) ;
@ -1569,15 +1569,15 @@ void FASTCALL CM_TraceToLeaf( TraceInfo_t * RESTRICT pTraceInfo, int ndxLeaf, fl
@@ -1569,15 +1569,15 @@ void FASTCALL CM_TraceToLeaf( TraceInfo_t * RESTRICT pTraceInfo, int ndxLeaf, fl
if ( IsX360 ( ) )
{
// set up some relatively constant variables we'll use in the loop below
fltx4 traceStart = LoadUnaligned3 SIMD ( pTraceInfo - > m_start . Base ( ) ) ;
fltx4 traceDelta = LoadUnaligned3 SIMD ( pTraceInfo - > m_delta . Base ( ) ) ;
fltx4 traceInvDelta = LoadUnaligned3 SIMD ( pTraceInfo - > m_invDelta . Base ( ) ) ;
fltx4 traceStart = LoadAligned SIMD ( pTraceInfo - > m_start . Base ( ) ) ;
fltx4 traceDelta = LoadAligned SIMD ( pTraceInfo - > m_delta . Base ( ) ) ;
fltx4 traceInvDelta = LoadAligned SIMD ( pTraceInfo - > m_invDelta . Base ( ) ) ;
static const fltx4 vecEpsilon = { DISPCOLL_DIST_EPSILON , DISPCOLL_DIST_EPSILON , DISPCOLL_DIST_EPSILON , DISPCOLL_DIST_EPSILON } ;
// only used in !IS_POINT version:
fltx4 extents ;
if ( ! IS_POINT )
{
extents = LoadUnaligned3 SIMD ( pTraceInfo - > m_extents . Base ( ) ) ;
extents = LoadAligned SIMD ( pTraceInfo - > m_extents . Base ( ) ) ;
}
// TODO: this loop probably ought to be unrolled so that we can make a more efficient