Bug 76843 - [glsl] RBDoom3-BFG fail to build shaders
Summary: [glsl] RBDoom3-BFG fail to build shaders
Status: RESOLVED NOTOURBUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-31 15:11 UTC by Laurent carlier
Modified: 2014-04-02 04:47 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Laurent carlier 2014-03-31 15:11:44 UTC
https://github.com/RobertBeckebans/RBDOOM-3-BFG

* radeonsi driver (Pitcairn XT)
* mesa-git trunk
* llvm-svn

RBDoom3-BFG fail to build shaders with the following error:
---------->8----------
----- Initializing Render Shaders -----
While compiling vertex program renderprogs/gui.vertex
-----------------
  1: #version 150
  2: #define PC
  3: 
  4: float saturate( float v ) { return clamp( v, 0.0, 1.0 ); }
  5: vec2 saturate( vec2 v ) { return clamp( v, 0.0, 1.0 ); }
  6: vec3 saturate( vec3 v ) { return clamp( v, 0.0, 1.0 ); }
  7: vec4 saturate( vec4 v ) { return clamp( v, 0.0, 1.0 ); }
  8: vec4 tex2Dlod( sampler2D sampler, vec4 texcoord ) { return textureLod( sampler, texcoord.xy, texcoord.w ); }
  9: 
 10: 
 11: uniform vec4 _va_[4];
 12: 
 13: float dot4 (vec4 a , vec4 b ) {return dot ( a , b ) ; }
 14: float dot4 (vec2 a , vec4 b ) {return dot ( vec4 ( a , 0 , 1 ) , b ) ; }
 15: vec4 swizzleColor (vec4 c ) {return c ; }
 16: 
 17: in vec4 in_Position;
 18: in vec2 in_TexCoord;
 19: in vec4 in_Normal;
 20: in vec4 in_Tangent;
 21: in vec4 in_Color;
 22: in vec4 in_Color2;
 23: 
 24: out vec4 gl_Position;
 25: out vec2 vofi_TexCoord0;
 26: out vec4 vofi_TexCoord1;
 27: out vec4 gl_FrontColor;
 28: 
 29: void main() {
 30:    gl_Position . x = dot4 ( in_Position , _va_[0 /* rpMVPmatrixX */] ) ;
 31:    gl_Position . y = dot4 ( in_Position , _va_[1 /* rpMVPmatrixY */] ) ;
 32:    gl_Position . z = dot4 ( in_Position , _va_[2 /* rpMVPmatrixZ */] ) ;
 33:    gl_Position . w = dot4 ( in_Position , _va_[3 /* rpMVPmatrixW */] ) ;
 34:    vofi_TexCoord0 . xy = in_TexCoord . xy ;
 35:    vofi_TexCoord1 = ( swizzleColor ( in_Color2 ) * 2 ) - 1 ;
 36:    gl_FrontColor = swizzleColor ( in_Color ) ;
 37: }
-----------------
0:24(10): error: `gl_Position' redeclared
0:27(1): error: identifier `gl_FrontColor' uses reserved `gl_' prefix
----------8<----------

Changing _mesa_glsl_error() into _mesa_glsl_warning() makes the game start, but content of the window is now garbled/black.

An apitrace of RBDoom3-BFG is available here:
http://pkgbuild.com/~lcarlier/traces/RBDoom3BFG.trace.tar.xz

Upstream bugreports are available here:
https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues/86
https://github.com/RobertBeckebans/RBDOOM-3-BFG/issues/52
Comment 1 Ian Romanick 2014-04-02 04:47:02 UTC
The game is trying to use compatibility profile features that are not available in the core profile context that it gets from Mesa.


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.