Summary: | [Bisected]Piglit glslparsertest/glsl2/pragma-08.frag regressed | ||
---|---|---|---|
Product: | Mesa | Reporter: | lu hua <huax.lu> |
Component: | glsl-compiler | Assignee: | Carl Worth <cworth> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | major | ||
Priority: | high | CC: | cworth, idr, sa, xunx.fang |
Version: | git | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
patch to fix problem
patch |
Description
lu hua
2012-06-28 00:18:40 UTC
I am able to reproduce this. It looks like something goes wrong after processing the #line directive. If I comment that line out, the test passes. (In reply to comment #1) > I am able to reproduce this. It looks like something goes wrong after > processing the #line directive. If I comment that line out, the test passes. My bug, sorry. It looks like the current processing of "#line" directives is swallowing the trailing newline. So these directives will work if they are followed by a blank line, but will cause this problem otherwise. I'll augment our test suite and cook up a fix as soon as I can. -Carl *** Bug 51802 has been marked as a duplicate of this bug. *** Created attachment 64616 [details] [review] patch to fix problem the patch also modifies the preprocessor test 091 Since it's been almost three weeks, I've gone ahead and pushed a patch to add \n to the #line directives, since this is actually breaking real games like Regnum Online and Overgrowth. It's not the right solution, as line numbers in error messages will likely be off by one in certain circumstances, but it gets those games working again. Carl, feel free to revert when you come up with the proper fix. It fixed by commit:dcf8754cce1af09547a5976a74ba807bc6f2657c. commit dcf8754cce1af09547a5976a74ba807bc6f2657c Author: Kenneth Graunke <kenneth@whitecape.org> Date: Sat Jul 28 13:04:53 2012 -0700 glcpp: Add a newline to expanded #line directives. Otherwise, the preprocessor happily outputs #line 2 4 <your next line of code> and the main compiler gets horribly confused and fails to compile. This is not the right solution (line numbers in error messages will likely be off-by-one in certain circumstances), but until Carl comes up with a proper fix, this gets programs running again. Verified.It fixed. let's keep this open so maybe Carl will come up with a real fix. Created attachment 69648 [details] [review] patch Carl and I came up with this patch to fix glcpp's test 091 and determined that we needed to modify the test in an identical way to Fabian's patch. I think since Fabian's patch is much simpler, it's what we'll go with. I'll send it to the list. In any case, this bug is fixed. Verified.Fixed. |
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.