@@ -86,51 +86,51 @@ enum class GpuCounter
8686
8787// Mapping from GPU counter names to enum values. Used for JSON initialization.
8888const std::unordered_map<std::string, GpuCounter> gpu_counter_names {
89- {" GpuCycles" , GpuCounter::GpuCycles},
90- {" ComputeCycles" , GpuCounter::ComputeCycles},
91- {" VertexCycles" , GpuCounter::VertexCycles},
92- {" VertexComputeCycles" , GpuCounter::VertexComputeCycles},
93- {" FragmentCycles" , GpuCounter::FragmentCycles},
94- {" TilerCycles" , GpuCounter::TilerCycles},
95-
96- {" ComputeJobs" , GpuCounter::VertexComputeJobs},
97- {" VertexJobs" , GpuCounter::VertexJobs},
98- {" VertexComputeJobs" , GpuCounter::VertexComputeJobs},
99- {" FragmentJobs" , GpuCounter::FragmentJobs},
100- {" Pixels" , GpuCounter::Pixels},
101-
102- {" CulledPrimitives" , GpuCounter::CulledPrimitives},
103- {" VisiblePrimitives" , GpuCounter::VisiblePrimitives},
104- {" InputPrimitives" , GpuCounter::InputPrimitives},
105-
106- {" Tiles" , GpuCounter::Tiles},
107- {" TransactionEliminations" , GpuCounter::TransactionEliminations},
108-
109- {" EarlyZTests" , GpuCounter::EarlyZTests},
110- {" EarlyZKilled" , GpuCounter::EarlyZKilled},
111- {" LateZTests" , GpuCounter::LateZTests},
112- {" LateZKilled" , GpuCounter::LateZKilled},
113-
114- {" Instructions" , GpuCounter::Instructions},
115- {" DivergedInstructions" , GpuCounter::DivergedInstructions},
116-
117- {" ShaderComputeCycles" , GpuCounter::ShaderComputeCycles},
118- {" ShaderFragmentCycles" , GpuCounter::ShaderFragmentCycles},
119- {" ShaderCycles" , GpuCounter::ShaderCycles},
120- {" ShaderArithmeticCycles" , GpuCounter::ShaderArithmeticCycles},
121- {" ShaderInterpolatorCycles" , GpuCounter::ShaderInterpolatorCycles},
122- {" ShaderLoadStoreCycles" , GpuCounter::ShaderLoadStoreCycles},
123- {" ShaderTextureCycles" , GpuCounter::ShaderTextureCycles},
124-
125- {" CacheReadLookups" , GpuCounter::CacheReadLookups},
126- {" CacheWriteLookups" , GpuCounter::CacheWriteLookups},
127-
128- {" ExternalMemoryReadAccesses" , GpuCounter::ExternalMemoryReadAccesses},
129- {" ExternalMemoryWriteAccesses" , GpuCounter::ExternalMemoryWriteAccesses},
130- {" ExternalMemoryReadStalls" , GpuCounter::ExternalMemoryReadStalls},
131- {" ExternalMemoryWriteStalls" , GpuCounter::ExternalMemoryWriteStalls},
132- {" ExternalMemoryReadBytes" , GpuCounter::ExternalMemoryReadBytes},
133- {" ExternalMemoryWriteBytes" , GpuCounter::ExternalMemoryWriteBytes},
89+ {" GpuCycles" , GpuCounter::GpuCycles},
90+ {" ComputeCycles" , GpuCounter::ComputeCycles},
91+ {" VertexCycles" , GpuCounter::VertexCycles},
92+ {" VertexComputeCycles" , GpuCounter::VertexComputeCycles},
93+ {" FragmentCycles" , GpuCounter::FragmentCycles},
94+ {" TilerCycles" , GpuCounter::TilerCycles},
95+
96+ {" ComputeJobs" , GpuCounter::VertexComputeJobs},
97+ {" VertexJobs" , GpuCounter::VertexJobs},
98+ {" VertexComputeJobs" , GpuCounter::VertexComputeJobs},
99+ {" FragmentJobs" , GpuCounter::FragmentJobs},
100+ {" Pixels" , GpuCounter::Pixels},
101+
102+ {" CulledPrimitives" , GpuCounter::CulledPrimitives},
103+ {" VisiblePrimitives" , GpuCounter::VisiblePrimitives},
104+ {" InputPrimitives" , GpuCounter::InputPrimitives},
105+
106+ {" Tiles" , GpuCounter::Tiles},
107+ {" TransactionEliminations" , GpuCounter::TransactionEliminations},
108+
109+ {" EarlyZTests" , GpuCounter::EarlyZTests},
110+ {" EarlyZKilled" , GpuCounter::EarlyZKilled},
111+ {" LateZTests" , GpuCounter::LateZTests},
112+ {" LateZKilled" , GpuCounter::LateZKilled},
113+
114+ {" Instructions" , GpuCounter::Instructions},
115+ {" DivergedInstructions" , GpuCounter::DivergedInstructions},
116+
117+ {" ShaderComputeCycles" , GpuCounter::ShaderComputeCycles},
118+ {" ShaderFragmentCycles" , GpuCounter::ShaderFragmentCycles},
119+ {" ShaderCycles" , GpuCounter::ShaderCycles},
120+ {" ShaderArithmeticCycles" , GpuCounter::ShaderArithmeticCycles},
121+ {" ShaderInterpolatorCycles" , GpuCounter::ShaderInterpolatorCycles},
122+ {" ShaderLoadStoreCycles" , GpuCounter::ShaderLoadStoreCycles},
123+ {" ShaderTextureCycles" , GpuCounter::ShaderTextureCycles},
124+
125+ {" CacheReadLookups" , GpuCounter::CacheReadLookups},
126+ {" CacheWriteLookups" , GpuCounter::CacheWriteLookups},
127+
128+ {" ExternalMemoryReadAccesses" , GpuCounter::ExternalMemoryReadAccesses},
129+ {" ExternalMemoryWriteAccesses" , GpuCounter::ExternalMemoryWriteAccesses},
130+ {" ExternalMemoryReadStalls" , GpuCounter::ExternalMemoryReadStalls},
131+ {" ExternalMemoryWriteStalls" , GpuCounter::ExternalMemoryWriteStalls},
132+ {" ExternalMemoryReadBytes" , GpuCounter::ExternalMemoryReadBytes},
133+ {" ExternalMemoryWriteBytes" , GpuCounter::ExternalMemoryWriteBytes},
134134};
135135
136136// A hash function for GpuCounter values
@@ -151,51 +151,51 @@ struct GpuCounterInfo
151151
152152// Mapping from each counter to its corresponding information (description and unit)
153153const std::unordered_map<GpuCounter, GpuCounterInfo, GpuCounterHash> gpu_counter_info {
154- {GpuCounter::GpuCycles, {" Number of GPU cycles" , " cycles" }},
155- {GpuCounter::ComputeCycles, {" Number of compute cycles" , " cycles" }},
156- {GpuCounter::VertexCycles, {" Number of vertex cycles" , " cycles" }},
157- {GpuCounter::VertexComputeCycles, {" Number of vertex/compute cycles" , " cycles" }},
158- {GpuCounter::FragmentCycles, {" Number of fragment cycles" , " cycles" }},
159- {GpuCounter::TilerCycles, {" Number of tiler cycles" , " cycles" }},
160-
161- {GpuCounter::ComputeJobs, {" Number of compute jobs" , " jobs" }},
162- {GpuCounter::VertexJobs, {" Number of vertex jobs" , " jobs" }},
163- {GpuCounter::VertexComputeJobs, {" Number of vertex/compute jobs" , " jobs" }},
164- {GpuCounter::FragmentJobs, {" Number of fragment jobs" , " jobs" }},
165- {GpuCounter::Pixels, {" Number of pixels shaded" , " cycles" }},
166-
167- {GpuCounter::CulledPrimitives, {" Number of culled primitives" , " triangles" }},
168- {GpuCounter::VisiblePrimitives, {" Number of visible primitives" , " triangles" }},
169- {GpuCounter::InputPrimitives, {" Number of input primitives" , " triangles" }},
170-
171- {GpuCounter::Tiles, {" Number of physical tiles written" , " tiles" }},
172- {GpuCounter::TransactionEliminations, {" Number of transaction eliminations" , " tiles" }},
173-
174- {GpuCounter::EarlyZTests, {" Number of early-Z tests performed" , " tests" }},
175- {GpuCounter::EarlyZKilled, {" Number of early-Z tests resulting in a kill" , " tests" }},
176- {GpuCounter::LateZTests, {" Number of late-Z tests performed" , " tests" }},
177- {GpuCounter::LateZKilled, {" Number of late-Z tests resulting in a kill" , " tests" }},
178-
179- {GpuCounter::Instructions, {" Number of shader instructions" , " instructions" }},
180- {GpuCounter::DivergedInstructions, {" Number of diverged shader instructions" , " instructions" }},
181-
182- {GpuCounter::ShaderComputeCycles, {" Number of shader vertex/compute cycles" , " cycles" }},
183- {GpuCounter::ShaderFragmentCycles, {" Number of shader fragment cycles" , " cycles" }},
184- {GpuCounter::ShaderCycles, {" Number of shader core cycles" , " cycles" }},
185- {GpuCounter::ShaderArithmeticCycles, {" Number of shader arithmetic cycles" , " cycles" }},
186- {GpuCounter::ShaderInterpolatorCycles, {" Number of shader interpolator cycles" , " cycles" }},
187- {GpuCounter::ShaderLoadStoreCycles, {" Number of shader load/store cycles" , " cycles" }},
188- {GpuCounter::ShaderTextureCycles, {" Number of shader texture cycles" , " cycles" }},
189-
190- {GpuCounter::CacheReadLookups, {" Number of cache read lookups" , " lookups" }},
191- {GpuCounter::CacheWriteLookups, {" Number of cache write lookups" , " lookups" }},
192-
193- {GpuCounter::ExternalMemoryReadAccesses, {" Number of reads from external memory" , " accesses" }},
194- {GpuCounter::ExternalMemoryWriteAccesses, {" Number of writes to external memory" , " accesses" }},
195- {GpuCounter::ExternalMemoryReadStalls, {" Number of stall cycles when reading from external memory" , " cycles" }},
196- {GpuCounter::ExternalMemoryWriteStalls, {" Number of stall cycles when writing to external memory" , " cycles" }},
197- {GpuCounter::ExternalMemoryReadBytes, {" Number of bytes read to external memory" , " bytes" }},
198- {GpuCounter::ExternalMemoryWriteBytes, {" Number of bytes written to external memory" , " bytes" }},
154+ {GpuCounter::GpuCycles, {" Number of GPU cycles" , " cycles" }},
155+ {GpuCounter::ComputeCycles, {" Number of compute cycles" , " cycles" }},
156+ {GpuCounter::VertexCycles, {" Number of vertex cycles" , " cycles" }},
157+ {GpuCounter::VertexComputeCycles, {" Number of vertex/compute cycles" , " cycles" }},
158+ {GpuCounter::FragmentCycles, {" Number of fragment cycles" , " cycles" }},
159+ {GpuCounter::TilerCycles, {" Number of tiler cycles" , " cycles" }},
160+
161+ {GpuCounter::ComputeJobs, {" Number of compute jobs" , " jobs" }},
162+ {GpuCounter::VertexJobs, {" Number of vertex jobs" , " jobs" }},
163+ {GpuCounter::VertexComputeJobs, {" Number of vertex/compute jobs" , " jobs" }},
164+ {GpuCounter::FragmentJobs, {" Number of fragment jobs" , " jobs" }},
165+ {GpuCounter::Pixels, {" Number of pixels shaded" , " cycles" }},
166+
167+ {GpuCounter::CulledPrimitives, {" Number of culled primitives" , " triangles" }},
168+ {GpuCounter::VisiblePrimitives, {" Number of visible primitives" , " triangles" }},
169+ {GpuCounter::InputPrimitives, {" Number of input primitives" , " triangles" }},
170+
171+ {GpuCounter::Tiles, {" Number of physical tiles written" , " tiles" }},
172+ {GpuCounter::TransactionEliminations, {" Number of transaction eliminations" , " tiles" }},
173+
174+ {GpuCounter::EarlyZTests, {" Number of early-Z tests performed" , " tests" }},
175+ {GpuCounter::EarlyZKilled, {" Number of early-Z tests resulting in a kill" , " tests" }},
176+ {GpuCounter::LateZTests, {" Number of late-Z tests performed" , " tests" }},
177+ {GpuCounter::LateZKilled, {" Number of late-Z tests resulting in a kill" , " tests" }},
178+
179+ {GpuCounter::Instructions, {" Number of shader instructions" , " instructions" }},
180+ {GpuCounter::DivergedInstructions, {" Number of diverged shader instructions" , " instructions" }},
181+
182+ {GpuCounter::ShaderComputeCycles, {" Number of shader vertex/compute cycles" , " cycles" }},
183+ {GpuCounter::ShaderFragmentCycles, {" Number of shader fragment cycles" , " cycles" }},
184+ {GpuCounter::ShaderCycles, {" Number of shader core cycles" , " cycles" }},
185+ {GpuCounter::ShaderArithmeticCycles, {" Number of shader arithmetic cycles" , " cycles" }},
186+ {GpuCounter::ShaderInterpolatorCycles, {" Number of shader interpolator cycles" , " cycles" }},
187+ {GpuCounter::ShaderLoadStoreCycles, {" Number of shader load/store cycles" , " cycles" }},
188+ {GpuCounter::ShaderTextureCycles, {" Number of shader texture cycles" , " cycles" }},
189+
190+ {GpuCounter::CacheReadLookups, {" Number of cache read lookups" , " lookups" }},
191+ {GpuCounter::CacheWriteLookups, {" Number of cache write lookups" , " lookups" }},
192+
193+ {GpuCounter::ExternalMemoryReadAccesses, {" Number of reads from external memory" , " accesses" }},
194+ {GpuCounter::ExternalMemoryWriteAccesses, {" Number of writes to external memory" , " accesses" }},
195+ {GpuCounter::ExternalMemoryReadStalls, {" Number of stall cycles when reading from external memory" , " cycles" }},
196+ {GpuCounter::ExternalMemoryWriteStalls, {" Number of stall cycles when writing to external memory" , " cycles" }},
197+ {GpuCounter::ExternalMemoryReadBytes, {" Number of bytes read to external memory" , " bytes" }},
198+ {GpuCounter::ExternalMemoryWriteBytes, {" Number of bytes written to external memory" , " bytes" }},
199199};
200200
201201typedef std::unordered_set<GpuCounter, GpuCounterHash> GpuCounterSet;
0 commit comments