Skip to content

Conversation

@madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Jan 28, 2026

Connections
Might help with #5827.
Part of #4632.
See also related past issue gfx-rs/naga#1625.

Description
In gfx-rs/naga#289 / gfx-rs/naga#239, using namespace metal; was removed, probably to help with avoiding name clashes. This causes issues on older platforms such as macOS 10.12 though, since a lot of types there doesn't seem to be builtin, and are only exposed as typedefs in the metal namespace. Naga already contains a partial workaround for this (the using metal::uint;).

TODO: Solution?

Testing
cargo xtask test on a macOS 10.12 machine with #8953 applied gets us down to 11 failed tests.

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests.
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@madsmtm
Copy link
Contributor Author

madsmtm commented Jan 28, 2026

This PR is a draft because I see three ways of resolving this:

  1. Re-add using namespace metal;, and add everything from that namespace to the list of reserved keywords.
  2. Namespace all non-C types (e.g. do metal::uint, metal::uint2, metal::float4, etc). This would be partially reverting [msl-out] Write 'using metal::uint' at the top, to work around bug. naga#1740.
  3. Explicitly import all the basic types that Naga uses (e.g. do using metal::{uint, uint2, uint4, ...};).

CC @kvark who avoided using namespace metal; and implemented the keywords stuff, WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant