From 89ab5902b2300bbb04281ebb7862a3ce53ab8f4b Mon Sep 17 00:00:00 2001 From: teoxoy <28601907+teoxoy@users.noreply.github.com> Date: Wed, 20 Sep 2023 14:16:17 +0200 Subject: [PATCH] [msl-out] add min version check for `primitive_id` --- src/back/msl/mod.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/back/msl/mod.rs b/src/back/msl/mod.rs index fc507b4ea4..15af43abd1 100644 --- a/src/back/msl/mod.rs +++ b/src/back/msl/mod.rs @@ -258,6 +258,11 @@ impl Options { crate::BuiltIn::InstanceIndex if self.lang_version < (1, 2) => { return Err(Error::UnsupportedAttribute("instance_id".to_string())); } + // macOS: Since Metal 2.2 + // iOS: Since Metal 2.3 (check depends on https://github.com/gfx-rs/naga/issues/2164) + crate::BuiltIn::PrimitiveIndex if self.lang_version < (2, 2) => { + return Err(Error::UnsupportedAttribute("primitive_id".to_string())); + } _ => {} }