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()
|
default |
Default-constructed: all queries report their (conservative) default.
成员函数说明
◆ capture()
| void eve::graphics::webgpu::Capabilities::capture | ( | wgpu::Adapter & | adapter, |
| wgpu::Device & | device | ||
| ) |
◆ maxBindGroups()
|
inline |
Maximum bind group count per pipeline layout.
在文件 Capabilities.h 第 46 行定义.
◆ maxDynamicUniformBuffers()
|
inline |
Maximum dynamic uniform buffers per pipeline layout.
在文件 Capabilities.h 第 49 行定义.
◆ maxSampledTexturesPerShaderStage()
|
inline |
Maximum sampled textures visible to one shader stage.
在文件 Capabilities.h 第 52 行定义.
被这些函数引用 eve::graphics::webgpu::Graphics::setMesh3DPbrSurface().
◆ maxSamplerAnisotropy()
|
inline |
Maximum sampler anisotropy the device supports (>=1).
在文件 Capabilities.h 第 58 行定义.
◆ maxSamplersPerShaderStage()
|
inline |
Maximum samplers visible to one shader stage.
在文件 Capabilities.h 第 55 行定义.
被这些函数引用 eve::graphics::webgpu::Graphics::setMesh3DPbrSurface().
◆ maxTextureDimension2D()
|
inline |
Maximum 2D texture dimension the device guarantees.
在文件 Capabilities.h 第 43 行定义.
被这些函数引用 eve::graphics::webgpu::Graphics::newTextureMipChain().
◆ querySurfaceFormat()
|
static |
Query the surface's preferred format from the adapter. Falls back to defaultFormat when the surface reports none.
在文件 Capabilities.cpp 第 11 行定义.
◆ 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.
该类的文档由以下文件生成:
- src/modules/graphics/webgpu/Capabilities.h
- src/modules/graphics/webgpu/Capabilities.cpp