glslang-zig/Test/baseResults/spv.debuginfo.bufferref.glsl.frag.out
Matthew Moulton 5073d93ec4
Apply GLSL memory decorations to top-level OpVariable
Apply memory decorations from GLSL source to the top-level OpVariable.
Previously, these decorations would only be applied to individual
members. While this is correct behavior, it is more convenient for some
front ends to see the decorations (specifically ReadOnly and WriteOnly)
applied to the whole variable rather than individual members.
2024-08-28 17:46:16 -04:00

230 lines
14 KiB
Text

spv.debuginfo.bufferref.glsl.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 146
Capability Shader
Capability PhysicalStorageBufferAddressesEXT
Extension "SPV_KHR_non_semantic_info"
Extension "SPV_KHR_physical_storage_buffer"
Extension "SPV_KHR_relaxed_extended_instruction"
Extension "SPV_KHR_storage_buffer_storage_class"
1: ExtInstImport "NonSemantic.Shader.DebugInfo.100"
3: ExtInstImport "GLSL.std.450"
MemoryModel PhysicalStorageBuffer64EXT GLSL450
EntryPoint Fragment 14 "main" 82 135
ExecutionMode 14 OriginUpperLeft
2: String "spv.debuginfo.bufferref.glsl.frag"
8: String "uint"
16: String "main"
19: String "// OpModuleProcessed auto-map-locations
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed keep-uncalled
// OpModuleProcessed entry-point main
#line 1
#version 450 core
#extension GL_EXT_buffer_reference : enable
layout(buffer_reference, std430) buffer MeshVertexPositions {
float data[];
};
struct Mesh {
MeshVertexPositions positions;
};
layout(set = 0, binding = 0) readonly buffer PerPass_meshes {
Mesh data[];
} perPass_meshes;
layout(location = 0) out vec4 out_fragColor;
layout(location = 0) in flat uint tri_idx0;
void main() {
Mesh meshData = perPass_meshes.data[tri_idx0];
vec3 vertex_pos0 = vec3(meshData.positions.data[3 * tri_idx0],
meshData.positions.data[3 * tri_idx0 + 1],
meshData.positions.data[3 * tri_idx0 + 2]);
out_fragColor = vec4(vertex_pos0, 1.0);
}
"
33: String "positions"
37: String "Mesh"
40: String "float"
46: String "data"
49: String "MeshVertexPositions"
55: String "meshData"
69: String "PerPass_meshes"
75: String "perPass_meshes"
77: String "int"
84: String "tri_idx0"
100: String "vertex_pos0"
137: String "out_fragColor"
SourceExtension "GL_EXT_buffer_reference"
Name 14 "main"
Name 31 "Mesh"
MemberName 31(Mesh) 0 "positions"
Name 44 "MeshVertexPositions"
MemberName 44(MeshVertexPositions) 0 "data"
Name 53 "meshData"
Name 59 "Mesh"
MemberName 59(Mesh) 0 "positions"
Name 64 "PerPass_meshes"
MemberName 64(PerPass_meshes) 0 "data"
Name 73 "perPass_meshes"
Name 82 "tri_idx0"
Name 98 "vertex_pos0"
Name 135 "out_fragColor"
Decorate 42 ArrayStride 4
Decorate 44(MeshVertexPositions) Block
MemberDecorate 44(MeshVertexPositions) 0 Offset 0
Decorate 53(meshData) DecorationAliasedPointerEXT
MemberDecorate 59(Mesh) 0 Offset 0
Decorate 62 ArrayStride 8
Decorate 64(PerPass_meshes) Block
MemberDecorate 64(PerPass_meshes) 0 NonWritable
MemberDecorate 64(PerPass_meshes) 0 Offset 0
Decorate 73(perPass_meshes) NonWritable
Decorate 73(perPass_meshes) Binding 0
Decorate 73(perPass_meshes) DescriptorSet 0
Decorate 82(tri_idx0) Flat
Decorate 82(tri_idx0) Location 0
Decorate 135(out_fragColor) Location 0
4: TypeVoid
5: TypeFunction 4
7: TypeInt 32 0
10: 7(int) Constant 32
11: 7(int) Constant 6
12: 7(int) Constant 0
9: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 8 10 11 12
13: 7(int) Constant 3
6: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 8(DebugTypeFunction) 13 4
18: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 35(DebugSource) 2 19
20: 7(int) Constant 20
22: 7(int) Constant 1
23: 7(int) Constant 4
24: 7(int) Constant 2
21: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 1(DebugCompilationUnit) 22 23 18 24
17: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 20(DebugFunction) 16 6 18 20 12 21 16 13 20
TypeForwardPointer 28 PhysicalStorageBufferEXT
29: 7(int) Constant 5349
30: 4 ExtInstWithForwardRefsKHR 1(NonSemantic.Shader.DebugInfo.100) 3 48 29 12
31(Mesh): TypeStruct 28
34: 7(int) Constant 9
35: 7(int) Constant 23
32: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 33 30 18 34 35 12 12 13
38: 7(int) Constant 21
36: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 37 22 18 38 12 21 37 12 13 32
39: TypeFloat 32
41: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 40 10 13 12
42: TypeRuntimeArray 39(float)
43: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 41 12
44(MeshVertexPositions): TypeStruct 42
47: 7(int) Constant 5
45: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 46 43 18 47 34 12 12 13
48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 49 22 18 38 12 21 49 12 13 45
28: TypePointer PhysicalStorageBufferEXT 44(MeshVertexPositions)
50: TypePointer Function 31(Mesh)
51: 7(int) Constant 7
52: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 36 51 12
54: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 55 36 18 38 12 17 23
57: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
59(Mesh): TypeStruct 28(ptr)
60: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 33 30 18 34 35 12 12 13
61: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 37 22 18 38 12 21 37 12 13 60
62: TypeRuntimeArray 59(Mesh)
63: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 61 12
64(PerPass_meshes): TypeStruct 62
66: 7(int) Constant 13
67: 7(int) Constant 8
65: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 46 63 18 66 67 12 12 13
68: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 69 22 18 38 12 21 69 12 13 65
70: TypePointer StorageBuffer 64(PerPass_meshes)
71: 7(int) Constant 12
72: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 68 71 12
73(perPass_meshes): 70(ptr) Variable StorageBuffer
74: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 75 68 18 38 12 21 75 73(perPass_meshes) 67
76: TypeInt 32 1
78: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 77 10 23 12
79: 76(int) Constant 0
80: TypePointer Input 7(int)
81: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 9 22 12
82(tri_idx0): 80(ptr) Variable Input
83: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 84 9 18 38 12 21 84 82(tri_idx0) 67
86: TypePointer StorageBuffer 59(Mesh)
87: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 61 71 12
91: TypePointer Function 28(ptr)
92: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 30 51 12
94: TypeVector 39(float) 3
95: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 41 13
96: TypePointer Function 94(fvec3)
97: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 95 51 12
99: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 100 95 18 35 12 17 23
107: TypePointer PhysicalStorageBufferEXT 39(float)
108: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 41 29 12
113: 7(int) Constant 24
122: 7(int) Constant 25
131: TypeVector 39(float) 4
132: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 41 23
133: TypePointer Output 131(fvec4)
134: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 132 13 12
135(out_fragColor): 133(ptr) Variable Output
138: 7(int) Constant 27
136: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 137 132 18 138 12 21 137 135(out_fragColor) 67
141: 39(float) Constant 1065353216
14(main): 4 Function None 5
15: Label
53(meshData): 50(ptr) Variable Function
98(vertex_pos0): 96(ptr) Variable Function
26: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
27: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 20 20 12 12
25: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main)
58: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 38 38 12 12
56: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 54 53(meshData) 57
85: 7(int) Load 82(tri_idx0)
88: 86(ptr) AccessChain 73(perPass_meshes) 79 85
89: 59(Mesh) Load 88
90: 28(ptr) CompositeExtract 89 0
93: 91(ptr) AccessChain 53(meshData) 79
Store 93 90
102: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 35 35 12 12
101: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 99 98(vertex_pos0) 57
103: 91(ptr) AccessChain 53(meshData) 79
104: 28(ptr) Load 103
105: 7(int) Load 82(tri_idx0)
106: 7(int) IMul 13 105
109: 107(ptr) AccessChain 104 79 106
110: 39(float) Load 109 Aligned 4
112: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 113 113 12 12
111: 91(ptr) AccessChain 53(meshData) 79
114: 28(ptr) Load 111
115: 7(int) Load 82(tri_idx0)
116: 7(int) IMul 13 115
117: 7(int) IAdd 116 22
118: 107(ptr) AccessChain 114 79 117
119: 39(float) Load 118 Aligned 4
121: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 122 122 12 12
120: 91(ptr) AccessChain 53(meshData) 79
123: 28(ptr) Load 120
124: 7(int) Load 82(tri_idx0)
125: 7(int) IMul 13 124
126: 7(int) IAdd 125 24
127: 107(ptr) AccessChain 123 79 126
128: 39(float) Load 127 Aligned 4
129: 94(fvec3) CompositeConstruct 110 119 128
130: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 35 35 12 12
Store 98(vertex_pos0) 129
140: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 138 138 12 12
139: 94(fvec3) Load 98(vertex_pos0)
142: 39(float) CompositeExtract 139 0
143: 39(float) CompositeExtract 139 1
144: 39(float) CompositeExtract 139 2
145: 131(fvec4) CompositeConstruct 142 143 144 141
Store 135(out_fragColor) 145
Return
FunctionEnd