blob: cd52797f5a74d2394c286fb8604ff715b5c087db [file] [edit]
spv.debuginfo.bufferref.glsl.frag
// Module Version 10000
// Generated by (magic number): 8000b
// Id's are bound by 150
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" 64 70
ExecutionMode 14 OriginUpperLeft
2: String "spv.debuginfo.bufferref.glsl.frag"
8: String "uint"
16: String "main"
19: String "#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);
}
"
30: String "positions"
34: String "Mesh"
37: String "float"
43: String "data"
46: String "MeshVertexPositions"
54: String "PerPass_meshes"
59: String "perPass_meshes"
66: String "out_fragColor"
72: String "tri_idx0"
86: String "meshData"
91: String "int"
109: String "vertex_pos0"
SourceExtension "GL_EXT_buffer_reference"
Name 14 "main"
Name 28 "Mesh"
MemberName 28(Mesh) 0 "positions"
Name 41 "MeshVertexPositions"
MemberName 41(MeshVertexPositions) 0 "data"
Name 49 "PerPass_meshes"
MemberName 49(PerPass_meshes) 0 "data"
Name 57 "perPass_meshes"
Name 64 "out_fragColor"
Name 70 "tri_idx0"
Name 77 "Mesh"
MemberName 77(Mesh) 0 "positions"
Name 84 "meshData"
Name 107 "vertex_pos0"
MemberDecorate 28(Mesh) 0 Offset 0
Decorate 39 ArrayStride 4
Decorate 41(MeshVertexPositions) Block
MemberDecorate 41(MeshVertexPositions) 0 Offset 0
Decorate 47 ArrayStride 8
Decorate 49(PerPass_meshes) Block
MemberDecorate 49(PerPass_meshes) 0 NonWritable
MemberDecorate 49(PerPass_meshes) 0 Offset 0
Decorate 57(perPass_meshes) NonWritable
Decorate 57(perPass_meshes) Binding 0
Decorate 57(perPass_meshes) DescriptorSet 0
Decorate 64(out_fragColor) Location 0
Decorate 70(tri_idx0) Flat
Decorate 70(tri_idx0) Location 0
Decorate 84(meshData) DecorationAliasedPointerEXT
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 25 PhysicalStorageBufferEXT
26: 7(int) Constant 5349
27: 4 ExtInstWithForwardRefsKHR 1(NonSemantic.Shader.DebugInfo.100) 3 45 26 12
28(Mesh): TypeStruct 25
31: 7(int) Constant 9
32: 7(int) Constant 23
29: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 30 27 18 31 32 12 12 13
35: 7(int) Constant 12
33: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 34 22 18 35 12 21 34 12 13 29
36: TypeFloat 32
38: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 37 10 13 12
39: TypeRuntimeArray 36(float)
40: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 38 12
41(MeshVertexPositions): TypeStruct 39
44: 7(int) Constant 5
42: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 43 40 18 44 31 12 12 13
45: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 46 22 18 35 12 21 46 12 13 42
25: TypePointer PhysicalStorageBufferEXT 41(MeshVertexPositions)
47: TypeRuntimeArray 28(Mesh)
48: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 5(DebugTypeArray) 33 12
49(PerPass_meshes): TypeStruct 47
51: 7(int) Constant 13
52: 7(int) Constant 8
50: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 43 48 18 51 52 12 12 13
53: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 54 22 18 35 12 21 54 12 13 50
55: TypePointer StorageBuffer 49(PerPass_meshes)
56: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 53 35 12
57(perPass_meshes): 55(ptr) Variable StorageBuffer
58: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 59 53 18 35 12 21 59 57(perPass_meshes) 52
60: TypeVector 36(float) 4
61: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 38 23
62: TypePointer Output 60(fvec4)
63: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 61 13 12
64(out_fragColor): 62(ptr) Variable Output
67: 7(int) Constant 16
65: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 66 61 18 67 12 21 66 64(out_fragColor) 52
68: TypePointer Input 7(int)
69: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 9 22 12
70(tri_idx0): 68(ptr) Variable Input
73: 7(int) Constant 18
71: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 18(DebugGlobalVariable) 72 9 18 73 12 21 72 70(tri_idx0) 52
77(Mesh): TypeStruct 25(ptr)
78: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 11(DebugTypeMember) 30 27 18 31 32 12 12 13
80: 7(int) Constant 21
79: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 10(DebugTypeComposite) 34 22 18 80 12 21 34 12 13 78
81: TypePointer Function 77(Mesh)
82: 7(int) Constant 7
83: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 79 82 12
85: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 86 79 18 80 12 17 23
88: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 31(DebugExpression)
90: TypeInt 32 1
92: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 2(DebugTypeBasic) 91 10 23 12
93: 90(int) Constant 0
95: TypePointer StorageBuffer 28(Mesh)
96: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 33 35 12
100: TypePointer Function 25(ptr)
101: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 27 82 12
103: TypeVector 36(float) 3
104: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 6(DebugTypeVector) 38 13
105: TypePointer Function 103(fvec3)
106: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 104 82 12
108: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 26(DebugLocalVariable) 109 104 18 32 12 17 23
116: TypePointer PhysicalStorageBufferEXT 36(float)
117: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 3(DebugTypePointer) 38 26 12
122: 7(int) Constant 24
131: 7(int) Constant 25
142: 7(int) Constant 27
143: 36(float) Constant 1065353216
149: 7(int) Constant 28
14(main): 4 Function None 5
15: Label
84(meshData): 81(ptr) Variable Function
107(vertex_pos0): 105(ptr) Variable Function
75: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 23(DebugScope) 17
76: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 20 20 12 12
74: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 101(DebugFunctionDefinition) 17 14(main)
89: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 80 80 12 12
87: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 85 84(meshData) 88
94: 7(int) Load 70(tri_idx0)
97: 95(ptr) AccessChain 57(perPass_meshes) 93 94
98: 28(Mesh) Load 97
99: 25(ptr) CompositeExtract 98 0
102: 100(ptr) AccessChain 84(meshData) 93
Store 102 99
111: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 32 32 12 12
110: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 28(DebugDeclare) 108 107(vertex_pos0) 88
112: 100(ptr) AccessChain 84(meshData) 93
113: 25(ptr) Load 112
114: 7(int) Load 70(tri_idx0)
115: 7(int) IMul 13 114
118: 116(ptr) AccessChain 113 93 115
119: 36(float) Load 118 Aligned 4
121: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 122 122 12 12
120: 100(ptr) AccessChain 84(meshData) 93
123: 25(ptr) Load 120
124: 7(int) Load 70(tri_idx0)
125: 7(int) IMul 13 124
126: 7(int) IAdd 125 22
127: 116(ptr) AccessChain 123 93 126
128: 36(float) Load 127 Aligned 4
130: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 131 131 12 12
129: 100(ptr) AccessChain 84(meshData) 93
132: 25(ptr) Load 129
133: 7(int) Load 70(tri_idx0)
134: 7(int) IMul 13 133
135: 7(int) IAdd 134 24
136: 116(ptr) AccessChain 132 93 135
137: 36(float) Load 136 Aligned 4
138: 103(fvec3) CompositeConstruct 119 128 137
139: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 32 32 12 12
Store 107(vertex_pos0) 138
141: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 142 142 12 12
140: 103(fvec3) Load 107(vertex_pos0)
144: 36(float) CompositeExtract 140 0
145: 36(float) CompositeExtract 140 1
146: 36(float) CompositeExtract 140 2
147: 60(fvec4) CompositeConstruct 144 145 146 143
Store 64(out_fragColor) 147
148: 4 ExtInst 1(NonSemantic.Shader.DebugInfo.100) 103(DebugLine) 18 149 149 12 12
Return
FunctionEnd