GLSL spec says: "User code can replace built-in functions with their own if they choose, by simply re-declaring and defining the same name and argument list." But piglit/tests/glslparsertest/shaders/CorrectBuiltInOveride.frag fails when defining 'radians' (a built-in function) with below failure: error: function `radians' redefined This happens with mesa glsl2 branch, while passes with master branch. It seems the glsl2 ir reader doesn't consider built-in functions when processing redefining error.
just seeing this has been mentioned in src/glsl/TODO as well: - Handle over-riding built-in functions
idr fixed this with his linker changes - probably in d5be2acae (linker: Link built-in functions instead of including them in every shader). CorrectBuiltInOveride.frag now passes on Ironlake.
verified
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.