docs: update RHI API docs
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
# D3D12Common::IsRenderTargetFormatSupported
|
||||
|
||||
```cpp
|
||||
inline bool IsRenderTargetFormatSupported(ID3D12Device* device, DXGI_FORMAT format)
|
||||
```
|
||||
|
||||
检查指定格式是否支持作为渲染目标。
|
||||
|
||||
**参数:**
|
||||
- `device` - D3D12 设备指针
|
||||
- `format` - 要检查的 DXGI 格式
|
||||
|
||||
**返回:** 如果格式支持作为渲染目标返回 `true`
|
||||
|
||||
**线程安全:** ✅(只读查询)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
ID3D12Device* device = ...;
|
||||
if (IsRenderTargetFormatSupported(device, DXGI_FORMAT_R8G8B8A8_UNORM)) {
|
||||
// 可以使用该格式作为渲染目标
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Common 总览](common.md)
|
||||
- [CheckFormatSupport](check-format-support.md)
|
||||
Reference in New Issue
Block a user