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@lists.freedesktop.org Reporter: sigles...@igalia.com QA Contact: mesa-dev@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.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev