载入中...
搜索中...
未找到
src
modules
graphics
webgpu
GpuInfoProvider.cpp
浏览该文件的文档.
1
// WebGPU counterpart of graphics/vulkan/GpuInfoProvider.cpp.
2
//
3
// WebGPU deliberately does not expose adapter identity to the page, so only the
4
// device type is meaningful here; the rest stay empty, which is what the system
5
// module reported on this backend before the capability existed.
6
7
#include "
common/Capability.h
"
8
#include "
common/GpuInfo.h
"
9
10
#include <string>
11
12
namespace
eve::graphics::webgpu
{
13
namespace
{
14
15
class
WebGpuGpuInfo :
public
eve::caps::IGpuInfo
{
16
public
:
17
bool
gpuReady()
const override
{
return
true
; }
18
std::string gpuName()
const override
{
return
{}; }
19
std::string gpuVendor()
const override
{
return
{}; }
20
std::string gpuDeviceType()
const override
{
return
"webgpu"
; }
21
int
gpuMemoryTotalMB()
const override
{
return
0; }
22
};
23
24
struct
Register {
25
Register() {
26
static
WebGpuGpuInfo info;
27
eve::cap::provide<eve::caps::IGpuInfo>
(&info);
28
}
29
} g_register;
30
31
}
// namespace
32
}
// namespace eve::graphics::webgpu
Capability.h
GpuInfo.h
eve::caps::IGpuInfo
Definition
GpuInfo.h:17
eve::cap::query
I * query()
Definition
Capability.h:77
eve::graphics::webgpu
Definition
Canvas.cpp:10