[PATCH xserver] glamor: Declare "pos" in glamor_dash.c

dieter.jurzitza at t-online.de dieter.jurzitza at t-online.de
Wed Feb 22 10:47:44 UTC 2017


From: Dr.-Ing. Dieter Jurzitza <dieter.jurzitza at t-online.de>

Fixes compile failure:

 Failed to compile VS: 0:13(43): error: `pos' undeclared
0:13(14): error: operands to arithmetic operators must be numeric
0:13(13): error: operands to arithmetic operators must be numeric
 
 Program source:
#version 130
attribute vec3 primitive;
varying float dash_offset;
uniform vec2 fill_offset;
uniform vec2 fill_size_inv;
varying vec2 fill_pos;
uniform float dash_length;
uniform vec4 v_matrix;
void main() {
       dash_offset = primitive.z / dash_length;
       gl_Position.xy = primitive.xy.xy * v_matrix.xz + v_matrix.yw;
       gl_Position.zw = vec2(0.0,1.0);
       fill_pos = (fill_offset + primitive.xy + pos) * fill_size_inv;
}
 (EE) Fatal server error:
 (EE) GLSL compile failure

Signed-off-by: Dr.-Ing. Dieter Jurzitza <dieter.jurzitza at t-online.de>


[PATCH xserver] glamor: Declare "pos" in glamor_dash.c

--- glamor/glamor_dash.c.original       2016-03-11 19:43:16.000000000 +0100
+++ glamor/glamor_dash.c        2017-02-19 20:00:11.883218927 +0100
@@ -32,6 +32,7 @@

 static const char dash_vs_exec[] =
     "       dash_offset = primitive.z / dash_length;\n"
+    "       vec2 pos = vec2(0,0);\n"
     GLAMOR_POS(gl_Position, primitive.xy);

 static const char dash_fs_vars[] =




More information about the xorg-devel mailing list