yum-mirror/glslang

git clone https://git.yummers.dev/yum-mirror/glslang

David NetoHLSL: handle type error for ternary operator (#4207)7d9fae2c

main
4.2 KiB92 linesraw
1hlsl.ternary.error.frag
2ERROR: 0:3: 'missing' : unknown variable 
3ERROR: 0:3: ':' :  wrong operand types: no operation ':' exists that takes a left-hand operand of type ' in 4-component vector of float' and a right operand of type ' temp void' (or there is no acceptable conversion)
4ERROR: 0:2: '' : function does not return a value: @main
5ERROR: 3 compilation errors.  No code generated.
6
7
8Shader version: 500
9gl_FragCoord origin is upper left
10ERROR: node is still EOpNull!
110:2  Function Definition: @main(i1;i1;vf4;vf4; ( temp 4-component vector of float)
120:2    Function Parameters: 
130:2      'a' ( in int)
140:2      'b' ( in int)
150:2      'col0' ( in 4-component vector of float)
160:2      'col1' ( in 4-component vector of float)
170:?     Sequence
180:3      Branch: Return
190:2  Function Definition: main( ( temp void)
200:2    Function Parameters: 
210:?     Sequence
220:2      move second child to first child ( temp int)
230:?         'a' ( temp int)
240:?         'a' (layout( location=0) flat in int)
250:2      move second child to first child ( temp int)
260:?         'b' ( temp int)
270:?         'b' (layout( location=1) flat in int)
280:2      move second child to first child ( temp 4-component vector of float)
290:?         'col0' ( temp 4-component vector of float)
300:?         'col0' (layout( location=2) in 4-component vector of float)
310:2      move second child to first child ( temp 4-component vector of float)
320:?         'col1' ( temp 4-component vector of float)
330:?         'col1' (layout( location=3) in 4-component vector of float)
340:2      move second child to first child ( temp 4-component vector of float)
350:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
360:2        Function Call: @main(i1;i1;vf4;vf4; ( temp 4-component vector of float)
370:?           'a' ( temp int)
380:?           'b' ( temp int)
390:?           'col0' ( temp 4-component vector of float)
400:?           'col1' ( temp 4-component vector of float)
410:?   Linker Objects
420:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
430:?     'a' (layout( location=0) flat in int)
440:?     'b' (layout( location=1) flat in int)
450:?     'col0' (layout( location=2) in 4-component vector of float)
460:?     'col1' (layout( location=3) in 4-component vector of float)
47
48
49Linked fragment stage:
50
51
52Shader version: 500
53gl_FragCoord origin is upper left
54ERROR: node is still EOpNull!
550:2  Function Definition: @main(i1;i1;vf4;vf4; ( temp 4-component vector of float)
560:2    Function Parameters: 
570:2      'a' ( in int)
580:2      'b' ( in int)
590:2      'col0' ( in 4-component vector of float)
600:2      'col1' ( in 4-component vector of float)
610:?     Sequence
620:3      Branch: Return
630:2  Function Definition: main( ( temp void)
640:2    Function Parameters: 
650:?     Sequence
660:2      move second child to first child ( temp int)
670:?         'a' ( temp int)
680:?         'a' (layout( location=0) flat in int)
690:2      move second child to first child ( temp int)
700:?         'b' ( temp int)
710:?         'b' (layout( location=1) flat in int)
720:2      move second child to first child ( temp 4-component vector of float)
730:?         'col0' ( temp 4-component vector of float)
740:?         'col0' (layout( location=2) in 4-component vector of float)
750:2      move second child to first child ( temp 4-component vector of float)
760:?         'col1' ( temp 4-component vector of float)
770:?         'col1' (layout( location=3) in 4-component vector of float)
780:2      move second child to first child ( temp 4-component vector of float)
790:?         '@entryPointOutput' (layout( location=0) out 4-component vector of float)
800:2        Function Call: @main(i1;i1;vf4;vf4; ( temp 4-component vector of float)
810:?           'a' ( temp int)
820:?           'b' ( temp int)
830:?           'col0' ( temp 4-component vector of float)
840:?           'col1' ( temp 4-component vector of float)
850:?   Linker Objects
860:?     '@entryPointOutput' (layout( location=0) out 4-component vector of float)
870:?     'a' (layout( location=0) flat in int)
880:?     'b' (layout( location=1) flat in int)
890:?     'col0' (layout( location=2) in 4-component vector of float)
900:?     'col1' (layout( location=3) in 4-component vector of float)
91
92SPIR-V is not generated for failed compile or link