docs: update RHI API docs
This commit is contained in:
@@ -12,8 +12,26 @@ void CopyTexture(ID3D12Resource* dst, const D3D12_TEXTURE_COPY_LOCATION& dstLoca
|
||||
- `src` - 源纹理
|
||||
- `srcLocation` - 源位置
|
||||
|
||||
**复杂度:** O(n)
|
||||
**复杂度:** O(n),n 为复制数据量
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
D3D12_TEXTURE_COPY_LOCATION dstLoc = {};
|
||||
dstLoc.pResource = dstTexture;
|
||||
dstLoc.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
|
||||
dstLoc.SubresourceIndex = 0;
|
||||
|
||||
D3D12_TEXTURE_COPY_LOCATION srcLoc = {};
|
||||
srcLoc.pResource = srcTexture;
|
||||
srcLoc.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
|
||||
srcLoc.SubresourceIndex = 0;
|
||||
|
||||
cmdList.CopyTexture(dst, dstLoc, src, srcLoc);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
||||
- [CopyResource](copy-resource.md) - 复制整个资源
|
||||
- [CopyBuffer](copy-buffer.md) - 复制缓冲区数据
|
||||
|
||||
Reference in New Issue
Block a user