# gpui_wgpu: Guard against device feature mismatch \(\#52820\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 924ac5c99b807dd1ca40e8adaa26c62275133439

Requested commit: 924ac5c99b807dd1ca40e8adaa26c62275133439

Commit: 924ac5c99b807dd1ca40e8adaa26c62275133439

Tree: cfc939d311ff2ce0868ae46a1959eefaf9665d0e

Author: Oleksiy Syvokon

Committer: GitHub

## Message

```
gpui_wgpu: Guard against device feature mismatch (#52820)

This should prevent the "wgpu-hal invariant was violated (usage error):
Requested feature is not available on this device" panic, although I'm
not 100% sure (there's a possibility that a device reports the feature
but fails to use it). At the very least, we get more logging

I've tested this fix by patching code to emulate a situation where
device features change after the creation, but that may be not
representative of the real world failure.


Addresses ZED-5G1

Release Notes:

- N/A
```

## Parents

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

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