Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
64076ed7
Commit
64076ed7
authored
Jul 28, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix binary-expression associativity and termination issue.
parent
fea226ba
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
165 additions
and
102 deletions
+165
-102
hlsl.array.frag.out
Test/baseResults/hlsl.array.frag.out
+0
-0
hlsl.assoc.frag.out
Test/baseResults/hlsl.assoc.frag.out
+11
-11
hlsl.buffer.frag.out
Test/baseResults/hlsl.buffer.frag.out
+35
-35
hlsl.conditional.frag.out
Test/baseResults/hlsl.conditional.frag.out
+36
-36
hlsl.precedence.frag.out
Test/baseResults/hlsl.precedence.frag.out
+76
-10
hlsl.precedence.frag
Test/hlsl.precedence.frag
+1
-1
revision.h
glslang/Include/revision.h
+1
-1
hlslGrammar.cpp
hlsl/hlslGrammar.cpp
+5
-8
No files found.
Test/baseResults/hlsl.array.frag.out
View file @
64076ed7
This diff is collapsed.
Click to expand it.
Test/baseResults/hlsl.assoc.frag.out
View file @
64076ed7
...
@@ -23,11 +23,11 @@ gl_FragCoord origin is upper left
...
@@ -23,11 +23,11 @@ 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
'a1' (in
4-component vector of float)
0:10
add (temp
4-component vector of float)
0:10
'a2
' (in 4-component vector of float)
0:10
'a1
' (in 4-component vector of float)
0:10
add (temp
4-component vector of float)
0:10
'a2' (in
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)
0:? Linker Objects
0:? Linker Objects
...
@@ -59,11 +59,11 @@ gl_FragCoord origin is upper left
...
@@ -59,11 +59,11 @@ 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
'a1' (in
4-component vector of float)
0:10
add (temp
4-component vector of float)
0:10
'a2
' (in 4-component vector of float)
0:10
'a1
' (in 4-component vector of float)
0:10
add (temp
4-component vector of float)
0:10
'a2' (in
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)
0:? Linker Objects
0:? Linker Objects
...
@@ -104,9 +104,9 @@ gl_FragCoord origin is upper left
...
@@ -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 1
7
20
21: 7(fvec4) FAdd 1
9
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
...
...
Test/baseResults/hlsl.buffer.frag.out
View file @
64076ed7
...
@@ -10,20 +10,20 @@ gl_FragCoord origin is upper left
...
@@ -10,20 +10,20 @@ 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
'input' (in
4-component vector of float)
0:21
add (temp
4-component vector of float)
0:21
v1: direct index for structure (layout(column_major std140 ) uniform
4-component vector of float)
0:21
'input' (in
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
v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float
)
0:21
Constant:
0:21
'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
0:21
0 (const uint)
0:21
Constant:
0:21
add (temp 4-component vector of floa
t)
0:21
0 (const uin
t)
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:
0:21 0 (const uint)
0:21 0 (const uint)
0:21
v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
0:21 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
0:21
'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
0:21 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
0:21
Constant:
0:21 Constant:
0:21
0 (const uint)
0:21 0 (const uint)
0:21 v4: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
0:21 v4: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
0:21 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
0:21 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
0:21 Constant:
0:21 Constant:
...
@@ -49,20 +49,20 @@ gl_FragCoord origin is upper left
...
@@ -49,20 +49,20 @@ 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
'input' (in
4-component vector of float)
0:21
add (temp
4-component vector of float)
0:21
v1: direct index for structure (layout(column_major std140 ) uniform
4-component vector of float)
0:21
'input' (in
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
v1: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float
)
0:21
Constant:
0:21
'anon@0' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v1})
0:21
0 (const uint)
0:21
Constant:
0:21
add (temp 4-component vector of floa
t)
0:21
0 (const uin
t)
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:
0:21 0 (const uint)
0:21 0 (const uint)
0:21
v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
0:21 v3: direct index for structure (layout(column_major std140 ) uniform 4-component vector of float)
0:21
'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
0:21 'anon@2' (layout(column_major std140 ) uniform block{layout(column_major std140 ) uniform 4-component vector of float v3, layout(column_major std140 ) uniform int i3})
0:21
Constant:
0:21 Constant:
0:21
0 (const uint)
0:21 0 (const uint)
0:21 v4: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
0:21 v4: direct index for structure (layout(column_major std430 ) buffer 4-component vector of float)
0:21 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
0:21 'anon@3' (layout(column_major std430 ) buffer block{layout(column_major std430 ) buffer 4-component vector of float v4, layout(column_major std430 ) buffer int i4})
0:21 Constant:
0:21 Constant:
...
@@ -91,10 +91,10 @@ gl_FragCoord origin is upper left
...
@@ -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 2
5
""
Name 2
6
""
MemberName 2
5
0 "v3"
MemberName 2
6
0 "v3"
MemberName 2
5
1 "i3"
MemberName 2
6
1 "i3"
Name 2
7
""
Name 2
8
""
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
...
@@ -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 2
5
0 Offset 0
MemberDecorate 2
6
0 Offset 0
MemberDecorate 2
5
1 Offset 16
MemberDecorate 2
6
1 Offset 16
Decorate 2
5
Block
Decorate 2
6
Block
Decorate 2
7
DescriptorSet 0
Decorate 2
8
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
...
@@ -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
2
5
: TypeStruct 7(fvec4) 14(int)
2
6
: TypeStruct 7(fvec4) 14(int)
2
6: TypePointer Uniform 25
(struct)
2
7: TypePointer Uniform 26
(struct)
2
7: 26
(ptr) Variable Uniform
2
8: 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
...
@@ -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
2
8: 16(ptr) AccessChain 27 15
2
5: 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
...
...
Test/baseResults/hlsl.conditional.frag.out
View file @
64076ed7
...
@@ -29,25 +29,25 @@ gl_FragCoord origin is upper left
...
@@ -29,25 +29,25 @@ 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:
8
add (temp 4-component vector of float)
0:
9
add (temp 4-component vector of float)
0:
7
add (temp 4-component vector of float)
0:
8
add (temp 4-component vector of float)
0:7
vector-scale
(temp 4-component vector of float)
0:7
add
(temp 4-component vector of float)
0:7
Convert int to float (temp
float)
0:7
vector-scale (temp 4-component vector of
float)
0:7
'a' (temp in
t)
0:7
Convert int to float (temp floa
t)
0:7
'input' (in 4-component vector of floa
t)
0:7
'a' (temp in
t)
0:
8 vector-scale (temp
4-component vector of float)
0:
7 'input' (in
4-component vector of float)
0:8
Convert int to float (temp
float)
0:8
vector-scale (temp 4-component vector of
float)
0:8
'b' (temp in
t)
0:8
Convert int to float (temp floa
t)
0:8
'input' (in 4-component vector of floa
t)
0:8
'b' (temp in
t)
0:
9 add (temp
4-component vector of float)
0:
8 'input' (in
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)
0:9 'input' (in 4-component vector of float)
0:9 'input' (in 4-component vector of float)
0:10
vector-scale (temp 4-component vector of float)
0:10 vector-scale (temp 4-component vector of float)
0:10
Convert int to float (temp float)
0:10 Convert int to float (temp float)
0:10
'd' (temp int)
0:10 'd' (temp int)
0:10
'input' (in 4-component vector of float)
0:10 'input' (in 4-component vector of float)
0:12 Comma (temp int)
0:12 Comma (temp int)
0:12 move second child to first child (temp int)
0:12 move second child to first child (temp int)
0:12 'e' (temp int)
0:12 'e' (temp int)
...
@@ -141,25 +141,25 @@ gl_FragCoord origin is upper left
...
@@ -141,25 +141,25 @@ 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:
8
add (temp 4-component vector of float)
0:
9
add (temp 4-component vector of float)
0:
7
add (temp 4-component vector of float)
0:
8
add (temp 4-component vector of float)
0:7
vector-scale
(temp 4-component vector of float)
0:7
add
(temp 4-component vector of float)
0:7
Convert int to float (temp
float)
0:7
vector-scale (temp 4-component vector of
float)
0:7
'a' (temp in
t)
0:7
Convert int to float (temp floa
t)
0:7
'input' (in 4-component vector of floa
t)
0:7
'a' (temp in
t)
0:
8 vector-scale (temp
4-component vector of float)
0:
7 'input' (in
4-component vector of float)
0:8
Convert int to float (temp
float)
0:8
vector-scale (temp 4-component vector of
float)
0:8
'b' (temp in
t)
0:8
Convert int to float (temp floa
t)
0:8
'input' (in 4-component vector of floa
t)
0:8
'b' (temp in
t)
0:
9 add (temp
4-component vector of float)
0:
8 'input' (in
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)
0:9 'input' (in 4-component vector of float)
0:9 'input' (in 4-component vector of float)
0:10
vector-scale (temp 4-component vector of float)
0:10 vector-scale (temp 4-component vector of float)
0:10
Convert int to float (temp float)
0:10 Convert int to float (temp float)
0:10
'd' (temp int)
0:10 'd' (temp int)
0:10
'input' (in 4-component vector of float)
0:10 'input' (in 4-component vector of float)
0:12 Comma (temp int)
0:12 Comma (temp int)
0:12 move second child to first child (temp int)
0:12 move second child to first child (temp int)
0:12 'e' (temp int)
0:12 'e' (temp int)
...
@@ -287,12 +287,12 @@ gl_FragCoord origin is upper left
...
@@ -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: 1
6(fvec4) Load 22(input)
36: 1
5(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
...
...
Test/baseResults/hlsl.precedence.frag.out
View file @
64076ed7
...
@@ -12,11 +12,36 @@ gl_FragCoord origin is upper left
...
@@ -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 'a1' (in 4-component vector of float)
0:8 add (temp 4-component vector of float)
0:8 component-wise multiply (temp 4-component vector of float)
0:8 'a1' (in 4-component vector of float)
0:8 'a2' (in 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 'a3' (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 'a3' (in 4-component vector of float)
0:8 'a4' (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
...
@@ -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 'a1' (in 4-component vector of float)
0:8 add (temp 4-component vector of float)
0:8 component-wise multiply (temp 4-component vector of float)
0:8 'a1' (in 4-component vector of float)
0:8 'a2' (in 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 'a3' (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 'a3' (in 4-component vector of float)
0:8 'a4' (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
...
@@ -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
...
@@ -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
Test/hlsl.precedence.frag
View file @
64076ed7
...
@@ -5,5 +5,5 @@ float4 PixelShaderFunction(
...
@@ -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
)
;
}
}
glslang/Include/revision.h
View file @
64076ed7
...
@@ -2,5 +2,5 @@
...
@@ -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.136
1
"
#define GLSLANG_REVISION "SPIRV99.136
2
"
#define GLSLANG_DATE "28-Jul-2016"
#define GLSLANG_DATE "28-Jul-2016"
hlsl/hlslGrammar.cpp
View file @
64076ed7
...
@@ -1675,12 +1675,12 @@ bool HlslGrammar::acceptBinaryExpression(TIntermTyped*& node, PrecedenceLevel pr
...
@@ -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
;
TOperator
op
=
HlslOpMap
::
binary
(
peek
());
PrecedenceLevel
tokenLevel
=
HlslOpMap
::
precedenceLevel
(
op
);
if
(
tokenLevel
<
precedenceLevel
)
return
true
;
do
{
do
{
TOperator
op
=
HlslOpMap
::
binary
(
peek
());
PrecedenceLevel
tokenLevel
=
HlslOpMap
::
precedenceLevel
(
op
);
if
(
tokenLevel
<
precedenceLevel
)
return
true
;
// ... op
// ... op
TSourceLoc
loc
=
token
.
loc
;
TSourceLoc
loc
=
token
.
loc
;
advanceToken
();
advanceToken
();
...
@@ -1697,9 +1697,6 @@ bool HlslGrammar::acceptBinaryExpression(TIntermTyped*& node, PrecedenceLevel pr
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment