# D3D12CommandList::TransitionBarrier 设置资源状态转换屏障。 ```cpp void TransitionBarrier(void* resource, ResourceStates stateBefore, ResourceStates stateAfter) override; ``` **参数:** - `resource` - 目标资源指针 - `stateBefore` - 转换前的资源状态 - `stateAfter` - 转换后的资源状态 **线程安全:** ❌ 非线程安全,应在单线程中调用 ## 相关文档 - [D3D12CommandList 总览](d3d12-command-list.md)