HLSL: Wrap the entry-point; need to write 'in' args, and support 'inout' args.

This needs some render testing, but is destined to be part of master.

This also leads to a variety of other simplifications.
 - IO are global symbols, so only need one list of linkage nodes (deferred)
 - no longer need parse-context-wide 'inEntryPoint' state, entry-point is localized
 - several parts of splitting/flattening are now localized
This commit is contained in:
John Kessenich
2017-01-19 15:41:47 -07:00
parent 18adbdbbb8
commit 02467d8d94
171 changed files with 37604 additions and 32679 deletions

View File

@@ -3,14 +3,22 @@ Shader version: 450
gl_FragCoord origin is upper left
using depth_greater
0:? Sequence
0:2 Function Definition: PixelShaderFunction(f1; (temp void)
0:2 Function Definition: @PixelShaderFunction(f1; (temp void)
0:2 Function Parameters:
0:2 'depth' (out float FragDepth)
0:2 'depth' (out float unknown built-in variable)
0:? Sequence
0:3 move second child to first child (temp float)
0:3 'depth' (out float FragDepth)
0:3 'depth' (out float unknown built-in variable)
0:3 Constant:
0:3 0.200000
0:2 Function Definition: PixelShaderFunction( (temp void)
0:2 Function Parameters:
0:? Sequence
0:2 Function Call: @PixelShaderFunction(f1; (temp void)
0:? 'depth' (temp float)
0:2 move second child to first child (temp float)
0:? 'depth' (out float FragDepth)
0:? 'depth' (temp float)
0:? Linker Objects
0:? 'depth' (out float FragDepth)
@@ -22,38 +30,64 @@ Shader version: 450
gl_FragCoord origin is upper left
using depth_greater
0:? Sequence
0:2 Function Definition: PixelShaderFunction(f1; (temp void)
0:2 Function Definition: @PixelShaderFunction(f1; (temp void)
0:2 Function Parameters:
0:2 'depth' (out float FragDepth)
0:2 'depth' (out float unknown built-in variable)
0:? Sequence
0:3 move second child to first child (temp float)
0:3 'depth' (out float FragDepth)
0:3 'depth' (out float unknown built-in variable)
0:3 Constant:
0:3 0.200000
0:2 Function Definition: PixelShaderFunction( (temp void)
0:2 Function Parameters:
0:? Sequence
0:2 Function Call: @PixelShaderFunction(f1; (temp void)
0:? 'depth' (temp float)
0:2 move second child to first child (temp float)
0:? 'depth' (out float FragDepth)
0:? 'depth' (temp float)
0:? Linker Objects
0:? 'depth' (out float FragDepth)
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 10
// Id's are bound by 20
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "PixelShaderFunction" 8
EntryPoint Fragment 4 "PixelShaderFunction" 18
ExecutionMode 4 OriginUpperLeft
ExecutionMode 4 DepthGreater
Name 4 "PixelShaderFunction"
Name 8 "depth"
Decorate 8(depth) BuiltIn FragDepth
Name 10 "@PixelShaderFunction(f1;"
Name 9 "depth"
Name 13 "depth"
Name 14 "param"
Name 18 "depth"
Decorate 18(depth) BuiltIn FragDepth
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypePointer Output 6(float)
8(depth): 7(ptr) Variable Output
9: 6(float) Constant 1045220557
7: TypePointer Function 6(float)
8: TypeFunction 2 7(ptr)
12: 6(float) Constant 1045220557
17: TypePointer Output 6(float)
18(depth): 17(ptr) Variable Output
4(PixelShaderFunction): 2 Function None 3
5: Label
Store 8(depth) 9
13(depth): 7(ptr) Variable Function
14(param): 7(ptr) Variable Function
15: 2 FunctionCall 10(@PixelShaderFunction(f1;) 14(param)
16: 6(float) Load 14(param)
Store 13(depth) 16
19: 6(float) Load 13(depth)
Store 18(depth) 19
Return
FunctionEnd
10(@PixelShaderFunction(f1;): 2 Function None 8
9(depth): 7(ptr) FunctionParameter
11: Label
Store 9(depth) 12
Return
FunctionEnd