Merge branch 'DRTVWR-546' of https://bitbucket.org/lindenlab/viewer
commit
410704b5c6
|
|
@ -725,20 +725,23 @@ bool LLGLManager::initGL()
|
|||
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units);
|
||||
mNumTextureImageUnits = llmin(num_tex_image_units, 32);
|
||||
|
||||
if (LLRender::sGLCoreProfile)
|
||||
{
|
||||
mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS);
|
||||
}
|
||||
else if (mHasMultitexture)
|
||||
{
|
||||
GLint num_tex_units;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units);
|
||||
mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS);
|
||||
if (mIsIntel)
|
||||
{
|
||||
mNumTextureUnits = llmin(mNumTextureUnits, 2);
|
||||
}
|
||||
}
|
||||
if (mHasMultitexture)
|
||||
{
|
||||
if (LLRender::sGLCoreProfile)
|
||||
{
|
||||
mNumTextureUnits = llmin(mNumTextureImageUnits, MAX_GL_TEXTURE_UNITS);
|
||||
}
|
||||
else
|
||||
{
|
||||
GLint num_tex_units;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &num_tex_units);
|
||||
mNumTextureUnits = llmin(num_tex_units, (GLint)MAX_GL_TEXTURE_UNITS);
|
||||
if (mIsIntel)
|
||||
{
|
||||
mNumTextureUnits = llmin(mNumTextureUnits, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
mHasRequirements = FALSE;
|
||||
|
|
|
|||
|
|
@ -910,6 +910,10 @@ void LLWindowWin32::close()
|
|||
}
|
||||
|
||||
});
|
||||
// Window thread might be waiting for a getMessage(), give it
|
||||
// a push to enshure it will process destroy_window_handler
|
||||
kickWindowThread();
|
||||
|
||||
// Even though the above lambda might not yet have run, we've already
|
||||
// bound mWindowHandle into it by value, which should suffice for the
|
||||
// operations we're asking. That's the last time WE should touch it.
|
||||
|
|
@ -1254,9 +1258,9 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO
|
|||
if (!DescribePixelFormat(mhDC, pixel_format, sizeof(PIXELFORMATDESCRIPTOR),
|
||||
&pfd))
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"),
|
||||
mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1293,42 +1297,42 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO
|
|||
|
||||
if (pfd.cColorBits < 32)
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"),
|
||||
mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (pfd.cAlphaBits < 8)
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBAlpha"),
|
||||
mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!SetPixelFormat(mhDC, pixel_format, &pfd))
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"),
|
||||
mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (!(mhRC = SafeCreateContext(mhDC)))
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBGLContextErr"),
|
||||
mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!wglMakeCurrent(mhDC, mhRC))
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBGLContextActErr"),
|
||||
mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1535,16 +1539,16 @@ const S32 max_format = (S32)num_formats - 1;
|
|||
|
||||
if (!mhDC)
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBDevContextErr"), mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!SetPixelFormat(mhDC, pixel_format, &pfd))
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"),
|
||||
mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1580,8 +1584,8 @@ const S32 max_format = (S32)num_formats - 1;
|
|||
if (!DescribePixelFormat(mhDC, pixel_format, sizeof(PIXELFORMATDESCRIPTOR),
|
||||
&pfd))
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBPixelFmtDescErr"), mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1593,15 +1597,15 @@ const S32 max_format = (S32)num_formats - 1;
|
|||
// make sure we have 32 bits per pixel
|
||||
if (pfd.cColorBits < 32 || GetDeviceCaps(mhDC, BITSPIXEL) < 32)
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBTrueColorWindow"), mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (pfd.cAlphaBits < 8)
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBAlpha"), mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
@ -1617,15 +1621,15 @@ const S32 max_format = (S32)num_formats - 1;
|
|||
|
||||
if (!wglMakeCurrent(mhDC, mhRC))
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBGLContextActErr"), mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (!gGLManager.initGL())
|
||||
{
|
||||
close();
|
||||
OSMessageBox(mCallbacks->translateString("MBVideoDrvErr"), mCallbacks->translateString("MBError"), OSMB_OK);
|
||||
close();
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -10892,9 +10892,9 @@ Change of this parameter will affect the layout of buttons in notification toast
|
|||
<string>Color4</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>1.0</real>
|
||||
<real>0.33</real>
|
||||
<real>0.33</real>
|
||||
<real>0.33</real>
|
||||
<real>1.0</real>
|
||||
</array>
|
||||
</map>
|
||||
|
|
|
|||
|
|
@ -52,30 +52,6 @@ float calcDirectionalLight(vec3 n, vec3 l)
|
|||
return a;
|
||||
}
|
||||
|
||||
|
||||
float calcLocalLight(vec3 v, vec3 n, vec4 lp, vec3 ln, float la, float is_pointlight)
|
||||
{
|
||||
//get light vector
|
||||
vec3 lv = lp.xyz-v;
|
||||
|
||||
//get distance
|
||||
float d = length(lv);
|
||||
|
||||
//normalize light vector
|
||||
lv *= 1.0/d;
|
||||
|
||||
//distance attenuation
|
||||
float da = clamp(1.0/(la * d), 0.0, 1.0);
|
||||
|
||||
// spotlight coefficient.
|
||||
float spot = max(dot(-ln, lv), is_pointlight);
|
||||
da *= spot*spot; // GL_SPOT_EXPONENT=2
|
||||
|
||||
//angular attenuation
|
||||
da *= calcDirectionalLight(n, lv);
|
||||
|
||||
return da;
|
||||
}
|
||||
//====================================================================================================
|
||||
|
||||
|
||||
|
|
@ -92,7 +68,8 @@ void main()
|
|||
|
||||
// Collect normal lights (need to be divided by two, as we later multiply by 2)
|
||||
col.rgb += light_diffuse[1].rgb * calcDirectionalLight(norm, light_position[1].xyz);
|
||||
col.rgb += light_diffuse[2].rgb*calcLocalLight(pos.xyz, norm, light_position[2], light_direction[2], light_attenuation[2].x, light_attenuation[2].z);
|
||||
col.rgb += light_diffuse[3].rgb*calcLocalLight(pos.xyz, norm, light_position[3], light_direction[3], light_attenuation[3].x, light_attenuation[3].z);
|
||||
col.rgb += light_diffuse[2].rgb * calcDirectionalLight(norm, light_position[2].xyz);
|
||||
col.rgb += light_diffuse[3].rgb * calcDirectionalLight(norm, light_position[3].xyz);
|
||||
|
||||
vertex_color = col*color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -718,6 +718,7 @@ LLAppViewer::LLAppViewer()
|
|||
mLogoutMarkerFile(),
|
||||
mReportedCrash(false),
|
||||
mNumSessions(0),
|
||||
mGeneralThreadPool(nullptr),
|
||||
mPurgeCache(false),
|
||||
mPurgeCacheOnExit(false),
|
||||
mPurgeUserDataOnExit(false),
|
||||
|
|
@ -1156,13 +1157,7 @@ bool LLAppViewer::init()
|
|||
// If we don't have the right GL requirements, exit.
|
||||
if (!gGLManager.mHasRequirements)
|
||||
{
|
||||
// can't use an alert here since we're exiting and
|
||||
// all hell breaks lose.
|
||||
LLUIString details = LLNotifications::instance().getGlobalString("UnsupportedGLRequirements");
|
||||
OSMessageBox(
|
||||
details.getString(),
|
||||
LLStringUtil::null,
|
||||
OSMB_OK);
|
||||
// already handled with a MBVideoDrvErr
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2014,11 +2009,6 @@ void LLAppViewer::flushLFSIO()
|
|||
|
||||
bool LLAppViewer::cleanup()
|
||||
{
|
||||
// Since we don't know what functions are going to be queued by
|
||||
// onCleanup(), we have to assume they might rely on some of the things
|
||||
// we're about to destroy below. Run them first.
|
||||
mOnCleanup();
|
||||
|
||||
LLAtmosphere::cleanupClass();
|
||||
|
||||
//ditch LLVOAvatarSelf instance
|
||||
|
|
@ -2465,6 +2455,10 @@ bool LLAppViewer::cleanup()
|
|||
sTextureCache->shutdown();
|
||||
sImageDecodeThread->shutdown();
|
||||
sPurgeDiskCacheThread->shutdown();
|
||||
if (mGeneralThreadPool)
|
||||
{
|
||||
mGeneralThreadPool->close();
|
||||
}
|
||||
|
||||
sTextureFetch->shutDownTextureCacheThread() ;
|
||||
sTextureFetch->shutDownImageDecodeThread() ;
|
||||
|
|
@ -2489,6 +2483,8 @@ bool LLAppViewer::cleanup()
|
|||
mFastTimerLogThread = NULL;
|
||||
delete sPurgeDiskCacheThread;
|
||||
sPurgeDiskCacheThread = NULL;
|
||||
delete mGeneralThreadPool;
|
||||
mGeneralThreadPool = NULL;
|
||||
|
||||
if (LLFastTimerView::sAnalyzePerformance)
|
||||
{
|
||||
|
|
@ -2554,6 +2550,7 @@ bool LLAppViewer::cleanup()
|
|||
LLEnvironment::deleteSingleton();
|
||||
LLSelectMgr::deleteSingleton();
|
||||
LLViewerEventRecorder::deleteSingleton();
|
||||
LLWorld::deleteSingleton();
|
||||
|
||||
// It's not at first obvious where, in this long sequence, a generic cleanup
|
||||
// call OUGHT to go. So let's say this: as we migrate cleanup from
|
||||
|
|
@ -2574,6 +2571,24 @@ bool LLAppViewer::cleanup()
|
|||
return true;
|
||||
}
|
||||
|
||||
void LLAppViewer::initGeneralThread()
|
||||
{
|
||||
if (mGeneralThreadPool)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
LLSD poolSizes{ gSavedSettings.getLLSD("ThreadPoolSizes") };
|
||||
LLSD sizeSpec{ poolSizes["General"] };
|
||||
LLSD::Integer poolSize{ sizeSpec.isInteger() ? sizeSpec.asInteger() : 3 };
|
||||
LL_DEBUGS("ThreadPool") << "Instantiating General pool with "
|
||||
<< poolSize << " threads" << LL_ENDL;
|
||||
// We don't want anyone, especially the main thread, to have to block
|
||||
// due to this ThreadPool being full.
|
||||
mGeneralThreadPool = new LL::ThreadPool("General", poolSize, 1024 * 1024);
|
||||
mGeneralThreadPool->start();
|
||||
}
|
||||
|
||||
bool LLAppViewer::initThreads()
|
||||
{
|
||||
static const bool enable_threads = true;
|
||||
|
|
@ -6339,7 +6354,7 @@ void LLAppViewer::disconnectViewer()
|
|||
// Now we just ask the LLWorld singleton to cleanly shut down.
|
||||
if(LLWorld::instanceExists())
|
||||
{
|
||||
LLWorld::getInstance()->destroyClass();
|
||||
LLWorld::getInstance()->resetClass();
|
||||
}
|
||||
LLVOCache::deleteSingleton();
|
||||
|
||||
|
|
|
|||
|
|
@ -63,6 +63,11 @@ class LLViewerJoystick;
|
|||
class LLPurgeDiskCacheThread;
|
||||
class LLViewerRegion;
|
||||
|
||||
namespace LL
|
||||
{
|
||||
class ThreadPool;
|
||||
}
|
||||
|
||||
extern LLTrace::BlockTimerStatHandle FTM_FRAME;
|
||||
|
||||
class LLAppViewer : public LLApp
|
||||
|
|
@ -213,13 +218,7 @@ public:
|
|||
|
||||
void addOnIdleCallback(const boost::function<void()>& cb); // add a callback to fire (once) when idle
|
||||
|
||||
typedef boost::signals2::signal<void()> cleanup_signal_t;
|
||||
cleanup_signal_t mOnCleanup;
|
||||
boost::signals2::connection onCleanup(const cleanup_signal_t::slot_type& cb)
|
||||
{
|
||||
return mOnCleanup.connect(cb);
|
||||
}
|
||||
|
||||
void initGeneralThread();
|
||||
void purgeUserDataOnExit() { mPurgeUserDataOnExit = true; }
|
||||
void purgeCache(); // Clear the local cache.
|
||||
void purgeCacheImmediate(); //clear local cache immediately.
|
||||
|
|
@ -316,6 +315,7 @@ private:
|
|||
static LLImageDecodeThread* sImageDecodeThread;
|
||||
static LLTextureFetch* sTextureFetch;
|
||||
static LLPurgeDiskCacheThread* sPurgeDiskCacheThread;
|
||||
LL::ThreadPool* mGeneralThreadPool;
|
||||
|
||||
S32 mNumSessions;
|
||||
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ S32 LLAvatarTracker::addBuddyList(const LLAvatarTracker::buddy_map_t& buds)
|
|||
LLAvatarName av_name;
|
||||
LLAvatarNameCache::get(agent_id, &av_name);
|
||||
|
||||
addChangedMask(LLFriendObserver::ADD, agent_id); // <FS:Ansariel> Re-added because we need it for the legacy contact list
|
||||
addChangedMask(LLFriendObserver::ADD, agent_id);
|
||||
LL_DEBUGS() << "Added buddy " << agent_id
|
||||
<< ", " << (mBuddyInfo[agent_id]->isOnline() ? "Online" : "Offline")
|
||||
<< ", TO: " << mBuddyInfo[agent_id]->getRightsGrantedTo()
|
||||
|
|
|
|||
|
|
@ -765,6 +765,16 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
|
|||
LLGLEnableFunc stencil_test(GL_STENCIL_TEST, params.mSelected, &LLGLCommonFunc::selected_stencil_test);
|
||||
|
||||
gGL.blendFunc((LLRender::eBlendFactor) params.mBlendFuncSrc, (LLRender::eBlendFactor) params.mBlendFuncDst, mAlphaSFactor, mAlphaDFactor);
|
||||
|
||||
bool reset_minimum_alpha = false;
|
||||
if (!LLPipeline::sImpostorRender &&
|
||||
params.mBlendFuncDst != LLRender::BF_SOURCE_ALPHA &&
|
||||
params.mBlendFuncSrc != LLRender::BF_SOURCE_ALPHA)
|
||||
{ // this draw call has a custom blend function that may require rendering of "invisible" fragments
|
||||
current_shader->setMinimumAlpha(0.f);
|
||||
reset_minimum_alpha = true;
|
||||
}
|
||||
|
||||
U32 drawMask = mask;
|
||||
if (params.mFullbright)
|
||||
{
|
||||
|
|
@ -777,6 +787,11 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged)
|
|||
|
||||
params.mVertexBuffer->setBufferFast(drawMask);
|
||||
params.mVertexBuffer->drawRangeFast(params.mDrawMode, params.mStart, params.mEnd, params.mCount, params.mOffset);
|
||||
|
||||
if (reset_minimum_alpha)
|
||||
{
|
||||
current_shader->setMinimumAlpha(MINIMUM_ALPHA);
|
||||
}
|
||||
}
|
||||
|
||||
// If this alpha mesh has glow, then draw it a second time to add the destination-alpha (=glow). Interleaving these state-changing calls is expensive, but glow must be drawn Z-sorted with alpha.
|
||||
|
|
|
|||
|
|
@ -630,8 +630,10 @@ void LLDrawPoolWater::renderWater()
|
|||
|
||||
shader->uniform3fv(LLShaderMgr::WATER_SPECULAR, 1, light_diffuse.mV);
|
||||
shader->uniform1f(LLShaderMgr::WATER_SPECULAR_EXP, light_exp);
|
||||
|
||||
shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR1, 1, pwater->getWave1Dir().mV);
|
||||
shader->uniform2fv(LLShaderMgr::WATER_WAVE_DIR2, 1, pwater->getWave2Dir().mV);
|
||||
|
||||
shader->uniform3fv(LLShaderMgr::WATER_LIGHT_DIR, 1, light_dir.mV);
|
||||
|
||||
shader->uniform3fv(LLShaderMgr::WATER_NORM_SCALE, 1, pwater->getNormalScale().mV);
|
||||
|
|
|
|||
|
|
@ -2476,14 +2476,35 @@ F32 LLFace::getTextureVirtualSize()
|
|||
|
||||
BOOL LLFace::calcPixelArea(F32& cos_angle_to_view_dir, F32& radius)
|
||||
{
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE
|
||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
|
||||
|
||||
//VECTORIZE THIS
|
||||
//get area of circle around face
|
||||
LLVector4a center;
|
||||
center.load3(getPositionAgent().mV);
|
||||
LLVector4a size;
|
||||
size.setSub(mExtents[1], mExtents[0]);
|
||||
|
||||
LLVector4a center;
|
||||
LLVector4a size;
|
||||
|
||||
|
||||
if (isState(LLFace::RIGGED))
|
||||
{
|
||||
//override with avatar bounding box
|
||||
LLVOAvatar* avatar = mVObjp->getAvatar();
|
||||
if (avatar)
|
||||
{
|
||||
center.load3(avatar->getPositionAgent().mV);
|
||||
const LLVector4a* exts = avatar->mDrawable->getSpatialExtents();
|
||||
size.setSub(exts[1], exts[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
center.load3(getPositionAgent().mV);
|
||||
size.setSub(mExtents[1], mExtents[0]);
|
||||
}
|
||||
size.mul(0.5f);
|
||||
|
||||
LLViewerCamera* camera = LLViewerCamera::getInstance();
|
||||
|
|
|
|||
|
|
@ -870,6 +870,7 @@ LLSpatialPartition::LLSpatialPartition(U32 data_mask, BOOL render_by_group, U32
|
|||
|
||||
LLSpatialPartition::~LLSpatialPartition()
|
||||
{
|
||||
cleanup();
|
||||
}
|
||||
|
||||
LLSpatialGroup *LLSpatialPartition::put(LLDrawable *drawablep, BOOL was_visible)
|
||||
|
|
|
|||
|
|
@ -2231,19 +2231,7 @@ bool idle_startup()
|
|||
display_startup();
|
||||
|
||||
// start up the ThreadPool we'll use for textures et al.
|
||||
{
|
||||
LLSD poolSizes{ gSavedSettings.getLLSD("ThreadPoolSizes") };
|
||||
LLSD sizeSpec{ poolSizes["General"] };
|
||||
LLSD::Integer poolSize{ sizeSpec.isInteger()? sizeSpec.asInteger() : 3 };
|
||||
LL_DEBUGS("ThreadPool") << "Instantiating General pool with "
|
||||
<< poolSize << " threads" << LL_ENDL;
|
||||
// We don't want anyone, especially the main thread, to have to block
|
||||
// due to this ThreadPool being full.
|
||||
auto pool = new LL::ThreadPool("General", poolSize, 1024*1024);
|
||||
pool->start();
|
||||
// Once we start shutting down, destroy this ThreadPool.
|
||||
LLAppViewer::instance()->onCleanup([pool](){ delete pool; });
|
||||
}
|
||||
LLAppViewer::instance()->initGeneralThread();
|
||||
|
||||
// Initialize global class data needed for surfaces (i.e. textures)
|
||||
LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL;
|
||||
|
|
@ -3793,7 +3781,7 @@ void reset_login()
|
|||
gAgentWearables.cleanup();
|
||||
gAgentCamera.cleanup();
|
||||
gAgent.cleanup();
|
||||
LLWorld::getInstance()->destroyClass();
|
||||
LLWorld::getInstance()->resetClass();
|
||||
|
||||
if ( gViewerWindow )
|
||||
{ // Hide menus and normal buttons
|
||||
|
|
|
|||
|
|
@ -1325,8 +1325,13 @@ LLViewerOctreePartition::LLViewerOctreePartition() :
|
|||
|
||||
LLViewerOctreePartition::~LLViewerOctreePartition()
|
||||
{
|
||||
delete mOctree;
|
||||
mOctree = NULL;
|
||||
cleanup();
|
||||
}
|
||||
|
||||
void LLViewerOctreePartition::cleanup()
|
||||
{
|
||||
delete mOctree;
|
||||
mOctree = nullptr;
|
||||
}
|
||||
|
||||
BOOL LLViewerOctreePartition::isOcclusionEnabled()
|
||||
|
|
@ -1334,6 +1339,7 @@ BOOL LLViewerOctreePartition::isOcclusionEnabled()
|
|||
return mOcclusionEnabled || LLPipeline::sUseOcclusion > 2;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------
|
||||
//class LLViewerOctreeCull definitions
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -352,6 +352,10 @@ public:
|
|||
virtual S32 cull(LLCamera &camera, bool do_occlusion) = 0;
|
||||
BOOL isOcclusionEnabled();
|
||||
|
||||
protected:
|
||||
// MUST call from destructor of any derived classes (SL-17276)
|
||||
void cleanup();
|
||||
|
||||
public:
|
||||
U32 mPartitionType;
|
||||
U32 mDrawableType;
|
||||
|
|
|
|||
|
|
@ -433,6 +433,13 @@ void LLViewerShaderMgr::setShaders()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!gGLManager.mHasRequirements)
|
||||
{
|
||||
// Viewer will show 'hardware requirements' warning later
|
||||
LL_INFOS("ShaderLoading") << "Not supported hardware/software" << LL_ENDL;
|
||||
return;
|
||||
}
|
||||
|
||||
static LLCachedControl<U32> max_texture_index(gSavedSettings, "RenderMaxTextureIndex", 16);
|
||||
LLGLSLShader::sIndexedTextureChannels = llmax(llmin(gGLManager.mNumTextureImageUnits, (S32) max_texture_index), 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -2019,12 +2019,6 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
|||
gSavedSettings.getBOOL("RenderDeferred") ? 0 : gSavedSettings.getU32("RenderFSAASamples"), //don't use window level anti-aliasing if FBOs are enabled
|
||||
useLegacyCursors); // <FS:LO> Legacy cursor setting from main program
|
||||
|
||||
if (!LLViewerShaderMgr::sInitialized)
|
||||
{ //immediately initialize shaders
|
||||
LLViewerShaderMgr::sInitialized = TRUE;
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
}
|
||||
|
||||
if (NULL == mWindow)
|
||||
{
|
||||
LLSplashScreen::update(LLTrans::getString("StartupRequireDriverUpdate"));
|
||||
|
|
@ -2043,6 +2037,12 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
|||
#endif
|
||||
LLAppViewer::instance()->fastQuit(1);
|
||||
}
|
||||
else if (!LLViewerShaderMgr::sInitialized)
|
||||
{
|
||||
//immediately initialize shaders
|
||||
LLViewerShaderMgr::sInitialized = TRUE;
|
||||
LLViewerShaderMgr::instance()->setShaders();
|
||||
}
|
||||
|
||||
if (!LLAppViewer::instance()->restoreErrorTrap())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3021,22 +3021,22 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
|
|||
attachment_iter != attachment->mAttachedObjects.end();
|
||||
++attachment_iter)
|
||||
{
|
||||
LLViewerObject* attached_object = attachment_iter->get();
|
||||
BOOL visibleAttachment = visible || (attached_object && attached_object->mDrawable.notNull() &&
|
||||
!(attached_object->mDrawable->getSpatialBridge() &&
|
||||
attached_object->mDrawable->getSpatialBridge()->getRadius() < 2.0f));
|
||||
|
||||
if (visibleAttachment
|
||||
&& attached_object
|
||||
&& !attached_object->isDead()
|
||||
&& attachment->getValid()
|
||||
&& attached_object->mDrawable.notNull())
|
||||
{
|
||||
LLViewerObject* attached_object = attachment_iter->get();
|
||||
if (!attached_object
|
||||
|| attached_object->isDead()
|
||||
|| !attachment->getValid()
|
||||
|| attached_object->mDrawable.isNull())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
LLSpatialBridge* bridge = attached_object->mDrawable->getSpatialBridge();
|
||||
|
||||
if (visible || !(bridge && bridge->getRadius() < 2.0f))
|
||||
{
|
||||
//override rigged attachments' octree spatial extents with this avatar's bounding box
|
||||
LLSpatialBridge* bridge = attached_object->mDrawable->getSpatialBridge();
|
||||
bool rigged = false;
|
||||
if (bridge && !bridge->isDead())
|
||||
if (bridge)
|
||||
{
|
||||
//transform avatar bounding box into attachment's coordinate frame
|
||||
LLVector4a extents[2];
|
||||
|
|
@ -3052,8 +3052,12 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
|
|||
|
||||
attached_object->mDrawable->makeActive();
|
||||
attached_object->mDrawable->updateXform(TRUE);
|
||||
|
||||
if (bridge && !bridge->isDead())
|
||||
|
||||
// override_bbox calls movePartition() and getSpatialPartition(),
|
||||
// so bridge might no longer be valid, get it again.
|
||||
// ex: animesh stops being an animesh
|
||||
bridge = attached_object->mDrawable->getSpatialBridge();
|
||||
if (bridge)
|
||||
{
|
||||
if (!rigged)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -639,6 +639,13 @@ LLVOCachePartition::LLVOCachePartition(LLViewerRegion* regionp)
|
|||
new LLVOCacheGroup(mOctree, this);
|
||||
}
|
||||
|
||||
LLVOCachePartition::~LLVOCachePartition()
|
||||
{
|
||||
// SL-17276 make sure to do base class cleanup while this instance
|
||||
// can still be treated as an LLVOCachePartition
|
||||
cleanup();
|
||||
}
|
||||
|
||||
bool LLVOCachePartition::addEntry(LLViewerOctreeEntry* entry)
|
||||
{
|
||||
llassert(entry->hasVOCacheEntry());
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ class LLVOCachePartition : public LLViewerOctreePartition
|
|||
{
|
||||
public:
|
||||
LLVOCachePartition(LLViewerRegion* regionp);
|
||||
virtual ~LLVOCachePartition();
|
||||
|
||||
bool addEntry(LLViewerOctreeEntry* entry);
|
||||
void removeEntry(LLViewerOctreeEntry* entry);
|
||||
|
|
|
|||
|
|
@ -6262,7 +6262,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
|
|||
|
||||
// for rigged set, add weights and disable alpha sorting (rigged items use depth buffer)
|
||||
extra_mask |= LLVertexBuffer::MAP_WEIGHT4;
|
||||
alpha_sort = FALSE;
|
||||
rigged = TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -6529,8 +6528,11 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
|
|||
|
||||
if (rigged)
|
||||
{
|
||||
//sort faces by things that break batches, including avatar and mesh id
|
||||
std::sort(faces, faces + face_count, CompareBatchBreakerRigged());
|
||||
if (!distance_sort) // <--- alpha "sort" rigged faces by maintaining original draw order
|
||||
{
|
||||
//sort faces by things that break batches, including avatar and mesh id
|
||||
std::sort(faces, faces + face_count, CompareBatchBreakerRigged());
|
||||
}
|
||||
}
|
||||
else if (!distance_sort)
|
||||
{
|
||||
|
|
@ -6565,11 +6567,6 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
|
|||
texture_index_channels = gDeferredAlphaProgram.mFeatures.mIndexedTextureChannels;
|
||||
}
|
||||
|
||||
if (rigged)
|
||||
{ //don't attempt distance sorting on rigged meshes, not likely to succeed and breaks batches
|
||||
distance_sort = FALSE;
|
||||
}
|
||||
|
||||
if (distance_sort)
|
||||
{
|
||||
buffer_index = -1;
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ LLWorld::LLWorld() :
|
|||
}
|
||||
|
||||
|
||||
void LLWorld::destroyClass()
|
||||
void LLWorld::resetClass()
|
||||
{
|
||||
mHoleWaterObjects.clear();
|
||||
gObjectList.destroy();
|
||||
|
|
@ -149,7 +149,6 @@ void LLWorld::destroyClass()
|
|||
LLDrawable::incrementVisible();
|
||||
|
||||
LLSceneMonitor::deleteSingleton();
|
||||
LLWorld::deleteSingleton();
|
||||
}
|
||||
// <AW: opensim-limits>
|
||||
void LLWorld::refreshLimits()
|
||||
|
|
|
|||
|
|
@ -64,7 +64,9 @@ class LLWorld : public LLSimpleton<LLWorld>
|
|||
public:
|
||||
LLWorld();
|
||||
|
||||
void destroyClass();
|
||||
// Clear any objects, regions
|
||||
// Prepares class to be reused or destroyed
|
||||
void resetClass();
|
||||
|
||||
void refreshLimits();// <AW: opensim-limits>
|
||||
// <FS:CR> Aurora Sim
|
||||
|
|
|
|||
|
|
@ -10336,18 +10336,6 @@ Do you wish to continue?
|
|||
yestext="OK"/>
|
||||
</notification>
|
||||
|
||||
<global name="UnsupportedShaderRequirements">
|
||||
You do not appear to meet the hardware requirements for [APP_NAME]. [APP_NAME] requires OpenGL 2.0 or later shader support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system.
|
||||
|
||||
If you continue to have problems, please visit the [SUPPORT_SITE].
|
||||
</global>
|
||||
|
||||
<global name="UnsupportedGLRequirements">
|
||||
You do not appear to have the proper hardware requirements for [APP_NAME]. [APP_NAME] requires an OpenGL graphics card that has multitexture support. If this is the case, you may want to make sure that you have the latest drivers for your graphics card, and service packs and patches for your operating system.
|
||||
|
||||
If you continue to have problems, please visit the [SUPPORT_SITE].
|
||||
</global>
|
||||
|
||||
<global name="UnsupportedIntelDriver">
|
||||
The installed Intel graphics driver for [GPUNAME], version [VERSION], is significantly out of date and is known to cause excessive rates of program crashes. You are strongly advised to update to a current Intel driver.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue