Implement implicit conversions on function return expressions to the function's type.

git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@26501 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
John Kessenich 2014-05-06 06:02:01 +00:00
parent 2ea882fdae
commit 8a1a4a7a8b
10 changed files with 66 additions and 30 deletions

View file

@ -7,6 +7,7 @@ ERROR: 0:32: 'gl_Position' : no such field in structure
ERROR: 0:32: '=' : cannot convert from 'block{in float gl_PointSize}' to '4-component vector of float'
ERROR: 0:33: 'gl_Position' : member of nameless block was not redeclared
ERROR: 0:33: 'assign' : cannot convert from 'const 4-component vector of float' to 'layout(stream=0 ) gl_Position void'
WARNING: 0:38: 'return' : type conversion on return values was not explicitly allowed until version 420
ERROR: 7 compilation errors. No code generated.
@ -46,6 +47,12 @@ ERROR: node is still EOpNull!
0:33 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float gl_PointSize, })
0:33 Constant:
0:33 0 (const uint)
0:36 Function Definition: foo5( (float)
0:36 Function Parameters:
0:38 Sequence
0:38 Branch: Return with expression
0:38 Constant:
0:38 4.000000
0:? Linker Objects
0:? 'gl_in' (in implicitly-sized array of block{in float gl_PointSize})
0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float gl_PointSize, })
@ -93,6 +100,12 @@ ERROR: node is still EOpNull!
0:33 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float gl_PointSize, })
0:33 Constant:
0:33 0 (const uint)
0:36 Function Definition: foo5( (float)
0:36 Function Parameters:
0:38 Sequence
0:38 Branch: Return with expression
0:38 Constant:
0:38 4.000000
0:? Linker Objects
0:? 'gl_in' (in 2-element array of block{in float gl_PointSize})
0:? 'anon@0' (layout(stream=0 ) out block{layout(stream=0 ) gl_PointSize float gl_PointSize, })