HLSL: Make the entry-point shadow function have non-IO params and return.
This also removes an no longer needed makeTemporary() and rationalizes makeTypeNonIo()'s interface.
This commit is contained in:
@@ -15,7 +15,7 @@ Shader version: 450
|
||||
0:18 'fn1_out' (in structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:18 Constant:
|
||||
0:18 1 (const int)
|
||||
0:22 Function Definition: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 Function Definition: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Function Parameters:
|
||||
0:22 'vsin' (in structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
|
||||
0:? Sequence
|
||||
@@ -74,9 +74,9 @@ Shader version: 450
|
||||
0:22 2 (const int)
|
||||
0:? 'x1_in' (layout(location=1 ) in int)
|
||||
0:22 Sequence
|
||||
0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 Function Call: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Function Call: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
|
||||
0:22 move second child to first child (temp int)
|
||||
0:22 x0_out: direct index for structure (temp int)
|
||||
@@ -84,13 +84,13 @@ Shader version: 450
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
0:22 x0_out: direct index for structure (temp int)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
0:22 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput_Pos_out' (out 4-component vector of float Position)
|
||||
0:22 Pos_out: direct index for structure (temp 4-component vector of float Position)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 Pos_out: direct index for structure (temp 4-component vector of float)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Constant:
|
||||
0:22 1 (const int)
|
||||
0:22 move second child to first child (temp int)
|
||||
@@ -99,7 +99,7 @@ Shader version: 450
|
||||
0:22 Constant:
|
||||
0:22 1 (const int)
|
||||
0:22 x1_out: direct index for structure (temp int)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Constant:
|
||||
0:22 2 (const int)
|
||||
0:? Linker Objects
|
||||
@@ -129,7 +129,7 @@ Shader version: 450
|
||||
0:18 'fn1_out' (in structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:18 Constant:
|
||||
0:18 1 (const int)
|
||||
0:22 Function Definition: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 Function Definition: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Function Parameters:
|
||||
0:22 'vsin' (in structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
|
||||
0:? Sequence
|
||||
@@ -188,9 +188,9 @@ Shader version: 450
|
||||
0:22 2 (const int)
|
||||
0:? 'x1_in' (layout(location=1 ) in int)
|
||||
0:22 Sequence
|
||||
0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 Function Call: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 move second child to first child (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Function Call: @main(struct-VS_INPUT-i1-vf4-i11; (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:? 'vsin' (temp structure{temp int x0_in, temp 4-component vector of float Pos_in, temp int x1_in})
|
||||
0:22 move second child to first child (temp int)
|
||||
0:22 x0_out: direct index for structure (temp int)
|
||||
@@ -198,13 +198,13 @@ Shader version: 450
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
0:22 x0_out: direct index for structure (temp int)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Constant:
|
||||
0:22 0 (const int)
|
||||
0:22 move second child to first child (temp 4-component vector of float)
|
||||
0:? '@entryPointOutput_Pos_out' (out 4-component vector of float Position)
|
||||
0:22 Pos_out: direct index for structure (temp 4-component vector of float Position)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 Pos_out: direct index for structure (temp 4-component vector of float)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Constant:
|
||||
0:22 1 (const int)
|
||||
0:22 move second child to first child (temp int)
|
||||
@@ -213,7 +213,7 @@ Shader version: 450
|
||||
0:22 Constant:
|
||||
0:22 1 (const int)
|
||||
0:22 x1_out: direct index for structure (temp int)
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Position Pos_out, temp int x1_out})
|
||||
0:22 'flattenTemp' (temp structure{temp int x0_out, temp 4-component vector of float Pos_out, temp int x1_out})
|
||||
0:22 Constant:
|
||||
0:22 2 (const int)
|
||||
0:? Linker Objects
|
||||
@@ -225,12 +225,12 @@ Shader version: 450
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 95
|
||||
// Id's are bound by 83
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
MemoryModel Logical GLSL450
|
||||
EntryPoint Vertex 4 "main" 64 68 71 80 86 94
|
||||
EntryPoint Vertex 4 "main" 52 56 59 68 74 82
|
||||
Name 4 "main"
|
||||
Name 9 "VS_INPUT"
|
||||
MemberName 9(VS_INPUT) 0 "x0_in"
|
||||
@@ -243,41 +243,32 @@ Shader version: 450
|
||||
Name 16 "Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;"
|
||||
Name 14 "fn1_in"
|
||||
Name 15 "fn1_out"
|
||||
Name 18 "VS_INPUT"
|
||||
MemberName 18(VS_INPUT) 0 "x0_in"
|
||||
MemberName 18(VS_INPUT) 1 "Pos_in"
|
||||
MemberName 18(VS_INPUT) 2 "x1_in"
|
||||
Name 20 "VS_OUTPUT"
|
||||
MemberName 20(VS_OUTPUT) 0 "x0_out"
|
||||
MemberName 20(VS_OUTPUT) 1 "Pos_out"
|
||||
MemberName 20(VS_OUTPUT) 2 "x1_out"
|
||||
Name 23 "@main(struct-VS_INPUT-i1-vf4-i11;"
|
||||
Name 22 "vsin"
|
||||
Name 32 "vsout"
|
||||
Name 45 "param"
|
||||
Name 47 "param"
|
||||
Name 62 "vsin"
|
||||
Name 64 "x0_in"
|
||||
Name 68 "Pos_in"
|
||||
Name 71 "x1_in"
|
||||
Name 74 "flattenTemp"
|
||||
Name 75 "param"
|
||||
Name 78 "VS_OUTPUT"
|
||||
MemberName 78(VS_OUTPUT) 0 "x0_out"
|
||||
MemberName 78(VS_OUTPUT) 1 "x1_out"
|
||||
Name 80 "@entryPointOutput"
|
||||
Name 86 "@entryPointOutput_Pos_out"
|
||||
Name 92 "PerVertex_out"
|
||||
MemberName 92(PerVertex_out) 0 "@entryPointOutput_Pos_out"
|
||||
Name 94 "PerVertex_out"
|
||||
MemberDecorate 20(VS_OUTPUT) 1 BuiltIn Position
|
||||
Decorate 64(x0_in) Location 0
|
||||
Decorate 68(Pos_in) BuiltIn Position
|
||||
Decorate 71(x1_in) Location 1
|
||||
Decorate 80(@entryPointOutput) Location 0
|
||||
Decorate 86(@entryPointOutput_Pos_out) BuiltIn Position
|
||||
MemberDecorate 92(PerVertex_out) 0 BuiltIn Position
|
||||
Decorate 92(PerVertex_out) Block
|
||||
Name 20 "@main(struct-VS_INPUT-i1-vf4-i11;"
|
||||
Name 19 "vsin"
|
||||
Name 29 "vsout"
|
||||
Name 42 "param"
|
||||
Name 44 "param"
|
||||
Name 50 "vsin"
|
||||
Name 52 "x0_in"
|
||||
Name 56 "Pos_in"
|
||||
Name 59 "x1_in"
|
||||
Name 62 "flattenTemp"
|
||||
Name 63 "param"
|
||||
Name 66 "VS_OUTPUT"
|
||||
MemberName 66(VS_OUTPUT) 0 "x0_out"
|
||||
MemberName 66(VS_OUTPUT) 1 "x1_out"
|
||||
Name 68 "@entryPointOutput"
|
||||
Name 74 "@entryPointOutput_Pos_out"
|
||||
Name 80 "PerVertex_out"
|
||||
MemberName 80(PerVertex_out) 0 "@entryPointOutput_Pos_out"
|
||||
Name 82 "PerVertex_out"
|
||||
Decorate 52(x0_in) Location 0
|
||||
Decorate 56(Pos_in) BuiltIn Position
|
||||
Decorate 59(x1_in) Location 1
|
||||
Decorate 68(@entryPointOutput) Location 0
|
||||
Decorate 74(@entryPointOutput_Pos_out) BuiltIn Position
|
||||
MemberDecorate 80(PerVertex_out) 0 BuiltIn Position
|
||||
Decorate 80(PerVertex_out) Block
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
6: TypeInt 32 1
|
||||
@@ -288,106 +279,91 @@ Shader version: 450
|
||||
11(VS_OUTPUT): TypeStruct 6(int) 8(fvec4) 6(int)
|
||||
12: TypePointer Function 11(VS_OUTPUT)
|
||||
13: TypeFunction 2 10(ptr) 12(ptr)
|
||||
18(VS_INPUT): TypeStruct 6(int) 8(fvec4) 6(int)
|
||||
19: TypePointer Function 18(VS_INPUT)
|
||||
20(VS_OUTPUT): TypeStruct 6(int) 8(fvec4) 6(int)
|
||||
21: TypeFunction 20(VS_OUTPUT) 19(ptr)
|
||||
25: 6(int) Constant 1
|
||||
26: TypePointer Function 8(fvec4)
|
||||
33: 6(int) Constant 0
|
||||
34: TypePointer Function 6(int)
|
||||
41: 6(int) Constant 2
|
||||
51: TypePointer Function 20(VS_OUTPUT)
|
||||
63: TypePointer Input 6(int)
|
||||
64(x0_in): 63(ptr) Variable Input
|
||||
67: TypePointer Input 8(fvec4)
|
||||
68(Pos_in): 67(ptr) Variable Input
|
||||
71(x1_in): 63(ptr) Variable Input
|
||||
78(VS_OUTPUT): TypeStruct 6(int) 6(int)
|
||||
79: TypePointer Output 78(VS_OUTPUT)
|
||||
80(@entryPointOutput): 79(ptr) Variable Output
|
||||
83: TypePointer Output 6(int)
|
||||
85: TypePointer Output 8(fvec4)
|
||||
86(@entryPointOutput_Pos_out): 85(ptr) Variable Output
|
||||
92(PerVertex_out): TypeStruct 8(fvec4)
|
||||
93: TypePointer Output 92(PerVertex_out)
|
||||
94(PerVertex_out): 93(ptr) Variable Output
|
||||
18: TypeFunction 11(VS_OUTPUT) 10(ptr)
|
||||
22: 6(int) Constant 1
|
||||
23: TypePointer Function 8(fvec4)
|
||||
30: 6(int) Constant 0
|
||||
31: TypePointer Function 6(int)
|
||||
38: 6(int) Constant 2
|
||||
51: TypePointer Input 6(int)
|
||||
52(x0_in): 51(ptr) Variable Input
|
||||
55: TypePointer Input 8(fvec4)
|
||||
56(Pos_in): 55(ptr) Variable Input
|
||||
59(x1_in): 51(ptr) Variable Input
|
||||
66(VS_OUTPUT): TypeStruct 6(int) 6(int)
|
||||
67: TypePointer Output 66(VS_OUTPUT)
|
||||
68(@entryPointOutput): 67(ptr) Variable Output
|
||||
71: TypePointer Output 6(int)
|
||||
73: TypePointer Output 8(fvec4)
|
||||
74(@entryPointOutput_Pos_out): 73(ptr) Variable Output
|
||||
80(PerVertex_out): TypeStruct 8(fvec4)
|
||||
81: TypePointer Output 80(PerVertex_out)
|
||||
82(PerVertex_out): 81(ptr) Variable Output
|
||||
4(main): 2 Function None 3
|
||||
5: Label
|
||||
62(vsin): 19(ptr) Variable Function
|
||||
74(flattenTemp): 51(ptr) Variable Function
|
||||
75(param): 19(ptr) Variable Function
|
||||
65: 6(int) Load 64(x0_in)
|
||||
66: 34(ptr) AccessChain 62(vsin) 33
|
||||
Store 66 65
|
||||
69: 8(fvec4) Load 68(Pos_in)
|
||||
70: 26(ptr) AccessChain 62(vsin) 25
|
||||
Store 70 69
|
||||
72: 6(int) Load 71(x1_in)
|
||||
73: 34(ptr) AccessChain 62(vsin) 41
|
||||
Store 73 72
|
||||
76:18(VS_INPUT) Load 62(vsin)
|
||||
Store 75(param) 76
|
||||
77:20(VS_OUTPUT) FunctionCall 23(@main(struct-VS_INPUT-i1-vf4-i11;) 75(param)
|
||||
Store 74(flattenTemp) 77
|
||||
81: 34(ptr) AccessChain 74(flattenTemp) 33
|
||||
82: 6(int) Load 81
|
||||
84: 83(ptr) AccessChain 80(@entryPointOutput) 33
|
||||
Store 84 82
|
||||
87: 26(ptr) AccessChain 74(flattenTemp) 25
|
||||
88: 8(fvec4) Load 87
|
||||
Store 86(@entryPointOutput_Pos_out) 88
|
||||
89: 34(ptr) AccessChain 74(flattenTemp) 41
|
||||
90: 6(int) Load 89
|
||||
91: 83(ptr) AccessChain 80(@entryPointOutput) 25
|
||||
Store 91 90
|
||||
50(vsin): 10(ptr) Variable Function
|
||||
62(flattenTemp): 12(ptr) Variable Function
|
||||
63(param): 10(ptr) Variable Function
|
||||
53: 6(int) Load 52(x0_in)
|
||||
54: 31(ptr) AccessChain 50(vsin) 30
|
||||
Store 54 53
|
||||
57: 8(fvec4) Load 56(Pos_in)
|
||||
58: 23(ptr) AccessChain 50(vsin) 22
|
||||
Store 58 57
|
||||
60: 6(int) Load 59(x1_in)
|
||||
61: 31(ptr) AccessChain 50(vsin) 38
|
||||
Store 61 60
|
||||
64: 9(VS_INPUT) Load 50(vsin)
|
||||
Store 63(param) 64
|
||||
65:11(VS_OUTPUT) FunctionCall 20(@main(struct-VS_INPUT-i1-vf4-i11;) 63(param)
|
||||
Store 62(flattenTemp) 65
|
||||
69: 31(ptr) AccessChain 62(flattenTemp) 30
|
||||
70: 6(int) Load 69
|
||||
72: 71(ptr) AccessChain 68(@entryPointOutput) 30
|
||||
Store 72 70
|
||||
75: 23(ptr) AccessChain 62(flattenTemp) 22
|
||||
76: 8(fvec4) Load 75
|
||||
Store 74(@entryPointOutput_Pos_out) 76
|
||||
77: 31(ptr) AccessChain 62(flattenTemp) 38
|
||||
78: 6(int) Load 77
|
||||
79: 71(ptr) AccessChain 68(@entryPointOutput) 22
|
||||
Store 79 78
|
||||
Return
|
||||
FunctionEnd
|
||||
16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;): 2 Function None 13
|
||||
14(fn1_in): 10(ptr) FunctionParameter
|
||||
15(fn1_out): 12(ptr) FunctionParameter
|
||||
17: Label
|
||||
27: 26(ptr) AccessChain 14(fn1_in) 25
|
||||
28: 8(fvec4) Load 27
|
||||
29: 26(ptr) AccessChain 15(fn1_out) 25
|
||||
30: 8(fvec4) Load 29
|
||||
31: 8(fvec4) FAdd 28 30
|
||||
24: 23(ptr) AccessChain 14(fn1_in) 22
|
||||
25: 8(fvec4) Load 24
|
||||
26: 23(ptr) AccessChain 15(fn1_out) 22
|
||||
27: 8(fvec4) Load 26
|
||||
28: 8(fvec4) FAdd 25 27
|
||||
Return
|
||||
FunctionEnd
|
||||
23(@main(struct-VS_INPUT-i1-vf4-i11;):20(VS_OUTPUT) Function None 21
|
||||
22(vsin): 19(ptr) FunctionParameter
|
||||
24: Label
|
||||
32(vsout): 12(ptr) Variable Function
|
||||
45(param): 19(ptr) Variable Function
|
||||
47(param): 12(ptr) Variable Function
|
||||
52: 51(ptr) Variable Function
|
||||
35: 34(ptr) AccessChain 22(vsin) 33
|
||||
36: 6(int) Load 35
|
||||
37: 34(ptr) AccessChain 32(vsout) 33
|
||||
20(@main(struct-VS_INPUT-i1-vf4-i11;):11(VS_OUTPUT) Function None 18
|
||||
19(vsin): 10(ptr) FunctionParameter
|
||||
21: Label
|
||||
29(vsout): 12(ptr) Variable Function
|
||||
42(param): 10(ptr) Variable Function
|
||||
44(param): 12(ptr) Variable Function
|
||||
32: 31(ptr) AccessChain 19(vsin) 30
|
||||
33: 6(int) Load 32
|
||||
34: 31(ptr) AccessChain 29(vsout) 30
|
||||
Store 34 33
|
||||
35: 23(ptr) AccessChain 19(vsin) 22
|
||||
36: 8(fvec4) Load 35
|
||||
37: 23(ptr) AccessChain 29(vsout) 22
|
||||
Store 37 36
|
||||
38: 26(ptr) AccessChain 22(vsin) 25
|
||||
39: 8(fvec4) Load 38
|
||||
40: 26(ptr) AccessChain 32(vsout) 25
|
||||
Store 40 39
|
||||
42: 34(ptr) AccessChain 22(vsin) 41
|
||||
43: 6(int) Load 42
|
||||
44: 34(ptr) AccessChain 32(vsout) 41
|
||||
Store 44 43
|
||||
46:18(VS_INPUT) Load 22(vsin)
|
||||
Store 45(param) 46
|
||||
48:11(VS_OUTPUT) Load 32(vsout)
|
||||
Store 47(param) 48
|
||||
49: 2 FunctionCall 16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;) 45(param) 47(param)
|
||||
50:11(VS_OUTPUT) Load 32(vsout)
|
||||
53: 6(int) CompositeExtract 50 0
|
||||
54: 34(ptr) AccessChain 52 33
|
||||
Store 54 53
|
||||
55: 8(fvec4) CompositeExtract 50 1
|
||||
56: 26(ptr) AccessChain 52 25
|
||||
Store 56 55
|
||||
57: 6(int) CompositeExtract 50 2
|
||||
58: 34(ptr) AccessChain 52 41
|
||||
Store 58 57
|
||||
59:20(VS_OUTPUT) Load 52
|
||||
ReturnValue 59
|
||||
39: 31(ptr) AccessChain 19(vsin) 38
|
||||
40: 6(int) Load 39
|
||||
41: 31(ptr) AccessChain 29(vsout) 38
|
||||
Store 41 40
|
||||
43: 9(VS_INPUT) Load 19(vsin)
|
||||
Store 42(param) 43
|
||||
45:11(VS_OUTPUT) Load 29(vsout)
|
||||
Store 44(param) 45
|
||||
46: 2 FunctionCall 16(Fn1(struct-VS_INPUT-i1-vf4-i11;struct-VS_OUTPUT-i1-vf4-i11;) 42(param) 44(param)
|
||||
47:11(VS_OUTPUT) Load 29(vsout)
|
||||
ReturnValue 47
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user