# Use \`command_buffer.wait_until_scheduled\` in metal renderer \(\#7283\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/3d76ed96f5e7837e410a6d11da3ff2cc237c9cb0)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 3d76ed96f5e7837e410a6d11da3ff2cc237c9cb0

Requested commit: 3d76ed96f5e7837e410a6d11da3ff2cc237c9cb0

Commit: 3d76ed96f5e7837e410a6d11da3ff2cc237c9cb0

Tree: 07b0e826df38644c731113ca4a5b671278ed8b24

Author: Thorsten Ball

Committer: GitHub

## Message

```
Use `command_buffer.wait_until_scheduled` in metal renderer (#7283)

This commit goes back to using `wait_until_scheduled` as opposed to
`wait_until_completed`. What this means, however, is that another draw
could take place before the previous one finished. When that happens we
don't want to reuse the same instance buffer because the GPU is actively
reading from it, so we use a pool instead.

Release Notes:

- Fixed a bug that caused inconsistent frame rate when scrolling on
certain hardware.

---------

Co-authored-by: Antonio Scandurra <me@as-cii.com>
Co-authored-by: Antonio <antonio@zed.dev>
```

## Parents

- [cf4f3ed79acc361e470ad8cff11ea1d98e20ae81](https://git.cafe/gitcafe/zed/commit/cf4f3ed79acc361e470ad8cff11ea1d98e20ae81?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/3d76ed96f5e7837e410a6d11da3ff2cc237c9cb0?format=markdown)
