From ee107cd4911e692480ab2ff9c12e3c6958bdec4e Mon Sep 17 00:00:00 2001 From: Konstantin Pugin Date: Sun, 24 Jul 2022 16:03:51 +0300 Subject: glamor: support GLES3 shaders Some hardware (preferably mobile) working on GLES3 way faster than on desktop GL and supports more features. This commit will allow using GLES3 if glamor is running over GL ES, and version 3 is supported. Changes are the following: 1. Add compatibility layer for 120/GLES2 shaders with defines in and out 2. Switch attribute and varying to in and out in almost all shaders (aside gradient) 3. Add newGL-only frag_color variable, which defines as gl_FragColor on old pipelines 4. Switch all shaders to use frag_color. 5. Previous commit is reverted, because now we have more than one GL ES version, previous commit used to set version 100 for all ES shaders, which is not true for ES 3 Signed-off-by: Konstantin Pugin --- glamor/glamor_lines.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'glamor/glamor_lines.c') diff --git a/glamor/glamor_lines.c b/glamor/glamor_lines.c index ec70804ac..c9b776bb5 100644 --- a/glamor/glamor_lines.c +++ b/glamor/glamor_lines.c @@ -27,7 +27,7 @@ static const glamor_facet glamor_facet_poly_lines = { .name = "poly_lines", - .vs_vars = "attribute vec2 primitive;\n", + .vs_vars = "in vec2 primitive;\n", .vs_exec = (" vec2 pos = vec2(0.0,0.0);\n" GLAMOR_POS(gl_Position, primitive.xy)), }; -- cgit v1.2.3