On 30.07.2014 07:11, Carl Worth wrote: > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=f062f0506a5b827667b7eb52136d8420b7e8113b > Author: Carl Worth <cwo...@cworth.org> > Date: Wed Jun 25 12:20:22 2014 -0700 > > glsl/glcpp: Correctly parse directives with intervening comments
FYI, this change broke the game Reaction Quake, see the failure output below. I don't know if this is a bug in this change or in the game, so I'm reporting it here. ------- GLSL_InitGPUShaders ------- #version 120 #ifndef M_PI #define M_PI 3.14159265358979323846f #endif #ifndef deformGen_t #define deformGen_t #define DGEN_WAVE_SIN 1 #define DGEN_WAVE_SQUARE 2 #define DGEN_WAVE_TRIANGLE 3 #define DGEN_WAVE_SAWTOOTH 4 #define DGEN_WAVE_INVERSE_SAWTOOTH 5 #define DGEN_BULGE 7 #define DGEN_MOVE 8 #endif #ifndef tcGen_t #define tcGen_t #define TCGEN_LIGHTMAP 2 #define TCGEN_TEXTURE 3 #define TCGEN_ENVIRONMENT_MAPPED 4 #define TCGEN_FOG 5 #define TCGEN_VECTOR 6 #endif #ifndef colorGen_t #define colorGen_t #define CGEN_LIGHTING_DIFFUSE 11 #endif #ifndef alphaGen_t #define alphaGen_t #define AGEN_LIGHTING_SPECULAR 6 #define AGEN_PORTAL 8 #define AGEN_FRESNEL 10 #endif #ifndef texenv_t #define texenv_t #define TEXENV_MODULATE 8448 #define TEXENV_ADD 260 #define TEXENV_REPLACE 7681 #endif #ifndef r_FBufScale #define r_FBufScale vec2(0.000521, 0.000926) #endif #ifndef r_obbcorrect #define r_obbcorrect 2 #endif #define USE_PCF #define USE_DISCARD#line 0 attribute vec4 attr_Position; attribute vec3 attr_Normal; un form mat4 u_ModelViewProjectionMatrix; varying vec3 var_Position; varying vec3 var_Normal; void main() { vec4 position = attr_Position; gl_Position = u_ModelViewProjectionMatrix * position; var_Position = position.xyz; var_Normal = attr_Normal; } compile log: 0:46(20): preprocessor error: syntax error, unexpected HASH_TOKEN, expecting NEWLINE ******************** ERROR: Couldn't compile shader ******************** -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev