glamor: handle EXT_gpu_shader4 in dual source blend paths
Fixes: a955286869
("glamor: add EXT_gpu_shader4 support")
Acked-by: Emma Anholt <emma@anholt.net>
This commit is contained in:
parent
0ba6d8c370
commit
86598739ba
|
@ -61,7 +61,7 @@ static struct blendinfo composite_op_info[] = {
|
||||||
|
|
||||||
#define RepeatFix 10
|
#define RepeatFix 10
|
||||||
static GLuint
|
static GLuint
|
||||||
glamor_create_composite_fs(struct shader_key *key)
|
glamor_create_composite_fs(glamor_screen_private *glamor_priv, struct shader_key *key)
|
||||||
{
|
{
|
||||||
const char *repeat_define =
|
const char *repeat_define =
|
||||||
"#define RepeatNone 0\n"
|
"#define RepeatNone 0\n"
|
||||||
|
@ -223,6 +223,8 @@ glamor_create_composite_fs(struct shader_key *key)
|
||||||
"}\n";
|
"}\n";
|
||||||
const char *header_ca_dual_blend =
|
const char *header_ca_dual_blend =
|
||||||
"#version 130\n";
|
"#version 130\n";
|
||||||
|
const char *header_ca_dual_blend_gpu_shader4 =
|
||||||
|
"#version 120\n#extension GL_EXT_gpu_shader4 : require\n";
|
||||||
const char *in_ca_dual_blend_gles2 =
|
const char *in_ca_dual_blend_gles2 =
|
||||||
"void main()\n"
|
"void main()\n"
|
||||||
"{\n"
|
"{\n"
|
||||||
|
@ -301,7 +303,10 @@ glamor_create_composite_fs(struct shader_key *key)
|
||||||
break;
|
break;
|
||||||
case glamor_program_alpha_dual_blend:
|
case glamor_program_alpha_dual_blend:
|
||||||
in = in_ca_dual_blend;
|
in = in_ca_dual_blend;
|
||||||
header = header_ca_dual_blend;
|
if (glamor_priv->glsl_version >= 130)
|
||||||
|
header = header_ca_dual_blend;
|
||||||
|
else
|
||||||
|
header = header_ca_dual_blend_gpu_shader4;
|
||||||
break;
|
break;
|
||||||
case glamor_program_alpha_dual_blend_gles2:
|
case glamor_program_alpha_dual_blend_gles2:
|
||||||
in = in_ca_dual_blend_gles2;
|
in = in_ca_dual_blend_gles2;
|
||||||
|
@ -379,7 +384,7 @@ glamor_create_composite_shader(ScreenPtr screen, struct shader_key *key,
|
||||||
vs = glamor_create_composite_vs(key);
|
vs = glamor_create_composite_vs(key);
|
||||||
if (vs == 0)
|
if (vs == 0)
|
||||||
return;
|
return;
|
||||||
fs = glamor_create_composite_fs(key);
|
fs = glamor_create_composite_fs(glamor_priv, key);
|
||||||
if (fs == 0)
|
if (fs == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue