 e770b3e6cf
			
		
	
	
		e770b3e6cf
		
	
	
	
	
		
			
			Structured control-flow rules allow leaving the middle of a construct through a return, but not through a jump to a block that does a return. Addresses issue #58.
		
			
				
	
	
		
			52 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
		
			Executable File
		
	
	
	
	
| spv.simpleFunctionCall.frag
 | |
| WARNING: 0:4: varying deprecated in version 130; may be removed in future release
 | |
| 
 | |
| 
 | |
| Linked fragment stage:
 | |
| 
 | |
| 
 | |
| // Module Version 99
 | |
| // Generated by (magic number): 51a00bb
 | |
| // Id's are bound by 22
 | |
| 
 | |
|                               Source GLSL 150
 | |
|                               Capability Shader
 | |
|                1:             ExtInstImport  "GLSL.std.450"
 | |
|                               MemoryModel Logical GLSL450
 | |
|                               EntryPoint Fragment 4  "main"
 | |
|                               ExecutionMode 4 OriginLowerLeft
 | |
|                               Name 4  "main"
 | |
|                               Name 9  "foo("
 | |
|                               Name 12  "BaseColor"
 | |
|                               Name 16  "gl_FragColor"
 | |
|                               Name 19  "bigColor"
 | |
|                               Name 21  "d"
 | |
|                               Decorate 12(BaseColor) Smooth
 | |
|                               Decorate 16(gl_FragColor) BuiltIn FragColor
 | |
|                               Decorate 19(bigColor) NoStaticUse
 | |
|                               Decorate 21(d) NoStaticUse
 | |
|                2:             TypeVoid
 | |
|                3:             TypeFunction 2
 | |
|                6:             TypeFloat 32
 | |
|                7:             TypeVector 6(float) 4
 | |
|                8:             TypeFunction 7(fvec4)
 | |
|               11:             TypePointer Input 7(fvec4)
 | |
|    12(BaseColor):     11(ptr) Variable Input
 | |
|               15:             TypePointer Output 7(fvec4)
 | |
| 16(gl_FragColor):     15(ptr) Variable Output
 | |
|               18:             TypePointer UniformConstant 7(fvec4)
 | |
|     19(bigColor):     18(ptr) Variable UniformConstant
 | |
|               20:             TypePointer UniformConstant 6(float)
 | |
|            21(d):     20(ptr) Variable UniformConstant
 | |
|          4(main):           2 Function None 3
 | |
|                5:             Label
 | |
|               17:    7(fvec4) FunctionCall 9(foo()
 | |
|                               Store 16(gl_FragColor) 17
 | |
|                               Return
 | |
|                               FunctionEnd
 | |
|          9(foo():    7(fvec4) Function None 8
 | |
|               10:             Label
 | |
|               13:    7(fvec4) Load 12(BaseColor)
 | |
|                               ReturnValue 13
 | |
|                               FunctionEnd
 |