summaryrefslogtreecommitdiff
path: root/vcl/opengl/win/gdiimpl.cxx
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2016-11-03 23:11:18 +0100
committerTomaž Vajngerl <quikee@gmail.com>2016-11-09 09:56:59 +0000
commitd115a235bf3ff5366d992d01fb418a3eacb9d125 (patch)
treebaa6312709846e05ba4b5857ea012b54e8cc7d10 /vcl/opengl/win/gdiimpl.cxx
parente21ef810e178e37f202e5ab8d0b582b24d5ce001 (diff)
tdf#103804 reduced register areaScale shader and detection for intel
Some intel drivers crash when areaScale shader with "large" array is used. This adds a "reduced register" version of the areaScale shader. We still use the first version of the shader for other drivers and switch between the 2 implementations with a runtime detection. Change-Id: I1860f898c03b40a600eb1b41f7262719382a7171 Reviewed-on: https://gerrit.libreoffice.org/30571 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'vcl/opengl/win/gdiimpl.cxx')
-rw-r--r--vcl/opengl/win/gdiimpl.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/vcl/opengl/win/gdiimpl.cxx b/vcl/opengl/win/gdiimpl.cxx
index 6470bd093cff..93e7cb904293 100644
--- a/vcl/opengl/win/gdiimpl.cxx
+++ b/vcl/opengl/win/gdiimpl.cxx
@@ -684,6 +684,11 @@ bool WinOpenGLContext::ImplInit()
bFirstCall = false;
+ static OString aVendor(reinterpret_cast<const char*>(glGetString(GL_VENDOR)));
+
+ if (aVendor.equalsIgnoreAsciiCase("intel"))
+ maOpenGLCapabilitySwitch.mbLimitedShaderRegisters = true;
+
return true;
}