diff --git a/src/back/msl/mod.rs b/src/back/msl/mod.rs index 819d48a8fd..5ef18730c9 100644 --- a/src/back/msl/mod.rs +++ b/src/back/msl/mod.rs @@ -127,10 +127,22 @@ pub enum Error { UnsupportedBuiltIn(crate::BuiltIn), #[error("capability {0:?} is not supported")] CapabilityNotSupported(crate::valid::Capabilities), - #[error("address space {0:?} is not supported for target MSL version")] - UnsupportedAddressSpace(crate::AddressSpace), #[error("attribute '{0}' is not supported for target MSL version")] UnsupportedAttribute(String), + #[error("function '{0}' is not supported for target MSL version")] + UnsupportedFunction(String), + #[error("can not use writeable storage buffers in fragment stage prior to MSL 1.2")] + UnsupportedWriteableStorageBuffer, + #[error("can not use writeable storage textures in {0:?} stage prior to MSL 1.2")] + UnsupportedWriteableStorageTexture(crate::ShaderStage), + #[error("can not use read-write storage textures prior to MSL 1.2")] + UnsupportedRWStorageTexture, + #[error("array of '{0}' is not supported for target MSL version")] + UnsupportedArrayOf(String), + #[error("array of type '{0:?}' is not supported")] + UnsupportedArrayOfType(Handle), + #[error("ray tracing is not supported prior to MSL 2.3")] + UnsupportedRayTracing, } #[derive(Clone, Debug, PartialEq, thiserror::Error)] @@ -197,7 +209,7 @@ pub struct Options { impl Default for Options { fn default() -> Self { Options { - lang_version: (2, 0), + lang_version: (1, 0), per_entry_point_map: EntryPointResourceMap::default(), inline_samplers: Vec::new(), spirv_cross_compatibility: false, @@ -230,16 +242,30 @@ impl Options { ) -> Result { match *binding { crate::Binding::BuiltIn(mut built_in) => { - if let crate::BuiltIn::Position { ref mut invariant } = built_in { - if *invariant && self.lang_version < (2, 1) { - return Err(Error::UnsupportedAttribute("invariant".to_string())); + match built_in { + crate::BuiltIn::Position { ref mut invariant } => { + if *invariant && self.lang_version < (2, 1) { + return Err(Error::UnsupportedAttribute("invariant".to_string())); + } + + // The 'invariant' attribute may only appear on vertex + // shader outputs, not fragment shader inputs. + if !matches!(mode, LocationMode::VertexOutput) { + *invariant = false; + } } - - // The 'invariant' attribute may only appear on vertex - // shader outputs, not fragment shader inputs. - if !matches!(mode, LocationMode::VertexOutput) { - *invariant = false; + crate::BuiltIn::BaseInstance if self.lang_version < (1, 2) => { + return Err(Error::UnsupportedAttribute("base_instance".to_string())); + } + 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())); } + _ => {} } Ok(ResolvedBinding::BuiltIn(built_in)) diff --git a/src/back/msl/writer.rs b/src/back/msl/writer.rs index 54941836e0..91315eb5b7 100644 --- a/src/back/msl/writer.rs +++ b/src/back/msl/writer.rs @@ -503,6 +503,7 @@ struct ExpressionContext<'a> { module: &'a crate::Module, mod_info: &'a valid::ModuleInfo, pipeline_options: &'a PipelineOptions, + lang_version: (u8, u8), policies: index::BoundsCheckPolicies, /// A bitset containing the `Expression` handle indexes of expressions used @@ -1789,6 +1790,23 @@ impl Writer { Mf::Unpack2x16float => "", }; + match fun { + Mf::ReverseBits | Mf::ExtractBits | Mf::InsertBits => { + // reverse_bits is listed as requiring MSL 2.1 but that + // is a copy/paste error. Looking at previous snapshots + // on web.archive.org it's present in MSL 1.2. + // + // https://developer.apple.com/library/archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/WhatsNewiniOS10tvOS10andOSX1012/WhatsNewiniOS10tvOS10andOSX1012.html + // also talks about MSL 1.2 adding "New integer + // functions to extract, insert, and reverse bits, as + // described in Integer Functions." + if context.lang_version < (1, 2) { + return Err(Error::UnsupportedFunction(fun_name.to_string())); + } + } + _ => {} + } + if fun == Mf::Distance && scalar_argument { write!(self.out, "{NAMESPACE}::abs(")?; self.put_expression(arg, context, false)?; @@ -1943,6 +1961,10 @@ impl Writer { } } crate::Expression::RayQueryGetIntersection { query, committed } => { + if context.lang_version < (2, 4) { + return Err(Error::UnsupportedRayTracing); + } + if !committed { unimplemented!() } @@ -1953,16 +1975,16 @@ impl Writer { write!(self.out, ".{RAY_QUERY_FIELD_INTERSECTION}.type)")?; let fields = [ "distance", - "user_instance_id", + "user_instance_id", // req Metal 2.4 "instance_id", "", // SBT offset "geometry_id", "primitive_id", "triangle_barycentric_coord", "triangle_front_facing", - "", // padding - "object_to_world_transform", - "world_to_object_transform", + "", // padding + "object_to_world_transform", // req Metal 2.4 + "world_to_object_transform", // req Metal 2.4 ]; for field in fields { write!(self.out, ", ")?; @@ -2895,6 +2917,10 @@ impl Writer { self.write_barrier(crate::Barrier::WORK_GROUP, level)?; } crate::Statement::RayQuery { query, ref fun } => { + if context.expression.lang_version < (2, 4) { + return Err(Error::UnsupportedRayTracing); + } + match *fun { crate::RayQueryFunction::Initialize { acceleration_structure, @@ -3086,33 +3112,36 @@ impl Writer { // Work around Metal bug where `uint` is not available by default writeln!(self.out, "using {NAMESPACE}::uint;")?; - if module.types.iter().any(|(_, t)| match t.inner { - crate::TypeInner::RayQuery => true, - _ => false, - }) { - let tab = back::INDENT; - writeln!(self.out, "struct {RAY_QUERY_TYPE} {{")?; - let full_type = format!("{RT_NAMESPACE}::intersector<{RT_NAMESPACE}::instancing, {RT_NAMESPACE}::triangle_data, {RT_NAMESPACE}::world_space_data>"); - writeln!(self.out, "{tab}{full_type} {RAY_QUERY_FIELD_INTERSECTOR};")?; - writeln!( - self.out, - "{tab}{full_type}::result_type {RAY_QUERY_FIELD_INTERSECTION};" - )?; - writeln!(self.out, "{tab}bool {RAY_QUERY_FIELD_READY} = false;")?; - writeln!(self.out, "}};")?; - writeln!(self.out, "constexpr {NAMESPACE}::uint {RAY_QUERY_FUN_MAP_INTERSECTION}(const {RT_NAMESPACE}::intersection_type ty) {{")?; - let v_triangle = back::RayIntersectionType::Triangle as u32; - let v_bbox = back::RayIntersectionType::BoundingBox as u32; - writeln!( - self.out, - "{tab}return ty=={RT_NAMESPACE}::intersection_type::triangle ? {v_triangle} : " - )?; - writeln!( - self.out, - "{tab}{tab}ty=={RT_NAMESPACE}::intersection_type::bounding_box ? {v_bbox} : 0;" - )?; - writeln!(self.out, "}}")?; + let mut uses_ray_query = false; + for (_, ty) in module.types.iter() { + match ty.inner { + crate::TypeInner::AccelerationStructure => { + if options.lang_version < (2, 4) { + return Err(Error::UnsupportedRayTracing); + } + } + crate::TypeInner::RayQuery => { + if options.lang_version < (2, 4) { + return Err(Error::UnsupportedRayTracing); + } + uses_ray_query = true; + } + _ => (), + } } + + if module.special_types.ray_desc.is_some() + || module.special_types.ray_intersection.is_some() + { + if options.lang_version < (2, 4) { + return Err(Error::UnsupportedRayTracing); + } + } + + if uses_ray_query { + self.put_ray_query_type()?; + } + if options .bounds_check_policies .contains(index::BoundsCheckPolicy::ReadZeroSkipWrite) @@ -3170,6 +3199,32 @@ impl Writer { Ok(()) } + fn put_ray_query_type(&mut self) -> BackendResult { + let tab = back::INDENT; + writeln!(self.out, "struct {RAY_QUERY_TYPE} {{")?; + let full_type = format!("{RT_NAMESPACE}::intersector<{RT_NAMESPACE}::instancing, {RT_NAMESPACE}::triangle_data, {RT_NAMESPACE}::world_space_data>"); + writeln!(self.out, "{tab}{full_type} {RAY_QUERY_FIELD_INTERSECTOR};")?; + writeln!( + self.out, + "{tab}{full_type}::result_type {RAY_QUERY_FIELD_INTERSECTION};" + )?; + writeln!(self.out, "{tab}bool {RAY_QUERY_FIELD_READY} = false;")?; + writeln!(self.out, "}};")?; + writeln!(self.out, "constexpr {NAMESPACE}::uint {RAY_QUERY_FUN_MAP_INTERSECTION}(const {RT_NAMESPACE}::intersection_type ty) {{")?; + let v_triangle = back::RayIntersectionType::Triangle as u32; + let v_bbox = back::RayIntersectionType::BoundingBox as u32; + writeln!( + self.out, + "{tab}return ty=={RT_NAMESPACE}::intersection_type::triangle ? {v_triangle} : " + )?; + writeln!( + self.out, + "{tab}{tab}ty=={RT_NAMESPACE}::intersection_type::bounding_box ? {v_bbox} : 0;" + )?; + writeln!(self.out, "}}")?; + Ok(()) + } + fn write_type_defs(&mut self, module: &crate::Module) -> BackendResult { for (handle, ty) in module.types.iter() { if !ty.needs_alias() { @@ -3559,6 +3614,7 @@ impl Writer { function: fun, origin: FunctionOrigin::Handle(fun_handle), info: fun_info, + lang_version: options.lang_version, policies: options.bounds_check_policies, guarded_indices, module, @@ -3936,13 +3992,124 @@ impl Writer { if usage.is_empty() || var.space == crate::AddressSpace::Private { continue; } + + if options.lang_version < (1, 2) { + match var.space { + // This restriction is not documented in the MSL spec + // but validation will fail if it is not upheld. + // + // We infer the required version from the "Function + // Buffer Read-Writes" section of [what's new], where + // the feature sets listed correspond with the ones + // supporting MSL 1.2. + // + // [what's new]: https://developer.apple.com/library/archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/WhatsNewiniOS10tvOS10andOSX1012/WhatsNewiniOS10tvOS10andOSX1012.html + crate::AddressSpace::Storage { access } + if access.contains(crate::StorageAccess::STORE) + && ep.stage == crate::ShaderStage::Fragment => + { + return Err(Error::UnsupportedWriteableStorageBuffer) + } + crate::AddressSpace::Handle => { + match module.types[var.ty].inner { + crate::TypeInner::Image { + class: crate::ImageClass::Storage { access, .. }, + .. + } => { + // This restriction is not documented in the MSL spec + // but validation will fail if it is not upheld. + // + // We infer the required version from the "Function + // Texture Read-Writes" section of [what's new], where + // the feature sets listed correspond with the ones + // supporting MSL 1.2. + // + // [what's new]: https://developer.apple.com/library/archive/documentation/Miscellaneous/Conceptual/MetalProgrammingGuide/WhatsNewiniOS10tvOS10andOSX1012/WhatsNewiniOS10tvOS10andOSX1012.html + if access.contains(crate::StorageAccess::STORE) + && (ep.stage == crate::ShaderStage::Vertex + || ep.stage == crate::ShaderStage::Fragment) + { + return Err(Error::UnsupportedWriteableStorageTexture( + ep.stage, + )); + } + + if access.contains( + crate::StorageAccess::LOAD | crate::StorageAccess::STORE, + ) { + return Err(Error::UnsupportedRWStorageTexture); + } + } + _ => {} + } + } + _ => {} + } + } + + // Check min MSL version for binding arrays + match var.space { + crate::AddressSpace::Handle => match module.types[var.ty].inner { + crate::TypeInner::BindingArray { base, .. } => { + match module.types[base].inner { + crate::TypeInner::Sampler { .. } => { + if options.lang_version < (2, 0) { + return Err(Error::UnsupportedArrayOf( + "samplers".to_string(), + )); + } + } + crate::TypeInner::Image { class, .. } => match class { + crate::ImageClass::Sampled { .. } + | crate::ImageClass::Depth { .. } + | crate::ImageClass::Storage { + access: crate::StorageAccess::LOAD, + .. + } => { + // Array of textures since: + // - iOS: Metal 1.2 (check depends on https://github.com/gfx-rs/naga/issues/2164) + // - macOS: Metal 2 + + if options.lang_version < (2, 0) { + return Err(Error::UnsupportedArrayOf( + "textures".to_string(), + )); + } + } + crate::ImageClass::Storage { + access: crate::StorageAccess::STORE, + .. + } => { + // Array of write-only textures since: + // - iOS: Metal 2.2 (check depends on https://github.com/gfx-rs/naga/issues/2164) + // - macOS: Metal 2 + + if options.lang_version < (2, 0) { + return Err(Error::UnsupportedArrayOf( + "write-only textures".to_string(), + )); + } + } + crate::ImageClass::Storage { .. } => { + return Err(Error::UnsupportedArrayOf( + "read-write textures".to_string(), + )); + } + }, + _ => { + return Err(Error::UnsupportedArrayOfType(base)); + } + } + } + _ => {} + }, + _ => {} + } + // the resolves have already been checked for `!fake_missing_bindings` case let resolved = match var.space { crate::AddressSpace::PushConstant => options.resolve_push_constants(ep).ok(), crate::AddressSpace::WorkGroup => None, - crate::AddressSpace::Storage { .. } if options.lang_version < (2, 0) => { - return Err(Error::UnsupportedAddressSpace(var.space)) - } _ => options .resolve_resource_binding(ep, var.binding.as_ref().unwrap()) .ok(), @@ -4115,6 +4282,7 @@ impl Writer { function: fun, origin: FunctionOrigin::EntryPoint(ep_index as _), info: fun_info, + lang_version: options.lang_version, policies: options.bounds_check_policies, guarded_indices, module, diff --git a/tests/in/access.param.ron b/tests/in/access.param.ron index 5cd8e79a48..e67f90cf2f 100644 --- a/tests/in/access.param.ron +++ b/tests/in/access.param.ron @@ -5,7 +5,7 @@ adjust_coordinate_space: false, ), msl: ( - lang_version: (2, 0), + lang_version: (1, 2), per_entry_point_map: { "foo_vert": ( resources: { diff --git a/tests/in/bitcast.params.ron b/tests/in/bitcast.params.ron index b40cf9fa08..febd505f73 100644 --- a/tests/in/bitcast.params.ron +++ b/tests/in/bitcast.params.ron @@ -1,6 +1,6 @@ ( msl: ( - lang_version: (1, 2), + lang_version: (1, 0), per_entry_point_map: { "main": ( resources: { diff --git a/tests/in/boids.param.ron b/tests/in/boids.param.ron index 976b457ede..25f81b8afd 100644 --- a/tests/in/boids.param.ron +++ b/tests/in/boids.param.ron @@ -5,7 +5,7 @@ adjust_coordinate_space: false, ), msl: ( - lang_version: (2, 0), + lang_version: (1, 0), per_entry_point_map: { "main": ( resources: { diff --git a/tests/in/bounds-check-image-restrict.param.ron b/tests/in/bounds-check-image-restrict.param.ron index 448db8a5d6..d7ff0f006b 100644 --- a/tests/in/bounds-check-image-restrict.param.ron +++ b/tests/in/bounds-check-image-restrict.param.ron @@ -13,4 +13,12 @@ binding_map: { }, zero_initialize_workgroup_memory: true, ), + msl: ( + lang_version: (1, 2), + per_entry_point_map: {}, + inline_samplers: [], + spirv_cross_compatibility: false, + fake_missing_bindings: true, + zero_initialize_workgroup_memory: true, + ), ) diff --git a/tests/in/bounds-check-image-rzsw.param.ron b/tests/in/bounds-check-image-rzsw.param.ron index 0a82f9584b..b256790e15 100644 --- a/tests/in/bounds-check-image-rzsw.param.ron +++ b/tests/in/bounds-check-image-rzsw.param.ron @@ -13,4 +13,12 @@ binding_map: { }, zero_initialize_workgroup_memory: true, ), + msl: ( + lang_version: (1, 2), + per_entry_point_map: {}, + inline_samplers: [], + spirv_cross_compatibility: false, + fake_missing_bindings: true, + zero_initialize_workgroup_memory: true, + ), ) diff --git a/tests/in/dualsource.param.ron b/tests/in/dualsource.param.ron index 1cf512c6c4..9ab5ee4146 100644 --- a/tests/in/dualsource.param.ron +++ b/tests/in/dualsource.param.ron @@ -1,13 +1,11 @@ ( god_mode: true, - vertex:[ - ], - fragment:[ - ( - entry_point:"main", - target_profile:"ps_5_1", - ), - ], - compute:[ - ], + msl: ( + lang_version: (1, 2), + per_entry_point_map: {}, + inline_samplers: [], + spirv_cross_compatibility: false, + fake_missing_bindings: false, + zero_initialize_workgroup_memory: true, + ), ) diff --git a/tests/in/padding.param.ron b/tests/in/padding.param.ron index 14859bba3e..1a735a201e 100644 --- a/tests/in/padding.param.ron +++ b/tests/in/padding.param.ron @@ -5,7 +5,7 @@ adjust_coordinate_space: false, ), msl: ( - lang_version: (2, 0), + lang_version: (1, 0), per_entry_point_map: { "vertex": ( resources: { diff --git a/tests/in/resource-binding-map.param.ron b/tests/in/resource-binding-map.param.ron index 15a14b1971..25e7b054b0 100644 --- a/tests/in/resource-binding-map.param.ron +++ b/tests/in/resource-binding-map.param.ron @@ -1,7 +1,7 @@ ( god_mode: true, msl: ( - lang_version: (2, 0), + lang_version: (1, 0), per_entry_point_map: { "entry_point_one": ( resources: { diff --git a/tests/in/workgroup-var-init.param.ron b/tests/in/workgroup-var-init.param.ron index be5302284b..a00ecf6bfd 100644 --- a/tests/in/workgroup-var-init.param.ron +++ b/tests/in/workgroup-var-init.param.ron @@ -5,7 +5,7 @@ adjust_coordinate_space: false, ), msl: ( - lang_version: (2, 0), + lang_version: (1, 0), per_entry_point_map: { "main": ( resources: { diff --git a/tests/out/msl/access.msl b/tests/out/msl/access.msl index 7c901c35a4..d0f48ba4f2 100644 --- a/tests/out/msl/access.msl +++ b/tests/out/msl/access.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.2 #include #include diff --git a/tests/out/msl/array-in-ctor.msl b/tests/out/msl/array-in-ctor.msl index 9428cb1e74..a3bbb2057c 100644 --- a/tests/out/msl/array-in-ctor.msl +++ b/tests/out/msl/array-in-ctor.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/array-in-function-return-type.msl b/tests/out/msl/array-in-function-return-type.msl index c2c2379cce..77399f6424 100644 --- a/tests/out/msl/array-in-function-return-type.msl +++ b/tests/out/msl/array-in-function-return-type.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/atomicOps.msl b/tests/out/msl/atomicOps.msl index 3a34cc3072..4732b4a32d 100644 --- a/tests/out/msl/atomicOps.msl +++ b/tests/out/msl/atomicOps.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/bitcast.msl b/tests/out/msl/bitcast.msl index ca8bc329bb..20f4b850e3 100644 --- a/tests/out/msl/bitcast.msl +++ b/tests/out/msl/bitcast.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/boids.msl b/tests/out/msl/boids.msl index de9d7186a8..ce1ccc7cc2 100644 --- a/tests/out/msl/boids.msl +++ b/tests/out/msl/boids.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/bounds-check-image-restrict.msl b/tests/out/msl/bounds-check-image-restrict.msl index 9f94ef0a6e..6a3c43f0ce 100644 --- a/tests/out/msl/bounds-check-image-restrict.msl +++ b/tests/out/msl/bounds-check-image-restrict.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.2 #include #include diff --git a/tests/out/msl/bounds-check-image-rzsw.msl b/tests/out/msl/bounds-check-image-rzsw.msl index a93014cb27..5db0c9df94 100644 --- a/tests/out/msl/bounds-check-image-rzsw.msl +++ b/tests/out/msl/bounds-check-image-rzsw.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.2 #include #include diff --git a/tests/out/msl/bounds-check-restrict.msl b/tests/out/msl/bounds-check-restrict.msl index 4191fd2765..0d41436534 100644 --- a/tests/out/msl/bounds-check-restrict.msl +++ b/tests/out/msl/bounds-check-restrict.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/bounds-check-zero-atomic.msl b/tests/out/msl/bounds-check-zero-atomic.msl index daaa079233..4a2f0b07dc 100644 --- a/tests/out/msl/bounds-check-zero-atomic.msl +++ b/tests/out/msl/bounds-check-zero-atomic.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/bounds-check-zero.msl b/tests/out/msl/bounds-check-zero.msl index c83f25b311..7bbdd50d1b 100644 --- a/tests/out/msl/bounds-check-zero.msl +++ b/tests/out/msl/bounds-check-zero.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/break-if.msl b/tests/out/msl/break-if.msl index 3a6f2e9bff..657fdf9f77 100644 --- a/tests/out/msl/break-if.msl +++ b/tests/out/msl/break-if.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/collatz.msl b/tests/out/msl/collatz.msl index 3c8bcf1722..e283741459 100644 --- a/tests/out/msl/collatz.msl +++ b/tests/out/msl/collatz.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/const-exprs.msl b/tests/out/msl/const-exprs.msl index 47b3615e13..c61ca952e7 100644 --- a/tests/out/msl/const-exprs.msl +++ b/tests/out/msl/const-exprs.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/constructors.msl b/tests/out/msl/constructors.msl index 100d6994e2..b3a0ecd896 100644 --- a/tests/out/msl/constructors.msl +++ b/tests/out/msl/constructors.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/control-flow.msl b/tests/out/msl/control-flow.msl index be396e23a8..0d0e082e41 100644 --- a/tests/out/msl/control-flow.msl +++ b/tests/out/msl/control-flow.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/do-while.msl b/tests/out/msl/do-while.msl index 6ddd59dab5..c1b4d08b0e 100644 --- a/tests/out/msl/do-while.msl +++ b/tests/out/msl/do-while.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/dualsource.msl b/tests/out/msl/dualsource.msl index 871957c81f..439e3c0d8c 100644 --- a/tests/out/msl/dualsource.msl +++ b/tests/out/msl/dualsource.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.2 #include #include diff --git a/tests/out/msl/empty-global-name.msl b/tests/out/msl/empty-global-name.msl index 1cbf9adf43..01cac3f6e0 100644 --- a/tests/out/msl/empty-global-name.msl +++ b/tests/out/msl/empty-global-name.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/empty.msl b/tests/out/msl/empty.msl index 4f8bf9f5e9..414cd22012 100644 --- a/tests/out/msl/empty.msl +++ b/tests/out/msl/empty.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/fragment-output.msl b/tests/out/msl/fragment-output.msl index 4d25809e4f..c886fc885e 100644 --- a/tests/out/msl/fragment-output.msl +++ b/tests/out/msl/fragment-output.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/functions.msl b/tests/out/msl/functions.msl index 31f57c656e..42632f99be 100644 --- a/tests/out/msl/functions.msl +++ b/tests/out/msl/functions.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/globals.msl b/tests/out/msl/globals.msl index 9d09db8055..d2ed89ed46 100644 --- a/tests/out/msl/globals.msl +++ b/tests/out/msl/globals.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/image.msl b/tests/out/msl/image.msl index e390c2e0fc..40d6e809ee 100644 --- a/tests/out/msl/image.msl +++ b/tests/out/msl/image.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/interpolate.msl b/tests/out/msl/interpolate.msl index 5d8b67111e..616291253f 100644 --- a/tests/out/msl/interpolate.msl +++ b/tests/out/msl/interpolate.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/math-functions.msl b/tests/out/msl/math-functions.msl index d0ae8c5047..d93e502dc6 100644 --- a/tests/out/msl/math-functions.msl +++ b/tests/out/msl/math-functions.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/msl-varyings.msl b/tests/out/msl/msl-varyings.msl index 62d635249a..5e5788c8c5 100644 --- a/tests/out/msl/msl-varyings.msl +++ b/tests/out/msl/msl-varyings.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/operators.msl b/tests/out/msl/operators.msl index 114865451a..960a87f01c 100644 --- a/tests/out/msl/operators.msl +++ b/tests/out/msl/operators.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/padding.msl b/tests/out/msl/padding.msl index 4d99bb4c4c..ae11b7d168 100644 --- a/tests/out/msl/padding.msl +++ b/tests/out/msl/padding.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/policy-mix.msl b/tests/out/msl/policy-mix.msl index bb7c12671a..24a40179a8 100644 --- a/tests/out/msl/policy-mix.msl +++ b/tests/out/msl/policy-mix.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/quad-vert.msl b/tests/out/msl/quad-vert.msl index 718d7aafa8..24b6cdd095 100644 --- a/tests/out/msl/quad-vert.msl +++ b/tests/out/msl/quad-vert.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/quad.msl b/tests/out/msl/quad.msl index 5fa5788aac..75fdafb6da 100644 --- a/tests/out/msl/quad.msl +++ b/tests/out/msl/quad.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/resource-binding-map.msl b/tests/out/msl/resource-binding-map.msl index b4a53d97b5..56fcea0cce 100644 --- a/tests/out/msl/resource-binding-map.msl +++ b/tests/out/msl/resource-binding-map.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/shadow.msl b/tests/out/msl/shadow.msl index 15dd042b8d..2443f002f2 100644 --- a/tests/out/msl/shadow.msl +++ b/tests/out/msl/shadow.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/standard.msl b/tests/out/msl/standard.msl index f02243eaac..e02ef7f892 100644 --- a/tests/out/msl/standard.msl +++ b/tests/out/msl/standard.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/texture-arg.msl b/tests/out/msl/texture-arg.msl index 5fb9b25649..4c173fce06 100644 --- a/tests/out/msl/texture-arg.msl +++ b/tests/out/msl/texture-arg.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/workgroup-uniform-load.msl b/tests/out/msl/workgroup-uniform-load.msl index 37a8781739..32495c198a 100644 --- a/tests/out/msl/workgroup-uniform-load.msl +++ b/tests/out/msl/workgroup-uniform-load.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include diff --git a/tests/out/msl/workgroup-var-init.msl b/tests/out/msl/workgroup-var-init.msl index ac300d4337..991c8b014b 100644 --- a/tests/out/msl/workgroup-var-init.msl +++ b/tests/out/msl/workgroup-var-init.msl @@ -1,4 +1,4 @@ -// language: metal2.0 +// language: metal1.0 #include #include