#1 0x00007fd22ec7b4ae in link_intrastage_shaders (ctx=<value optimized out>,
prog=0xc6b9f0, shader_list=0xdba250, num_shaders=1) at linker.cpp:751
#2 0x00007fd22ec7bae1 in link_shaders (ctx=0x6ef610, prog=0xc6b9f0)
#3 0x00007fd22ec42db3 in _mesa_glsl_link_shader (ctx=0x6ef610, prog=0xc6b9f0)
#4 0x0000000000403a7a in gears_init () at es2gears.c:678
#5 0x0000000000403bf5 in main (argc=1, argv=0x7fffc290e978) at es2gears.c:717
It seems to be a symptom of mixing FEATURE_GL libglsl.a with FEATURE_ES2 libes2gallium.a. There are several ways
a) build FEATURE_ES2 libes2sl.a as well as libglsl.a
b) remove "#if FEATURE_xxx" from core mesa types (noticeably dd_function_table)
c) do not use core mesa types in glsl
to fix it. I am favoring b). Suggestions?
Created attachment 38089 [details] [review]
This patch adds main/core.h and removes feature tests in mtypes.h and dd.h. It fixes this bug.
Created attachment 38090 [details] [review]
glsl: Include only main/core.h.
A minor cleanup. The idea is that GLX, WGL, and GLSL should only include main/core.h from core mesa.
Looks good to me.
Agreed on b). Removing FEATURE_* ifdefs ftw.
I've pushed the patches, with the second one updated for commit 6dad5a. There are more commits to update st/glx and st/wgl to use only main/core.h. "git grep 'main/.*\.h'" shows that main/core.h is the only core mesa header that is included outside src/mesa/.
es2gears should work now. I am closing this bug.