summaryrefslogtreecommitdiff
path: root/include/vcl/opengl
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 /include/vcl/opengl
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 'include/vcl/opengl')
-rw-r--r--include/vcl/opengl/OpenGLContext.hxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/vcl/opengl/OpenGLContext.hxx b/include/vcl/opengl/OpenGLContext.hxx
index dbe0ec66c280..e3e9ce0d2d83 100644
--- a/include/vcl/opengl/OpenGLContext.hxx
+++ b/include/vcl/opengl/OpenGLContext.hxx
@@ -52,6 +52,15 @@ struct VCL_DLLPUBLIC GLWindow
virtual ~GLWindow();
};
+struct VCL_DLLPUBLIC OpenGLCapabilitySwitch
+{
+ bool mbLimitedShaderRegisters;
+
+ OpenGLCapabilitySwitch()
+ : mbLimitedShaderRegisters(false)
+ {}
+};
+
class VCL_DLLPUBLIC OpenGLContext
{
friend class OpenGLTests;
@@ -94,6 +103,11 @@ public:
return mpRenderState;
}
+ OpenGLCapabilitySwitch& getOpenGLCapabilitySwitch()
+ {
+ return maOpenGLCapabilitySwitch;
+ }
+
/// Is this GL context the current context ?
virtual bool isCurrent();
/// Is any GL context the current context ?
@@ -165,6 +179,8 @@ protected:
OpenGLFramebuffer* mpFirstFramebuffer;
OpenGLFramebuffer* mpLastFramebuffer;
+ OpenGLCapabilitySwitch maOpenGLCapabilitySwitch;
+
private:
struct ProgramHash
{