I’m using Metal to execute a compute kernel, but I’m receiving the following error:
failed assertion
_status < MTLCommandBufferStatusCommitted
at line 316 in-[IOGPUMetalCommandBuffer setCurrentCommandEncoder:]
What does this mean?
@Spo1ler: The assertion is telling you that you are trying to create a command encoder from a command buffer that’s already committed.
You can only commit an MTLCommandBuffer
one time.
If you want to encode and commit more commands, you need to create a new MTLCommandBuffer
.