676 B
676 B
D3D12Common::IsDepthStencilFormatSupported
inline bool IsDepthStencilFormatSupported(ID3D12Device* device, DXGI_FORMAT format)
检查指定格式是否支持作为深度模板缓冲区。
参数:
device- D3D12 设备指针format- 要检查的 DXGI 格式
返回: 如果格式支持作为深度模板返回 true
线程安全: ✅(只读查询)
示例:
ID3D12Device* device = ...;
if (IsDepthStencilFormatSupported(device, DXGI_FORMAT_D24_UNORM_S8_UINT)) {
// 可以使用该格式作为深度模板
}