[Mesa-dev] [Bug 89642] dEQP-GLES3: dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_2_vertex fails because of wrong __LINE__ values
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Mar 18 00:41:08 PDT 2015
https://bugs.freedesktop.org/show_bug.cgi?id=89642
Bug ID: 89642
Summary: dEQP-GLES3:
dEQP-GLES3.functional.shaders.preprocessor.predefined_
macros.line_2_vertex fails because of wrong __LINE__
values
Product: Mesa
Version: git
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Mesa core
Assignee: mesa-dev at lists.freedesktop.org
Reporter: siglesias at igalia.com
QA Contact: mesa-dev at lists.freedesktop.org
DEQP failed test:
dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.line_2_vertex
-------
The test does a complex __LINE__ macro replacement. The shaders are created
from the following template in modules/gles3/gles3/shader/preprocessor.test
file:
#version 300 es
precision mediump float;
${DECLARATIONS:single-line}
#define BBB __LINE__, /*
*/ __LINE__
#define AAA(a,b) BBB, a, b
void main()
{
out0 = vec4(AAA(__LINE__,
__LINE__
));
${OUTPUT}
}
It expects to have out0 filled with (12, 12, 10, 11) values. Mesa gives (4, 5,
10, 11). I created a C program that mimics the shader (because Mesa follows a
draft of C99 standard, see src/glsl/glcpp/README) but I got different results
depending of which C compiler was used:
* gcc --std=c99 (or without c99, it doesn't matter) prints: 12, 12, 12, 12
* clang prints: 12, 12, 10, 11.
Mesa calculates the LINE macro values as the line numbers of where the macro is
seen in the code before doing any expansion, as special case in glcpp-parse.y,
function _glcpp_parser_expand_node().
-------
Tested on Haswell with Mesa master: 27bf37ba05b69ebf6f373d1637a26b4839265921
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150318/0752889b/attachment.html>
More information about the mesa-dev
mailing list