Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
gpu_startup_report.hpp
Go to the documentation of this file.
1// gpu_startup_report.hpp — the always-on GPU bring-up lines a support read
2// greps for.
3//
4// A shipped app's stdout/stderr is often the only evidence a remote support
5// read gets. These formatters produce a handful of stable, greppable,
6// info-level lines — the adapter Dawn actually picked, how long each bring-up
7// stage took, and whether the Skia log bridge was wired — so a log that says
8// "Graphite initialized" also says on WHAT and how fast. None of them is
9// per-frame.
10//
11// The line shapes are a contract with downstream tooling: add fields at the
12// end, never rename or reorder existing ones.
13#pragma once
14
15#if defined(PULP_GPU_RUNTIME)
16// This build's device layer is gpu-runtime's (tools/cmake/PulpGpuRuntime.cmake):
17// these are its types and functions under their Pulp names, so a Pulp object
18// and a gpu-runtime object are one and the same.
19#include <gpu_runtime/gpu_startup_report.hpp>
20// The Pulp names of the types it uses, as the header always provided.
23
24namespace pulp::render {
25using gpu_runtime::adapter_type_label;
26using gpu_runtime::format_gpu_adapter_line;
27using gpu_runtime::format_gpu_diagnostics_line;
28using gpu_runtime::format_gpu_startup_line;
29using gpu_runtime::GpuStartupReport;
30using gpu_runtime::log_gpu_diagnostics_summary;
31} // namespace pulp::render
32#else // !PULP_GPU_RUNTIME
33
36
37#include <string>
38
39namespace pulp::render {
40
44
52
63
68std::string format_gpu_startup_line(const GpuStartupReport& report);
69
76 const GpuDiagnosticsStats& stats);
77
82
83} // namespace pulp::render
84
85#endif // PULP_GPU_RUNTIME
AdapterType
Native adapter type reported by Dawn/WebGPU.
Definition gpu_surface.hpp:117
Definition gpu_fwd.hpp:31
const char * adapter_type_label(GpuSurface::AdapterType type) noexcept
Stable lowercase label for an adapter type: "integrated", "discrete", "cpu", or "unknown".
std::string format_gpu_diagnostics_line(const SkiaLogBridgeState &bridge, const GpuDiagnosticsStats &stats)
One line saying whether the Skia log bridge is wired and what reached it, e.g.
@ info
Definition gpu_diagnostics.hpp:56
std::string format_gpu_startup_line(const GpuStartupReport &report)
One line of stage timings in milliseconds with one decimal, e.g.
void log_gpu_diagnostics_summary()
Log the GpuDiagnostics line for this process at info level, preceded by skia: N more records suppress...
std::string format_gpu_adapter_line(const GpuSurface::AdapterInfo &info)
One line naming the adapter a surface came up on, e.g.
Counters that separate "the sink was never called" from "the sink was calledbut this build compiles t...
Definition gpu_diagnostics.hpp:83
Bring-up stage timings from GpuSurface::initialize() plus the two stages the owning host measures aro...
Definition gpu_startup_report.hpp:55
GpuSurface::StartupTimings surface
Definition gpu_startup_report.hpp:56
double graphite_ms
SkiaSurface (Graphite context) creation on the shared Dawn device.
Definition gpu_startup_report.hpp:58
double first_frame_ms
From the start of GPU bring-up to the end of the first rendered frame (submitted and presented,...
Definition gpu_startup_report.hpp:61
Definition gpu_surface.hpp:136
Wall-clock milliseconds spent in each stage of initialize(), measured with a monotonic clock.
Definition gpu_surface.hpp:243
Definition gpu_diagnostics.hpp:115