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

Read-only snapshot of WebGPU adapter/device limits and surface capabilities, queried once after device creation. 更多...

#include <Capabilities.h>

Public 成员函数

 Capabilities ()=default
 Default-constructed: all queries report their (conservative) default.
 
void capture (wgpu::Adapter &adapter, wgpu::Device &device)
 Populate the snapshot from an adapter and device. Call once, right after device creation; keep the returned object.
 
bool supportsSampleCount (uint32_t count) const
 True when the device supports the given render-target sample count.
 
bool supportsFormat (WGPUTextureFormat format) const
 True when the device advertises the given texture format.
 
uint32_t maxTextureDimension2D () const
 Maximum 2D texture dimension the device guarantees.
 
uint32_t maxBindGroups () const
 Maximum bind group count per pipeline layout.
 
uint32_t maxDynamicUniformBuffers () const
 Maximum dynamic uniform buffers per pipeline layout.
 
uint32_t maxSampledTexturesPerShaderStage () const
 Maximum sampled textures visible to one shader stage.
 
uint32_t maxSamplersPerShaderStage () const
 Maximum samplers visible to one shader stage.
 
float maxSamplerAnisotropy () const
 Maximum sampler anisotropy the device supports (>=1).
 

静态 Public 成员函数

static WGPUTextureFormat querySurfaceFormat (wgpu::Adapter &adapter, wgpu::Surface &surface, WGPUTextureFormat defaultFormat)
 Query the surface's preferred format from the adapter. Falls back to defaultFormat when the surface reports none.
 

详细描述

Read-only snapshot of WebGPU adapter/device limits and surface capabilities, queried once after device creation.

Mirrors the capability-probe pattern of vk-bootstrap (PhysicalDevice/Device queries) so feature-gated paths (MSAA sample count, formats, bind-group budget) can reject infeasible requests before issuing a GPU call, instead of guessing and crashing at validation time.

在文件 Capabilities.h 第 18 行定义.

构造及析构函数说明

◆ Capabilities()

eve::graphics::webgpu::Capabilities::Capabilities ( )
default

Default-constructed: all queries report their (conservative) default.

成员函数说明

◆ capture()

void eve::graphics::webgpu::Capabilities::capture ( wgpu::Adapter &  adapter,
wgpu::Device &  device 
)

Populate the snapshot from an adapter and device. Call once, right after device creation; keep the returned object.

在文件 Capabilities.cpp 第 26 行定义.

引用了 adapter, device, limits , 以及 ok.

◆ maxBindGroups()

uint32_t eve::graphics::webgpu::Capabilities::maxBindGroups ( ) const
inline

Maximum bind group count per pipeline layout.

在文件 Capabilities.h 第 46 行定义.

◆ maxDynamicUniformBuffers()

uint32_t eve::graphics::webgpu::Capabilities::maxDynamicUniformBuffers ( ) const
inline

Maximum dynamic uniform buffers per pipeline layout.

在文件 Capabilities.h 第 49 行定义.

◆ maxSampledTexturesPerShaderStage()

uint32_t eve::graphics::webgpu::Capabilities::maxSampledTexturesPerShaderStage ( ) const
inline

Maximum sampled textures visible to one shader stage.

在文件 Capabilities.h 第 52 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::setMesh3DPbrSurface().

◆ maxSamplerAnisotropy()

float eve::graphics::webgpu::Capabilities::maxSamplerAnisotropy ( ) const
inline

Maximum sampler anisotropy the device supports (>=1).

在文件 Capabilities.h 第 58 行定义.

◆ maxSamplersPerShaderStage()

uint32_t eve::graphics::webgpu::Capabilities::maxSamplersPerShaderStage ( ) const
inline

Maximum samplers visible to one shader stage.

在文件 Capabilities.h 第 55 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::setMesh3DPbrSurface().

◆ maxTextureDimension2D()

uint32_t eve::graphics::webgpu::Capabilities::maxTextureDimension2D ( ) const
inline

Maximum 2D texture dimension the device guarantees.

在文件 Capabilities.h 第 43 行定义.

被这些函数引用 eve::graphics::webgpu::Graphics::newTextureMipChain().

◆ querySurfaceFormat()

WGPUTextureFormat eve::graphics::webgpu::Capabilities::querySurfaceFormat ( wgpu::Adapter &  adapter,
wgpu::Surface &  surface,
WGPUTextureFormat  defaultFormat 
)
static

Query the surface's preferred format from the adapter. Falls back to defaultFormat when the surface reports none.

在文件 Capabilities.cpp 第 11 行定义.

引用了 adapter , 以及 caps.

◆ supportsFormat()

bool eve::graphics::webgpu::Capabilities::supportsFormat ( WGPUTextureFormat  format) const

True when the device advertises the given texture format.

在文件 Capabilities.cpp 第 61 行定义.

◆ supportsSampleCount()

bool eve::graphics::webgpu::Capabilities::supportsSampleCount ( uint32_t  count) const

True when the device supports the given render-target sample count.

在文件 Capabilities.cpp 第 55 行定义.

引用了 count.


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