983 add debug setting to control the maximum download resolution (#986)
* Create RenderMaxTextureResolution.md * #983 Add RenderMaxTextureResolution setting. Incidental crash fix.master
parent
329996de50
commit
ef75523555
|
|
@ -0,0 +1,16 @@
|
||||||
|
The Setting RenderMaxTextureResolution controls the maximum resolution of non-boosted textures as displayed by the viewer.
|
||||||
|
|
||||||
|
Valid values are 512-2048 (clamped in C++).
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
Test Asset available on beta grid:
|
||||||
|
Object: 'Damaged Helmet', AssetID 0623e759-11b5-746c-a75e-7ba1caa6eb0e
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -9405,6 +9405,17 @@
|
||||||
<string>U32</string>
|
<string>U32</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>16</integer>
|
<integer>16</integer>
|
||||||
|
</map>
|
||||||
|
<key>RenderMaxTextureResolution</key>
|
||||||
|
<map>
|
||||||
|
<key>Comment</key>
|
||||||
|
<string>Maximum texture resolution to download for non-boosted textures.</string>
|
||||||
|
<key>Persist</key>
|
||||||
|
<integer>1</integer>
|
||||||
|
<key>Type</key>
|
||||||
|
<string>U32</string>
|
||||||
|
<key>Value</key>
|
||||||
|
<integer>2048</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>RenderDebugTextureBind</key>
|
<key>RenderDebugTextureBind</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
|
||||||
|
|
@ -581,7 +581,7 @@ bool LLHeroProbeManager::registerViewerObject(LLVOVolume* drawablep)
|
||||||
|
|
||||||
void LLHeroProbeManager::unregisterViewerObject(LLVOVolume* drawablep)
|
void LLHeroProbeManager::unregisterViewerObject(LLVOVolume* drawablep)
|
||||||
{
|
{
|
||||||
std::vector<LLVOVolume*>::iterator found_itr = std::find(mHeroVOList.begin(), mHeroVOList.end(), drawablep);
|
std::vector<LLPointer<LLVOVolume>>::iterator found_itr = std::find(mHeroVOList.begin(), mHeroVOList.end(), drawablep);
|
||||||
if (found_itr != mHeroVOList.end())
|
if (found_itr != mHeroVOList.end())
|
||||||
{
|
{
|
||||||
mHeroVOList.erase(found_itr);
|
mHeroVOList.erase(found_itr);
|
||||||
|
|
|
||||||
|
|
@ -146,8 +146,8 @@ private:
|
||||||
|
|
||||||
U32 mCurrentProbeUpdateFrame = 0;
|
U32 mCurrentProbeUpdateFrame = 0;
|
||||||
|
|
||||||
std::vector<LLVOVolume*> mHeroVOList;
|
std::vector<LLPointer<LLVOVolume>> mHeroVOList;
|
||||||
LLVOVolume* mNearestHero;
|
LLPointer<LLVOVolume> mNearestHero;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3079,7 +3079,15 @@ void LLViewerLODTexture::processTextureStats()
|
||||||
updateVirtualSize();
|
updateVirtualSize();
|
||||||
|
|
||||||
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
|
static LLCachedControl<bool> textures_fullres(gSavedSettings,"TextureLoadFullRes", false);
|
||||||
|
|
||||||
|
{ // restrict texture resolution to download based on RenderMaxTextureResolution
|
||||||
|
static LLCachedControl<U32> max_texture_resolution(gSavedSettings, "RenderMaxTextureResolution", 2048);
|
||||||
|
// sanity clamp debug setting to avoid settings hack shenanigans
|
||||||
|
F32 tex_res = (F32)llclamp((S32)max_texture_resolution, 512, 2048);
|
||||||
|
tex_res *= tex_res;
|
||||||
|
mMaxVirtualSize = llmin(mMaxVirtualSize, tex_res);
|
||||||
|
}
|
||||||
|
|
||||||
if (textures_fullres)
|
if (textures_fullres)
|
||||||
{
|
{
|
||||||
mDesiredDiscardLevel = 0;
|
mDesiredDiscardLevel = 0;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue