# gpui: Provide workaround for AMD Linux driver bug \(\#26890\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 4a39fc264405a1e7f1c319a513c62d330a1f644d

Requested commit: 4a39fc264405a1e7f1c319a513c62d330a1f644d

Commit: 4a39fc264405a1e7f1c319a513c62d330a1f644d

Tree: f2e8a3f8edc0763ddab23fa365ad09c7bf7973ad

Author: Martin Fischer

Committer: GitHub

## Message

```
gpui: Provide workaround for AMD Linux driver bug (#26890)

There apparently is some amdgpu/radv bug that rendering with
multisample anti-aliasing (MSAA) results in a crash when the bounds
of a triangle list exceed 1024px, which in Zed happens with the default
buffer font size when you select a line with more than 144 characters.

This crash has been reported as #26143.

This commit introduces a workaround: you can set the
ZED_PATH_SAMPLE_COUNT=0
environment variable to disable MSAA and the error message we print
when a GPU crash is encountered with radv now suggests trying this
environment
variable as a workaround and links the respective issue.

Sidenote: MSAA was introduced in
f08b1d78ec1655a56b07c5efcd74d225d2a4b7d5
so you didn't run into this driver bug with versions < 0.173.8.

Release Notes:

- Added a workaround for an AMD Linux driver bug that causes Zed to
crash when selecting long lines.
```

## Parents

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

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