HLSL: Translate directive [flatten] and [branch] to SPV control mask.

This commit is contained in:
Rex Xu
2017-07-04 23:23:40 +08:00
parent 423fae4858
commit 57e65929e4
15 changed files with 92 additions and 35 deletions

View File

@@ -90,7 +90,7 @@ gl_FragCoord origin is upper left
11(@PixelShaderFunction(vf4;): 2 Function None 9
10(input): 8(ptr) FunctionParameter
12: Label
SelectionMerge 16 None
SelectionMerge 16 DontFlatten
BranchConditional 14 15 16
15: Label
Branch 16

View File

@@ -319,7 +319,7 @@ gl_FragCoord origin is upper left
48: 7(fvec4) Load 10(input)
49: 16(bvec4) FOrdEqual 47 48
50: 15(bool) All 49
SelectionMerge 52 None
SelectionMerge 52 Flatten
BranchConditional 50 51 52
51: Label
53: 7(fvec4) Load 10(input)

View File

@@ -399,7 +399,7 @@ gl_FragCoord origin is upper left
Branch 25
25: Label
36: 9(int) Load 13(c)
SelectionMerge 40 None
SelectionMerge 40 DontFlatten
Switch 36 39
case 1: 37
case 2: 38