载入中...
搜索中...
未找到
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
18public:
19 static constexpr const char* capabilityName = "IGpuInfo";
20 virtual ~IGpuInfo() = default;
21
23 virtual bool gpuReady() const = 0;
24 virtual std::string gpuName() const = 0;
25 virtual std::string gpuVendor() const = 0;
27 virtual std::string gpuDeviceType() const = 0;
28 virtual int gpuMemoryTotalMB() const = 0;
29};
30
31} // namespace eve::caps
#define EVENGINE_API
宿主(eve / libmain)导出宏;插件从进程导入同一批符号。
Definition Export.h:16
virtual std::string gpuName() const =0
virtual int gpuMemoryTotalMB() const =0
virtual std::string gpuVendor() const =0
virtual ~IGpuInfo()=default
virtual std::string gpuDeviceType() const =0
virtual bool gpuReady() const =0