glamor: use dual source blend on GL 2.1 with ARB_ES2_compatibility

ARB_blend_func_extended may be exposed even without GLSL 1.30.
In order to use it we need GLES2 shaders that are available if
ARB_ES2_compatibility is exposed.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
This commit is contained in:
Vasily Khoruzhick 2022-05-27 18:00:56 -07:00 • committed by Konstantin
commit 05b8401eeb
5 changed files with 70 additions and 16 deletions

View file

@ -44,6 +44,7 @@ typedef enum {
glamor_program_alpha_ca_first,
glamor_program_alpha_ca_second,
glamor_program_alpha_dual_blend,
glamor_program_alpha_dual_blend_gles2,
glamor_program_alpha_count
} glamor_program_alpha;
@ -56,8 +57,8 @@ typedef Bool (*glamor_use_render) (CARD8 op, PicturePtr src, PicturePtr dst, gla
typedef struct {
const char *name;
const int version;
char *vs_defines;
char *fs_defines;
char *vs_extensions;
const char *fs_extensions;
const char *vs_vars;
const char *vs_exec;
const char *fs_vars;