Bug 98522 - dEQP mandates preprocessor tests for define defined
Summary: dEQP mandates preprocessor tests for define defined
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Blocks: i965-deqp
  Show dependency treegraph
Reported: 2016-10-31 22:46 UTC by Kenneth Graunke
Modified: 2019-03-14 08:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Description Kenneth Graunke 2016-10-31 22:46:39 UTC
We fail the following tests on the dEQP nougat-cts-dev mustpass list:

Comment 1 Kenneth Graunke 2016-10-31 22:46:54 UTC
See also:
Comment 2 Ian Romanick 2016-10-31 23:25:55 UTC
I think https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15567#c22 matches what dEQP expects.  Basically, C explicitly allows

#define derp defined

According to https://cvs.khronos.org/bugzilla/show_bug.cgi?id=15567#c21, C says that the following is undefined, but c22 says that all tested C compiler "do the right thing":

#if derp herp

Just from peeking over Ken's shoulder, I think this is the behavior that dEQP expects.  As far as I'm aware, WebGL expects errors for this, but GLSL ES and desktop GLSL have left it also undefined.

I think we should accept these, but we should probably generate warnings.  I think the warning should occur in the #if line.  I believe this is what glslang does in its permissive mode.
Comment 3 Ian Romanick 2016-10-31 23:26:34 UTC
Also... I think everyone agrees that

#define defined derp

is an error.
Comment 4 Kenneth Graunke 2017-02-03 09:24:40 UTC
These were blacklisted from dEQP in dEQP/AOSP commit e5f74834175e076b46f5c002a2e2d17274cc5db9 on the nougat-cts-dev branch, because they're testing undefined behavior.  Therefore, NOTOURBUG.

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.