载入中...
搜索中...
未找到
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, uint32_t colorAttachmentByteBudget=40)
 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 第 47 行定义.

成员函数说明

◆ createInstance()

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

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

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

被这些函数引用 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 第 33 行定义.

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

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

◆ requestDevice()

DeviceDone eve::graphics::webgpu::InitFlow::requestDevice ( AdapterDone &&  prev,
uint32_t  colorAttachmentByteBudget = 40 
)
static

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

参数
prevAdapter stage consumed by the request.
colorAttachmentByteBudgetMaximum requested attachment bytes per sample; 32 exercises the WebGPU baseline, while 40 enables the five-target GBuffer. @cost Blocking adapter device creation; perform once per Graphics initialization. @thread Call on the graphics initialization thread; callback work is driven here.

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

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

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


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