Bug 29745 - glsl2 crash
Summary: glsl2 crash
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
Depends on:
Reported: 2010-08-22 19:54 UTC by Luca Barbato
Modified: 2010-08-23 20:49 UTC (History)
0 users

See Also:
i915 platform:
i915 features:

Add core.h (10.72 KB, patch)
2010-08-23 04:06 UTC, Chia-I Wu
Details | Splinter Review
glsl: Include only main/core.h. (7.72 KB, patch)
2010-08-23 04:08 UTC, Chia-I Wu
Details | Splinter Review

Description Luca Barbato 2010-08-22 19:54:28 UTC
trying es2gears 


#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)
    at linker.cpp:1283
#3  0x00007fd22ec42db3 in _mesa_glsl_link_shader (ctx=0x6ef610, prog=0xc6b9f0)
    at program/ir_to_mesa.cpp:2747
#4  0x0000000000403a7a in gears_init () at es2gears.c:678
#5  0x0000000000403bf5 in main (argc=1, argv=0x7fffc290e978) at es2gears.c:717
Comment 1 Chia-I Wu 2010-08-23 00:42:13 UTC
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?
Comment 2 Chia-I Wu 2010-08-23 04:06:20 UTC
Created attachment 38089 [details] [review]
Add core.h

This patch adds main/core.h and removes feature tests in mtypes.h and dd.h.  It fixes this bug.
Comment 3 Chia-I Wu 2010-08-23 04:08:09 UTC
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.
Comment 4 Brian Paul 2010-08-23 05:43:24 UTC
Looks good to me.
Comment 5 Eric Anholt 2010-08-23 15:03:48 UTC
Agreed on b).   Removing FEATURE_* ifdefs ftw.
Comment 6 Chia-I Wu 2010-08-23 20:49:20 UTC
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.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.