Files
glslang/Test/baseResults/spv.310.comp.out
John Kessenich fa668dad99 SPV: Reduce spurious type generation by removing intermediate types in the middle of access chains.
This generally simplifies access chain generation, with far fewer  type conversions.
It is particularly important to future SPIR-V changes where there is less aggregate
type uniqueness due to carrying different layout information with the type.
2015-09-13 14:46:30 -06:00

122 lines
5.9 KiB
Plaintext

spv.310.comp
Warning, version 310 is not yet complete; most version-specific features are present, but some are missing.
Linked compute stage:
// Module Version 99
// Generated by (magic number): 51a00bb
// Id's are bound by 68
Source ESSL 310
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint GLCompute 4 "main"
Name 4 "main"
Name 14 "outb"
MemberName 14(outb) 0 "f"
MemberName 14(outb) 1 "g"
MemberName 14(outb) 2 "h"
MemberName 14(outb) 3 "uns"
Name 16 "outbname"
Name 20 "s"
Name 25 "outbna"
MemberName 25(outbna) 0 "k"
MemberName 25(outbna) 1 "na"
Name 27 "outbnamena"
Name 44 "i"
Name 50 "outs"
MemberName 50(outs) 0 "s"
MemberName 50(outs) 1 "va"
Name 52 "outnames"
Name 55 "gl_LocalInvocationID"
Decorate 14(outb) GLSLShared
Decorate 14(outb) BufferBlock
Decorate 25(outbna) GLSLShared
Decorate 25(outbna) BufferBlock
Decorate 50(outs) GLSLShared
Decorate 50(outs) BufferBlock
Decorate 55(gl_LocalInvocationID) BuiltIn LocalInvocationId
Decorate 67 BuiltIn WorkgroupSize
Decorate 67 NoStaticUse
2: TypeVoid
3: TypeFunction 2
7: TypeInt 32 0
8: 7(int) Constant 1
9: 7(int) Constant 1023
10: 7(int) Constant 0
11: TypeFloat 32
12: TypeVector 11(float) 3
13: TypeRuntimeArray 12(fvec3)
14(outb): TypeStruct 11(float) 11(float) 11(float) 13
15: TypePointer Uniform 14(outb)
16(outbname): 15(ptr) Variable Uniform
17: TypeInt 32 1
18: 17(int) Constant 0
19: TypePointer WorkgroupLocal 11(float)
20(s): 19(ptr) Variable WorkgroupLocal
22: TypePointer Uniform 11(float)
24: TypeVector 11(float) 4
25(outbna): TypeStruct 17(int) 24(fvec4)
26: TypePointer Uniform 25(outbna)
27(outbnamena): 26(ptr) Variable Uniform
28: 17(int) Constant 1
31: TypePointer Uniform 24(fvec4)
33: 17(int) Constant 3
34: 17(int) Constant 18
35: TypePointer Uniform 12(fvec3)
39: 17(int) Constant 17
40: 11(float) Constant 1077936128
41: 12(fvec3) ConstantComposite 40 40 40
43: TypePointer WorkgroupLocal 17(int)
44(i): 43(ptr) Variable WorkgroupLocal
49: TypeRuntimeArray 24(fvec4)
50(outs): TypeStruct 17(int) 49
51: TypePointer Uniform 50(outs)
52(outnames): 51(ptr) Variable Uniform
53: TypeVector 7(int) 3
54: TypePointer Input 53(ivec3)
55(gl_LocalInvocationID): 54(ptr) Variable Input
62: TypePointer Uniform 17(int)
64: 7(int) Constant 16
65: 7(int) Constant 32
66: 7(int) Constant 4
67: 53(ivec3) ConstantComposite 64 65 66
4(main): 2 Function None 3
5: Label
MemoryBarrier 8 9
ControlBarrier 8 8 10
21: 11(float) Load 20(s)
23: 22(ptr) AccessChain 16(outbname) 18
Store 23 21
29: 11(float) Load 20(s)
30: 24(fvec4) CompositeConstruct 29 29 29 29
32: 31(ptr) AccessChain 27(outbnamena) 28
Store 32 30
36: 35(ptr) AccessChain 16(outbname) 33 34
37: 12(fvec3) Load 36
38: 11(float) CompositeExtract 37 0
Store 20(s) 38
42: 35(ptr) AccessChain 16(outbname) 33 39
Store 42 41
45: 17(int) Load 44(i)
46: 11(float) Load 20(s)
47: 12(fvec3) CompositeConstruct 46 46 46
48: 35(ptr) AccessChain 16(outbname) 33 45
Store 48 47
56: 53(ivec3) Load 55(gl_LocalInvocationID)
57: 7(int) CompositeExtract 56 0
58: 11(float) Load 20(s)
59: 24(fvec4) CompositeConstruct 58 58 58 58
60: 31(ptr) AccessChain 52(outnames) 28 57
Store 60 59
61: 17(int) ArrayLength 16(outbname)
63: 62(ptr) AccessChain 52(outnames) 18
Store 63 61
Branch 6
6: Label
Return
FunctionEnd