Bug 25829 - [GLSL] allowing non-void function without returning value
Summary: [GLSL] allowing non-void function without returning value
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: All All
: medium minor
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 29044
  Show dependency treegraph
 
Reported: 2009-12-30 00:01 UTC by Gordon Jin
Modified: 2010-08-18 19:34 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Jin 2009-12-30 00:01:35 UTC
GLSL spec (1.10 to 1.50) 6.1 says:
Function that return no value must be declared as void.

But this gets passed with mesa:
int function(out int i)  
{  // function should return a value
}

This impacts piglit/tests/glslparsertest/shaders/function5.frag
Comment 1 Gordon Jin 2010-06-29 23:32:33 UTC
This also impacts piglit/tests/glslparsertest/glsl2/function-07.vert
Comment 2 Eric Anholt 2010-08-17 09:15:06 UTC
Fixed with glsl2 merge.
Comment 3 Gordon Jin 2010-08-18 19:34:40 UTC
verified with mesa master d442a01ac14382d83cdaac87d2832315ceb3e963.


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.