summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorMichel Dänzer <mdaenzer@redhat.com>2019-12-18 18:18:50 +0100
committerMichel Dänzer <michel@daenzer.net>2019-12-20 12:35:28 +0100
commit5bfca0038e92d61e58d4dc1a54748faef8273023 (patch)
tree2bad6426a65e636e53a12feebe4500211884ec14 /glamor
parent846e81ecb83f30b555ce71a32cd6965d7b9939a5 (diff)
glamor: Only use dual blending with GLSL >= 1.30
It can't be used with older GLSL. Fixes a crash when attempting to anyway. Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/97 Fixes: e7308b6c7756 "glamor: Add support for CA rendering in a single pass." Reviewed-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index 4d6a8394e..59178b930 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -797,6 +797,7 @@ glamor_init(ScreenPtr screen, unsigned int flags)
epoxy_gl_version() >= 30 ||
epoxy_has_gl_extension("GL_NV_pack_subimage");
glamor_priv->has_dual_blend =
+ glamor_priv->glsl_version >= 130 &&
epoxy_has_gl_extension("GL_ARB_blend_func_extended");
glamor_priv->has_clear_texture =
epoxy_gl_version() >= 44 ||