From 5a7e0b05a4958c66eb9dada8fa83ed1ec3569909 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Tue, 5 Mar 2019 03:11:04 -0600 Subject: [PATCH] Fixup texture compression. --- indra/llrender/llgl.cpp | 39 ++++++++++--------- indra/llrender/llgltexture.h | 6 +-- indra/llrender/llimagegl.cpp | 14 ++++--- indra/llrender/llimagegl.h | 8 ++-- indra/llrender/llpostprocess.cpp | 4 +- indra/llrender/llrendertarget.cpp | 12 +++--- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llviewertexture.cpp | 16 ++++---- indra/newview/llviewertexture.h | 8 ++-- indra/newview/pipeline.cpp | 4 +- .../xui/en-us/panel_preferences_graphics1.xml | 2 +- 11 files changed, 61 insertions(+), 54 deletions(-) diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp index 6f011e156..561d2f0bb 100644 --- a/indra/llrender/llgl.cpp +++ b/indra/llrender/llgl.cpp @@ -505,10 +505,6 @@ LLGLManager::LLGLManager() : } std::set sGLExtensions; -bool ExtensionExists(std::string ext) -{ - return sGLExtensions.find(ext) != sGLExtensions.end(); -} void registerExtension(std::string ext) { sGLExtensions.emplace(ext); @@ -520,22 +516,30 @@ void loadExtensionStrings() typedef boost::tokenizer > tokenizer; boost::char_separator sep(" "); - for (auto& extension : tokenizer(std::string((const char*)glGetString(GL_EXTENSIONS)), sep)) + std::string extensions((const char*)glGetString(GL_EXTENSIONS)); + for (auto& extension : tokenizer(extensions, sep)) { registerExtension(extension); } #if LL_WINDOWS - PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsString"); + PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = (PFNWGLGETEXTENSIONSSTRINGARBPROC)wglGetProcAddress("wglGetExtensionsStringARB"); if (wglGetExtensionsStringARB) { - for (auto& extension : tokenizer(std::string((const char*)wglGetExtensionsStringARB(wglGetCurrentDC())), sep)) + extensions = std::string(wglGetExtensionsStringARB(wglGetCurrentDC())); + for (auto& extension : tokenizer(extensions, sep)) { registerExtension(extension); } } #endif } +bool ExtensionExists(std::string ext) +{ + if (sGLExtensions.empty()) + loadExtensionStrings(); + return sGLExtensions.find(ext) != sGLExtensions.end(); +} //--------------------------------------------------------------------- // Global initialization for GL @@ -616,15 +620,6 @@ bool LLGLManager::initGL() } #endif } - - if (mGLVersion >= 2.1f && mHasCompressedTextures && LLImageGL::sCompressTextures) - { //use texture compression - glHint(GL_TEXTURE_COMPRESSION_HINT, GL_NICEST); - } - else - { //GL version is < 3.0, always disable texture compression - LLImageGL::sCompressTextures = false; - } // Trailing space necessary to keep "nVidia Corpor_ati_on" cards // from being recognized as ATI. @@ -713,10 +708,18 @@ bool LLGLManager::initGL() } stop_glerror(); - // This is called here because it depends on the setting of mIsGF2or4MX, and sets up mHasMultitexture. initExtensions(); stop_glerror(); + if (mGLVersion >= 2.1f && mHasCompressedTextures && LLImageGL::sCompressTextures) + { //use texture compression + glHint(GL_TEXTURE_COMPRESSION_HINT, GL_NICEST); + } + else + { //GL version is < 3.0, always disable texture compression + LLImageGL::sCompressTextures = false; + } + S32 old_vram = mVRAM; if (mHasATIMemInfo) @@ -967,7 +970,7 @@ void LLGLManager::initExtensions() mHasMultitexture = mGLVersion >= 1.3f || ExtensionExists("GL_ARB_multitexture"); mHasATIMemInfo = ExtensionExists("GL_ATI_meminfo"); mHasNVXMemInfo = ExtensionExists("GL_NVX_gpu_memory_info"); - mHasCompressedTextures = mGLVersion >= 1.3 || ExtensionExists("GL_ARB_multitexture"); + mHasCompressedTextures = mGLVersion >= 1.3 || ExtensionExists("GL_ARB_texture_compression"); mHasAnisotropic = mGLVersion >= 4.6f || ExtensionExists("GL_EXT_texture_filter_anisotropic"); mHasCubeMap = mGLVersion >= 1.3f || ExtensionExists("GL_ARB_texture_cube_map"); mHasARBEnvCombine = mGLVersion >= 2.1f || ExtensionExists("GL_ARB_texture_env_combine"); diff --git a/indra/llrender/llgltexture.h b/indra/llrender/llgltexture.h index 362860af0..03e540f49 100644 --- a/indra/llrender/llgltexture.h +++ b/indra/llrender/llgltexture.h @@ -97,9 +97,9 @@ protected: LOG_CLASS(LLGLTexture); public: - LLGLTexture(BOOL usemipmaps = TRUE, bool allow_compresssion=true); - LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps, bool allow_compresssion=true) ; - LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, bool allow_compresssion=true) ; + LLGLTexture(BOOL usemipmaps = TRUE, bool allow_compresssion=false); + LLGLTexture(const LLImageRaw* raw, BOOL usemipmaps, bool allow_compresssion=false) ; + LLGLTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, bool allow_compresssion=false) ; virtual void dump(); // debug info to llinfos diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 626a17dee..d1e5dd41a 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -774,7 +774,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) stop_glerror(); } - LLImageGL::setManualImage(mTarget, gl_level, mFormatInternal, w, h, mFormatPrimary, GL_UNSIGNED_BYTE, (GLvoid*)data_in, mAllowCompression); + mIsCompressed = LLImageGL::setManualImage(mTarget, gl_level, mFormatInternal, w, h, mFormatPrimary, GL_UNSIGNED_BYTE, (GLvoid*)data_in, mAllowCompression); if (gl_level == 0) { analyzeAlpha(data_in, w, h); @@ -819,7 +819,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) glTexParameteri(mTarget, GL_GENERATE_MIPMAP, GL_TRUE); } - LLImageGL::setManualImage(mTarget, 0, mFormatInternal, + mIsCompressed = LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h, mFormatPrimary, mFormatType, data_in, mAllowCompression); @@ -890,7 +890,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) stop_glerror(); } - LLImageGL::setManualImage(mTarget, m, mFormatInternal, w, h, mFormatPrimary, mFormatType, cur_mip_data, mAllowCompression); + mIsCompressed = LLImageGL::setManualImage(mTarget, m, mFormatInternal, w, h, mFormatPrimary, mFormatType, cur_mip_data, mAllowCompression); if (m == 0) { analyzeAlpha(data_in, w, h); @@ -947,7 +947,7 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) stop_glerror(); } - LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h, + mIsCompressed = LLImageGL::setManualImage(mTarget, 0, mFormatInternal, w, h, mFormatPrimary, mFormatType, (GLvoid *)data_in, mAllowCompression); analyzeAlpha(data_in, w, h); @@ -1198,9 +1198,10 @@ void LLImageGL::texMemoryDeallocated(const AllocationInfo& entry) // static static LLTrace::BlockTimerStatHandle FTM_SET_MANUAL_IMAGE("setManualImage"); -void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression) +bool LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression) { LL_RECORD_BLOCK_TIME(FTM_SET_MANUAL_IMAGE); + bool compressed = false; std::vector scratch; if (LLRender::sGLCoreProfile) { @@ -1296,6 +1297,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt } if (LLImageGL::sCompressTextures && allow_compression) { + compressed = true; switch (intformat) { case GL_RED: @@ -1327,6 +1329,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt intformat = GL_COMPRESSED_ALPHA; break; default: + compressed = false; LL_WARNS() << "Could not compress format: " << std::hex << intformat << std::dec << LL_ENDL; break; } @@ -1335,6 +1338,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt stop_glerror(); glTexImage2D(target, miplevel, intformat, width, height, 0, pixformat, pixtype, pixels); stop_glerror(); + return compressed; } //create an empty GL texture: just create a texture name diff --git a/indra/llrender/llimagegl.h b/indra/llrender/llimagegl.h index 56e4caa46..c35a8a24a 100644 --- a/indra/llrender/llimagegl.h +++ b/indra/llrender/llimagegl.h @@ -135,9 +135,9 @@ public: static BOOL create(LLPointer& dest, const LLImageRaw* imageraw, BOOL usemipmaps = TRUE); public: - LLImageGL(BOOL usemipmaps = TRUE, bool allow_compression = true); - LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps = TRUE, bool allow_compression = true); - LLImageGL(const LLImageRaw* imageraw, BOOL usemipmaps = TRUE, bool allow_compression = true); + LLImageGL(BOOL usemipmaps = TRUE, bool allow_compression = false); + LLImageGL(U32 width, U32 height, U8 components, BOOL usemipmaps = TRUE, bool allow_compression = false); + LLImageGL(const LLImageRaw* imageraw, BOOL usemipmaps = TRUE, bool allow_compression = false); protected: virtual ~LLImageGL(); @@ -152,7 +152,7 @@ public: void setComponents(S32 ncomponents) { mComponents = (S8)ncomponents ;} void setAllowCompression(bool allow) { mAllowCompression = allow; } - static void setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels, bool allow_compression = true); + static bool setManualImage(U32 target, S32 miplevel, S32 intformat, S32 width, S32 height, U32 pixformat, U32 pixtype, const void *pixels = nullptr, bool allow_compression = false); BOOL createGLTexture() ; BOOL createGLTexture(S32 discard_level, const LLImageRaw* imageraw, GLTextureName* usename = nullptr, BOOL to_create = TRUE, diff --git a/indra/llrender/llpostprocess.cpp b/indra/llrender/llpostprocess.cpp index e1c0d90e3..0bc624fbb 100644 --- a/indra/llrender/llpostprocess.cpp +++ b/indra/llrender/llpostprocess.cpp @@ -454,7 +454,7 @@ void LLPostProcess::createScreenTextures() { mDepthTexture = LLImageGL::createTextureName(); gGL.getTexUnit(0)->bindManual(type, mDepthTexture->getTexName()); - LLImageGL::setManualImage(LLTexUnit::getInternalType(type), 0, GL_DEPTH_COMPONENT24, mScreenWidth, mScreenHeight, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL, false); + LLImageGL::setManualImage(LLTexUnit::getInternalType(type), 0, GL_DEPTH_COMPONENT24, mScreenWidth, mScreenHeight, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT); stop_glerror(); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); @@ -479,7 +479,7 @@ void LLPostProcess::createNoiseTexture() gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseTexture->getTexName()); stop_glerror(); - LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_LUMINANCE8, NOISE_SIZE, NOISE_SIZE, GL_LUMINANCE, GL_UNSIGNED_BYTE, &buffer[0], false); + LLImageGL::setManualImage(GL_TEXTURE_2D, 0, GL_LUMINANCE8, NOISE_SIZE, NOISE_SIZE, GL_LUMINANCE, GL_UNSIGNED_BYTE, &buffer[0]); stop_glerror(); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_BILINEAR); diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp index e01ca4a3e..af5ad22e2 100644 --- a/indra/llrender/llrendertarget.cpp +++ b/indra/llrender/llrendertarget.cpp @@ -85,7 +85,7 @@ void LLRenderTarget::resize(U32 resx, U32 resy) for (U32 i = 0; i < mTex.size(); ++i) { //resize color attachments gGL.getTexUnit(0)->bindManual(mUsage, mTex[i]); - LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, mInternalFormat[i], mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL, false); + LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, mInternalFormat[i], mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE); sBytesAllocated += pix_diff*4; } @@ -103,9 +103,9 @@ void LLRenderTarget::resize(U32 resx, U32 resy) gGL.getTexUnit(0)->bindManual(mUsage, mDepth); U32 internal_type = LLTexUnit::getInternalType(mUsage); if(!mStencil) - LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL, false); + LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT); else - LLImageGL::setManualImage(internal_type, 0, GL_DEPTH24_STENCIL8, mResX, mResY, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL, false); + LLImageGL::setManualImage(internal_type, 0, GL_DEPTH24_STENCIL8, mResX, mResY, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); } sBytesAllocated += pix_diff*4; @@ -204,7 +204,7 @@ bool LLRenderTarget::addColorAttachment(U32 color_fmt) { clear_glerror(); - LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE, NULL, false); + LLImageGL::setManualImage(LLTexUnit::getInternalType(mUsage), 0, color_fmt, mResX, mResY, GL_RGBA, GL_UNSIGNED_BYTE); if (glGetError() != GL_NO_ERROR) { LL_WARNS() << "Could not allocate color buffer for render target." << LL_ENDL; @@ -281,9 +281,9 @@ bool LLRenderTarget::allocateDepth() stop_glerror(); clear_glerror(); if(!mStencil) - LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, NULL, false); + LLImageGL::setManualImage(internal_type, 0, GL_DEPTH_COMPONENT24, mResX, mResY, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT); else - LLImageGL::setManualImage(internal_type, 0, GL_DEPTH24_STENCIL8, mResX, mResY, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, NULL, false); + LLImageGL::setManualImage(internal_type, 0, GL_DEPTH24_STENCIL8, mResX, mResY, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f76c668f2..f7a35ff13 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -12615,7 +12615,7 @@ This should be as low as possible, but too low may break functionality RenderCompressTextures Comment - Enable texture compression on OpenGL 3.0 and later implementations (EXPERIMENTAL, requires restart) + Enable texture compression on OpenGL 2.1 and later implementations (requires restart) Persist 1 Type diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index fea85f4bc..0df6af561 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -233,7 +233,7 @@ LLViewerFetchedTexture* LLViewerTextureManager::staticCastToFetchedTexture(LLTex LLPointer LLViewerTextureManager::getLocalTexture(BOOL usemipmaps, BOOL generate_gl_tex) { - LLPointer tex = new LLViewerTexture(usemipmaps, false); + LLPointer tex = new LLViewerTexture(usemipmaps); if(generate_gl_tex) { tex->generateGLTexture(); @@ -243,7 +243,7 @@ LLPointer LLViewerTextureManager::getLocalTexture(BOOL usemipma } LLPointer LLViewerTextureManager::getLocalTexture(const LLUUID& id, BOOL usemipmaps, BOOL generate_gl_tex) { - LLPointer tex = new LLViewerTexture(id, usemipmaps, false); + LLPointer tex = new LLViewerTexture(id, usemipmaps); if(generate_gl_tex) { tex->generateGLTexture(); @@ -253,13 +253,13 @@ LLPointer LLViewerTextureManager::getLocalTexture(const LLUUID& } LLPointer LLViewerTextureManager::getLocalTexture(const LLImageRaw* raw, BOOL usemipmaps) { - LLPointer tex = new LLViewerTexture(raw, usemipmaps, false); + LLPointer tex = new LLViewerTexture(raw, usemipmaps); tex->setCategory(LLGLTexture::LOCAL); return tex; } LLPointer LLViewerTextureManager::getLocalTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, BOOL generate_gl_tex) { - LLPointer tex = new LLViewerTexture(width, height, components, usemipmaps, false); + LLPointer tex = new LLViewerTexture(width, height, components, usemipmaps); if(generate_gl_tex) { tex->generateGLTexture(); @@ -378,7 +378,7 @@ void LLViewerTextureManager::init() imagep->setCachedRawImage(0, image_raw); image_raw = NULL; #else - LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, TRUE, LLGLTexture::BOOST_UI); + LLViewerFetchedTexture::sDefaultImagep = LLViewerTextureManager::getFetchedTexture(IMG_DEFAULT, FTT_DEFAULT, TRUE, LLGLTexture::BOOST_UI); #endif LLViewerFetchedTexture::sDefaultImagep->dontDiscard(); LLViewerFetchedTexture::sDefaultImagep->setCategory(LLGLTexture::OTHER); @@ -990,7 +990,7 @@ const std::string& fttype_to_string(const FTType& fttype) //---------------------------------------------------------------------------------------------- LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, const LLHost& host, BOOL usemipmaps) - : LLViewerTexture(id, usemipmaps, f_type != FTT_LOCAL_FILE), + : LLViewerTexture(id, usemipmaps, f_type == FTT_DEFAULT || f_type == FTT_MAP_TILE), mTargetHost(host) { init(TRUE); @@ -1004,7 +1004,7 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, } LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_type, BOOL usemipmaps) - : LLViewerTexture(raw, usemipmaps, f_type != FTT_LOCAL_FILE) + : LLViewerTexture(raw, usemipmaps, f_type == FTT_DEFAULT || f_type == FTT_MAP_TILE) { init(TRUE); mFTType = f_type; @@ -1012,7 +1012,7 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLImageRaw* raw, FTType f_t } LLViewerFetchedTexture::LLViewerFetchedTexture(const std::string& url, FTType f_type, const LLUUID& id, BOOL usemipmaps) - : LLViewerTexture(id, usemipmaps, f_type != FTT_LOCAL_FILE), + : LLViewerTexture(id, usemipmaps, f_type == FTT_DEFAULT || f_type == FTT_MAP_TILE), mUrl(url) { init(TRUE); diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h index 843d3ae1f..352ac8857 100644 --- a/indra/newview/llviewertexture.h +++ b/indra/newview/llviewertexture.h @@ -119,10 +119,10 @@ public: static void initClass(); static void updateClass(const F32 velocity, const F32 angular_velocity) ; - LLViewerTexture(BOOL usemipmaps = TRUE, bool allow_compression = true); - LLViewerTexture(const LLUUID& id, BOOL usemipmaps, bool allow_compression = true) ; - LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps, bool allow_compression = true) ; - LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, bool allow_compression = true) ; + LLViewerTexture(BOOL usemipmaps = TRUE, bool allow_compression = false); + LLViewerTexture(const LLUUID& id, BOOL usemipmaps, bool allow_compression = false) ; + LLViewerTexture(const LLImageRaw* raw, BOOL usemipmaps, bool allow_compression = false) ; + LLViewerTexture(const U32 width, const U32 height, const U8 components, BOOL usemipmaps, bool allow_compression = false) ; void setNeedsAlphaAndPickMask(BOOL need_mask) { if(mGLTexturep)mGLTexturep->setNeedsAlphaAndPickMask(need_mask); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 5a384c38d..8520ce150 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1146,7 +1146,7 @@ void LLPipeline::createGLBuffers() mNoiseMap = LLImageGL::createTextureName(); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mNoiseMap->getTexName()); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, NOISE_MAP_RES, NOISE_MAP_RES, GL_RGB, GL_FLOAT, noise, false); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_RGB16F_ARB, NOISE_MAP_RES, NOISE_MAP_RES, GL_RGB, GL_FLOAT, noise); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_POINT); } @@ -1209,7 +1209,7 @@ void LLPipeline::createLUTBuffers() #endif mLightFunc = LLImageGL::createTextureName(); gGL.getTexUnit(0)->bindManual(LLTexUnit::TT_TEXTURE, mLightFunc->getTexName()); - LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls, false); + LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, pix_format, lightResX, lightResY, GL_RED, GL_FLOAT, ls); //LLImageGL::setManualImage(LLTexUnit::getInternalType(LLTexUnit::TT_TEXTURE), 0, GL_UNSIGNED_BYTE, lightResX, lightResY, GL_RED, GL_UNSIGNED_BYTE, ls, false); gGL.getTexUnit(0)->setTextureAddressMode(LLTexUnit::TAM_CLAMP); gGL.getTexUnit(0)->setTextureFilteringOption(LLTexUnit::TFO_TRILINEAR); diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml index 35e8449e3..75953b446 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_graphics1.xml @@ -124,7 +124,7 @@ Adaptive -