// queue the copy operation into the queue of the Metal context
// this will be queued at the end, after any currently ongoing GPU operations
- id<MTLCommandBuffer> cmd_buf = [ctx->queue commandBufferWithUnretainedReferences];
+ id<MTLCommandBuffer> cmd_buf = [ctx->queue commandBuffer];
id<MTLBlitCommandEncoder> encoder = [cmd_buf blitCommandEncoder];
[encoder copyFromBuffer:buf_src
[encoder endEncoding];
[cmd_buf commit];
+ [buf_src release];
// do not wait here for completion
//[cmd_buf waitUntilCompleted];
// queue the copy operation into the queue of the Metal context
// this will be queued at the end, after any currently ongoing GPU operations
- id<MTLCommandBuffer> cmd_buf = [ctx->queue commandBufferWithUnretainedReferences];
+ id<MTLCommandBuffer> cmd_buf = [ctx->queue commandBuffer];
id<MTLBlitCommandEncoder> encoder = [cmd_buf blitCommandEncoder];
[encoder copyFromBuffer:bid_src.metal
[encoder endEncoding];
[cmd_buf commit];
+ [buf_dst release];
// do not wait here for completion
//[cmd_buf waitUntilCompleted];