Data-alignment. SSE intrinsics.
This commit is contained in:
@@ -1328,7 +1328,7 @@ void LLAgent::startAutoPilotGlobal(
|
||||
else
|
||||
{
|
||||
// Guess at a reasonable stop distance.
|
||||
mAutoPilotStopDistance = fsqrtf( distance );
|
||||
mAutoPilotStopDistance = (F32) sqrt( distance );
|
||||
if (mAutoPilotStopDistance < 0.5f)
|
||||
{
|
||||
mAutoPilotStopDistance = 0.5f;
|
||||
|
||||
@@ -756,7 +756,7 @@ BOOL LLPhysicsMotion::onUpdate(F32 time)
|
||||
const F32 area_for_max_settings = 0.0;
|
||||
const F32 area_for_min_settings = 1400.0;
|
||||
const F32 area_for_this_setting = area_for_max_settings + (area_for_min_settings-area_for_max_settings)*(1.0-lod_factor);
|
||||
const F32 pixel_area = fsqrtf(mCharacter->getPixelArea());
|
||||
const F32 pixel_area = (F32) sqrt(mCharacter->getPixelArea());
|
||||
|
||||
const BOOL is_self = (dynamic_cast<LLVOAvatar *>(mCharacter) != NULL && ((LLVOAvatar*)mCharacter)->isSelf());
|
||||
if ((pixel_area > area_for_this_setting) || is_self)
|
||||
|
||||
@@ -3658,7 +3658,7 @@ void LLSelectMgr::deselectAllIfTooFar()
|
||||
{
|
||||
if (mDebugSelectMgr)
|
||||
{
|
||||
llinfos << "Selection manager: auto-deselecting, select_dist = " << fsqrtf(select_dist_sq) << llendl;
|
||||
llinfos << "Selection manager: auto-deselecting, select_dist = " << (F32) sqrt(select_dist_sq) << llendl;
|
||||
llinfos << "agent pos global = " << gAgent.getPositionGlobal() << llendl;
|
||||
llinfos << "selection pos global = " << selectionCenter << llendl;
|
||||
}
|
||||
|
||||
@@ -714,7 +714,7 @@ void LLViewerJoystick::moveAvatar(bool reset)
|
||||
sDelta[RX_I] += (cur_delta[RX_I] - sDelta[RX_I]) * time * feather;
|
||||
sDelta[RY_I] += (cur_delta[RY_I] - sDelta[RY_I]) * time * feather;
|
||||
|
||||
handleRun(fsqrtf(sDelta[Z_I]*sDelta[Z_I] + sDelta[X_I]*sDelta[X_I]));
|
||||
handleRun((F32) sqrt(sDelta[Z_I]*sDelta[Z_I] + sDelta[X_I]*sDelta[X_I]));
|
||||
|
||||
// Allow forward/backward movement some priority
|
||||
if (dom_axis == Z_I)
|
||||
|
||||
@@ -1613,7 +1613,7 @@ F32 LLViewerFetchedTexture::calcDecodePriority()
|
||||
|
||||
S32 cur_discard = getCurrentDiscardLevelForFetching();
|
||||
bool have_all_data = (cur_discard >= 0 && (cur_discard <= mDesiredDiscardLevel));
|
||||
F32 pixel_priority = fsqrtf(mMaxVirtualSize);
|
||||
F32 pixel_priority = (F32) sqrt(mMaxVirtualSize);
|
||||
|
||||
F32 priority = 0.f;
|
||||
|
||||
|
||||
@@ -5411,7 +5411,7 @@ void LLVOAvatar::updateTextures()
|
||||
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA))
|
||||
{
|
||||
setDebugText(llformat("%4.0f:%4.0f", fsqrtf(mMinPixelArea),fsqrtf(mMaxPixelArea)));
|
||||
setDebugText(llformat("%4.0f:%4.0f", (F32) sqrt(mMinPixelArea),(F32) sqrt(mMaxPixelArea)));
|
||||
}
|
||||
|
||||
if( render_avatar )
|
||||
|
||||
@@ -355,7 +355,7 @@ void LLVOGrass::updateTextures()
|
||||
{
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA))
|
||||
{
|
||||
setDebugText(llformat("%4.0f", fsqrtf(mPixelArea)));
|
||||
setDebugText(llformat("%4.0f", (F32) sqrt(mPixelArea)));
|
||||
}
|
||||
getTEImage(0)->addTextureStats(mPixelArea);
|
||||
}
|
||||
|
||||
@@ -496,7 +496,7 @@ void LLVOTree::updateTextures()
|
||||
{
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA))
|
||||
{
|
||||
setDebugText(llformat("%4.0f", fsqrtf(mPixelArea)));
|
||||
setDebugText(llformat("%4.0f", (F32) sqrt(mPixelArea)));
|
||||
}
|
||||
mTreeImagep->addTextureStats(mPixelArea);
|
||||
}
|
||||
|
||||
@@ -635,15 +635,15 @@ void LLVOVolume::updateTextureVirtualSize()
|
||||
|
||||
if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_AREA))
|
||||
{
|
||||
setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize)));
|
||||
setDebugText(llformat("%.0f:%.0f", (F32) sqrt(min_vsize),(F32) sqrt(max_vsize)));
|
||||
}
|
||||
// else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXTURE_PRIORITY))
|
||||
// {
|
||||
// setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize)));
|
||||
// setDebugText(llformat("%.0f:%.0f", (F32) sqrt(min_vsize),(F32) sqrt(max_vsize)));
|
||||
// }
|
||||
else if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_FACE_AREA))
|
||||
{
|
||||
setDebugText(llformat("%.0f:%.0f", fsqrtf(min_vsize),fsqrtf(max_vsize)));
|
||||
setDebugText(llformat("%.0f:%.0f", (F32) sqrt(min_vsize),(F32) sqrt(max_vsize)));
|
||||
}
|
||||
|
||||
if (mPixelArea == 0)
|
||||
|
||||
@@ -604,7 +604,7 @@ void LLWorld::updateVisibilities()
|
||||
region_list_t::iterator curiter = iter++;
|
||||
LLViewerRegion* regionp = *curiter;
|
||||
F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
|
||||
F32 radius = 0.5f*fsqrtf(height * height + diagonal_squared);
|
||||
F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
|
||||
if (!regionp->getLand().hasZData()
|
||||
|| LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
|
||||
{
|
||||
@@ -625,7 +625,7 @@ void LLWorld::updateVisibilities()
|
||||
}
|
||||
|
||||
F32 height = regionp->getLand().getMaxZ() - regionp->getLand().getMinZ();
|
||||
F32 radius = 0.5f*fsqrtf(height * height + diagonal_squared);
|
||||
F32 radius = 0.5f*(F32) sqrt(height * height + diagonal_squared);
|
||||
if (LLViewerCamera::getInstance()->sphereInFrustum(regionp->getCenterAgent(), radius))
|
||||
{
|
||||
regionp->calculateCameraDistance();
|
||||
|
||||
@@ -4692,7 +4692,7 @@ static F32 calc_light_dist(LLVOVolume* light, const LLVector3& cam_pos, F32 max_
|
||||
{
|
||||
return max_dist;
|
||||
}
|
||||
F32 dist = fsqrtf(dist2);
|
||||
F32 dist = (F32) sqrt(dist2);
|
||||
dist *= 1.f / inten;
|
||||
dist -= radius;
|
||||
if (selected)
|
||||
|
||||
Reference in New Issue
Block a user