Bug 51802

Summary: Problem with #line directives
Product: Mesa Reporter: Sven Arvidsson <sa>
Component: glsl-compilerAssignee: Ian Romanick <idr>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
URL: http://www.wolfire.com/overgrowth
Whiteboard:
i915 platform: i915 features:
Attachments: shader from overgrowth game

Description Sven Arvidsson 2012-07-06 14:27:22 UTC
Created attachment 63910 [details]
shader from overgrowth game

I have been trying out the beta version of the Overgrowth game, the shaders makes use of #line directives. 

In git master, the shaders fail to compile with this error:

 0:8(1): error: syntax error, unexpected $undefined, expecting $end

In Mesa 8.0.3 the shaders doesn't compile either, (a game problem, trying to use GLSL 1.20 with no #version directive) but it doesn't choke on the #line parts.

One of the failing shaders is attached.

Thanks in advance,
Comment 1 Sven Arvidsson 2012-07-06 14:29:59 UTC
Oh, and this is using current git 8b1f1900d191b01a6a58090228a8056f3c0cad1c
Comment 2 Sven Arvidsson 2012-07-07 05:42:39 UTC
It seems the problem is caused by:

 commit aac78ce8234d96932c38b3f48b1d828077bc0027
 Author: Carl Worth <cworth@cworth.org>
 Date:   Sat Jun 9 16:31:06 2012 -0700

     glsl: glcpp: Move handling of #line directives from lexer to parser.
    

The glcpp test for #line doesn't trigger the bug however, only running the game does.
Comment 3 Ian Romanick 2012-07-10 18:31:27 UTC

*** This bug has been marked as a duplicate of bug 51506 ***

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.