载入中...
搜索中...
未找到
GpuTimer.h
浏览该文件的文档.
1#pragma once
2
3#include <cstdint>
4
5// GPU timing capability. The graphics module (LAYER 3) provides a live
6// implementation; lower-layer consumers (e.g. the profiler module) query it via
7// eve::cap::query<I>() and cope with nullptr (when graphics is absent / disabled).
8// This keeps the interface in common/ so layering is not violated.
9
10namespace eve::service {
11
17class IGpuTimer {
18public:
19 static constexpr const char *capabilityName = "IGpuTimer";
21 virtual ~IGpuTimer() = default;
22
24 virtual bool gpuTimingAvailable() const = 0;
26 virtual float gpuFrameMs() const = 0;
27};
28
29} // namespace eve::service
Reads the GPU frame timing captured by the renderer via Vulkan timestamp queries. Providers: eve::gra...
Definition GpuTimer.h:17
static constexpr const char * capabilityName
Definition GpuTimer.h:19
virtual bool gpuTimingAvailable() const =0
True when the renderer captured a valid GPU frame this frame.
virtual float gpuFrameMs() const =0
GPU execution time of the last presented frame, in milliseconds.
virtual ~IGpuTimer()=default
Releases IGpuTimer resources.