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

@@ -1,25 +1,32 @@
hlsl.deadFunctionMissingBody.vert
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 13
// Id's are bound by 18
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 9
EntryPoint Vertex 4 "main" 16
Name 4 "main"
Name 9 "@entryPointOutput"
Decorate 9(@entryPointOutput) Location 0
Name 9 "@main("
Name 16 "@entryPointOutput"
Decorate 16(@entryPointOutput) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8: TypePointer Output 7(fvec4)
9(@entryPointOutput): 8(ptr) Variable Output
10: 6(float) Constant 0
11: 7(fvec4) ConstantComposite 10 10 10 10
8: TypeFunction 7(fvec4)
11: 6(float) Constant 0
12: 7(fvec4) ConstantComposite 11 11 11 11
15: TypePointer Output 7(fvec4)
16(@entryPointOutput): 15(ptr) Variable Output
4(main): 2 Function None 3
5: Label
Store 9(@entryPointOutput) 11
17: 7(fvec4) FunctionCall 9(@main()
Store 16(@entryPointOutput) 17
Return
FunctionEnd
9(@main(): 7(fvec4) Function None 8
10: Label
ReturnValue 12
FunctionEnd