载入中...
搜索中...
未找到
GpuInfo.h
浏览该文件的文档.
1#pragma once
2
3// Optional GPU description, provided by whichever graphics backend is linked.
4//
5// The system module reports GPU name / vendor / type / VRAM, but the values
6// only exist inside the backend's device object. Routing them through a
7// capability keeps system from including graphics (and from carrying a
8// Vulkan-vs-WebGPU #ifdef), and leaves the queries answering "unknown" in a
9// build with no graphics module at all.
10
11#include "common/Export.h"
12
13#include <string>
14
15namespace eve::caps {
16
19public:
20 static constexpr const char* capabilityName = "IGpuInfo";
22 virtual ~IGpuInfo() = default;
23
26 virtual bool gpuReady() const = 0;
28 virtual std::string gpuName() const = 0;
30 virtual std::string gpuVendor() const = 0;
33 virtual std::string gpuDeviceType() const = 0;
35 virtual int gpuMemoryTotalMB() const = 0;
36};
37
38} // namespace eve::caps
#define EVENGINE_API_FOUNDATION_INLINE
仅供"只有内联成员"的类型使用的组宏:拥有者 dllexport,消费方不导入。
Definition Export.h:170
EVENGINE_API_FOUNDATION_INLINE public API.
Definition GpuInfo.h:18
virtual std::string gpuName() const =0
Gpu name.
virtual int gpuMemoryTotalMB() const =0
Gpu memory total mb.
virtual std::string gpuVendor() const =0
Gpu vendor.
virtual ~IGpuInfo()=default
I gpu info.
virtual std::string gpuDeviceType() const =0
Gpu device type.
virtual bool gpuReady() const =0
Gpu ready.