Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
gpu_acquire_diagnostics.hpp
Go to the documentation of this file.
1#pragma once
2
21
22#include <string_view>
23
24namespace pulp::view {
25
30 bool vsync_driven = false;
32 double refresh_period_ms = 0.0;
36 double late_ms = 0.0;
40};
41
47 double vsync_target_s,
48 double refresh_period_s,
49 int frames_in_flight) noexcept;
50
55bool gpu_timing_requested(const char* env_value) noexcept;
56
59inline constexpr std::string_view kGpuTimingEnvVar = "PULP_GPU_TIMING"; // null-terminated
60
61} // namespace pulp::view
Hover-cursor tracking for platform window hosts.
Definition fwd.hpp:27
bool gpu_timing_requested(const char *env_value) noexcept
Whether an environment value asks for GPU timing: "1", "true", "yes" or "on", case-insensitively.
GpuAcquireDiagnostics gpu_acquire_diagnostics(double now_s, double vsync_target_s, double refresh_period_s, int frames_in_flight) noexcept
Build the record for one acquire.
constexpr std::string_view kGpuTimingEnvVar
The environment variable a standalone GPU window reads to enable GPU render timing.
Definition gpu_acquire_diagnostics.hpp:59
Definition gpu_acquire_diagnostics.hpp:26
double late_ms
How long after the display-link target presentation time the acquire started.
Definition gpu_acquire_diagnostics.hpp:36
int frames_in_flight
Frames submitted to the GPU whose work has not finished, or -1 when the surface does not track it.
Definition gpu_acquire_diagnostics.hpp:39
double refresh_period_ms
The display's refresh interval, or 0 when unknown.
Definition gpu_acquire_diagnostics.hpp:32
bool vsync_driven
True when the frame was dispatched by a display-link tick.
Definition gpu_acquire_diagnostics.hpp:30