SL-16220: Merge branch 'origin/DRTVWR-546' into glthread
commit
5188a26a85
|
|
@ -1036,9 +1036,9 @@
|
|||
<key>archive</key>
|
||||
<map>
|
||||
<key>hash</key>
|
||||
<string>650e836255b6c2ecb93d3f1f7220051c</string>
|
||||
<string>dce3f3c01fddb400cb143c3283fe9259</string>
|
||||
<key>url</key>
|
||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/55011/511905/glh_linear-0.0.0-common-538981.tar.bz2</string>
|
||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/82754/775367/glh_linear-0.0.0-common-560278.tar.bz2</string>
|
||||
</map>
|
||||
<key>name</key>
|
||||
<string>common</string>
|
||||
|
|
|
|||
|
|
@ -858,7 +858,6 @@ F64 PeriodicRecording::getPeriodMean( const StatType<EventAccumulator>& stat, S3
|
|||
: NaN;
|
||||
}
|
||||
|
||||
|
||||
F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<EventAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
|
@ -952,6 +951,32 @@ F64 PeriodicRecording::getPeriodMean( const StatType<SampleAccumulator>& stat, S
|
|||
: NaN;
|
||||
}
|
||||
|
||||
F64 PeriodicRecording::getPeriodMedian( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
std::vector<F64> buf;
|
||||
for (S32 i = 1; i <= num_periods; i++)
|
||||
{
|
||||
Recording& recording = getPrevRecording(i);
|
||||
if (recording.getDuration() > (F32Seconds)0.f)
|
||||
{
|
||||
if (recording.hasValue(stat))
|
||||
{
|
||||
buf.push_back(recording.getMean(stat));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (buf.size()==0)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
std::sort(buf.begin(), buf.end());
|
||||
|
||||
return F64((buf.size() % 2 == 0) ? (buf[buf.size() / 2 - 1] + buf[buf.size() / 2]) / 2 : buf[buf.size() / 2]);
|
||||
}
|
||||
|
||||
F64 PeriodicRecording::getPeriodStandardDeviation( const StatType<SampleAccumulator>& stat, S32 num_periods /*= S32_MAX*/ )
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
|
|
|
|||
|
|
@ -599,6 +599,35 @@ namespace LLTrace
|
|||
return typename RelatedTypes<T>::fractional_t(getPeriodMeanPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
F64 getPeriodMedian( const StatType<SampleAccumulator>& stat, S32 num_periods = S32_MAX);
|
||||
|
||||
template <typename T>
|
||||
typename RelatedTypes<typename T::value_t>::fractional_t getPeriodMedianPerSec(const StatType<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
num_periods = llmin(num_periods, getNumRecordedPeriods());
|
||||
|
||||
std::vector <typename RelatedTypes<typename T::value_t>::fractional_t> buf;
|
||||
for (S32 i = 1; i <= num_periods; i++)
|
||||
{
|
||||
Recording& recording = getPrevRecording(i);
|
||||
if (recording.getDuration() > (F32Seconds)0.f)
|
||||
{
|
||||
buf.push_back(recording.getPerSec(stat));
|
||||
}
|
||||
}
|
||||
std::sort(buf.begin(), buf.end());
|
||||
|
||||
return typename RelatedTypes<T>::fractional_t((buf.size() % 2 == 0) ? (buf[buf.size() / 2 - 1] + buf[buf.size() / 2]) / 2 : buf[buf.size() / 2]);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
typename RelatedTypes<T>::fractional_t getPeriodMedianPerSec(const CountStatHandle<T>& stat, S32 num_periods = S32_MAX)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
return typename RelatedTypes<T>::fractional_t(getPeriodMedianPerSec(static_cast<const StatType<CountAccumulator>&>(stat), num_periods));
|
||||
}
|
||||
|
||||
//
|
||||
// PERIODIC STANDARD DEVIATION
|
||||
//
|
||||
|
|
|
|||
|
|
@ -557,7 +557,7 @@ bool LLGLManager::initGL()
|
|||
glGetIntegerv(GL_NUM_EXTENSIONS, &count);
|
||||
for (GLint i = 0; i < count; ++i)
|
||||
{
|
||||
std::string ext((const char*) glGetStringi(GL_EXTENSIONS, i));
|
||||
std::string ext = ll_safe_string((const char*) glGetStringi(GL_EXTENSIONS, i));
|
||||
str << ext << " ";
|
||||
LL_DEBUGS("GLExtensions") << ext << LL_ENDL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1436,7 +1436,11 @@ GLint LLGLSLShader::getUniformLocation(U32 index)
|
|||
GLint ret = -1;
|
||||
if (mProgramObject)
|
||||
{
|
||||
llassert(index < mUniform.size());
|
||||
if (index >= mUniform.size())
|
||||
{
|
||||
LL_WARNS_ONCE("Shader") << "Uniform index " << index << " out of bounds " << (S32)mUniform.size() << LL_ENDL;
|
||||
return ret;
|
||||
}
|
||||
return mUniform[index];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -160,6 +160,7 @@ LLStatBar::Params::Params()
|
|||
tick_spacing("tick_spacing", 0.f),
|
||||
decimal_digits("decimal_digits", 3),
|
||||
show_bar("show_bar", false),
|
||||
show_median("show_median", false),
|
||||
show_history("show_history", false),
|
||||
scale_range("scale_range", true),
|
||||
num_frames("num_frames", 200),
|
||||
|
|
@ -186,6 +187,7 @@ LLStatBar::LLStatBar(const Params& p)
|
|||
mNumShortHistoryFrames(p.num_frames_short),
|
||||
mMaxHeight(p.max_height),
|
||||
mDisplayBar(p.show_bar),
|
||||
mShowMedian(p.show_median),
|
||||
mDisplayHistory(p.show_history),
|
||||
mOrientation(p.orientation),
|
||||
mAutoScaleMax(!p.bar_max.isProvided()),
|
||||
|
|
@ -318,7 +320,14 @@ void LLStatBar::draw()
|
|||
min = frame_recording.getPeriodMinPerSec(count_stat, num_frames);
|
||||
max = frame_recording.getPeriodMaxPerSec(count_stat, num_frames);
|
||||
mean = frame_recording.getPeriodMeanPerSec(count_stat, num_frames);
|
||||
display_value = mean;
|
||||
if (mShowMedian)
|
||||
{
|
||||
display_value = frame_recording.getPeriodMedianPerSec(count_stat, num_frames);
|
||||
}
|
||||
else
|
||||
{
|
||||
display_value = mean;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case STAT_EVENT:
|
||||
|
|
@ -344,7 +353,11 @@ void LLStatBar::draw()
|
|||
mean = frame_recording.getPeriodMean(sample_stat, num_frames);
|
||||
num_rapid_changes = calc_num_rapid_changes(frame_recording, sample_stat, RAPID_CHANGE_WINDOW);
|
||||
|
||||
if (num_rapid_changes / RAPID_CHANGE_WINDOW.value() > MAX_RAPID_CHANGES_PER_SEC)
|
||||
if (mShowMedian)
|
||||
{
|
||||
display_value = frame_recording.getPeriodMedian(sample_stat, num_frames);
|
||||
}
|
||||
else if (num_rapid_changes / RAPID_CHANGE_WINDOW.value() > MAX_RAPID_CHANGES_PER_SEC)
|
||||
{
|
||||
display_value = mean;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,9 +44,10 @@ public:
|
|||
bar_max,
|
||||
tick_spacing;
|
||||
|
||||
Optional<bool> show_bar,
|
||||
Optional<bool> show_bar,
|
||||
show_history,
|
||||
scale_range;
|
||||
scale_range,
|
||||
show_median; // default is mean
|
||||
|
||||
Optional<S32> decimal_digits,
|
||||
num_frames,
|
||||
|
|
@ -112,6 +113,7 @@ private:
|
|||
|
||||
bool mDisplayBar, // Display the bar graph.
|
||||
mDisplayHistory,
|
||||
mShowMedian,
|
||||
mAutoScaleMax,
|
||||
mAutoScaleMin;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,211 +0,0 @@
|
|||
/*
|
||||
* glh_extensions.h
|
||||
* $LicenseInfo:firstyear=2006&license=mit$ (mit used here to satisfy validity checker)
|
||||
* Copyright (C) 2006, NVIDIA
|
||||
* From nVidia Corporation, downloaded 2006-12-18 from:
|
||||
* http://developer.nvidia.com/attach/8196
|
||||
* ("NVParse Library with Source (.zip) (2390 KB)")
|
||||
*
|
||||
* License (quoted from license_info.txt in aforementioned file):
|
||||
* "The files bison.exe, bison.simple, and flex.exe are covered by
|
||||
* the GPL. All other files in this distribution can be used however
|
||||
* you want."
|
||||
* $/LicenseInfo$
|
||||
|
||||
*/
|
||||
|
||||
#ifndef GLH_EXTENSIONS
|
||||
#define GLH_EXTENSIONS
|
||||
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <windows.h>
|
||||
#endif
|
||||
|
||||
#ifndef __APPLE__
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# include "GL/wglext.h"
|
||||
#endif
|
||||
|
||||
#define CHECK_MEMORY(ptr) \
|
||||
if (NULL == ptr) { \
|
||||
printf("Error allocating memory in file %s, line %d\n", __FILE__, __LINE__); \
|
||||
exit(-1); \
|
||||
}
|
||||
|
||||
#ifdef GLH_EXT_SINGLE_FILE
|
||||
# define GLH_EXTENSIONS_SINGLE_FILE // have to do this because glh_genext.h unsets GLH_EXT_SINGLE_FILE
|
||||
#endif
|
||||
|
||||
#include "glh_genext.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifdef GLH_EXTENSIONS_SINGLE_FILE
|
||||
|
||||
class GLHExts
|
||||
{
|
||||
public:
|
||||
GLHExts()
|
||||
{
|
||||
mSysExts = NULL;
|
||||
// mUnsupportedExts = NULL;
|
||||
}
|
||||
~GLHExts()
|
||||
{
|
||||
if (mSysExts)
|
||||
{
|
||||
free(mSysExts);
|
||||
}
|
||||
// if (mUnsupportedExts)
|
||||
// {
|
||||
// free(mUnsupportedExts);
|
||||
// }
|
||||
}
|
||||
char *mSysExts;
|
||||
// char *mUnsupportedExts;
|
||||
};
|
||||
|
||||
GLHExts gGLHExts;
|
||||
|
||||
static int ExtensionExists(const char* extName, const char* sysExts)
|
||||
{
|
||||
char *padExtName = (char*)malloc(strlen(extName) + 2);
|
||||
strcat(strcpy(padExtName, extName), " ");
|
||||
|
||||
if (0 == strcmp(extName, "GL_VERSION_1_2")) {
|
||||
const char *version = (const char*)glGetString(GL_VERSION);
|
||||
if (strstr(version, "1.0") == version || strstr(version, "1.1") == version) {
|
||||
return FALSE;
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
if (strstr(sysExts, padExtName)) {
|
||||
free(padExtName);
|
||||
return TRUE;
|
||||
} else {
|
||||
free(padExtName);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static const char* EatWhiteSpace(const char *str)
|
||||
{
|
||||
for (; *str && (' ' == *str || '\t' == *str || '\n' == *str); str++);
|
||||
return str;
|
||||
}
|
||||
|
||||
static const char* EatNonWhiteSpace(const char *str)
|
||||
{
|
||||
for (; *str && (' ' != *str && '\t' != *str && '\n' != *str); str++);
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
int glh_init_extensions(const char *origReqExts)
|
||||
{
|
||||
// Length of requested extensions string
|
||||
//unsigned reqExtsLen;
|
||||
char *reqExts;
|
||||
// Ptr for individual extensions within reqExts
|
||||
char *reqExt;
|
||||
int success = TRUE;
|
||||
|
||||
// build space-padded extension string
|
||||
if (NULL == gGLHExts.mSysExts) {
|
||||
const char *extensions = (const char*)glGetString(GL_EXTENSIONS);
|
||||
int sysExtsLen = (int)strlen(extensions);
|
||||
const char *winsys_extensions = 0;
|
||||
int winsysExtsLen = 0;
|
||||
#ifdef _WIN32
|
||||
{
|
||||
PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = 0;
|
||||
wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB");
|
||||
if(wglGetExtensionsStringARB)
|
||||
{
|
||||
winsys_extensions = wglGetExtensionsStringARB(wglGetCurrentDC());
|
||||
winsysExtsLen = (S32)strlen(winsys_extensions);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Add 2 bytes, one for padding space, one for terminating NULL
|
||||
gGLHExts.mSysExts = (char*)malloc(sysExtsLen + winsysExtsLen + 3);
|
||||
CHECK_MEMORY(gGLHExts.mSysExts);
|
||||
strcpy(gGLHExts.mSysExts, extensions);
|
||||
gGLHExts.mSysExts[sysExtsLen] = ' ';
|
||||
gGLHExts.mSysExts[sysExtsLen + 1] = 0;
|
||||
if (winsysExtsLen)
|
||||
{
|
||||
strcat(gGLHExts.mSysExts, winsys_extensions);
|
||||
}
|
||||
gGLHExts.mSysExts[sysExtsLen + 1 + winsysExtsLen] = ' ';
|
||||
gGLHExts.mSysExts[sysExtsLen + 1 + winsysExtsLen + 1] = 0;
|
||||
}
|
||||
|
||||
if (NULL == origReqExts)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
reqExts = strdup(origReqExts);
|
||||
/*
|
||||
reqExtsLen = (S32)strlen(reqExts);
|
||||
if (NULL == gGLHExts.mUnsupportedExts)
|
||||
{
|
||||
gGLHExts.mUnsupportedExts = (char*)malloc(reqExtsLen + 1);
|
||||
}
|
||||
else if (reqExtsLen > strlen(gGLHExts.mUnsupportedExts))
|
||||
{
|
||||
gGLHExts.mUnsupportedExts = (char*)realloc(gGLHExts.mUnsupportedExts, reqExtsLen + 1);
|
||||
}
|
||||
CHECK_MEMORY(gGLHExts.mUnsupportedExts);
|
||||
*gGLHExts.mUnsupportedExts = 0;
|
||||
*/
|
||||
|
||||
// Parse requested extension list
|
||||
for (reqExt = reqExts;
|
||||
(reqExt = (char*)EatWhiteSpace(reqExt)) && *reqExt;
|
||||
reqExt = (char*)EatNonWhiteSpace(reqExt))
|
||||
{
|
||||
char *extEnd = (char*)EatNonWhiteSpace(reqExt);
|
||||
char saveChar = *extEnd;
|
||||
*extEnd = (char)0;
|
||||
|
||||
if (!ExtensionExists(reqExt, gGLHExts.mSysExts) ||
|
||||
!glh_init_extension(reqExt)) {
|
||||
/*
|
||||
// add reqExt to end of unsupportedExts
|
||||
strcat(gGLHExts.mUnsupportedExts, reqExt);
|
||||
strcat(gGLHExts.mUnsupportedExts, " ");
|
||||
*/
|
||||
success = FALSE;
|
||||
}
|
||||
*extEnd = saveChar;
|
||||
}
|
||||
free(reqExts);
|
||||
return success;
|
||||
}
|
||||
|
||||
const char* glh_get_unsupported_extensions()
|
||||
{
|
||||
return "";
|
||||
// return (const char*)gGLHExts.mUnsupportedExts;
|
||||
}
|
||||
|
||||
#else
|
||||
int glh_init_extensions(const char *origReqExts);
|
||||
const char* glh_get_unsupported_extensions();
|
||||
#endif /* GLH_EXT_SINGLE_FILE */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GLH_EXTENSIONS */
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -579,7 +579,7 @@ static void settings_modify()
|
|||
LLRenderTarget::sUseFBO = gSavedSettings.getBOOL("RenderDeferred");
|
||||
LLPipeline::sRenderTransparentWater = gSavedSettings.getBOOL("RenderTransparentWater");
|
||||
LLPipeline::sRenderBump = gSavedSettings.getBOOL("RenderObjectBump");
|
||||
LLPipeline::sRenderDeferred = LLPipeline::sRenderTransparentWater && LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred");
|
||||
LLPipeline::sRenderDeferred = LLPipeline::sRenderBump && gSavedSettings.getBOOL("RenderDeferred");
|
||||
LLVOSurfacePatch::sLODFactor = gSavedSettings.getF32("RenderTerrainLODFactor");
|
||||
LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor; //square lod factor to get exponential range of [1,4]
|
||||
gDebugGL = gSavedSettings.getBOOL("RenderDebugGL") || gDebugSession;
|
||||
|
|
|
|||
|
|
@ -137,6 +137,14 @@ void LLDrawPoolWater::endPostDeferredPass(S32 pass)
|
|||
void LLDrawPoolWater::renderDeferred(S32 pass)
|
||||
{
|
||||
LL_RECORD_BLOCK_TIME(FTM_RENDER_WATER);
|
||||
|
||||
if (!LLPipeline::sRenderTransparentWater)
|
||||
{
|
||||
// Will render opaque water without use of ALM
|
||||
render(pass);
|
||||
return;
|
||||
}
|
||||
|
||||
deferred_render = TRUE;
|
||||
shade();
|
||||
deferred_render = FALSE;
|
||||
|
|
@ -340,6 +348,11 @@ void LLDrawPoolWater::renderOpaqueLegacyWater()
|
|||
LL_PROFILE_ZONE_SCOPED;
|
||||
LLVOSky *voskyp = gSky.mVOSkyp;
|
||||
|
||||
if (voskyp == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLGLSLShader* shader = NULL;
|
||||
if (LLGLSLShader::sNoFixedFunction)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1198,11 +1198,9 @@ void LLFloaterPreference::refreshEnabledState()
|
|||
|
||||
//Deferred/SSAO/Shadows
|
||||
BOOL bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump") && gSavedSettings.getBOOL("RenderObjectBump");
|
||||
BOOL transparent_water = LLFeatureManager::getInstance()->isFeatureAvailable("RenderTransparentWater") && gSavedSettings.getBOOL("RenderTransparentWater");
|
||||
BOOL shaders = gSavedSettings.getBOOL("WindLightUseAtmosShaders");
|
||||
BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
|
||||
bumpshiny &&
|
||||
transparent_water &&
|
||||
shaders &&
|
||||
gGLManager.mHasFramebufferObject &&
|
||||
gSavedSettings.getBOOL("RenderAvatarVP") &&
|
||||
|
|
@ -1226,9 +1224,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
|
|||
ctrl_reflections->setEnabled(reflections);
|
||||
reflections_text->setEnabled(reflections);
|
||||
|
||||
// Transparent Water
|
||||
LLCheckBoxCtrl* transparent_water_ctrl = getChild<LLCheckBoxCtrl>("TransparentWater");
|
||||
|
||||
// Bump & Shiny
|
||||
LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
|
||||
bool bumpshiny = gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
|
||||
|
|
@ -1279,7 +1274,6 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
|
|||
|
||||
BOOL enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
|
||||
((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? TRUE : FALSE) &&
|
||||
((transparent_water_ctrl && transparent_water_ctrl->get()) ? TRUE : FALSE) &&
|
||||
gGLManager.mHasFramebufferObject &&
|
||||
gSavedSettings.getBOOL("RenderAvatarVP") &&
|
||||
(ctrl_wind_light->get()) ? TRUE : FALSE;
|
||||
|
|
|
|||
|
|
@ -187,7 +187,6 @@ static bool handleRenderPerfTestChanged(const LLSD& newvalue)
|
|||
|
||||
bool handleRenderTransparentWaterChanged(const LLSD& newvalue)
|
||||
{
|
||||
LLRenderTarget::sUseFBO = newvalue.asBoolean();
|
||||
if (gPipeline.isInit())
|
||||
{
|
||||
gPipeline.updateRenderTransparentWater();
|
||||
|
|
@ -243,7 +242,9 @@ static bool handleAnisotropicChanged(const LLSD& newvalue)
|
|||
|
||||
static bool handleVSyncChanged(const LLSD& newvalue)
|
||||
{
|
||||
#if LL_WINDOWS
|
||||
gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean());
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ void LLViewerShaderMgr::setShaders()
|
|||
initAttribsAndUniforms();
|
||||
gPipeline.releaseGLBuffers();
|
||||
|
||||
LLPipeline::sWaterReflections = gGLManager.mHasCubeMap;
|
||||
LLPipeline::sWaterReflections = gGLManager.mHasCubeMap && LLPipeline::sRenderTransparentWater;
|
||||
LLPipeline::sRenderGlow = gSavedSettings.getBOOL("RenderGlow");
|
||||
LLPipeline::updateRenderDeferred();
|
||||
|
||||
|
|
|
|||
|
|
@ -183,8 +183,9 @@ SimMeasurement<F64Kilobytes > SIM_UNACKED_BYTES("simtotalunackedbytes", "", LL_S
|
|||
SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM("physicsmemoryallocated", "", LL_SIM_STAT_SIMPHYSICSMEMORY);
|
||||
|
||||
LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER("frametimejitter", "Average delta between successive frame times"),
|
||||
FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"),
|
||||
SIM_PING("simpingstat");
|
||||
FRAMETIME_SLEW("frametimeslew", "Average delta between frame time and mean"),
|
||||
FRAMETIME("frametime", "Measured frame time"),
|
||||
SIM_PING("simpingstat");
|
||||
|
||||
LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP("agentpositionsnap", "agent position corrections");
|
||||
|
||||
|
|
@ -261,8 +262,11 @@ void LLViewerStats::updateFrameStats(const F64Seconds time_diff)
|
|||
// new "stutter" meter
|
||||
add(LLStatViewer::FRAMETIME_DOUBLED, time_diff >= 2.0 * mLastTimeDiff ? 1 : 0);
|
||||
|
||||
sample(LLStatViewer::FRAMETIME, time_diff);
|
||||
|
||||
// old stats that were never really used
|
||||
sample(LLStatViewer::FRAMETIME_JITTER, F64Milliseconds (mLastTimeDiff - time_diff));
|
||||
F64Seconds jit = (F64Seconds) std::fabs((mLastTimeDiff - time_diff));
|
||||
sample(LLStatViewer::FRAMETIME_JITTER, jit);
|
||||
|
||||
F32Seconds average_frametime = gRenderStartTime.getElapsedTimeF32() / (F32)gFrameCount;
|
||||
sample(LLStatViewer::FRAMETIME_SLEW, F64Milliseconds (average_frametime - time_diff));
|
||||
|
|
|
|||
|
|
@ -218,8 +218,8 @@ extern SimMeasurement<F64Megabytes > SIM_PHYSICS_MEM;
|
|||
|
||||
|
||||
extern LLTrace::SampleStatHandle<F64Milliseconds > FRAMETIME_JITTER,
|
||||
FRAMETIME_SLEW,
|
||||
SIM_PING;
|
||||
FRAMETIME_SLEW,
|
||||
SIM_PING;
|
||||
|
||||
extern LLTrace::EventStatHandle<LLUnit<F64, LLUnits::Meters> > AGENT_POSITION_SNAP;
|
||||
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ const F32 MIN_HOVER_Z = -2.0;
|
|||
const F32 MIN_ATTACHMENT_COMPLEXITY = 0.f;
|
||||
const F32 DEFAULT_MAX_ATTACHMENT_COMPLEXITY = 1.0e6f;
|
||||
|
||||
const F32 FIRST_APPEARANCE_CLOUD_MIN_DELAY = 3.f; // seconds
|
||||
const F32 FIRST_APPEARANCE_CLOUD_MAX_DELAY = 45.f;
|
||||
|
||||
using namespace LLAvatarAppearanceDefines;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
@ -667,6 +670,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||
mVisuallyMuteSetting(AV_RENDER_NORMALLY),
|
||||
mMutedAVColor(LLColor4::white /* used for "uninitialize" */),
|
||||
mFirstFullyVisible(TRUE),
|
||||
mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY),
|
||||
mFullyLoaded(FALSE),
|
||||
mPreviousFullyLoaded(FALSE),
|
||||
mFullyLoadedInitialized(FALSE),
|
||||
|
|
@ -741,7 +745,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
|
|||
|
||||
mCurrentGesticulationLevel = 0;
|
||||
|
||||
|
||||
mFirstSeenTimer.reset();
|
||||
mRuthTimer.reset();
|
||||
mRuthDebugTimer.reset();
|
||||
mDebugExistenceTimer.reset();
|
||||
|
|
@ -8126,16 +8130,35 @@ void LLVOAvatar::updateRuthTimer(bool loading)
|
|||
BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
|
||||
{
|
||||
// We wait a little bit before giving the 'all clear', to let things to
|
||||
// settle down (models to snap into place, textures to get first packets)
|
||||
// settle down (models to snap into place, textures to get first packets).
|
||||
// And if viewer isn't aware of some parts yet, this gives them a chance
|
||||
// to arrive.
|
||||
const F32 LOADED_DELAY = 1.f;
|
||||
const F32 FIRST_USE_DELAY = 3.f;
|
||||
|
||||
if (loading)
|
||||
mFullyLoadedTimer.reset();
|
||||
if (loading)
|
||||
{
|
||||
mFullyLoadedTimer.reset();
|
||||
}
|
||||
|
||||
if (mFirstFullyVisible)
|
||||
{
|
||||
mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > FIRST_USE_DELAY);
|
||||
if (!isSelf() && loading)
|
||||
{
|
||||
// Note that textures can causes 60s delay on thier own
|
||||
// so this delay might end up on top of textures' delay
|
||||
mFirstUseDelaySeconds = llclamp(
|
||||
mFirstSeenTimer.getElapsedTimeF32(),
|
||||
FIRST_APPEARANCE_CLOUD_MIN_DELAY,
|
||||
FIRST_APPEARANCE_CLOUD_MAX_DELAY);
|
||||
|
||||
if (shouldImpostor())
|
||||
{
|
||||
// Impostors are less of a priority,
|
||||
// let them stay cloud longer
|
||||
mFirstUseDelaySeconds *= 1.25;
|
||||
}
|
||||
}
|
||||
mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > mFirstUseDelaySeconds);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -376,6 +376,9 @@ protected:
|
|||
|
||||
private:
|
||||
BOOL mFirstFullyVisible;
|
||||
F32 mFirstUseDelaySeconds;
|
||||
LLFrameTimer mFirstSeenTimer;
|
||||
|
||||
BOOL mFullyLoaded;
|
||||
BOOL mPreviousFullyLoaded;
|
||||
BOOL mFullyLoadedInitialized;
|
||||
|
|
|
|||
|
|
@ -1047,7 +1047,6 @@ void LLPipeline::updateRenderDeferred()
|
|||
RenderDeferred &&
|
||||
LLRenderTarget::sUseFBO &&
|
||||
LLPipeline::sRenderBump &&
|
||||
LLPipeline::sRenderTransparentWater &&
|
||||
RenderAvatarVP &&
|
||||
WindLightUseAtmosShaders &&
|
||||
(bool) LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred");
|
||||
|
|
@ -9203,7 +9202,13 @@ inline float sgn(float a)
|
|||
void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED;
|
||||
if (LLPipeline::sWaterReflections && assertInitialized() && LLDrawPoolWater::sNeedsReflectionUpdate)
|
||||
|
||||
if (!assertInitialized())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (LLPipeline::sWaterReflections && LLDrawPoolWater::sNeedsReflectionUpdate)
|
||||
{
|
||||
bool skip_avatar_update = false;
|
||||
if (!isAgentAvatarValid() || gAgentCamera.getCameraAnimating() || gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK || !LLVOAvatar::sVisibleInFirstPerson)
|
||||
|
|
@ -9423,19 +9428,13 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
|||
|
||||
//clip out geometry on the same side of water as the camera w/ enough margin to not include the water geo itself,
|
||||
// but not so much as to clip out parts of avatars that should be seen under the water in the distortion map
|
||||
LLPlane plane(-pnorm, water_dist);
|
||||
LLPlane plane(-pnorm, camera_is_underwater ? -water_height : water_dist);
|
||||
LLGLUserClipPlane clip_plane(plane, saved_modelview, saved_projection);
|
||||
|
||||
gGL.setColorMask(true, true);
|
||||
mWaterDis.clear();
|
||||
gGL.setColorMask(true, false);
|
||||
|
||||
// ignore clip plane if we're underwater and viewing distortion map of objects above waterline
|
||||
if (camera_is_underwater)
|
||||
{
|
||||
clip_plane.disable();
|
||||
}
|
||||
|
||||
if (reflection_detail >= WATER_REFLECT_NONE_WATER_TRANSPARENT)
|
||||
{
|
||||
updateCull(camera, mRefractedObjects, water_clip, &plane);
|
||||
|
|
@ -9488,6 +9487,29 @@ void LLPipeline::generateWaterReflection(LLCamera& camera_in)
|
|||
|
||||
LLViewerCamera::sCurCameraID = LLViewerCamera::CAMERA_WORLD;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Initial sky pass is still needed even if water reflection is not rendering
|
||||
bool camera_is_underwater = LLViewerCamera::getInstance()->cameraUnderWater();
|
||||
if (!camera_is_underwater)
|
||||
{
|
||||
gPipeline.pushRenderTypeMask();
|
||||
{
|
||||
gPipeline.andRenderTypeMask(
|
||||
LLPipeline::RENDER_TYPE_SKY,
|
||||
LLPipeline::RENDER_TYPE_WL_SKY,
|
||||
LLPipeline::END_RENDER_TYPES);
|
||||
|
||||
LLCamera camera = camera_in;
|
||||
camera.setFar(camera_in.getFar() * 0.75f);
|
||||
|
||||
updateCull(camera, mSky);
|
||||
stateSort(camera, mSky);
|
||||
renderGeom(camera, TRUE);
|
||||
}
|
||||
gPipeline.popRenderTypeMask();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
glh::matrix4f look(const LLVector3 pos, const LLVector3 dir, const LLVector3 up)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,25 @@
|
|||
decimal_digits="1"
|
||||
show_bar="true"
|
||||
show_history="true"/>
|
||||
<stat_bar name="frame_mean"
|
||||
label="frame (mean)"
|
||||
unit_label="ms"
|
||||
stat="frametime"
|
||||
decimal_digits="1"
|
||||
show_bar="false"
|
||||
show_history="false"/>
|
||||
<stat_bar name="frame_median"
|
||||
label="frame (median)"
|
||||
unit_label="ms"
|
||||
stat="frametime"
|
||||
show_median="true"
|
||||
decimal_digits="1"
|
||||
show_bar="false"
|
||||
show_history="false"/>
|
||||
<stat_bar name="framet_jitter"
|
||||
label="jitter"
|
||||
decimal_digits="1"
|
||||
stat="frametimejitter"/>
|
||||
<stat_bar name="bandwidth"
|
||||
label="UDP Data Received"
|
||||
stat="activemessagedatareceived"
|
||||
|
|
|
|||
Loading…
Reference in New Issue