HLSL: Fix binary-expression associativity and termination issue.
This commit is contained in:
parent
fea226ba43
commit
64076ed7e9
@ -11,6 +11,9 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 direct index (temp 4-component vector of float)
|
0:10 direct index (temp 4-component vector of float)
|
||||||
0:10 'a' (global 4-element array of 4-component vector of float)
|
0:10 'a' (global 4-element array of 4-component vector of float)
|
||||||
0:10 Constant:
|
0:10 Constant:
|
||||||
@ -18,7 +21,6 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 indirect index (temp 4-component vector of float)
|
0:10 indirect index (temp 4-component vector of float)
|
||||||
0:10 'a' (global 4-element array of 4-component vector of float)
|
0:10 'a' (global 4-element array of 4-component vector of float)
|
||||||
0:10 'i' (in int)
|
0:10 'i' (in int)
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 direct index (temp 4-component vector of float)
|
0:10 direct index (temp 4-component vector of float)
|
||||||
0:10 'input' (in 3-element array of 4-component vector of float)
|
0:10 'input' (in 3-element array of 4-component vector of float)
|
||||||
0:10 Constant:
|
0:10 Constant:
|
||||||
@ -26,8 +28,6 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 indirect index (temp 4-component vector of float)
|
0:10 indirect index (temp 4-component vector of float)
|
||||||
0:10 'input' (in 3-element array of 4-component vector of float)
|
0:10 'input' (in 3-element array of 4-component vector of float)
|
||||||
0:10 'i' (in int)
|
0:10 'i' (in int)
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 direct index (temp 4-component vector of float)
|
0:10 direct index (temp 4-component vector of float)
|
||||||
0:10 'b' (temp 10-element array of 4-component vector of float)
|
0:10 'b' (temp 10-element array of 4-component vector of float)
|
||||||
0:10 Constant:
|
0:10 Constant:
|
||||||
@ -63,6 +63,9 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 direct index (temp 4-component vector of float)
|
0:10 direct index (temp 4-component vector of float)
|
||||||
0:10 'a' (global 4-element array of 4-component vector of float)
|
0:10 'a' (global 4-element array of 4-component vector of float)
|
||||||
0:10 Constant:
|
0:10 Constant:
|
||||||
@ -70,7 +73,6 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 indirect index (temp 4-component vector of float)
|
0:10 indirect index (temp 4-component vector of float)
|
||||||
0:10 'a' (global 4-element array of 4-component vector of float)
|
0:10 'a' (global 4-element array of 4-component vector of float)
|
||||||
0:10 'i' (in int)
|
0:10 'i' (in int)
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 direct index (temp 4-component vector of float)
|
0:10 direct index (temp 4-component vector of float)
|
||||||
0:10 'input' (in 3-element array of 4-component vector of float)
|
0:10 'input' (in 3-element array of 4-component vector of float)
|
||||||
0:10 Constant:
|
0:10 Constant:
|
||||||
@ -78,8 +80,6 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 indirect index (temp 4-component vector of float)
|
0:10 indirect index (temp 4-component vector of float)
|
||||||
0:10 'input' (in 3-element array of 4-component vector of float)
|
0:10 'input' (in 3-element array of 4-component vector of float)
|
||||||
0:10 'i' (in int)
|
0:10 'i' (in int)
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 direct index (temp 4-component vector of float)
|
0:10 direct index (temp 4-component vector of float)
|
||||||
0:10 'b' (temp 10-element array of 4-component vector of float)
|
0:10 'b' (temp 10-element array of 4-component vector of float)
|
||||||
0:10 Constant:
|
0:10 Constant:
|
||||||
@ -114,9 +114,9 @@ gl_FragCoord origin is upper left
|
|||||||
Name 19 "i"
|
Name 19 "i"
|
||||||
Name 27 "input"
|
Name 27 "input"
|
||||||
Name 40 "b"
|
Name 40 "b"
|
||||||
Name 51 ""
|
Name 52 ""
|
||||||
MemberName 51 0 "m"
|
MemberName 52 0 "m"
|
||||||
Name 55 "s"
|
Name 56 "s"
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
@ -142,14 +142,14 @@ gl_FragCoord origin is upper left
|
|||||||
39: TypePointer Function 38
|
39: TypePointer Function 38
|
||||||
41: 13(int) Constant 5
|
41: 13(int) Constant 5
|
||||||
42: TypePointer Function 7(fvec4)
|
42: TypePointer Function 7(fvec4)
|
||||||
49: 8(int) Constant 7
|
50: 8(int) Constant 7
|
||||||
50: TypeArray 7(fvec4) 49
|
51: TypeArray 7(fvec4) 50
|
||||||
51: TypeStruct 50
|
52: TypeStruct 51
|
||||||
52: 8(int) Constant 11
|
53: 8(int) Constant 11
|
||||||
53: TypeArray 51(struct) 52
|
54: TypeArray 52(struct) 53
|
||||||
54: TypePointer Private 53
|
55: TypePointer Private 54
|
||||||
55(s): 54(ptr) Variable Private
|
56(s): 55(ptr) Variable Private
|
||||||
57: 13(int) Constant 0
|
58: 13(int) Constant 0
|
||||||
4(PixelShaderFunction): 2 Function None 3
|
4(PixelShaderFunction): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
40(b): 39(ptr) Variable Function
|
40(b): 39(ptr) Variable Function
|
||||||
@ -161,22 +161,22 @@ gl_FragCoord origin is upper left
|
|||||||
23: 7(fvec4) FAdd 17 22
|
23: 7(fvec4) FAdd 17 22
|
||||||
30: 29(ptr) AccessChain 27(input) 28
|
30: 29(ptr) AccessChain 27(input) 28
|
||||||
31: 7(fvec4) Load 30
|
31: 7(fvec4) Load 30
|
||||||
32: 13(int) Load 19(i)
|
32: 7(fvec4) FAdd 23 31
|
||||||
33: 29(ptr) AccessChain 27(input) 32
|
33: 13(int) Load 19(i)
|
||||||
34: 7(fvec4) Load 33
|
34: 29(ptr) AccessChain 27(input) 33
|
||||||
35: 7(fvec4) FAdd 31 34
|
35: 7(fvec4) Load 34
|
||||||
36: 7(fvec4) FAdd 23 35
|
36: 7(fvec4) FAdd 32 35
|
||||||
43: 42(ptr) AccessChain 40(b) 41
|
43: 42(ptr) AccessChain 40(b) 41
|
||||||
44: 7(fvec4) Load 43
|
44: 7(fvec4) Load 43
|
||||||
45: 13(int) Load 19(i)
|
45: 7(fvec4) FAdd 36 44
|
||||||
46: 42(ptr) AccessChain 40(b) 45
|
46: 13(int) Load 19(i)
|
||||||
47: 7(fvec4) Load 46
|
47: 42(ptr) AccessChain 40(b) 46
|
||||||
48: 7(fvec4) FAdd 44 47
|
48: 7(fvec4) Load 47
|
||||||
56: 13(int) Load 19(i)
|
49: 7(fvec4) FAdd 45 48
|
||||||
58: 13(int) Load 19(i)
|
57: 13(int) Load 19(i)
|
||||||
59: 15(ptr) AccessChain 55(s) 56 57 58
|
59: 13(int) Load 19(i)
|
||||||
60: 7(fvec4) Load 59
|
60: 15(ptr) AccessChain 56(s) 57 58 59
|
||||||
61: 7(fvec4) FAdd 48 60
|
61: 7(fvec4) Load 60
|
||||||
62: 7(fvec4) FAdd 36 61
|
62: 7(fvec4) FAdd 49 61
|
||||||
ReturnValue 62
|
ReturnValue 62
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -23,9 +23,9 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 'a1' (in 4-component vector of float)
|
0:10 'a1' (in 4-component vector of float)
|
||||||
0:10 'a2' (in 4-component vector of float)
|
0:10 'a2' (in 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 'a3' (in 4-component vector of float)
|
0:10 'a3' (in 4-component vector of float)
|
||||||
0:10 'a4' (in 4-component vector of float)
|
0:10 'a4' (in 4-component vector of float)
|
||||||
0:10 'a5' (in 4-component vector of float)
|
0:10 'a5' (in 4-component vector of float)
|
||||||
@ -59,9 +59,9 @@ gl_FragCoord origin is upper left
|
|||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
0:10 add (temp 4-component vector of float)
|
||||||
|
0:10 add (temp 4-component vector of float)
|
||||||
0:10 'a1' (in 4-component vector of float)
|
0:10 'a1' (in 4-component vector of float)
|
||||||
0:10 'a2' (in 4-component vector of float)
|
0:10 'a2' (in 4-component vector of float)
|
||||||
0:10 add (temp 4-component vector of float)
|
|
||||||
0:10 'a3' (in 4-component vector of float)
|
0:10 'a3' (in 4-component vector of float)
|
||||||
0:10 'a4' (in 4-component vector of float)
|
0:10 'a4' (in 4-component vector of float)
|
||||||
0:10 'a5' (in 4-component vector of float)
|
0:10 'a5' (in 4-component vector of float)
|
||||||
@ -104,9 +104,9 @@ gl_FragCoord origin is upper left
|
|||||||
16: 7(fvec4) Load 10(a2)
|
16: 7(fvec4) Load 10(a2)
|
||||||
17: 7(fvec4) FAdd 15 16
|
17: 7(fvec4) FAdd 15 16
|
||||||
18: 7(fvec4) Load 11(a3)
|
18: 7(fvec4) Load 11(a3)
|
||||||
19: 7(fvec4) Load 12(a4)
|
19: 7(fvec4) FAdd 17 18
|
||||||
20: 7(fvec4) FAdd 18 19
|
20: 7(fvec4) Load 12(a4)
|
||||||
21: 7(fvec4) FAdd 17 20
|
21: 7(fvec4) FAdd 19 20
|
||||||
22: 7(fvec4) Load 13(a5)
|
22: 7(fvec4) Load 13(a5)
|
||||||
23: 7(fvec4) FAdd 21 22
|
23: 7(fvec4) FAdd 21 22
|
||||||
ReturnValue 23
|
ReturnValue 23
|
||||||
|
@ -10,12 +10,12 @@ gl_FragCoord origin is upper left
|
|||||||
0:21 add (temp 4-component vector of float)
|
0:21 add (temp 4-component vector of float)
|
||||||
0:21 add (temp 4-component vector of float)
|
0:21 add (temp 4-component vector of float)
|
||||||
0:21 add (temp 4-component vector of float)
|
0:21 add (temp 4-component vector of float)
|
||||||
|
0:21 add (temp 4-component vector of float)
|
||||||
0:21 'input' (in 4-component vector of float)
|
0:21 'input' (in 4-component vector of float)
|
||||||
0:21 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
0:21 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||||
0:21 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
0:21 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||||
0:21 Constant:
|
0:21 Constant:
|
||||||
0:21 0 (const uint)
|
0:21 0 (const uint)
|
||||||
0:21 add (temp 4-component vector of float)
|
|
||||||
0:21 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
0:21 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||||
0:21 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
0:21 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||||
0:21 Constant:
|
0:21 Constant:
|
||||||
@ -49,12 +49,12 @@ gl_FragCoord origin is upper left
|
|||||||
0:21 add (temp 4-component vector of float)
|
0:21 add (temp 4-component vector of float)
|
||||||
0:21 add (temp 4-component vector of float)
|
0:21 add (temp 4-component vector of float)
|
||||||
0:21 add (temp 4-component vector of float)
|
0:21 add (temp 4-component vector of float)
|
||||||
|
0:21 add (temp 4-component vector of float)
|
||||||
0:21 'input' (in 4-component vector of float)
|
0:21 'input' (in 4-component vector of float)
|
||||||
0:21 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
0:21 v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
|
||||||
0:21 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
0:21 'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
|
||||||
0:21 Constant:
|
0:21 Constant:
|
||||||
0:21 0 (const uint)
|
0:21 0 (const uint)
|
||||||
0:21 add (temp 4-component vector of float)
|
|
||||||
0:21 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
0:21 v2: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
|
||||||
0:21 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
0:21 'anon@1' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v2})
|
||||||
0:21 Constant:
|
0:21 Constant:
|
||||||
@ -91,10 +91,10 @@ gl_FragCoord origin is upper left
|
|||||||
Name 20 ""
|
Name 20 ""
|
||||||
MemberName 20 0 "v2"
|
MemberName 20 0 "v2"
|
||||||
Name 22 ""
|
Name 22 ""
|
||||||
Name 25 ""
|
Name 26 ""
|
||||||
MemberName 25 0 "v3"
|
MemberName 26 0 "v3"
|
||||||
MemberName 25 1 "i3"
|
MemberName 26 1 "i3"
|
||||||
Name 27 ""
|
Name 28 ""
|
||||||
Name 32 ""
|
Name 32 ""
|
||||||
MemberName 32 0 "v4"
|
MemberName 32 0 "v4"
|
||||||
MemberName 32 1 "i4"
|
MemberName 32 1 "i4"
|
||||||
@ -105,10 +105,10 @@ gl_FragCoord origin is upper left
|
|||||||
MemberDecorate 20 0 Offset 0
|
MemberDecorate 20 0 Offset 0
|
||||||
Decorate 20 BufferBlock
|
Decorate 20 BufferBlock
|
||||||
Decorate 22 DescriptorSet 0
|
Decorate 22 DescriptorSet 0
|
||||||
MemberDecorate 25 0 Offset 0
|
MemberDecorate 26 0 Offset 0
|
||||||
MemberDecorate 25 1 Offset 16
|
MemberDecorate 26 1 Offset 16
|
||||||
Decorate 25 Block
|
Decorate 26 Block
|
||||||
Decorate 27 DescriptorSet 0
|
Decorate 28 DescriptorSet 0
|
||||||
MemberDecorate 32 0 Offset 0
|
MemberDecorate 32 0 Offset 0
|
||||||
MemberDecorate 32 1 Offset 16
|
MemberDecorate 32 1 Offset 16
|
||||||
Decorate 32 BufferBlock
|
Decorate 32 BufferBlock
|
||||||
@ -128,9 +128,9 @@ gl_FragCoord origin is upper left
|
|||||||
20: TypeStruct 7(fvec4)
|
20: TypeStruct 7(fvec4)
|
||||||
21: TypePointer Uniform 20(struct)
|
21: TypePointer Uniform 20(struct)
|
||||||
22: 21(ptr) Variable Uniform
|
22: 21(ptr) Variable Uniform
|
||||||
25: TypeStruct 7(fvec4) 14(int)
|
26: TypeStruct 7(fvec4) 14(int)
|
||||||
26: TypePointer Uniform 25(struct)
|
27: TypePointer Uniform 26(struct)
|
||||||
27: 26(ptr) Variable Uniform
|
28: 27(ptr) Variable Uniform
|
||||||
32: TypeStruct 7(fvec4) 14(int)
|
32: TypeStruct 7(fvec4) 14(int)
|
||||||
33: TypePointer Uniform 32(struct)
|
33: TypePointer Uniform 32(struct)
|
||||||
34: 33(ptr) Variable Uniform
|
34: 33(ptr) Variable Uniform
|
||||||
@ -142,10 +142,10 @@ gl_FragCoord origin is upper left
|
|||||||
19: 7(fvec4) FAdd 10 18
|
19: 7(fvec4) FAdd 10 18
|
||||||
23: 16(ptr) AccessChain 22 15
|
23: 16(ptr) AccessChain 22 15
|
||||||
24: 7(fvec4) Load 23
|
24: 7(fvec4) Load 23
|
||||||
28: 16(ptr) AccessChain 27 15
|
25: 7(fvec4) FAdd 19 24
|
||||||
29: 7(fvec4) Load 28
|
29: 16(ptr) AccessChain 28 15
|
||||||
30: 7(fvec4) FAdd 24 29
|
30: 7(fvec4) Load 29
|
||||||
31: 7(fvec4) FAdd 19 30
|
31: 7(fvec4) FAdd 25 30
|
||||||
35: 16(ptr) AccessChain 34 15
|
35: 16(ptr) AccessChain 34 15
|
||||||
36: 7(fvec4) Load 35
|
36: 7(fvec4) Load 35
|
||||||
37: 7(fvec4) FAdd 31 36
|
37: 7(fvec4) FAdd 31 36
|
||||||
|
@ -29,6 +29,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:7 Sequence
|
0:7 Sequence
|
||||||
0:7 move second child to first child (temp 4-component vector of float)
|
0:7 move second child to first child (temp 4-component vector of float)
|
||||||
0:7 'ret' (temp 4-component vector of float)
|
0:7 'ret' (temp 4-component vector of float)
|
||||||
|
0:9 add (temp 4-component vector of float)
|
||||||
0:8 add (temp 4-component vector of float)
|
0:8 add (temp 4-component vector of float)
|
||||||
0:7 add (temp 4-component vector of float)
|
0:7 add (temp 4-component vector of float)
|
||||||
0:7 vector-scale (temp 4-component vector of float)
|
0:7 vector-scale (temp 4-component vector of float)
|
||||||
@ -39,7 +40,6 @@ gl_FragCoord origin is upper left
|
|||||||
0:8 Convert int to float (temp float)
|
0:8 Convert int to float (temp float)
|
||||||
0:8 'b' (temp int)
|
0:8 'b' (temp int)
|
||||||
0:8 'input' (in 4-component vector of float)
|
0:8 'input' (in 4-component vector of float)
|
||||||
0:9 add (temp 4-component vector of float)
|
|
||||||
0:9 vector-scale (temp 4-component vector of float)
|
0:9 vector-scale (temp 4-component vector of float)
|
||||||
0:9 Convert int to float (temp float)
|
0:9 Convert int to float (temp float)
|
||||||
0:9 'c' (temp int)
|
0:9 'c' (temp int)
|
||||||
@ -141,6 +141,7 @@ gl_FragCoord origin is upper left
|
|||||||
0:7 Sequence
|
0:7 Sequence
|
||||||
0:7 move second child to first child (temp 4-component vector of float)
|
0:7 move second child to first child (temp 4-component vector of float)
|
||||||
0:7 'ret' (temp 4-component vector of float)
|
0:7 'ret' (temp 4-component vector of float)
|
||||||
|
0:9 add (temp 4-component vector of float)
|
||||||
0:8 add (temp 4-component vector of float)
|
0:8 add (temp 4-component vector of float)
|
||||||
0:7 add (temp 4-component vector of float)
|
0:7 add (temp 4-component vector of float)
|
||||||
0:7 vector-scale (temp 4-component vector of float)
|
0:7 vector-scale (temp 4-component vector of float)
|
||||||
@ -151,7 +152,6 @@ gl_FragCoord origin is upper left
|
|||||||
0:8 Convert int to float (temp float)
|
0:8 Convert int to float (temp float)
|
||||||
0:8 'b' (temp int)
|
0:8 'b' (temp int)
|
||||||
0:8 'input' (in 4-component vector of float)
|
0:8 'input' (in 4-component vector of float)
|
||||||
0:9 add (temp 4-component vector of float)
|
|
||||||
0:9 vector-scale (temp 4-component vector of float)
|
0:9 vector-scale (temp 4-component vector of float)
|
||||||
0:9 Convert int to float (temp float)
|
0:9 Convert int to float (temp float)
|
||||||
0:9 'c' (temp int)
|
0:9 'c' (temp int)
|
||||||
@ -287,12 +287,12 @@ gl_FragCoord origin is upper left
|
|||||||
31: 15(float) ConvertSToF 30
|
31: 15(float) ConvertSToF 30
|
||||||
32: 16(fvec4) Load 22(input)
|
32: 16(fvec4) Load 22(input)
|
||||||
33: 16(fvec4) VectorTimesScalar 32 31
|
33: 16(fvec4) VectorTimesScalar 32 31
|
||||||
34: 6(int) Load 14(d)
|
34: 16(fvec4) FAdd 29 33
|
||||||
35: 15(float) ConvertSToF 34
|
35: 6(int) Load 14(d)
|
||||||
36: 16(fvec4) Load 22(input)
|
36: 15(float) ConvertSToF 35
|
||||||
37: 16(fvec4) VectorTimesScalar 36 35
|
37: 16(fvec4) Load 22(input)
|
||||||
38: 16(fvec4) FAdd 33 37
|
38: 16(fvec4) VectorTimesScalar 37 36
|
||||||
39: 16(fvec4) FAdd 29 38
|
39: 16(fvec4) FAdd 34 38
|
||||||
Store 18(ret) 39
|
Store 18(ret) 39
|
||||||
42: 6(int) Load 10(b)
|
42: 6(int) Load 10(b)
|
||||||
SelectionMerge 44 None
|
SelectionMerge 44 None
|
||||||
|
@ -12,11 +12,36 @@ gl_FragCoord origin is upper left
|
|||||||
0:8 Branch: Return with expression
|
0:8 Branch: Return with expression
|
||||||
0:8 add (temp 4-component vector of float)
|
0:8 add (temp 4-component vector of float)
|
||||||
0:8 add (temp 4-component vector of float)
|
0:8 add (temp 4-component vector of float)
|
||||||
|
0:8 add (temp 4-component vector of float)
|
||||||
0:8 'a1' (in 4-component vector of float)
|
0:8 'a1' (in 4-component vector of float)
|
||||||
0:8 component-wise multiply (temp 4-component vector of float)
|
0:8 component-wise multiply (temp 4-component vector of float)
|
||||||
0:8 'a2' (in 4-component vector of float)
|
0:8 'a2' (in 4-component vector of float)
|
||||||
0:8 'a3' (in 4-component vector of float)
|
0:8 'a3' (in 4-component vector of float)
|
||||||
0:8 'a4' (in 4-component vector of float)
|
0:8 'a4' (in 4-component vector of float)
|
||||||
|
0:? Construct vec4 (temp 4-component vector of float)
|
||||||
|
0:8 component-wise multiply (temp 3-component vector of float)
|
||||||
|
0:8 vector swizzle (temp 3-component vector of float)
|
||||||
|
0:8 'a1' (in 4-component vector of float)
|
||||||
|
0:8 Sequence
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 0 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 1 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 2 (const int)
|
||||||
|
0:8 vector swizzle (temp 3-component vector of float)
|
||||||
|
0:8 'a2' (in 4-component vector of float)
|
||||||
|
0:8 Sequence
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 0 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 1 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 2 (const int)
|
||||||
|
0:8 direct index (temp float)
|
||||||
|
0:8 'a3' (in 4-component vector of float)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 3 (const int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
|
|
||||||
|
|
||||||
@ -36,16 +61,41 @@ gl_FragCoord origin is upper left
|
|||||||
0:8 Branch: Return with expression
|
0:8 Branch: Return with expression
|
||||||
0:8 add (temp 4-component vector of float)
|
0:8 add (temp 4-component vector of float)
|
||||||
0:8 add (temp 4-component vector of float)
|
0:8 add (temp 4-component vector of float)
|
||||||
|
0:8 add (temp 4-component vector of float)
|
||||||
0:8 'a1' (in 4-component vector of float)
|
0:8 'a1' (in 4-component vector of float)
|
||||||
0:8 component-wise multiply (temp 4-component vector of float)
|
0:8 component-wise multiply (temp 4-component vector of float)
|
||||||
0:8 'a2' (in 4-component vector of float)
|
0:8 'a2' (in 4-component vector of float)
|
||||||
0:8 'a3' (in 4-component vector of float)
|
0:8 'a3' (in 4-component vector of float)
|
||||||
0:8 'a4' (in 4-component vector of float)
|
0:8 'a4' (in 4-component vector of float)
|
||||||
|
0:? Construct vec4 (temp 4-component vector of float)
|
||||||
|
0:8 component-wise multiply (temp 3-component vector of float)
|
||||||
|
0:8 vector swizzle (temp 3-component vector of float)
|
||||||
|
0:8 'a1' (in 4-component vector of float)
|
||||||
|
0:8 Sequence
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 0 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 1 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 2 (const int)
|
||||||
|
0:8 vector swizzle (temp 3-component vector of float)
|
||||||
|
0:8 'a2' (in 4-component vector of float)
|
||||||
|
0:8 Sequence
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 0 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 1 (const int)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 2 (const int)
|
||||||
|
0:8 direct index (temp float)
|
||||||
|
0:8 'a3' (in 4-component vector of float)
|
||||||
|
0:8 Constant:
|
||||||
|
0:8 3 (const int)
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
|
|
||||||
// Module Version 10000
|
// Module Version 10000
|
||||||
// Generated by (magic number): 80001
|
// Generated by (magic number): 80001
|
||||||
// Id's are bound by 21
|
// Id's are bound by 37
|
||||||
|
|
||||||
Capability Shader
|
Capability Shader
|
||||||
1: ExtInstImport "GLSL.std.450"
|
1: ExtInstImport "GLSL.std.450"
|
||||||
@ -67,6 +117,10 @@ gl_FragCoord origin is upper left
|
|||||||
11(a2): 8(ptr) Variable Input
|
11(a2): 8(ptr) Variable Input
|
||||||
13(a3): 8(ptr) Variable Input
|
13(a3): 8(ptr) Variable Input
|
||||||
17(a4): 8(ptr) Variable Input
|
17(a4): 8(ptr) Variable Input
|
||||||
|
20: TypeVector 6(float) 3
|
||||||
|
26: TypeInt 32 0
|
||||||
|
27: 26(int) Constant 3
|
||||||
|
28: TypePointer Input 6(float)
|
||||||
4(PixelShaderFunction): 2 Function None 3
|
4(PixelShaderFunction): 2 Function None 3
|
||||||
5: Label
|
5: Label
|
||||||
10: 7(fvec4) Load 9(a1)
|
10: 7(fvec4) Load 9(a1)
|
||||||
@ -76,5 +130,17 @@ gl_FragCoord origin is upper left
|
|||||||
16: 7(fvec4) FAdd 10 15
|
16: 7(fvec4) FAdd 10 15
|
||||||
18: 7(fvec4) Load 17(a4)
|
18: 7(fvec4) Load 17(a4)
|
||||||
19: 7(fvec4) FAdd 16 18
|
19: 7(fvec4) FAdd 16 18
|
||||||
ReturnValue 19
|
21: 7(fvec4) Load 9(a1)
|
||||||
|
22: 20(fvec3) VectorShuffle 21 21 0 1 2
|
||||||
|
23: 7(fvec4) Load 11(a2)
|
||||||
|
24: 20(fvec3) VectorShuffle 23 23 0 1 2
|
||||||
|
25: 20(fvec3) FMul 22 24
|
||||||
|
29: 28(ptr) AccessChain 13(a3) 27
|
||||||
|
30: 6(float) Load 29
|
||||||
|
31: 6(float) CompositeExtract 25 0
|
||||||
|
32: 6(float) CompositeExtract 25 1
|
||||||
|
33: 6(float) CompositeExtract 25 2
|
||||||
|
34: 7(fvec4) CompositeConstruct 31 32 33 30
|
||||||
|
35: 7(fvec4) FAdd 19 34
|
||||||
|
ReturnValue 35
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
@ -5,5 +5,5 @@ float4 PixelShaderFunction(
|
|||||||
float4 a4
|
float4 a4
|
||||||
) : COLOR0
|
) : COLOR0
|
||||||
{
|
{
|
||||||
return a1 + a2 * a3 + a4;
|
return a1 + a2 * a3 + a4 + float4(a1.rgb * a2.rgb, a3.a);
|
||||||
}
|
}
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
// For the version, it uses the latest git tag followed by the number of commits.
|
// For the version, it uses the latest git tag followed by the number of commits.
|
||||||
// For the date, it uses the current date (when then script is run).
|
// For the date, it uses the current date (when then script is run).
|
||||||
|
|
||||||
#define GLSLANG_REVISION "SPIRV99.1361"
|
#define GLSLANG_REVISION "SPIRV99.1362"
|
||||||
#define GLSLANG_DATE "28-Jul-2016"
|
#define GLSLANG_DATE "28-Jul-2016"
|
||||||
|
@ -1675,12 +1675,12 @@ bool HlslGrammar::acceptBinaryExpression(TIntermTyped*& node, PrecedenceLevel pr
|
|||||||
if (! acceptBinaryExpression(node, (PrecedenceLevel)(precedenceLevel + 1)))
|
if (! acceptBinaryExpression(node, (PrecedenceLevel)(precedenceLevel + 1)))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
do {
|
||||||
TOperator op = HlslOpMap::binary(peek());
|
TOperator op = HlslOpMap::binary(peek());
|
||||||
PrecedenceLevel tokenLevel = HlslOpMap::precedenceLevel(op);
|
PrecedenceLevel tokenLevel = HlslOpMap::precedenceLevel(op);
|
||||||
if (tokenLevel < precedenceLevel)
|
if (tokenLevel < precedenceLevel)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
do {
|
|
||||||
// ... op
|
// ... op
|
||||||
TSourceLoc loc = token.loc;
|
TSourceLoc loc = token.loc;
|
||||||
advanceToken();
|
advanceToken();
|
||||||
@ -1697,9 +1697,6 @@ bool HlslGrammar::acceptBinaryExpression(TIntermTyped*& node, PrecedenceLevel pr
|
|||||||
parseContext.error(loc, "Could not perform requested binary operation", "", "");
|
parseContext.error(loc, "Could not perform requested binary operation", "", "");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! peekTokenClass(EHTokComma))
|
|
||||||
return true;
|
|
||||||
} while (true);
|
} while (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user