HLSL: Airplane work: break/continue/discard grammar, and decls for for/if/while.
This commit is contained in:
@@ -2,7 +2,7 @@ hlsl.forLoop.frag
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:9 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:14 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:2 Function Parameters:
|
||||
0:2 'input' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
@@ -52,6 +52,61 @@ gl_FragCoord origin is upper left
|
||||
0:7 'input' (in 4-component vector of float)
|
||||
0:7 Constant:
|
||||
0:7 2.000000
|
||||
0:? Sequence
|
||||
0:8 Loop with condition tested first
|
||||
0:8 No loop condition
|
||||
0:8 Loop Body
|
||||
0:8 Test condition and select (temp void)
|
||||
0:8 Condition
|
||||
0:8 Compare Greater Than (temp bool)
|
||||
0:8 direct index (temp float)
|
||||
0:8 'input' (in 4-component vector of float)
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 Constant:
|
||||
0:8 2.000000
|
||||
0:8 true case
|
||||
0:8 Branch: Break
|
||||
0:? Sequence
|
||||
0:9 Loop with condition tested first
|
||||
0:9 No loop condition
|
||||
0:9 Loop Body
|
||||
0:9 Test condition and select (temp void)
|
||||
0:9 Condition
|
||||
0:9 Compare Greater Than (temp bool)
|
||||
0:9 direct index (temp float)
|
||||
0:9 'input' (in 4-component vector of float)
|
||||
0:9 Constant:
|
||||
0:9 0 (const int)
|
||||
0:9 Constant:
|
||||
0:9 2.000000
|
||||
0:9 true case
|
||||
0:9 Branch: Continue
|
||||
0:11 Sequence
|
||||
0:11 move second child to first child (temp int)
|
||||
0:11 'ii' (temp int)
|
||||
0:11 Constant:
|
||||
0:11 -1 (const int)
|
||||
0:11 Loop with condition tested first
|
||||
0:11 Loop Condition
|
||||
0:11 Compare Less Than (temp bool)
|
||||
0:11 'ii' (temp int)
|
||||
0:11 Constant:
|
||||
0:11 3 (const int)
|
||||
0:11 Loop Body
|
||||
0:11 Test condition and select (temp void)
|
||||
0:11 Condition
|
||||
0:11 Compare Equal (temp bool)
|
||||
0:11 'ii' (temp int)
|
||||
0:11 Constant:
|
||||
0:11 2 (const int)
|
||||
0:11 true case
|
||||
0:11 Branch: Continue
|
||||
0:11 Loop Terminal Expression
|
||||
0:11 Pre-Increment (temp int)
|
||||
0:11 'ii' (temp int)
|
||||
0:12 Pre-Decrement (temp float)
|
||||
0:12 'ii' (temp float)
|
||||
0:? Linker Objects
|
||||
|
||||
|
||||
@@ -61,7 +116,7 @@ Linked fragment stage:
|
||||
Shader version: 450
|
||||
gl_FragCoord origin is upper left
|
||||
0:? Sequence
|
||||
0:9 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:14 Function Definition: PixelShaderFunction(vf4; (temp 4-component vector of float)
|
||||
0:2 Function Parameters:
|
||||
0:2 'input' (in 4-component vector of float)
|
||||
0:? Sequence
|
||||
@@ -111,11 +166,66 @@ gl_FragCoord origin is upper left
|
||||
0:7 'input' (in 4-component vector of float)
|
||||
0:7 Constant:
|
||||
0:7 2.000000
|
||||
0:? Sequence
|
||||
0:8 Loop with condition tested first
|
||||
0:8 No loop condition
|
||||
0:8 Loop Body
|
||||
0:8 Test condition and select (temp void)
|
||||
0:8 Condition
|
||||
0:8 Compare Greater Than (temp bool)
|
||||
0:8 direct index (temp float)
|
||||
0:8 'input' (in 4-component vector of float)
|
||||
0:8 Constant:
|
||||
0:8 0 (const int)
|
||||
0:8 Constant:
|
||||
0:8 2.000000
|
||||
0:8 true case
|
||||
0:8 Branch: Break
|
||||
0:? Sequence
|
||||
0:9 Loop with condition tested first
|
||||
0:9 No loop condition
|
||||
0:9 Loop Body
|
||||
0:9 Test condition and select (temp void)
|
||||
0:9 Condition
|
||||
0:9 Compare Greater Than (temp bool)
|
||||
0:9 direct index (temp float)
|
||||
0:9 'input' (in 4-component vector of float)
|
||||
0:9 Constant:
|
||||
0:9 0 (const int)
|
||||
0:9 Constant:
|
||||
0:9 2.000000
|
||||
0:9 true case
|
||||
0:9 Branch: Continue
|
||||
0:11 Sequence
|
||||
0:11 move second child to first child (temp int)
|
||||
0:11 'ii' (temp int)
|
||||
0:11 Constant:
|
||||
0:11 -1 (const int)
|
||||
0:11 Loop with condition tested first
|
||||
0:11 Loop Condition
|
||||
0:11 Compare Less Than (temp bool)
|
||||
0:11 'ii' (temp int)
|
||||
0:11 Constant:
|
||||
0:11 3 (const int)
|
||||
0:11 Loop Body
|
||||
0:11 Test condition and select (temp void)
|
||||
0:11 Condition
|
||||
0:11 Compare Equal (temp bool)
|
||||
0:11 'ii' (temp int)
|
||||
0:11 Constant:
|
||||
0:11 2 (const int)
|
||||
0:11 true case
|
||||
0:11 Branch: Continue
|
||||
0:11 Loop Terminal Expression
|
||||
0:11 Pre-Increment (temp int)
|
||||
0:11 'ii' (temp int)
|
||||
0:12 Pre-Decrement (temp float)
|
||||
0:12 'ii' (temp float)
|
||||
0:? Linker Objects
|
||||
|
||||
// Module Version 10000
|
||||
// Generated by (magic number): 80001
|
||||
// Id's are bound by 64
|
||||
// Id's are bound by 112
|
||||
|
||||
Capability Shader
|
||||
1: ExtInstImport "GLSL.std.450"
|
||||
@@ -125,6 +235,8 @@ gl_FragCoord origin is upper left
|
||||
Source HLSL 450
|
||||
Name 4 "PixelShaderFunction"
|
||||
Name 13 "input"
|
||||
Name 89 "ii"
|
||||
Name 109 "ii"
|
||||
2: TypeVoid
|
||||
3: TypeFunction 2
|
||||
10: TypeFloat 32
|
||||
@@ -135,8 +247,20 @@ gl_FragCoord origin is upper left
|
||||
29: TypeBool
|
||||
30: TypeVector 29(bool) 4
|
||||
60: 10(float) Constant 1073741824
|
||||
68: TypeInt 32 0
|
||||
69: 68(int) Constant 0
|
||||
70: TypePointer Input 10(float)
|
||||
87: TypeInt 32 1
|
||||
88: TypePointer Function 87(int)
|
||||
90: 87(int) Constant 4294967295
|
||||
97: 87(int) Constant 3
|
||||
100: 87(int) Constant 2
|
||||
106: 87(int) Constant 1
|
||||
108: TypePointer Function 10(float)
|
||||
4(PixelShaderFunction): 2 Function None 3
|
||||
5: Label
|
||||
89(ii): 88(ptr) Variable Function
|
||||
109(ii): 108(ptr) Variable Function
|
||||
Branch 6
|
||||
6: Label
|
||||
LoopMerge 8 9 None
|
||||
@@ -216,5 +340,66 @@ gl_FragCoord origin is upper left
|
||||
Store 13(input) 63
|
||||
Branch 48
|
||||
50: Label
|
||||
Branch 64
|
||||
64: Label
|
||||
LoopMerge 66 67 None
|
||||
Branch 65
|
||||
65: Label
|
||||
71: 70(ptr) AccessChain 13(input) 69
|
||||
72: 10(float) Load 71
|
||||
73: 29(bool) FOrdGreaterThan 72 60
|
||||
SelectionMerge 75 None
|
||||
BranchConditional 73 74 75
|
||||
74: Label
|
||||
Branch 66
|
||||
75: Label
|
||||
Branch 67
|
||||
67: Label
|
||||
Branch 64
|
||||
66: Label
|
||||
Branch 77
|
||||
77: Label
|
||||
LoopMerge 79 80 None
|
||||
Branch 78
|
||||
78: Label
|
||||
81: 70(ptr) AccessChain 13(input) 69
|
||||
82: 10(float) Load 81
|
||||
83: 29(bool) FOrdGreaterThan 82 60
|
||||
SelectionMerge 85 None
|
||||
BranchConditional 83 84 85
|
||||
84: Label
|
||||
Branch 80
|
||||
85: Label
|
||||
Branch 80
|
||||
80: Label
|
||||
Branch 77
|
||||
79: Label
|
||||
Store 89(ii) 90
|
||||
Branch 91
|
||||
91: Label
|
||||
LoopMerge 93 94 None
|
||||
Branch 95
|
||||
95: Label
|
||||
96: 87(int) Load 89(ii)
|
||||
98: 29(bool) SLessThan 96 97
|
||||
BranchConditional 98 92 93
|
||||
92: Label
|
||||
99: 87(int) Load 89(ii)
|
||||
101: 29(bool) IEqual 99 100
|
||||
SelectionMerge 103 None
|
||||
BranchConditional 101 102 103
|
||||
102: Label
|
||||
Branch 94
|
||||
103: Label
|
||||
Branch 94
|
||||
94: Label
|
||||
105: 87(int) Load 89(ii)
|
||||
107: 87(int) IAdd 105 106
|
||||
Store 89(ii) 107
|
||||
Branch 91
|
||||
93: Label
|
||||
110: 10(float) Load 109(ii)
|
||||
111: 10(float) FSub 110 15
|
||||
Store 109(ii) 111
|
||||
Return
|
||||
FunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user