wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

Fix metal feature detection

Open inner-daemons opened this issue 1 month ago • 1 comments

Connections Closes #8594 Closes #8629 Closes #8632

Description

Many (most?) of the feature detection logic in the metal backend is completely incorrect. You usually need to check for a specific metal version, a feature family, or specific versions of different OSes. This is often not checked correctly. For example, I have seen checks that ignore the API version completely. Many checks also assume tvOS versions and iOS versions have the same feature support which isn't true.

This addresses that by adjusting a TON of feature checks. This is not exhaustive.

@opstic confirms that this fixed all issues on their A7 (that's the one in the iPhone 5). So I'm thinking this is good enough for now

Testing None

Squash or Rebase?

Squash

Checklist

  • [x] Run cargo fmt.
  • [x] Run taplo format.
  • [x] Run cargo clippy --tests. If applicable, add:
    • [x] --target wasm32-unknown-unknown
  • [x] Run cargo xtask test to run tests.
  • [x] If this contains user-facing changes, add a CHANGELOG.md entry.

inner-daemons avatar Oct 29 '25 20:10 inner-daemons

Due to my hatred of metal docs and the fact that they don't make any sense, and because it seems that feature set related docs have been removed, I'm not gonna look over most of the feature detection code, and just trust that it works well enough.

I will definitely take another few looks over all of this. Its kind of a nightmare to navigate, but I'll try to improve that a little and make sure that reviewers have to put in slightly less effort to follow what's going on.

inner-daemons avatar Oct 30 '25 04:10 inner-daemons