Bug 98242 - dEQP mandates preprocessor tests for #line expressions
Summary: dEQP mandates preprocessor tests for #line expressions
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: All Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: i965-deqp
  Show dependency treegraph
 
Reported: 2016-10-14 06:09 UTC by Randy
Modified: 2019-03-14 08:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Randy 2016-10-14 06:09:21 UTC
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_and_file_expression_fragment.qpa: <Result StatusCode="Fail">expected shaders to compile and link properly, but failed to compile.</Result>
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_and_file_expression_vertex.qpa: <Result StatusCode="Fail">expected shaders to compile and link properly, but failed to compile.</Result>
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_expression_fragment.qpa: <Result StatusCode="Fail">expected shaders to compile and link properly, but failed to compile.</Result>
dEQP-GLES3.functional.shaders.preprocessor.builtin.line_expression_vertex.qpa: <Result StatusCode="Fail">expected shaders to compile and link properly, but failed to compile.</Result>
dEQP-GLES3.functional.shaders.preprocessor.conditional_inclusion.defined_macro_defined_test_fragment.qpa: <Result StatusCode="Fail">expected shaders to compile and link properly, but failed to compile.</Result>
dEQP-GLES3.functional.shaders.preprocessor.conditional_inclusion.defined_macro_defined_test_vertex.qpa: <Result StatusCode="Fail">expected shaders to compile and link properly, but failed to compile.</Result>
Comment 1 Randy 2016-10-14 06:15:08 UTC
Mesa git top commit: 389d6dedbe75defe07216ad761569a9b94f44e58
dEQP git top commit: ca988480be945772473f9256b6ae91fa6aa62bd1

Reproduced on HSW and SKL
Comment 2 Kenneth Graunke 2016-10-15 21:32:20 UTC
Ugh.  These are tests for that awful "arbitrary expressions in the #line directive" thing we discussed with Khronos, and no vendor actually wanted.

We had planned to never support this, but apparently we either have to, or we have to go argue with Android people.
Comment 3 Ian Romanick 2016-10-16 00:07:55 UTC
We'll have to argue with Android people then. We're never going to implement this garbage. Period.
Comment 4 Tapani Pälli 2016-10-17 04:59:12 UTC
It seems Mesa already supports such expressions for #define's, I wonder if same functionality could be hooked up to parse #line .. just a thought
Comment 5 Tapani Pälli 2016-10-18 05:26:54 UTC
(In reply to Tapani Pälli from comment #4)
> It seems Mesa already supports such expressions for #define's, I wonder if
> same functionality could be hooked up to parse #line .. just a thought

oops this is not really true, following would need to be supported and is not currently supported

"#line (233 +10) (+10)"
Comment 6 Kenneth Graunke 2016-10-31 22:47:26 UTC
I've split out the define defined parts of this bug as:
https://bugs.freedesktop.org/show_bug.cgi?id=98522

This bug will now just be about #line expressions.
Comment 7 Tapani Pälli 2016-11-01 05:57:22 UTC
(In reply to Kenneth Graunke from comment #6)
> I've split out the define defined parts of this bug as:
> https://bugs.freedesktop.org/show_bug.cgi?id=98522
> 
> This bug will now just be about #line expressions.

since #line is very likely highly unused my proposal would be to handle these 'case by case', as example this branch contains patch that makes these particular cases pass:

https://cgit.freedesktop.org/~tpalli/mesa/log/?h=handle_expr
Comment 8 Kenneth Graunke 2017-01-05 22:46:39 UTC
Here's an updated version of that patch which passes the "line_expression" tests in addition to the "line_and_file_expression" tests.  I haven't tested it further, and am not advocating one way or another...just making sure we have a hack in case someone needs them.

https://cgit.freedesktop.org/~kwg/mesa/commit/?h=glcpp-line-expressions


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.