载入中...
搜索中...
未找到
eve::graphics::webgpu::InitFlow类 参考

Typed, blocking WebGPU initialization flow. 更多...

#include <InitFlow.h>

静态 Public 成员函数

static InstanceDone createInstance ()
 Create a wgpu Instance (native requests the TimedWaitAny feature).
 
static AdapterDone requestAdapter (InstanceDone &&prev, const wgpu::Surface &compatibleSurface)
 Blocking adapter request. Drives ProcessEvents until the callback fires; throws eve::graphics::Exception when no adapter is found.
 
static DeviceDone requestDevice (AdapterDone &&prev)
 Blocking device request (plus queue + capability capture). Throws eve::graphics::Exception on failure.
 

详细描述

Typed, blocking WebGPU initialization flow.

Wraps the raw async request callbacks (RequestAdapter / RequestDevice) and the ProcessEvents busy-wait (preserving the browser Emscripten yield) behind typed stages, replacing the scattered std::atomic<bool> flags and waitForAdapter/waitForDevice helpers in Graphics.cpp.

在文件 InitFlow.h 第 45 行定义.

成员函数说明

◆ createInstance()

InstanceDone eve::graphics::webgpu::InitFlow::createInstance ( )
static

Create a wgpu Instance (native requests the TimedWaitAny feature).

在文件 InitFlow.cpp 第 15 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::initHeadless() , 以及 eve::graphics::webgpu::Graphics::initWithWindow().

◆ requestAdapter()

AdapterDone eve::graphics::webgpu::InitFlow::requestAdapter ( InstanceDone &&  prev,
const wgpu::Surface &  compatibleSurface 
)
static

Blocking adapter request. Drives ProcessEvents until the callback fires; throws eve::graphics::Exception when no adapter is found.

参数
prevthe instance stage (only obtainable from createInstance()).
compatibleSurfacesurface to prefer (may be null for headless).

在文件 InitFlow.cpp 第 32 行定义.

引用了 a, adapter, error, eve::graphics::webgpu::AdapterDone::instance, r , 以及 status.

被这些函数引用 eve::graphics::webgpu::Graphics::initHeadless() , 以及 eve::graphics::webgpu::Graphics::initWithWindow().

◆ requestDevice()

DeviceDone eve::graphics::webgpu::InitFlow::requestDevice ( AdapterDone &&  prev)
static

Blocking device request (plus queue + capability capture). Throws eve::graphics::Exception on failure.

在文件 InitFlow.cpp 第 76 行定义.

引用了 adapter, caps, d, device, error, eve::graphics::webgpu::DeviceDone::instance, message, r, status, eve::graphics::webgpu::sv() , 以及 type.

被这些函数引用 eve::graphics::webgpu::Graphics::initHeadless() , 以及 eve::graphics::webgpu::Graphics::initWithWindow().


该类的文档由以下文件生成: