MAINT-708 Add checkbox to hardware settings for controlling texture compression. Default texture compression to on for cards with 512MB of VRAM or less, off otherwise.
parent
cd468364a7
commit
83e69659e2
|
|
@ -576,7 +576,7 @@ bool LLGLManager::initGL()
|
|||
#endif
|
||||
}
|
||||
|
||||
if (mGLVersion >= 3.f && LLImageGL::sCompressTextures)
|
||||
if (mGLVersion >= 2.1f && LLImageGL::sCompressTextures)
|
||||
{ //use texture compression
|
||||
glHint(GL_TEXTURE_COMPRESSION_HINT, GL_NICEST);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -222,6 +223,12 @@ RenderVBOEnable 1 1
|
|||
list Class3
|
||||
RenderVBOEnable 1 1
|
||||
|
||||
//
|
||||
// VRAM > 512MB
|
||||
//
|
||||
list VRAMGT512
|
||||
RenderCompressTextures 1 0
|
||||
|
||||
//
|
||||
// No Pixel Shaders available
|
||||
//
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -219,6 +220,12 @@ RenderVBOEnable 1 1
|
|||
list Class3
|
||||
RenderVBOEnable 1 1
|
||||
|
||||
//
|
||||
// VRAM > 512MB
|
||||
//
|
||||
list VRAMGT512
|
||||
RenderCompressTextures 1 0
|
||||
|
||||
//
|
||||
// No Pixel Shaders available
|
||||
//
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 0.5
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 1
|
||||
RenderDeferredSSAO 1 1
|
||||
|
|
@ -247,6 +248,12 @@ RenderDeferred 0 0
|
|||
RenderDeferredSSAO 0 0
|
||||
RenderShadowDetail 0 0
|
||||
|
||||
//
|
||||
// VRAM > 512MB
|
||||
//
|
||||
list VRAMGT512
|
||||
RenderCompressTextures 1 0
|
||||
|
||||
//
|
||||
// "Default" setups for safe, low, medium, high
|
||||
//
|
||||
|
|
@ -286,6 +293,7 @@ RenderObjectBump 0 0
|
|||
list OpenGLPre15
|
||||
RenderVBOEnable 1 0
|
||||
|
||||
|
||||
list TexUnit8orLess
|
||||
RenderDeferredSSAO 0 0
|
||||
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ WLSkyDetail 1 128
|
|||
Disregard128DefaultDrawDistance 1 1
|
||||
Disregard96DefaultDrawDistance 1 1
|
||||
RenderTextureMemoryMultiple 1 1.0
|
||||
RenderCompressTextures 1 1
|
||||
RenderShaderLightingMaxLevel 1 3
|
||||
RenderDeferred 1 0
|
||||
RenderDeferredSSAO 1 0
|
||||
|
|
@ -221,6 +222,12 @@ RenderVBOEnable 1 1
|
|||
list Class3
|
||||
RenderVBOEnable 1 1
|
||||
|
||||
//
|
||||
// VRAM > 512MB
|
||||
//
|
||||
list VRAMGT512
|
||||
RenderCompressTextures 1 0
|
||||
|
||||
//
|
||||
// No Pixel Shaders available
|
||||
//
|
||||
|
|
|
|||
|
|
@ -779,6 +779,10 @@ void LLFeatureManager::applyBaseMasks()
|
|||
{
|
||||
maskFeatures("MapBufferRange");
|
||||
}
|
||||
if (gGLManager.mVRAM > 512)
|
||||
{
|
||||
maskFeatures("VRAMGT512");
|
||||
}
|
||||
|
||||
// now mask by gpu string
|
||||
// Replaces ' ' with '_' in mGPUString to deal with inability for parser to handle spaces
|
||||
|
|
|
|||
|
|
@ -99,6 +99,12 @@ void LLFloaterHardwareSettings::refreshEnabledState()
|
|||
getChildView("vbo")->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures") ||
|
||||
!gGLManager.mHasVertexBufferObject)
|
||||
{
|
||||
getChildView("texture compression")->setEnabled(FALSE);
|
||||
}
|
||||
|
||||
// if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
|
||||
LLSpinCtrl* gamma_ctrl = getChild<LLSpinCtrl>("gamma");
|
||||
gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders());
|
||||
|
|
|
|||
|
|
@ -132,6 +132,28 @@
|
|||
name="vbo"
|
||||
tool_tip="Enabling this on modern hardware gives a performance gain. However, older hardware often has poor implementations of VBOs and you may get crashes when this is enabled."
|
||||
width="315" />
|
||||
<text
|
||||
type="string"
|
||||
length="1"
|
||||
follows="left|top"
|
||||
height="16"
|
||||
layout="topleft"
|
||||
left="10"
|
||||
name="tc label"
|
||||
top_pad="10"
|
||||
width="188">
|
||||
Enable S3TC:
|
||||
</text>
|
||||
<check_box
|
||||
control_name="RenderCompressTextures"
|
||||
height="16"
|
||||
initial_value="true"
|
||||
label="Enable Texture Compression (requires restart)"
|
||||
layout="topleft"
|
||||
left_pad="10"
|
||||
name="texture compression"
|
||||
tool_tip="Compresses textures in video memory, allowing for higher resolution textures to be loaded at the cost of some color quality."
|
||||
width="315" />
|
||||
<slider
|
||||
control_name="TextureMemory"
|
||||
decimal_digits="0"
|
||||
|
|
|
|||
Loading…
Reference in New Issue