1 parent a43fbcc commit 2ee1ca1Copy full SHA for 2ee1ca1
1 file changed
src/FlyCube/CommandList/MTCommandList.mm
@@ -155,7 +155,9 @@ MTLStages ResourceStateToMTLStages(ResourceState state)
155
} else {
156
[allocator_ reset];
157
}
158
- command_buffer_ = [device_.GetDevice() newCommandBuffer];
+ if (!command_buffer_) {
159
+ command_buffer_ = [device_.GetDevice() newCommandBuffer];
160
+ }
161
[command_buffer_ beginCommandBufferWithAllocator:allocator_];
162
163
state_ = std::make_unique<State>();
0 commit comments