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: e7308b6c77 "glamor: Add support for CA rendering in a single pass."
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
(Cherry picked from commit 5bfca0038e)
This commit is contained in:
Michel Dänzer 2019-12-20 15:51:00 +01:00 committed by Matt Turner
parent cfc5e5040c
commit 977f3acfce
1 changed files with 1 additions and 0 deletions

View File

@ -624,6 +624,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->can_copyplane = (gl_version >= 30);