Bug 25829

Summary: [GLSL] allowing non-void function without returning value
Product: Mesa Reporter: Gordon Jin <gordon.jin>
Component: Mesa coreAssignee: Ian Romanick <idr>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: medium CC: brianp, vlee
Version: git   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 29044    

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.