pub fn execute<C, P>(
    cmd_buf: C,
    func: impl FnOnce(&Device<P>, &CommandBuffer<P>) + 'static
) -> CommandChain<C, P> where
    C: AsRef<CommandBuffer<P>>,
    P: SharedPointerKind