Function CommandEncoder.finish

Finishes recording and returns a CommandBuffer that can be submitted for execution.

CommandBuffer finish();