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
6ae18707
Commit
6ae18707
authored
Apr 10, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Fix #1332: consistently use uint for counter buf typing.
parent
1dcd1623
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
345 additions
and
347 deletions
+345
-347
hlsl.noSemantic.functionality1.comp.out
Test/baseResults/hlsl.noSemantic.functionality1.comp.out
+23
-24
hlsl.structbuffer.append.fn.frag.out
Test/baseResults/hlsl.structbuffer.append.fn.frag.out
+56
-56
hlsl.structbuffer.append.frag.out
Test/baseResults/hlsl.structbuffer.append.frag.out
+41
-41
hlsl.structbuffer.floatidx.comp.out
Test/baseResults/hlsl.structbuffer.floatidx.comp.out
+86
-85
hlsl.structbuffer.fn.frag.out
Test/baseResults/hlsl.structbuffer.fn.frag.out
+45
-45
hlsl.structbuffer.incdec.frag.hlslfun1.out
Test/baseResults/hlsl.structbuffer.incdec.frag.hlslfun1.out
+19
-19
hlsl.structbuffer.incdec.frag.out
Test/baseResults/hlsl.structbuffer.incdec.frag.out
+34
-34
spv.ssboAlias.frag.out
Test/baseResults/spv.ssboAlias.frag.out
+38
-40
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+3
-3
No files found.
Test/baseResults/hlsl.noSemantic.functionality1.comp.out
View file @
6ae18707
hlsl.noSemantic.functionality1.comp
// Module Version 10000
// Generated by (magic number): 80006
// Id's are bound by 3
1
// Id's are bound by 3
0
Capability Shader
Extension "SPV_GOOGLE_hlsl_functionality1"
...
...
@@ -15,18 +15,18 @@ hlsl.noSemantic.functionality1.comp
Name 11 "Buf"
MemberName 11(Buf) 0 "@data"
Name 13 "Buf"
Name 1
6
"Buf@count"
MemberName 1
6
(Buf@count) 0 "@count"
Name 1
8
"Buf@count"
Name 1
7
"Buf@count"
MemberName 1
7
(Buf@count) 0 "@count"
Name 1
9
"Buf@count"
Decorate 10 ArrayStride 16
MemberDecorate 11(Buf) 0 Offset 0
Decorate 11(Buf) BufferBlock
Decorate 13(Buf) DescriptorSet 0
Decorate 13(Buf) Binding 0
MemberDecorate 1
6
(Buf@count) 0 Offset 0
Decorate 1
6
(Buf@count) BufferBlock
Decorate 1
8
(Buf@count) DescriptorSet 0
DecorateId 13(Buf) DecorationHlslCounterBufferGOOGLE 1
8
(Buf@count)
MemberDecorate 1
7
(Buf@count) 0 Offset 0
Decorate 1
7
(Buf@count) BufferBlock
Decorate 1
9
(Buf@count) DescriptorSet 0
DecorateId 13(Buf) DecorationHlslCounterBufferGOOGLE 1
9
(Buf@count)
2: TypeVoid
3: TypeFunction 2
8: TypeFloat 32
...
...
@@ -37,27 +37,26 @@ hlsl.noSemantic.functionality1.comp
13(Buf): 12(ptr) Variable Uniform
14: TypeInt 32 1
15: 14(int) Constant 0
16(Buf@count): TypeStruct 14(int)
17: TypePointer Uniform 16(Buf@count)
18(Buf@count): 17(ptr) Variable Uniform
19: TypePointer Uniform 14(int)
21: 14(int) Constant 1
22: TypeInt 32 0
23: 22(int) Constant 1
24: 22(int) Constant 0
26: 8(float) Constant 1065353216
27: 9(fvec4) ConstantComposite 26 26 26 26
28: TypePointer Uniform 9(fvec4)
16: TypeInt 32 0
17(Buf@count): TypeStruct 16(int)
18: TypePointer Uniform 17(Buf@count)
19(Buf@count): 18(ptr) Variable Uniform
20: TypePointer Uniform 16(int)
22: 16(int) Constant 1
23: 16(int) Constant 0
25: 8(float) Constant 1065353216
26: 9(fvec4) ConstantComposite 25 25 25 25
27: TypePointer Uniform 9(fvec4)
4(main): 2 Function None 3
5: Label
30
: 2 FunctionCall 6(@main()
29
: 2 FunctionCall 6(@main()
Return
FunctionEnd
6(@main(): 2 Function None 3
7: Label
2
0: 19(ptr) AccessChain 18
(Buf@count) 15
2
5: 22(int) AtomicIAdd 20 23 24 21
2
9: 28(ptr) AccessChain 13(Buf) 15 25
Store 2
9 27
2
1: 20(ptr) AccessChain 19
(Buf@count) 15
2
4: 16(int) AtomicIAdd 21 22 23 22
2
8: 27(ptr) AccessChain 13(Buf) 15 24
Store 2
8 26
Return
FunctionEnd
Test/baseResults/hlsl.structbuffer.append.fn.frag.out
View file @
6ae18707
...
...
@@ -5,9 +5,9 @@ gl_FragCoord origin is upper left
0:8 Function Definition: Fn2(block--vf4[0]1;block--vf4[0]1; ( temp 4-component vector of float)
0:8 Function Parameters:
0:8 'arg_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:8 'arg_a@count' ( buffer block{layout( row_major std430) buffer int @count})
0:8 'arg_a@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:8 'arg_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:8 'arg_c@count' ( buffer block{layout( row_major std430) buffer int @count})
0:8 'arg_c@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:? Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:9 indirect index ( buffer 4-component vector of float)
...
...
@@ -16,12 +16,12 @@ gl_FragCoord origin is upper left
0:9 Constant:
0:9 0 (const uint)
0:9 AtomicAdd ( temp uint)
0:9 @count: direct index for structure ( temp int)
0:9 'arg_a@count' ( buffer block{layout( row_major std430) buffer int @count})
0:9 @count: direct index for structure ( temp
u
int)
0:9 'arg_a@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 1 (const int)
0:9 1 (const
u
int)
0:? Constant:
0:? 1.000000
0:? 2.000000
...
...
@@ -35,12 +35,12 @@ gl_FragCoord origin is upper left
0:10 0 (const uint)
0:10 add ( temp uint)
0:10 AtomicAdd ( temp uint)
0:10 @count: direct index for structure ( temp int)
0:10 'arg_c@count' ( buffer block{layout( row_major std430) buffer int @count})
0:10 @count: direct index for structure ( temp
u
int)
0:10 'arg_c@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10
-1 (const
int)
0:10
4294967295 (const u
int)
0:10 Constant:
0:10 -1 (const int)
0:19 Function Definition: @main(u1; ( temp 4-component vector of float)
...
...
@@ -50,9 +50,9 @@ gl_FragCoord origin is upper left
0:22 Branch: Return with expression
0:22 Function Call: Fn2(block--vf4[0]1;block--vf4[0]1; ( temp 4-component vector of float)
0:22 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:22 'sbuf_a@count' ( buffer block{layout( row_major std430) buffer int @count})
0:22 'sbuf_a@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:22 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:22 'sbuf_c@count' ( buffer block{layout( row_major std430) buffer int @count})
0:22 'sbuf_c@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:19 Function Definition: main( ( temp void)
0:19 Function Parameters:
0:? Sequence
...
...
@@ -65,9 +65,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -82,9 +82,9 @@ gl_FragCoord origin is upper left
0:8 Function Definition: Fn2(block--vf4[0]1;block--vf4[0]1; ( temp 4-component vector of float)
0:8 Function Parameters:
0:8 'arg_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:8 'arg_a@count' ( buffer block{layout( row_major std430) buffer int @count})
0:8 'arg_a@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:8 'arg_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:8 'arg_c@count' ( buffer block{layout( row_major std430) buffer int @count})
0:8 'arg_c@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:? Sequence
0:9 move second child to first child ( temp 4-component vector of float)
0:9 indirect index ( buffer 4-component vector of float)
...
...
@@ -93,12 +93,12 @@ gl_FragCoord origin is upper left
0:9 Constant:
0:9 0 (const uint)
0:9 AtomicAdd ( temp uint)
0:9 @count: direct index for structure ( temp int)
0:9 'arg_a@count' ( buffer block{layout( row_major std430) buffer int @count})
0:9 @count: direct index for structure ( temp
u
int)
0:9 'arg_a@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:9 Constant:
0:9 0 (const int)
0:9 Constant:
0:9 1 (const int)
0:9 1 (const
u
int)
0:? Constant:
0:? 1.000000
0:? 2.000000
...
...
@@ -112,12 +112,12 @@ gl_FragCoord origin is upper left
0:10 0 (const uint)
0:10 add ( temp uint)
0:10 AtomicAdd ( temp uint)
0:10 @count: direct index for structure ( temp int)
0:10 'arg_c@count' ( buffer block{layout( row_major std430) buffer int @count})
0:10 @count: direct index for structure ( temp
u
int)
0:10 'arg_c@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10
-1 (const
int)
0:10
4294967295 (const u
int)
0:10 Constant:
0:10 -1 (const int)
0:19 Function Definition: @main(u1; ( temp 4-component vector of float)
...
...
@@ -127,9 +127,9 @@ gl_FragCoord origin is upper left
0:22 Branch: Return with expression
0:22 Function Call: Fn2(block--vf4[0]1;block--vf4[0]1; ( temp 4-component vector of float)
0:22 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:22 'sbuf_a@count' ( buffer block{layout( row_major std430) buffer int @count})
0:22 'sbuf_a@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:22 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:22 'sbuf_c@count' ( buffer block{layout( row_major std430) buffer int @count})
0:22 'sbuf_c@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:19 Function Definition: main( ( temp void)
0:19 Function Parameters:
0:? Sequence
...
...
@@ -142,9 +142,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -169,8 +169,8 @@ gl_FragCoord origin is upper left
Name 16 "arg_a@count"
Name 17 "arg_c"
Name 18 "arg_c@count"
Name 2
5
"@main(u1;"
Name 2
4
"pos"
Name 2
4
"@main(u1;"
Name 2
3
"pos"
Name 49 "sbuf_a"
Name 50 "sbuf_a@count"
Name 51 "sbuf_c"
...
...
@@ -207,30 +207,30 @@ gl_FragCoord origin is upper left
8: TypeRuntimeArray 7(fvec4)
9: TypeStruct 8
10: TypePointer Uniform 9(struct)
11: TypeInt 32
1
11: TypeInt 32
0
12: TypeStruct 11(int)
13: TypePointer Uniform 12(struct)
14: TypeFunction 7(fvec4) 10(ptr) 13(ptr) 10(ptr) 13(ptr)
21: Type
Int 32 0
22: Type
Pointer Function 21(int
)
2
3: TypeFunction 7(fvec4) 22(ptr)
27:
11
(int) Constant 0
21: Type
Pointer Function 11(int)
22: Type
Function 7(fvec4) 21(ptr
)
2
6: TypeInt 32 1
27:
26
(int) Constant 0
28: TypePointer Uniform 11(int)
30: 11(int) Constant 1
31:
21(int) Constant 1
3
2: 21(int) Constant 0
34: 6(float) Constant 10
65353216
35: 6(float) Constant 107
3741824
36: 6(float) Constant 10
77936128
37:
6(float) Constant 1082130432
38:
7(fvec4) ConstantComposite 34 35 36 37
39: TypePointer Uniform 7(fvec4)
4
2: 11
(int) Constant 4294967295
31:
11(int) Constant 0
3
3: 6(float) Constant 1065353216
34: 6(float) Constant 10
73741824
35: 6(float) Constant 107
7936128
36: 6(float) Constant 10
82130432
37:
7(fvec4) ConstantComposite 33 34 35 36
38:
TypePointer Uniform 7(fvec4)
41: 11(int) Constant 4294967295
4
3: 26
(int) Constant 4294967295
49(sbuf_a): 10(ptr) Variable Uniform
50(sbuf_a@count): 13(ptr) Variable Uniform
51(sbuf_c): 10(ptr) Variable Uniform
52(sbuf_c@count): 13(ptr) Variable Uniform
57: TypePointer Input
2
1(int)
57: TypePointer Input
1
1(int)
58(pos): 57(ptr) Variable Input
60: TypePointer Output 7(fvec4)
61(@entryPointOutput): 60(ptr) Variable Output
...
...
@@ -241,13 +241,13 @@ gl_FragCoord origin is upper left
69(sbuf_unused): 10(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
56(pos): 2
2
(ptr) Variable Function
62(param): 2
2
(ptr) Variable Function
59:
2
1(int) Load 58(pos)
56(pos): 2
1
(ptr) Variable Function
62(param): 2
1
(ptr) Variable Function
59:
1
1(int) Load 58(pos)
Store 56(pos) 59
63:
2
1(int) Load 56(pos)
63:
1
1(int) Load 56(pos)
Store 62(param) 63
64: 7(fvec4) FunctionCall 2
5
(@main(u1;) 62(param)
64: 7(fvec4) FunctionCall 2
4
(@main(u1;) 62(param)
Store 61(@entryPointOutput) 64
Return
FunctionEnd
...
...
@@ -258,19 +258,19 @@ gl_FragCoord origin is upper left
18(arg_c@count): 13(ptr) FunctionParameter
20: Label
29: 28(ptr) AccessChain 16(arg_a@count) 27
3
3: 21(int) AtomicIAdd 29 31 32
30
40: 39(ptr) AccessChain 15(arg_a) 27 33
Store
40 38
4
1
: 28(ptr) AccessChain 18(arg_c@count) 27
4
3: 21(int) AtomicIAdd 41 31 32 42
44:
21(int) IAdd 43 42
45: 3
9
(ptr) AccessChain 17(arg_c) 27 44
3
2: 11(int) AtomicIAdd 29 30 31
30
39: 38(ptr) AccessChain 15(arg_a) 27 32
Store
39 37
4
0
: 28(ptr) AccessChain 18(arg_c@count) 27
4
2: 11(int) AtomicIAdd 40 30 31 41
44:
11(int) IAdd 42 43
45: 3
8
(ptr) AccessChain 17(arg_c) 27 44
46: 7(fvec4) Load 45
ReturnValue 46
FunctionEnd
2
5(@main(u1;): 7(fvec4) Function None 23
2
4(pos): 22
(ptr) FunctionParameter
2
6
: Label
2
4(@main(u1;): 7(fvec4) Function None 22
2
3(pos): 21
(ptr) FunctionParameter
2
5
: Label
53: 7(fvec4) FunctionCall 19(Fn2(block--vf4[0]1;block--vf4[0]1;) 49(sbuf_a) 50(sbuf_a@count) 51(sbuf_c) 52(sbuf_c@count)
ReturnValue 53
FunctionEnd
Test/baseResults/hlsl.structbuffer.append.frag.out
View file @
6ae18707
...
...
@@ -13,12 +13,12 @@ gl_FragCoord origin is upper left
0:8 Constant:
0:8 0 (const uint)
0:8 AtomicAdd ( temp uint)
0:8 @count: direct index for structure ( temp int)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:8 @count: direct index for structure ( temp
u
int)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:8 1 (const
u
int)
0:? Constant:
0:? 1.000000
0:? 2.000000
...
...
@@ -32,12 +32,12 @@ gl_FragCoord origin is upper left
0:10 0 (const uint)
0:10 add ( temp uint)
0:10 AtomicAdd ( temp uint)
0:10 @count: direct index for structure ( temp int)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:10 @count: direct index for structure ( temp
u
int)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10
-1 (const
int)
0:10
4294967295 (const u
int)
0:10 Constant:
0:10 -1 (const int)
0:7 Function Definition: main( ( temp void)
...
...
@@ -52,9 +52,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -77,12 +77,12 @@ gl_FragCoord origin is upper left
0:8 Constant:
0:8 0 (const uint)
0:8 AtomicAdd ( temp uint)
0:8 @count: direct index for structure ( temp int)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:8 @count: direct index for structure ( temp
u
int)
0:8 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:8 Constant:
0:8 0 (const int)
0:8 Constant:
0:8 1 (const int)
0:8 1 (const
u
int)
0:? Constant:
0:? 1.000000
0:? 2.000000
...
...
@@ -96,12 +96,12 @@ gl_FragCoord origin is upper left
0:10 0 (const uint)
0:10 add ( temp uint)
0:10 AtomicAdd ( temp uint)
0:10 @count: direct index for structure ( temp int)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:10 @count: direct index for structure ( temp
u
int)
0:10 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:10 Constant:
0:10 0 (const int)
0:10 Constant:
0:10
-1 (const
int)
0:10
4294967295 (const u
int)
0:10 Constant:
0:10 -1 (const int)
0:7 Function Definition: main( ( temp void)
...
...
@@ -116,9 +116,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_a' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_a@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_c' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_c@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_unused' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -142,8 +142,8 @@ gl_FragCoord origin is upper left
Name 20 "sbuf_a@count"
MemberName 20(sbuf_a@count) 0 "@count"
Name 22 "sbuf_a@count"
Name 3
6
"sbuf_c"
Name 3
7
"sbuf_c@count"
Name 3
5
"sbuf_c"
Name 3
6
"sbuf_c@count"
Name 46 "pos"
Name 48 "pos"
Name 51 "@entryPointOutput"
...
...
@@ -156,8 +156,8 @@ gl_FragCoord origin is upper left
MemberDecorate 20(sbuf_a@count) 0 Offset 0
Decorate 20(sbuf_a@count) BufferBlock
Decorate 22(sbuf_a@count) DescriptorSet 0
Decorate 3
6
(sbuf_c) DescriptorSet 0
Decorate 3
7
(sbuf_c@count) DescriptorSet 0
Decorate 3
5
(sbuf_c) DescriptorSet 0
Decorate 3
6
(sbuf_c@count) DescriptorSet 0
Decorate 48(pos) Flat
Decorate 48(pos) Location 0
Decorate 51(@entryPointOutput) Location 0
...
...
@@ -175,22 +175,22 @@ gl_FragCoord origin is upper left
17(sbuf_a): 16(ptr) Variable Uniform
18: TypeInt 32 1
19: 18(int) Constant 0
20(sbuf_a@count): TypeStruct
18
(int)
20(sbuf_a@count): TypeStruct
6
(int)
21: TypePointer Uniform 20(sbuf_a@count)
22(sbuf_a@count): 21(ptr) Variable Uniform
23: TypePointer Uniform
18
(int)
25:
18
(int) Constant 1
26: 6(int) Constant
1
2
7: 6(int) Constant 0
29: 8(float) Constant 10
65353216
30: 8(float) Constant 107
3741824
31: 8(float) Constant 10
77936128
32:
8(float) Constant 1082130432
33:
9(fvec4) ConstantComposite 29 30 31 32
34: TypePointer Uniform 9(fvec4)
36(sbuf_c): 16
(ptr) Variable Uniform
37(sbuf_c@count): 21(ptr) Variable Uniform
39
: 18(int) Constant 4294967295
23: TypePointer Uniform
6
(int)
25:
6
(int) Constant 1
26: 6(int) Constant
0
2
8: 8(float) Constant 1065353216
29: 8(float) Constant 10
73741824
30: 8(float) Constant 107
7936128
31: 8(float) Constant 10
82130432
32:
9(fvec4) ConstantComposite 28 29 30 31
33:
TypePointer Uniform 9(fvec4)
35(sbuf_c): 16(ptr) Variable Uniform
36(sbuf_c@count): 21
(ptr) Variable Uniform
38: 6(int) Constant 4294967295
40
: 18(int) Constant 4294967295
47: TypePointer Input 6(int)
48(pos): 47(ptr) Variable Input
50: TypePointer Output 9(fvec4)
...
...
@@ -212,13 +212,13 @@ gl_FragCoord origin is upper left
11(pos): 7(ptr) FunctionParameter
13: Label
24: 23(ptr) AccessChain 22(sbuf_a@count) 19
2
8: 6(int) AtomicIAdd 24 26 27
25
3
5: 34(ptr) AccessChain 17(sbuf_a) 19 28
Store 3
5 33
3
8: 23(ptr) AccessChain 37
(sbuf_c@count) 19
40: 6(int) AtomicIAdd 38 26 27 39
41: 6(int) IAdd
40 39
42: 3
4(ptr) AccessChain 36
(sbuf_c) 19 41
2
7: 6(int) AtomicIAdd 24 25 26
25
3
4: 33(ptr) AccessChain 17(sbuf_a) 19 27
Store 3
4 32
3
7: 23(ptr) AccessChain 36
(sbuf_c@count) 19
39: 6(int) AtomicIAdd 37 25 26 38
41: 6(int) IAdd
39 40
42: 3
3(ptr) AccessChain 35
(sbuf_c) 19 41
43: 9(fvec4) Load 42
ReturnValue 43
FunctionEnd
Test/baseResults/hlsl.structbuffer.floatidx.comp.out
View file @
6ae18707
...
...
@@ -16,12 +16,12 @@ local_size = (1, 1, 1)
0:14 0 (const uint)
0:14 add ( temp uint)
0:14 AtomicAdd ( temp uint)
0:14 @count: direct index for structure ( temp int)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:14 @count: direct index for structure ( temp
u
int)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14
-1 (const
int)
0:14
4294967295 (const u
int)
0:14 Constant:
0:14 -1 (const int)
0:15 Sequence
...
...
@@ -83,7 +83,7 @@ local_size = (1, 1, 1)
0:? Linker Objects
0:? 'outtx' (layout( rgba32f) uniform image2D)
0:? 'csb' (layout( binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp 4-component vector of float color, temp 2-component vector of uint threadId} @data})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'rwsb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'nThreadId' ( in 3-component vector of uint GlobalInvocationID)
...
...
@@ -108,12 +108,12 @@ local_size = (1, 1, 1)
0:14 0 (const uint)
0:14 add ( temp uint)
0:14 AtomicAdd ( temp uint)
0:14 @count: direct index for structure ( temp int)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:14 @count: direct index for structure ( temp
u
int)
0:14 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:14 Constant:
0:14 0 (const int)
0:14 Constant:
0:14
-1 (const
int)
0:14
4294967295 (const u
int)
0:14 Constant:
0:14 -1 (const int)
0:15 Sequence
...
...
@@ -175,18 +175,18 @@ local_size = (1, 1, 1)
0:? Linker Objects
0:? 'outtx' (layout( rgba32f) uniform image2D)
0:? 'csb' (layout( binding=1 row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of structure{ temp 4-component vector of float color, temp 2-component vector of uint threadId} @data})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'csb@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'rwsb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of float @data})
0:? 'nThreadId' ( in 3-component vector of uint GlobalInvocationID)
// Module Version 10000
// Generated by (magic number): 80006
// Id's are bound by 8
4
// Id's are bound by 8
5
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
79
EntryPoint GLCompute 4 "main"
80
ExecutionMode 4 LocalSize 1 1 1
Source HLSL 500
Name 4 "main"
...
...
@@ -205,15 +205,15 @@ local_size = (1, 1, 1)
Name 26 "csb@count"
MemberName 26(csb@count) 0 "@count"
Name 28 "csb@count"
Name 4
8
"coord"
Name 5
2
"storeTemp"
Name 5
7
"outtx"
Name 6
3
"rwsb"
MemberName 6
3
(rwsb) 0 "@data"
Name 6
5
"rwsb"
Name 7
7
"nThreadId"
Name
79
"nThreadId"
Name 8
1
"param"
Name 4
9
"coord"
Name 5
3
"storeTemp"
Name 5
8
"outtx"
Name 6
4
"rwsb"
MemberName 6
4
(rwsb) 0 "@data"
Name 6
6
"rwsb"
Name 7
8
"nThreadId"
Name
80
"nThreadId"
Name 8
2
"param"
MemberDecorate 19(sb_t) 0 Offset 0
MemberDecorate 19(sb_t) 1 Offset 16
Decorate 20 ArrayStride 32
...
...
@@ -224,12 +224,12 @@ local_size = (1, 1, 1)
MemberDecorate 26(csb@count) 0 Offset 0
Decorate 26(csb@count) BufferBlock
Decorate 28(csb@count) DescriptorSet 0
Decorate 5
7
(outtx) DescriptorSet 0
Decorate 6
2
ArrayStride 16
MemberDecorate 6
3
(rwsb) 0 Offset 0
Decorate 6
3
(rwsb) BufferBlock
Decorate 6
5
(rwsb) DescriptorSet 0
Decorate
79
(nThreadId) BuiltIn GlobalInvocationId
Decorate 5
8
(outtx) DescriptorSet 0
Decorate 6
3
ArrayStride 16
MemberDecorate 6
4
(rwsb) 0 Offset 0
Decorate 6
4
(rwsb) BufferBlock
Decorate 6
6
(rwsb) DescriptorSet 0
Decorate
80
(nThreadId) BuiltIn GlobalInvocationId
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
...
...
@@ -248,79 +248,80 @@ local_size = (1, 1, 1)
23(csb): 22(ptr) Variable Uniform
24: TypeInt 32 1
25: 24(int) Constant 0
26(csb@count): TypeStruct
24
(int)
26(csb@count): TypeStruct
6
(int)
27: TypePointer Uniform 26(csb@count)
28(csb@count): 27(ptr) Variable Uniform
29: TypePointer Uniform
24
(int)
31:
24
(int) Constant 4294967295
29: TypePointer Uniform
6
(int)
31:
6
(int) Constant 4294967295
32: 6(int) Constant 1
33: 6(int) Constant 0
36: TypePointer Uniform 19(sb_t)
40: TypePointer Function 14(fvec4)
43: 24(int) Constant 1
44: TypePointer Function 15(ivec2)
46: TypeVector 13(float) 2
47: TypePointer Function 46(fvec2)
55: TypeImage 13(float) 2D nonsampled format:Rgba32f
56: TypePointer UniformConstant 55
57(outtx): 56(ptr) Variable UniformConstant
62: TypeRuntimeArray 14(fvec4)
63(rwsb): TypeStruct 62
64: TypePointer Uniform 63(rwsb)
65(rwsb): 64(ptr) Variable Uniform
66: TypePointer Function 13(float)
73: TypePointer Uniform 14(fvec4)
78: TypePointer Input 7(ivec3)
79(nThreadId): 78(ptr) Variable Input
35: 24(int) Constant 4294967295
37: TypePointer Uniform 19(sb_t)
41: TypePointer Function 14(fvec4)
44: 24(int) Constant 1
45: TypePointer Function 15(ivec2)
47: TypeVector 13(float) 2
48: TypePointer Function 47(fvec2)
56: TypeImage 13(float) 2D nonsampled format:Rgba32f
57: TypePointer UniformConstant 56
58(outtx): 57(ptr) Variable UniformConstant
63: TypeRuntimeArray 14(fvec4)
64(rwsb): TypeStruct 63
65: TypePointer Uniform 64(rwsb)
66(rwsb): 65(ptr) Variable Uniform
67: TypePointer Function 13(float)
74: TypePointer Uniform 14(fvec4)
79: TypePointer Input 7(ivec3)
80(nThreadId): 79(ptr) Variable Input
4(main): 2 Function None 3
5: Label
7
7
(nThreadId): 8(ptr) Variable Function
8
1
(param): 8(ptr) Variable Function
8
0: 7(ivec3) Load 79
(nThreadId)
Store 7
7(nThreadId) 80
8
2: 7(ivec3) Load 77
(nThreadId)
Store 8
1(param) 82
8
3: 2 FunctionCall 11(@main(vu3;) 81
(param)
7
8
(nThreadId): 8(ptr) Variable Function
8
2
(param): 8(ptr) Variable Function
8
1: 7(ivec3) Load 80
(nThreadId)
Store 7
8(nThreadId) 81
8
3: 7(ivec3) Load 78
(nThreadId)
Store 8
2(param) 83
8
4: 2 FunctionCall 11(@main(vu3;) 82
(param)
Return
FunctionEnd
11(@main(vu3;): 2 Function None 9
10(nThreadId): 8(ptr) FunctionParameter
12: Label
18(data): 17(ptr) Variable Function
4
8(coord): 47
(ptr) Variable Function
5
2(storeTemp): 40
(ptr) Variable Function
4
9(coord): 48
(ptr) Variable Function
5
3(storeTemp): 41
(ptr) Variable Function
30: 29(ptr) AccessChain 28(csb@count) 25
34: 6(int) AtomicIAdd 30 32 33 31
3
5: 6(int) IAdd 34 31
3
7: 36(ptr) AccessChain 23(csb) 25 35
3
8: 19(sb_t) Load 37
39: 14(fvec4) CompositeExtract 38
0
4
1: 40
(ptr) AccessChain 18(data) 25
Store 4
1 39
4
2: 15(ivec2) CompositeExtract 38
1
4
5: 44(ptr) AccessChain 18(data) 43
Store 4
5 42
49: 44(ptr) AccessChain 18(data) 43
5
0: 15(ivec2) Load 49
5
1: 46(fvec2) ConvertUToF 50
Store 4
8(coord) 51
5
3: 40
(ptr) AccessChain 18(data) 25
5
4: 14(fvec4) Load 53
Store 5
2(storeTemp) 54
5
8: 55 Load 57
(outtx)
59: 46(fvec2) Load 48
(coord)
6
0: 15(ivec2) ConvertFToU 59
6
1: 14(fvec4) Load 52
(storeTemp)
ImageWrite 5
8 60 61
6
7: 66(ptr) AccessChain 48
(coord) 33
6
8: 13(float) Load 67
69: 6(int) ConvertFToU 68
7
0: 66(ptr) AccessChain 48
(coord) 32
7
1: 13(float) Load 70
7
2: 6(int) ConvertFToU 71
7
4: 73(ptr) AccessChain 65(rwsb) 25 72
7
5: 14(fvec4) Load 74
7
6: 73(ptr) AccessChain 65(rwsb) 25 69
Store 7
6 75
3
6: 6(int) IAdd 34 35
3
8: 37(ptr) AccessChain 23(csb) 25 36
3
9: 19(sb_t) Load 38
40: 14(fvec4) CompositeExtract 39
0
4
2: 41
(ptr) AccessChain 18(data) 25
Store 4
2 40
4
3: 15(ivec2) CompositeExtract 39
1
4
6: 45(ptr) AccessChain 18(data) 44
Store 4
6 43
50: 45(ptr) AccessChain 18(data) 44
5
1: 15(ivec2) Load 50
5
2: 47(fvec2) ConvertUToF 51
Store 4
9(coord) 52
5
4: 41
(ptr) AccessChain 18(data) 25
5
5: 14(fvec4) Load 54
Store 5
3(storeTemp) 55
5
9: 56 Load 58
(outtx)
60: 47(fvec2) Load 49
(coord)
6
1: 15(ivec2) ConvertFToU 60
6
2: 14(fvec4) Load 53
(storeTemp)
ImageWrite 5
9 61 62
6
8: 67(ptr) AccessChain 49
(coord) 33
6
9: 13(float) Load 68
70: 6(int) ConvertFToU 69
7
1: 67(ptr) AccessChain 49
(coord) 32
7
2: 13(float) Load 71
7
3: 6(int) ConvertFToU 72
7
5: 74(ptr) AccessChain 66(rwsb) 25 73
7
6: 14(fvec4) Load 75
7
7: 74(ptr) AccessChain 66(rwsb) 25 70
Store 7
7 76
Return
FunctionEnd
Test/baseResults/hlsl.structbuffer.fn.frag.out
View file @
6ae18707
...
...
@@ -17,7 +17,7 @@ gl_FragCoord origin is upper left
0:10 Function Definition: set(block--vu4[0]1;u1;vu4; ( temp void)
0:10 Function Parameters:
0:10 'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:10 'sb@count' ( buffer block{layout( row_major std430) buffer int @count})
0:10 'sb@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:10 'bufferOffset' ( in uint)
0:10 'data' ( in 4-component vector of uint)
0:? Sequence
...
...
@@ -35,7 +35,7 @@ gl_FragCoord origin is upper left
0:? Sequence
0:21 Function Call: set(block--vu4[0]1;u1;vu4; ( temp void)
0:21 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:21 'sbuf2@count' ( buffer block{layout( row_major std430) buffer int @count})
0:21 'sbuf2@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:21 Constant:
0:21 2 (const uint)
0:21 Function Call: get(block--vu4[0]1;u1; ( temp 4-component vector of uint)
...
...
@@ -61,7 +61,7 @@ gl_FragCoord origin is upper left
0:? Linker Objects
0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 3-component vector of uint @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -88,7 +88,7 @@ gl_FragCoord origin is upper left
0:10 Function Definition: set(block--vu4[0]1;u1;vu4; ( temp void)
0:10 Function Parameters:
0:10 'sb' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:10 'sb@count' ( buffer block{layout( row_major std430) buffer int @count})
0:10 'sb@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:10 'bufferOffset' ( in uint)
0:10 'data' ( in 4-component vector of uint)
0:? Sequence
...
...
@@ -106,7 +106,7 @@ gl_FragCoord origin is upper left
0:? Sequence
0:21 Function Call: set(block--vu4[0]1;u1;vu4; ( temp void)
0:21 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:21 'sbuf2@count' ( buffer block{layout( row_major std430) buffer int @count})
0:21 'sbuf2@count' ( buffer block{layout( row_major std430) buffer
u
int @count})
0:21 Constant:
0:21 2 (const uint)
0:21 Function Call: get(block--vu4[0]1;u1; ( temp 4-component vector of uint)
...
...
@@ -132,7 +132,7 @@ gl_FragCoord origin is upper left
0:? Linker Objects
0:? 'sbuf' (layout( binding=10 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf2' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf2@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf3' (layout( binding=12 row_major std430) readonly buffer block{layout( row_major std430) buffer unsized 1-element array of 3-component vector of uint @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -155,15 +155,15 @@ gl_FragCoord origin is upper left
Name 14 "bufferOffset"
Name 18 ""
MemberName 18 0 "@data"
Name 2
1
""
MemberName 2
1
0 "@count"
Name 2
9
"set(block--vu4[0]1;u1;vu4;"
Name 2
5
"sb"
Name 2
6
"sb@count"
Name 2
7
"bufferOffset"
Name 2
8
"data"
Name 3
5
"@main(u1;"
Name 3
4
"pos"
Name 2
0
""
MemberName 2
0
0 "@count"
Name 2
8
"set(block--vu4[0]1;u1;vu4;"
Name 2
4
"sb"
Name 2
5
"sb@count"
Name 2
6
"bufferOffset"
Name 2
7
"data"
Name 3
4
"@main(u1;"
Name 3
3
"pos"
Name 47 "sbuf2"
Name 48 "sbuf2@count"
Name 50 "sbuf"
...
...
@@ -188,7 +188,7 @@ gl_FragCoord origin is upper left
Decorate 17 ArrayStride 16
MemberDecorate 18 0 Offset 0
Decorate 18 BufferBlock
Decorate 2
1
BufferBlock
Decorate 2
0
BufferBlock
Decorate 47(sbuf2) DescriptorSet 0
Decorate 48(sbuf2@count) DescriptorSet 0
Decorate 50(sbuf) DescriptorSet 0
...
...
@@ -217,28 +217,28 @@ gl_FragCoord origin is upper left
17: TypeRuntimeArray 7(ivec4)
18: TypeStruct 17
19: TypePointer Uniform 18(struct)
20: Type
Int 32 1
21: Type
Struct 20(in
t)
22: TypePointer
Uniform 21(struct
)
23: Type
Pointer Function 7(ivec4
)
24: TypeFunction 2 19(ptr) 22(ptr) 11(ptr) 23(ptr)
31: Type
Float 32
32: Type
Vector 31(float) 4
3
3: TypeFunction 32(fvec4) 11(ptr)
37:
20
(int) Constant 0
20: Type
Struct 6(int)
21: Type
Pointer Uniform 20(struc
t)
22: TypePointer
Function 7(ivec4
)
23: Type
Function 2 19(ptr) 21(ptr) 11(ptr) 22(ptr
)
30: TypeFloat 32
31: Type
Vector 30(float) 4
32: Type
Function 31(fvec4) 11(ptr)
3
6: TypeInt 32 1
37:
36
(int) Constant 0
39: TypePointer Uniform 7(ivec4)
47(sbuf2): 19(ptr) Variable Uniform
48(sbuf2@count): 2
2
(ptr) Variable Uniform
48(sbuf2@count): 2
1
(ptr) Variable Uniform
49: 6(int) Constant 2
50(sbuf): 10(ptr) Variable Uniform
51: 6(int) Constant 3
57: 3
1
(float) Constant 0
58: 3
2
(fvec4) ConstantComposite 57 57 57 57
57: 3
0
(float) Constant 0
58: 3
1
(fvec4) ConstantComposite 57 57 57 57
62: TypePointer Input 6(int)
63(pos): 62(ptr) Variable Input
65: TypePointer Output 3
2
(fvec4)
65: TypePointer Output 3
1
(fvec4)
66(@entryPointOutput): 65(ptr) Variable Output
70(sbuf2@count): TypeStruct
20
(int)
70(sbuf2@count): TypeStruct
6
(int)
71: TypePointer Uniform 70(sbuf2@count)
72(sbuf2@count): 71(ptr) Variable Uniform
73: TypeVector 6(int) 3
...
...
@@ -254,7 +254,7 @@ gl_FragCoord origin is upper left
Store 61(pos) 64
68: 6(int) Load 61(pos)
Store 67(param) 68
69: 3
2(fvec4) FunctionCall 35
(@main(u1;) 67(param)
69: 3
1(fvec4) FunctionCall 34
(@main(u1;) 67(param)
Store 66(@entryPointOutput) 69
Return
FunctionEnd
...
...
@@ -267,28 +267,28 @@ gl_FragCoord origin is upper left
41: 7(ivec4) Load 40
ReturnValue 41
FunctionEnd
2
9(set(block--vu4[0]1;u1;vu4;): 2 Function None 24
2
5
(sb): 19(ptr) FunctionParameter
2
6(sb@count): 22
(ptr) FunctionParameter
2
7
(bufferOffset): 11(ptr) FunctionParameter
2
8(data): 23
(ptr) FunctionParameter
30
: Label
44: 6(int) Load 2
7
(bufferOffset)
45: 7(ivec4) Load 2
8
(data)
46: 39(ptr) AccessChain 2
5
(sb) 37 44
2
8(set(block--vu4[0]1;u1;vu4;): 2 Function None 23
2
4
(sb): 19(ptr) FunctionParameter
2
5(sb@count): 21
(ptr) FunctionParameter
2
6
(bufferOffset): 11(ptr) FunctionParameter
2
7(data): 22
(ptr) FunctionParameter
29
: Label
44: 6(int) Load 2
6
(bufferOffset)
45: 7(ivec4) Load 2
7
(data)
46: 39(ptr) AccessChain 2
4
(sb) 37 44
Store 46 45
Return
FunctionEnd
3
5(@main(u1;): 32(fvec4) Function None 33
3
4
(pos): 11(ptr) FunctionParameter
3
6
: Label
3
4(@main(u1;): 31(fvec4) Function None 32
3
3
(pos): 11(ptr) FunctionParameter
3
5
: Label
52(param): 11(ptr) Variable Function
54(param): 11(ptr) Variable Function
55(param): 2
3
(ptr) Variable Function
55(param): 2
2
(ptr) Variable Function
Store 52(param) 51
53: 7(ivec4) FunctionCall 15(get(block--vu4[0]1;u1;) 50(sbuf) 52(param)
Store 54(param) 49
Store 55(param) 53
56: 2 FunctionCall 2
9
(set(block--vu4[0]1;u1;vu4;) 47(sbuf2) 48(sbuf2@count) 54(param) 55(param)
56: 2 FunctionCall 2
8
(set(block--vu4[0]1;u1;vu4;) 47(sbuf2) 48(sbuf2@count) 54(param) 55(param)
ReturnValue 58
FunctionEnd
Test/baseResults/hlsl.structbuffer.incdec.frag.hlslfun1.out
View file @
6ae18707
...
...
@@ -23,8 +23,8 @@ hlsl.structbuffer.incdec.frag
Name 34 "sbuf_rw_i@count"
MemberName 34(sbuf_rw_i@count) 0 "@count"
Name 36 "sbuf_rw_i@count"
Name 4
2
"c2"
Name 4
3
"sbuf_rw_d@count"
Name 4
1
"c2"
Name 4
2
"sbuf_rw_d@count"
Name 61 "pos"
Name 63 "pos"
Name 66 "@entryPointOutput"
...
...
@@ -38,14 +38,14 @@ hlsl.structbuffer.incdec.frag
MemberDecorate 34(sbuf_rw_i@count) 0 Offset 0
Decorate 34(sbuf_rw_i@count) BufferBlock
Decorate 36(sbuf_rw_i@count) DescriptorSet 0
Decorate 4
3
(sbuf_rw_d@count) DescriptorSet 0
Decorate 4
2
(sbuf_rw_d@count) DescriptorSet 0
Decorate 63(pos) Flat
Decorate 63(pos) Location 0
DecorateStringGOOGLE 63(pos) DecorationHlslSemanticGOOGLE "FOO"
Decorate 66(@entryPointOutput) Location 0
DecorateStringGOOGLE 66(@entryPointOutput) DecorationHlslSemanticGOOGLE "SV_TARGET0"
DecorateId 22(sbuf_rw_i) DecorationHlslCounterBufferGOOGLE 36(sbuf_rw_i@count)
DecorateId 26(sbuf_rw_d) DecorationHlslCounterBufferGOOGLE 4
3
(sbuf_rw_d@count)
DecorateId 26(sbuf_rw_d) DecorationHlslCounterBufferGOOGLE 4
2
(sbuf_rw_d@count)
2: TypeVoid
3: TypeFunction 2
6: TypeInt 32 0
...
...
@@ -70,14 +70,14 @@ hlsl.structbuffer.incdec.frag
29: 6(int) Constant 2
30: 14(ivec4) ConstantComposite 29 29 29 29
31: TypePointer Uniform 14(ivec4)
34(sbuf_rw_i@count): TypeStruct
23
(int)
34(sbuf_rw_i@count): TypeStruct
6
(int)
35: TypePointer Uniform 34(sbuf_rw_i@count)
36(sbuf_rw_i@count): 35(ptr) Variable Uniform
37: TypePointer Uniform
23
(int)
39:
23
(int) Constant 1
40: 6(int) Constant 1
43(sbuf_rw_d@count): 35(ptr) Variable Uniform
4
5
: 23(int) Constant 4294967295
37: TypePointer Uniform
6
(int)
39:
6
(int) Constant 1
42(sbuf_rw_d@count): 35(ptr) Variable Uniform
44: 6(int) Constant 4294967295
4
6
: 23(int) Constant 4294967295
62: TypePointer Input 6(int)
63(pos): 62(ptr) Variable Input
65: TypePointer Output 9(fvec4)
...
...
@@ -99,26 +99,26 @@ hlsl.structbuffer.incdec.frag
13: Label
16(result): 15(ptr) Variable Function
33(c1): 7(ptr) Variable Function
4
2
(c2): 7(ptr) Variable Function
4
1
(c2): 7(ptr) Variable Function
Store 16(result) 18
32: 31(ptr) AccessChain 27(sbuf_rw_nocounter) 24 28
Store 32 30
38: 37(ptr) AccessChain 36(sbuf_rw_i@count) 24
4
1: 6(int) AtomicIAdd 38 40
17 39
Store 33(c1) 4
1
4
4: 37(ptr) AccessChain 43
(sbuf_rw_d@count) 24
4
6: 6(int) AtomicIAdd 44 40 17 45
47: 6(int) IAdd 4
6 45
Store 4
2
(c2) 47
4
0: 6(int) AtomicIAdd 38 39
17 39
Store 33(c1) 4
0
4
3: 37(ptr) AccessChain 42
(sbuf_rw_d@count) 24
4
5: 6(int) AtomicIAdd 43 39 17 44
47: 6(int) IAdd 4
5 46
Store 4
1
(c2) 47
48: 7(ptr) AccessChain 16(result) 17
49: 6(int) Load 48
50: 8(float) ConvertUToF 49
51: 7(ptr) AccessChain 16(result)
40
51: 7(ptr) AccessChain 16(result)
39
52: 6(int) Load 51
53: 8(float) ConvertUToF 52
54: 6(int) Load 33(c1)
55: 8(float) ConvertUToF 54
56: 6(int) Load 4
2
(c2)
56: 6(int) Load 4
1
(c2)
57: 8(float) ConvertUToF 56
58: 9(fvec4) CompositeConstruct 50 53 55 57
ReturnValue 58
...
...
Test/baseResults/hlsl.structbuffer.incdec.frag.out
View file @
6ae18707
...
...
@@ -45,23 +45,23 @@ gl_FragCoord origin is upper left
0:15 move second child to first child ( temp uint)
0:15 'c1' ( temp uint)
0:15 AtomicAdd ( temp uint)
0:15 @count: direct index for structure ( temp int)
0:15 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:15 @count: direct index for structure ( temp
u
int)
0:15 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:15 Constant:
0:15 0 (const int)
0:15 Constant:
0:15 1 (const int)
0:15 1 (const
u
int)
0:16 Sequence
0:16 move second child to first child ( temp uint)
0:16 'c2' ( temp uint)
0:16 add ( temp uint)
0:16 AtomicAdd ( temp uint)
0:16 @count: direct index for structure ( temp int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:16 @count: direct index for structure ( temp
u
int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:16 Constant:
0:16 0 (const int)
0:16 Constant:
0:16
-1 (const
int)
0:16
4294967295 (const u
int)
0:16 Constant:
0:16 -1 (const int)
0:18 Branch: Return with expression
...
...
@@ -92,9 +92,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_rw_i' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_rw_d' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_rw_nocounter' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -149,23 +149,23 @@ gl_FragCoord origin is upper left
0:15 move second child to first child ( temp uint)
0:15 'c1' ( temp uint)
0:15 AtomicAdd ( temp uint)
0:15 @count: direct index for structure ( temp int)
0:15 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:15 @count: direct index for structure ( temp
u
int)
0:15 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:15 Constant:
0:15 0 (const int)
0:15 Constant:
0:15 1 (const int)
0:15 1 (const
u
int)
0:16 Sequence
0:16 move second child to first child ( temp uint)
0:16 'c2' ( temp uint)
0:16 add ( temp uint)
0:16 AtomicAdd ( temp uint)
0:16 @count: direct index for structure ( temp int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:16 @count: direct index for structure ( temp
u
int)
0:16 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:16 Constant:
0:16 0 (const int)
0:16 Constant:
0:16
-1 (const
int)
0:16
4294967295 (const u
int)
0:16 Constant:
0:16 -1 (const int)
0:18 Branch: Return with expression
...
...
@@ -196,9 +196,9 @@ gl_FragCoord origin is upper left
0:? 'pos' ( temp uint)
0:? Linker Objects
0:? 'sbuf_rw_i' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_rw_i@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_rw_d' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer int @count})
0:? 'sbuf_rw_d@count' (layout( row_major std430) buffer block{layout( row_major std430) buffer
u
int @count})
0:? 'sbuf_rw_nocounter' (layout( row_major std430) buffer block{layout( row_major std430) buffer unsized 1-element array of 4-component vector of uint @data})
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
...
...
@@ -226,8 +226,8 @@ gl_FragCoord origin is upper left
Name 34 "sbuf_rw_i@count"
MemberName 34(sbuf_rw_i@count) 0 "@count"
Name 36 "sbuf_rw_i@count"
Name 4
2
"c2"
Name 4
3
"sbuf_rw_d@count"
Name 4
1
"c2"
Name 4
2
"sbuf_rw_d@count"
Name 61 "pos"
Name 63 "pos"
Name 66 "@entryPointOutput"
...
...
@@ -241,7 +241,7 @@ gl_FragCoord origin is upper left
MemberDecorate 34(sbuf_rw_i@count) 0 Offset 0
Decorate 34(sbuf_rw_i@count) BufferBlock
Decorate 36(sbuf_rw_i@count) DescriptorSet 0
Decorate 4
3
(sbuf_rw_d@count) DescriptorSet 0
Decorate 4
2
(sbuf_rw_d@count) DescriptorSet 0
Decorate 63(pos) Flat
Decorate 63(pos) Location 0
Decorate 66(@entryPointOutput) Location 0
...
...
@@ -269,14 +269,14 @@ gl_FragCoord origin is upper left
29: 6(int) Constant 2
30: 14(ivec4) ConstantComposite 29 29 29 29
31: TypePointer Uniform 14(ivec4)
34(sbuf_rw_i@count): TypeStruct
23
(int)
34(sbuf_rw_i@count): TypeStruct
6
(int)
35: TypePointer Uniform 34(sbuf_rw_i@count)
36(sbuf_rw_i@count): 35(ptr) Variable Uniform
37: TypePointer Uniform
23
(int)
39:
23
(int) Constant 1
40: 6(int) Constant 1
43(sbuf_rw_d@count): 35(ptr) Variable Uniform
4
5
: 23(int) Constant 4294967295
37: TypePointer Uniform
6
(int)
39:
6
(int) Constant 1
42(sbuf_rw_d@count): 35(ptr) Variable Uniform
44: 6(int) Constant 4294967295
4
6
: 23(int) Constant 4294967295
62: TypePointer Input 6(int)
63(pos): 62(ptr) Variable Input
65: TypePointer Output 9(fvec4)
...
...
@@ -298,26 +298,26 @@ gl_FragCoord origin is upper left
13: Label
16(result): 15(ptr) Variable Function
33(c1): 7(ptr) Variable Function
4
2
(c2): 7(ptr) Variable Function
4
1
(c2): 7(ptr) Variable Function
Store 16(result) 18
32: 31(ptr) AccessChain 27(sbuf_rw_nocounter) 24 28
Store 32 30
38: 37(ptr) AccessChain 36(sbuf_rw_i@count) 24
4
1: 6(int) AtomicIAdd 38 40
17 39
Store 33(c1) 4
1
4
4: 37(ptr) AccessChain 43
(sbuf_rw_d@count) 24
4
6: 6(int) AtomicIAdd 44 40 17 45
47: 6(int) IAdd 4
6 45
Store 4
2
(c2) 47
4
0: 6(int) AtomicIAdd 38 39
17 39
Store 33(c1) 4
0
4
3: 37(ptr) AccessChain 42
(sbuf_rw_d@count) 24
4
5: 6(int) AtomicIAdd 43 39 17 44
47: 6(int) IAdd 4
5 46
Store 4
1
(c2) 47
48: 7(ptr) AccessChain 16(result) 17
49: 6(int) Load 48
50: 8(float) ConvertUToF 49
51: 7(ptr) AccessChain 16(result)
40
51: 7(ptr) AccessChain 16(result)
39
52: 6(int) Load 51
53: 8(float) ConvertUToF 52
54: 6(int) Load 33(c1)
55: 8(float) ConvertUToF 54
56: 6(int) Load 4
2
(c2)
56: 6(int) Load 4
1
(c2)
57: 8(float) ConvertUToF 56
58: 9(fvec4) CompositeConstruct 50 53 55 57
ReturnValue 58
...
...
Test/baseResults/spv.ssboAlias.frag.out
View file @
6ae18707
spv.ssboAlias.frag
// Module Version 10000
// Generated by (magic number): 80006
// Id's are bound by 4
6
// Id's are bound by 4
4
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 4
3
EntryPoint Fragment 4 "main" 4
1
ExecutionMode 4 OriginUpperLeft
Source HLSL 500
Name 4 "main"
...
...
@@ -17,10 +17,10 @@ spv.ssboAlias.frag
Name 18 "Buf1@count"
MemberName 18(Buf1@count) 0 "@count"
Name 20 "Buf1@count"
Name
30
"Buf2"
Name
31
"Buf2@count"
Name 4
3
"@entryPointOutput"
Name 4
5
"Buf3"
Name
28
"Buf2"
Name
29
"Buf2@count"
Name 4
1
"@entryPointOutput"
Name 4
3
"Buf3"
Decorate 12 ArrayStride 4
MemberDecorate 13(Buf1) 0 Offset 0
Decorate 13(Buf1) BufferBlock
...
...
@@ -30,13 +30,13 @@ spv.ssboAlias.frag
Decorate 18(Buf1@count) BufferBlock
Decorate 20(Buf1@count) DescriptorSet 0
Decorate 20(Buf1@count) Binding 83
Decorate
30
(Buf2) DescriptorSet 0
Decorate
30
(Buf2) Binding 85
Decorate
31
(Buf2@count) DescriptorSet 0
Decorate
31
(Buf2@count) Binding 86
Decorate 4
3
(@entryPointOutput) Location 0
Decorate 4
5
(Buf3) DescriptorSet 0
Decorate 4
5
(Buf3) Binding 84
Decorate
28
(Buf2) DescriptorSet 0
Decorate
28
(Buf2) Binding 85
Decorate
29
(Buf2@count) DescriptorSet 0
Decorate
29
(Buf2@count) Binding 86
Decorate 4
1
(@entryPointOutput) Location 0
Decorate 4
3
(Buf3) DescriptorSet 0
Decorate 4
3
(Buf3) Binding 84
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
...
...
@@ -49,40 +49,38 @@ spv.ssboAlias.frag
15(Buf1): 14(ptr) Variable Uniform
16: TypeInt 32 1
17: 16(int) Constant 0
18(Buf1@count): TypeStruct 1
6
(int)
18(Buf1@count): TypeStruct 1
1
(int)
19: TypePointer Uniform 18(Buf1@count)
20(Buf1@count): 19(ptr) Variable Uniform
21: TypePointer Uniform 16(int)
23: 16(int) Constant 1
24: 11(int) Constant 1
25: 11(int) Constant 0
27: 11(int) Constant 10
28: TypePointer Uniform 11(int)
30(Buf2): 14(ptr) Variable Uniform
31(Buf2@count): 19(ptr) Variable Uniform
34: 11(int) Constant 20
36: 6(float) Constant 1065353216
37: 6(float) Constant 1077936128
38: 6(float) Constant 1084227584
39: 7(fvec4) ConstantComposite 36 37 38 36
42: TypePointer Output 7(fvec4)
43(@entryPointOutput): 42(ptr) Variable Output
45(Buf3): 14(ptr) Variable Uniform
21: TypePointer Uniform 11(int)
23: 11(int) Constant 1
24: 11(int) Constant 0
26: 11(int) Constant 10
28(Buf2): 14(ptr) Variable Uniform
29(Buf2@count): 19(ptr) Variable Uniform
32: 11(int) Constant 20
34: 6(float) Constant 1065353216
35: 6(float) Constant 1077936128
36: 6(float) Constant 1084227584
37: 7(fvec4) ConstantComposite 34 35 36 34
40: TypePointer Output 7(fvec4)
41(@entryPointOutput): 40(ptr) Variable Output
43(Buf3): 14(ptr) Variable Uniform
4(main): 2 Function None 3
5: Label
4
4
: 7(fvec4) FunctionCall 9(@main()
Store 4
3(@entryPointOutput) 44
4
2
: 7(fvec4) FunctionCall 9(@main()
Store 4
1(@entryPointOutput) 42
Return
FunctionEnd
9(@main(): 7(fvec4) Function None 8
10: Label
22: 21(ptr) AccessChain 20(Buf1@count) 17
2
6: 11(int) AtomicIAdd 22 24 25
23
2
9: 28(ptr) AccessChain 15(Buf1) 17 26
Store 2
9 27
3
2: 21(ptr) AccessChain 31
(Buf2@count) 17
3
3: 11(int) AtomicIAdd 32 24 25
23
3
5: 28(ptr) AccessChain 30(Buf2) 17 33
Store 3
5 34
ReturnValue 3
9
2
5: 11(int) AtomicIAdd 22 23 24
23
2
7: 21(ptr) AccessChain 15(Buf1) 17 25
Store 2
7 26
3
0: 21(ptr) AccessChain 29
(Buf2@count) 17
3
1: 11(int) AtomicIAdd 30 23 24
23
3
3: 21(ptr) AccessChain 28(Buf2) 17 31
Store 3
3 32
ReturnValue 3
7
FunctionEnd
hlsl/hlslParseHelper.cpp
View file @
6ae18707
...
...
@@ -3164,7 +3164,7 @@ bool HlslParseContext::hasStructBuffCounter(const TType& type) const
void
HlslParseContext
::
counterBufferType
(
const
TSourceLoc
&
loc
,
TType
&
type
)
{
// Counter type
TType
*
counterType
=
new
TType
(
Ebt
I
nt
,
EvqBuffer
);
TType
*
counterType
=
new
TType
(
Ebt
Ui
nt
,
EvqBuffer
);
counterType
->
setFieldName
(
intermediate
.
implicitCounterName
);
TTypeList
*
blockStruct
=
new
TTypeList
;
...
...
@@ -3216,7 +3216,7 @@ TIntermTyped* HlslParseContext::getStructBufferCounter(const TSourceLoc& loc, TI
TIntermTyped
*
index
=
intermediate
.
addConstantUnion
(
0
,
loc
);
// index to counter inside block struct
TIntermTyped
*
counterMember
=
intermediate
.
addIndex
(
EOpIndexDirectStruct
,
counterVar
,
index
,
loc
);
counterMember
->
setType
(
TType
(
Ebt
I
nt
));
counterMember
->
setType
(
TType
(
Ebt
Ui
nt
));
return
counterMember
;
}
...
...
@@ -3249,7 +3249,7 @@ void HlslParseContext::decomposeStructBufferMethods(const TSourceLoc& loc, TInte
// Some methods require a hidden internal counter, obtained via getStructBufferCounter().
// This lambda adds something to it and returns the old value.
const
auto
incDecCounter
=
[
&
](
int
incval
)
->
TIntermTyped
*
{
TIntermTyped
*
incrementValue
=
intermediate
.
addConstantUnion
(
incval
,
loc
,
true
);
TIntermTyped
*
incrementValue
=
intermediate
.
addConstantUnion
(
static_cast
<
unsigned
int
>
(
incval
)
,
loc
,
true
);
TIntermTyped
*
counter
=
getStructBufferCounter
(
loc
,
bufferObj
);
// obtain the counter member
if
(
counter
==
nullptr
)
...
...
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