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
c3f1cdfa
Commit
c3f1cdfa
authored
Nov 14, 2016
by
chrgau01@arm.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL: The execution scope for barriers should be Workgroup.
parent
84d11e18
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
202 additions
and
201 deletions
+202
-201
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+1
-1
spv.310.comp.out
Test/baseResults/spv.310.comp.out
+105
-104
spv.400.tesc.out
Test/baseResults/spv.400.tesc.out
+96
-96
No files found.
SPIRV/GlslangToSpv.cpp
View file @
c3f1cdfa
...
...
@@ -4597,7 +4597,7 @@ spv::Id TGlslangToSpvTraverser::createNoArgOperation(glslang::TOperator op, spv:
builder
.
createNoResultOp
(
spv
::
OpEndPrimitive
);
return
0
;
case
glslang
:
:
EOpBarrier
:
builder
.
createControlBarrier
(
spv
::
Scope
Device
,
spv
::
ScopeDevice
,
spv
::
MemorySemanticsMaskNone
);
builder
.
createControlBarrier
(
spv
::
Scope
Workgroup
,
spv
::
ScopeDevice
,
spv
::
MemorySemanticsMaskNone
);
return
0
;
case
glslang
:
:
EOpMemoryBarrier
:
builder
.
createMemoryBarrier
(
spv
::
ScopeDevice
,
spv
::
MemorySemanticsAllMemory
);
...
...
Test/baseResults/spv.310.comp.out
100755 → 100644
View file @
c3f1cdfa
...
...
@@ -7,121 +7,122 @@ Linked compute stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 6
6
// Id's are bound by 6
7
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main" 5
2
EntryPoint GLCompute 4 "main" 5
3
ExecutionMode 4 LocalSize 16 32 4
Source ESSL 310
Name 4 "main"
Name 1
2
"outb"
MemberName 1
2
(outb) 0 "f"
MemberName 1
2
(outb) 1 "g"
MemberName 1
2
(outb) 2 "h"
MemberName 1
2
(outb) 3 "uns"
Name 1
4
"outbname"
Name 1
8
"s"
Name 2
3
"outbna"
MemberName 2
3
(outbna) 0 "k"
MemberName 2
3
(outbna) 1 "na"
Name 2
5
"outbnamena"
Name 4
1
"i"
Name 4
7
"outs"
MemberName 4
7
(outs) 0 "s"
MemberName 4
7
(outs) 1 "va"
Name
49
"outnames"
Name 5
2
"gl_LocalInvocationID"
Decorate 1
1
ArrayStride 16
MemberDecorate 1
2
(outb) 0 Offset 0
MemberDecorate 1
2
(outb) 1 Offset 4
MemberDecorate 1
2
(outb) 2 Offset 8
MemberDecorate 1
2
(outb) 3 Offset 16
Decorate 1
2
(outb) BufferBlock
Decorate 1
4
(outbname) DescriptorSet 0
MemberDecorate 2
3
(outbna) 0 Offset 0
MemberDecorate 2
3
(outbna) 1 Offset 16
Decorate 2
3
(outbna) BufferBlock
Decorate 2
5
(outbnamena) DescriptorSet 0
Decorate 4
6
ArrayStride 16
MemberDecorate 4
7
(outs) 0 Offset 0
MemberDecorate 4
7
(outs) 1 Offset 16
Decorate 4
7
(outs) BufferBlock
Decorate
49
(outnames) DescriptorSet 0
Decorate 5
2
(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 6
5
BuiltIn WorkgroupSize
Name 1
3
"outb"
MemberName 1
3
(outb) 0 "f"
MemberName 1
3
(outb) 1 "g"
MemberName 1
3
(outb) 2 "h"
MemberName 1
3
(outb) 3 "uns"
Name 1
5
"outbname"
Name 1
9
"s"
Name 2
4
"outbna"
MemberName 2
4
(outbna) 0 "k"
MemberName 2
4
(outbna) 1 "na"
Name 2
6
"outbnamena"
Name 4
2
"i"
Name 4
8
"outs"
MemberName 4
8
(outs) 0 "s"
MemberName 4
8
(outs) 1 "va"
Name
50
"outnames"
Name 5
3
"gl_LocalInvocationID"
Decorate 1
2
ArrayStride 16
MemberDecorate 1
3
(outb) 0 Offset 0
MemberDecorate 1
3
(outb) 1 Offset 4
MemberDecorate 1
3
(outb) 2 Offset 8
MemberDecorate 1
3
(outb) 3 Offset 16
Decorate 1
3
(outb) BufferBlock
Decorate 1
5
(outbname) DescriptorSet 0
MemberDecorate 2
4
(outbna) 0 Offset 0
MemberDecorate 2
4
(outbna) 1 Offset 16
Decorate 2
4
(outbna) BufferBlock
Decorate 2
6
(outbnamena) DescriptorSet 0
Decorate 4
7
ArrayStride 16
MemberDecorate 4
8
(outs) 0 Offset 0
MemberDecorate 4
8
(outs) 1 Offset 16
Decorate 4
8
(outs) BufferBlock
Decorate
50
(outnames) DescriptorSet 0
Decorate 5
3
(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 6
6
BuiltIn WorkgroupSize
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: 6(int) Constant 1
8: 6(int) Constant 0
9: TypeFloat 32
10: TypeVector 9(float) 3
11: TypeRuntimeArray 10(fvec3)
12(outb): TypeStruct 9(float) 9(float) 9(float) 11
13: TypePointer Uniform 12(outb)
14(outbname): 13(ptr) Variable Uniform
15: TypeInt 32 1
16: 15(int) Constant 0
17: TypePointer Workgroup 9(float)
18(s): 17(ptr) Variable Workgroup
20: TypePointer Uniform 9(float)
22: TypeVector 9(float) 4
23(outbna): TypeStruct 15(int) 22(fvec4)
24: TypePointer Uniform 23(outbna)
25(outbnamena): 24(ptr) Variable Uniform
26: 15(int) Constant 1
29: TypePointer Uniform 22(fvec4)
31: 15(int) Constant 3
32: 15(int) Constant 18
35: 15(int) Constant 17
36: 9(float) Constant 1077936128
37: 10(fvec3) ConstantComposite 36 36 36
38: TypePointer Uniform 10(fvec3)
40: TypePointer Workgroup 15(int)
41(i): 40(ptr) Variable Workgroup
46: TypeRuntimeArray 22(fvec4)
47(outs): TypeStruct 15(int) 46
48: TypePointer Uniform 47(outs)
49(outnames): 48(ptr) Variable Uniform
50: TypeVector 6(int) 3
51: TypePointer Input 50(ivec3)
52(gl_LocalInvocationID): 51(ptr) Variable Input
53: TypePointer Input 6(int)
60: TypePointer Uniform 15(int)
62: 6(int) Constant 16
63: 6(int) Constant 32
64: 6(int) Constant 4
65: 50(ivec3) ConstantComposite 62 63 64
7: 6(int) Constant 2
8: 6(int) Constant 1
9: 6(int) Constant 0
10: TypeFloat 32
11: TypeVector 10(float) 3
12: TypeRuntimeArray 11(fvec3)
13(outb): TypeStruct 10(float) 10(float) 10(float) 12
14: TypePointer Uniform 13(outb)
15(outbname): 14(ptr) Variable Uniform
16: TypeInt 32 1
17: 16(int) Constant 0
18: TypePointer Workgroup 10(float)
19(s): 18(ptr) Variable Workgroup
21: TypePointer Uniform 10(float)
23: TypeVector 10(float) 4
24(outbna): TypeStruct 16(int) 23(fvec4)
25: TypePointer Uniform 24(outbna)
26(outbnamena): 25(ptr) Variable Uniform
27: 16(int) Constant 1
30: TypePointer Uniform 23(fvec4)
32: 16(int) Constant 3
33: 16(int) Constant 18
36: 16(int) Constant 17
37: 10(float) Constant 1077936128
38: 11(fvec3) ConstantComposite 37 37 37
39: TypePointer Uniform 11(fvec3)
41: TypePointer Workgroup 16(int)
42(i): 41(ptr) Variable Workgroup
47: TypeRuntimeArray 23(fvec4)
48(outs): TypeStruct 16(int) 47
49: TypePointer Uniform 48(outs)
50(outnames): 49(ptr) Variable Uniform
51: TypeVector 6(int) 3
52: TypePointer Input 51(ivec3)
53(gl_LocalInvocationID): 52(ptr) Variable Input
54: TypePointer Input 6(int)
61: TypePointer Uniform 16(int)
63: 6(int) Constant 16
64: 6(int) Constant 32
65: 6(int) Constant 4
66: 51(ivec3) ConstantComposite 63 64 65
4(main): 2 Function None 3
5: Label
ControlBarrier 7
7 8
19: 9(float) Load 18
(s)
2
1: 20(ptr) AccessChain 14(outbname) 16
Store 2
1 19
2
7: 9(float) Load 18
(s)
2
8: 22(fvec4) CompositeConstruct 27 27 27 27
3
0: 29(ptr) AccessChain 25(outbnamena) 26
Store 3
0 28
3
3: 20(ptr) AccessChain 14(outbname) 31 32 8
3
4: 9(float) Load 33
Store 1
8(s) 34
39: 38(ptr) AccessChain 14(outbname) 31 35
Store
39 37
4
2: 15(int) Load 41
(i)
4
3: 9(float) Load 18
(s)
4
4: 10(fvec3) CompositeConstruct 43 43 43
4
5: 38(ptr) AccessChain 14(outbname) 31 42
Store 4
5 44
5
4: 53(ptr) AccessChain 52(gl_LocalInvocationID) 8
5
5: 6(int) Load 54
5
6: 9(float) Load 18
(s)
5
7: 22(fvec4) CompositeConstruct 56 56 56 56
5
8: 29(ptr) AccessChain 49(outnames) 26 55
Store 5
8 57
59: 15(int) ArrayLength 14
(outbname) 3
6
1: 60(ptr) AccessChain 49(outnames) 16
Store 6
1 59
ControlBarrier 7
8 9
20: 10(float) Load 19
(s)
2
2: 21(ptr) AccessChain 15(outbname) 17
Store 2
2 20
2
8: 10(float) Load 19
(s)
2
9: 23(fvec4) CompositeConstruct 28 28 28 28
3
1: 30(ptr) AccessChain 26(outbnamena) 27
Store 3
1 29
3
4: 21(ptr) AccessChain 15(outbname) 32 33 9
3
5: 10(float) Load 34
Store 1
9(s) 35
40: 39(ptr) AccessChain 15(outbname) 32 36
Store
40 38
4
3: 16(int) Load 42
(i)
4
4: 10(float) Load 19
(s)
4
5: 11(fvec3) CompositeConstruct 44 44 44
4
6: 39(ptr) AccessChain 15(outbname) 32 43
Store 4
6 45
5
5: 54(ptr) AccessChain 53(gl_LocalInvocationID) 9
5
6: 6(int) Load 55
5
7: 10(float) Load 19
(s)
5
8: 23(fvec4) CompositeConstruct 57 57 57 57
5
9: 30(ptr) AccessChain 50(outnames) 27 56
Store 5
9 58
60: 16(int) ArrayLength 15
(outbname) 3
6
2: 61(ptr) AccessChain 50(outnames) 17
Store 6
2 60
Return
FunctionEnd
Test/baseResults/spv.400.tesc.out
100755 → 100644
View file @
c3f1cdfa
...
...
@@ -14,26 +14,26 @@ Linked tessellation control stage:
Capability ClipDistance
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint TessellationControl 4 "main" 2
3 40 43 46
54 68 73 79 83 84 87 88 91 92
EntryPoint TessellationControl 4 "main" 2
4 41 44 47
54 68 73 79 83 84 87 88 91 92
ExecutionMode 4 OutputVertices 4
Source GLSL 400
SourceExtension "GL_ARB_separate_shader_objects"
Name 4 "main"
Name 1
1
"a"
Name 1
6
"p"
Name
19
"gl_PerVertex"
MemberName
19
(gl_PerVertex) 0 "gl_Position"
MemberName
19
(gl_PerVertex) 1 "gl_PointSize"
MemberName
19
(gl_PerVertex) 2 "gl_ClipDistance"
Name 2
3
"gl_in"
Name 3
0
"ps"
Name 3
4
"cd"
Name 3
8
"pvi"
Name 4
0
"gl_PatchVerticesIn"
Name 4
2
"pid"
Name 4
3
"gl_PrimitiveID"
Name 4
5
"iid"
Name 4
6
"gl_InvocationID"
Name 1
2
"a"
Name 1
7
"p"
Name
20
"gl_PerVertex"
MemberName
20
(gl_PerVertex) 0 "gl_Position"
MemberName
20
(gl_PerVertex) 1 "gl_PointSize"
MemberName
20
(gl_PerVertex) 2 "gl_ClipDistance"
Name 2
4
"gl_in"
Name 3
1
"ps"
Name 3
5
"cd"
Name 3
9
"pvi"
Name 4
1
"gl_PatchVerticesIn"
Name 4
3
"pid"
Name 4
4
"gl_PrimitiveID"
Name 4
6
"iid"
Name 4
7
"gl_InvocationID"
Name 50 "gl_PerVertex"
MemberName 50(gl_PerVertex) 0 "gl_Position"
MemberName 50(gl_PerVertex) 1 "gl_PointSize"
...
...
@@ -49,13 +49,13 @@ Linked tessellation control stage:
Name 88 "ivlb"
Name 91 "ovla"
Name 92 "ovlb"
MemberDecorate
19
(gl_PerVertex) 0 BuiltIn Position
MemberDecorate
19
(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate
19
(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate
19
(gl_PerVertex) Block
Decorate 4
0
(gl_PatchVerticesIn) BuiltIn PatchVertices
Decorate 4
3
(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 4
6
(gl_InvocationID) BuiltIn InvocationId
MemberDecorate
20
(gl_PerVertex) 0 BuiltIn Position
MemberDecorate
20
(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate
20
(gl_PerVertex) 2 BuiltIn ClipDistance
Decorate
20
(gl_PerVertex) Block
Decorate 4
1
(gl_PatchVerticesIn) BuiltIn PatchVertices
Decorate 4
4
(gl_PrimitiveID) BuiltIn PrimitiveId
Decorate 4
7
(gl_InvocationID) BuiltIn InvocationId
MemberDecorate 50(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 50(gl_PerVertex) 1 BuiltIn PointSize
MemberDecorate 50(gl_PerVertex) 2 BuiltIn ClipDistance
...
...
@@ -72,106 +72,106 @@ Linked tessellation control stage:
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
7: 6(int) Constant
1
8: 6(int) Constant
0
9:
TypeInt 32 1
10: Type
Pointer Function 9(int)
1
2: 9(int) Constant 5392
13:
TypeFloat 3
2
14: Type
Vector 13(float) 4
15: Type
Pointer Function 14(fvec4)
1
7: 6(int) Constant 3
18:
TypeArray 13(float) 17
19(gl_PerVertex): TypeStruct 14(fvec4) 13
(float) 18
20: 6(int) Constant 32
21:
TypeArray 19(gl_PerVertex) 20
22: Type
Pointer Input
21
23(gl_in): 22(ptr) Variable Input
24: 9(int) Constant 1
25:
9(int) Constant 0
26:
TypePointer Input 14(fvec4)
2
9: TypePointer Function 13(float
)
3
1: TypePointer Input 13
(float)
3
5: 9(int) Constant 2
3
9: TypePointer Input 9(int)
40(gl_PatchVerticesIn): 39(ptr) Variable Input
4
3(gl_PrimitiveID): 39
(ptr) Variable Input
4
6(gl_InvocationID): 39
(ptr) Variable Input
48: 6(int) Constant 2
49: TypeArray 1
3(float) 48
50(gl_PerVertex): TypeStruct 1
4(fvec4) 13
(float) 49
7: 6(int) Constant
2
8: 6(int) Constant
1
9:
6(int) Constant 0
10: Type
Int 32 1
1
1: TypePointer Function 10(int)
13:
10(int) Constant 539
2
14: Type
Float 32
15: Type
Vector 14(float) 4
1
6: TypePointer Function 15(fvec4)
18:
6(int) Constant 3
19: TypeArray 14
(float) 18
20(gl_PerVertex): TypeStruct 15(fvec4) 14(float) 19
21:
6(int) Constant 32
22: Type
Array 20(gl_PerVertex)
21
23: TypePointer Input 22
24(gl_in): 23(ptr) Variable Input
25:
10(int) Constant 1
26:
10(int) Constant 0
2
7: TypePointer Input 15(fvec4
)
3
0: TypePointer Function 14
(float)
3
2: TypePointer Input 14(float)
3
6: 10(int) Constant 2
40: TypePointer Input 10(int)
4
1(gl_PatchVerticesIn): 40
(ptr) Variable Input
4
4(gl_PrimitiveID): 40
(ptr) Variable Input
47(gl_InvocationID): 40(ptr) Variable Input
49: TypeArray 1
4(float) 7
50(gl_PerVertex): TypeStruct 1
5(fvec4) 14
(float) 49
51: 6(int) Constant 4
52: TypeArray 50(gl_PerVertex) 51
53: TypePointer Output 52
54(gl_out): 53(ptr) Variable Output
57: TypePointer Output 1
4
(fvec4)
61: TypePointer Output 1
3
(float)
66: TypeArray 1
3
(float) 51
57: TypePointer Output 1
5
(fvec4)
61: TypePointer Output 1
4
(float)
66: TypeArray 1
4
(float) 51
67: TypePointer Output 66
68(gl_TessLevelOuter): 67(ptr) Variable Output
69:
9
(int) Constant 3
70: 1
3
(float) Constant 1078774989
69:
10
(int) Constant 3
70: 1
4
(float) Constant 1078774989
72: TypePointer Output 49
73(gl_TessLevelInner): 72(ptr) Variable Output
74: 1
3
(float) Constant 1067869798
76: TypeArray
9
(int) 51
74: 1
4
(float) Constant 1067869798
76: TypeArray
10
(int) 51
77: TypePointer Private 76
78(outa): 77(ptr) Variable Private
79(patchOut): 57(ptr) Variable Output
80: TypeVector 1
3
(float) 2
81: TypeArray 80(fvec2) 2
0
80: TypeVector 1
4
(float) 2
81: TypeArray 80(fvec2) 2
1
82: TypePointer Input 81
83(inb): 82(ptr) Variable Input
84(ind): 82(ptr) Variable Input
85: TypeArray 1
4(fvec4) 20
85: TypeArray 1
5(fvec4) 21
86: TypePointer Input 85
87(ivla): 86(ptr) Variable Input
88(ivlb): 86(ptr) Variable Input
89: TypeArray 1
4
(fvec4) 51
89: TypeArray 1
5
(fvec4) 51
90: TypePointer Output 89
91(ovla): 90(ptr) Variable Output
92(ovlb): 90(ptr) Variable Output
4(main): 2 Function None 3
5: Label
1
1(a): 10
(ptr) Variable Function
1
6(p): 15
(ptr) Variable Function
3
0(ps): 29
(ptr) Variable Function
3
4(cd): 29
(ptr) Variable Function
3
8(pvi): 10
(ptr) Variable Function
4
2(pid): 10
(ptr) Variable Function
4
5(iid): 10
(ptr) Variable Function
ControlBarrier 7
7 8
Store 1
1(a) 12
2
7: 26(ptr) AccessChain 23(gl_in) 24 25
2
8: 14(fvec4) Load 27
Store 1
6(p) 28
3
2: 31(ptr) AccessChain 23(gl_in) 24 24
3
3: 13(float) Load 32
Store 3
0(ps) 33
3
6: 31(ptr) AccessChain 23(gl_in) 24 35 35
3
7: 13(float) Load 36
Store 3
4(cd) 37
4
1: 9(int) Load 40
(gl_PatchVerticesIn)
Store 3
8(pvi) 41
4
4: 9(int) Load 43
(gl_PrimitiveID)
Store 4
2(pid) 44
4
7: 9(int) Load 46
(gl_InvocationID)
Store 4
5(iid) 47
55:
9(int) Load 46
(gl_InvocationID)
56: 1
4(fvec4) Load 16
(p)
58: 57(ptr) AccessChain 54(gl_out) 55 2
5
1
2(a): 11
(ptr) Variable Function
1
7(p): 16
(ptr) Variable Function
3
1(ps): 30
(ptr) Variable Function
3
5(cd): 30
(ptr) Variable Function
3
9(pvi): 11
(ptr) Variable Function
4
3(pid): 11
(ptr) Variable Function
4
6(iid): 11
(ptr) Variable Function
ControlBarrier 7
8 9
Store 1
2(a) 13
2
8: 27(ptr) AccessChain 24(gl_in) 25 26
2
9: 15(fvec4) Load 28
Store 1
7(p) 29
3
3: 32(ptr) AccessChain 24(gl_in) 25 25
3
4: 14(float) Load 33
Store 3
1(ps) 34
3
7: 32(ptr) AccessChain 24(gl_in) 25 36 36
3
8: 14(float) Load 37
Store 3
5(cd) 38
4
2: 10(int) Load 41
(gl_PatchVerticesIn)
Store 3
9(pvi) 42
4
5: 10(int) Load 44
(gl_PrimitiveID)
Store 4
3(pid) 45
4
8: 10(int) Load 47
(gl_InvocationID)
Store 4
6(iid) 48
55:
10(int) Load 47
(gl_InvocationID)
56: 1
5(fvec4) Load 17
(p)
58: 57(ptr) AccessChain 54(gl_out) 55 2
6
Store 58 56
59:
9(int) Load 46
(gl_InvocationID)
60: 1
3(float) Load 30
(ps)
62: 61(ptr) AccessChain 54(gl_out) 59 2
4
59:
10(int) Load 47
(gl_InvocationID)
60: 1
4(float) Load 31
(ps)
62: 61(ptr) AccessChain 54(gl_out) 59 2
5
Store 62 60
63:
9(int) Load 46
(gl_InvocationID)
64: 1
3(float) Load 34
(cd)
65: 61(ptr) AccessChain 54(gl_out) 63 3
5 24
63:
10(int) Load 47
(gl_InvocationID)
64: 1
4(float) Load 35
(cd)
65: 61(ptr) AccessChain 54(gl_out) 63 3
6 25
Store 65 64
71: 61(ptr) AccessChain 68(gl_TessLevelOuter) 69
Store 71 70
75: 61(ptr) AccessChain 73(gl_TessLevelInner) 2
4
75: 61(ptr) AccessChain 73(gl_TessLevelInner) 2
5
Store 75 74
Return
FunctionEnd
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