summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-06-04 00:03:03 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-06-04 00:03:03 +0300
commit9212c1f33e6790c50957c4c46b8e1a386990aef9 (patch)
tree91051e955074c7a0dbcb44e36c5b4ee2badf6522 /indra/llwindow/llwindowwin32.cpp
parentb996c95f32e9fa27206c4ed7ca20853c80c5e297 (diff)
SL-11341 Skip storing the previous gamma value on Intel GPUs + more logging
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 27787a51a8..97cd31de81 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2994,6 +2994,7 @@ BOOL LLWindowWin32::restoreGamma()
{
if (mCustomGammaSet != FALSE)
{
+ LL_DEBUGS("Window") << "Restoring gamma" << LL_ENDL;
mCustomGammaSet = FALSE;
return SetDeviceGammaRamp(mhDC, mPrevGammaRamp);
}
@@ -3007,8 +3008,15 @@ BOOL LLWindowWin32::setGamma(const F32 gamma)
//Get the previous gamma ramp to restore later.
if (mCustomGammaSet == FALSE)
{
- if (GetDeviceGammaRamp(mhDC, mPrevGammaRamp) == FALSE)
- return FALSE;
+ if (!gGLManager.mIsIntel) // skip for Intel GPUs (see SL-11341)
+ {
+ LL_DEBUGS("Window") << "Getting the previous gamma ramp to restore later" << LL_ENDL;
+ if(GetDeviceGammaRamp(mhDC, mPrevGammaRamp) == FALSE)
+ {
+ LL_WARNS("Window") << "Failed to get the previous gamma ramp" << LL_ENDL;
+ return FALSE;
+ }
+ }
mCustomGammaSet = TRUE;
}