diff --git a/src/back/msl/mod.rs b/src/back/msl/mod.rs index 819d48a8fd..a5c7139657 100644 --- a/src/back/msl/mod.rs +++ b/src/back/msl/mod.rs @@ -127,8 +127,6 @@ 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), } @@ -197,7 +195,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, diff --git a/src/back/msl/writer.rs b/src/back/msl/writer.rs index 67ab887285..d18e868697 100644 --- a/src/back/msl/writer.rs +++ b/src/back/msl/writer.rs @@ -3916,9 +3916,6 @@ impl Writer { 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(), 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/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 e5d875dd19..22157a3dcb 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 b7264e883d..5097cb3c2a 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 a0cf093b7f..538a7ac284 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 1a81aaf684..cf88fbf632 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..f6f5d5f328 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.0 #include #include diff --git a/tests/out/msl/bounds-check-image-rzsw.msl b/tests/out/msl/bounds-check-image-rzsw.msl index a93014cb27..bea4df8f17 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.0 #include #include diff --git a/tests/out/msl/bounds-check-restrict.msl b/tests/out/msl/bounds-check-restrict.msl index 49a232e706..cd5e2c82af 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 816983d98b..7005f3fb8d 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 88f9521a27..24ac0f9360 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/constructors.msl b/tests/out/msl/constructors.msl index b3d3b9dd43..19cb59bcdc 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 4f928d1f3c..bebfdaeea9 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 92b1909f8b..c7fa9124ee 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 f456649bc6..ccf269294c 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 d9142c1990..2fdce2dbaa 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 dccb90ad6c..a87932b494 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/operators.msl b/tests/out/msl/operators.msl index de3e990db2..0406b0833e 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 f6a4fe5d6d..39306f65ea 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 d322cbcb9b..5f8080825b 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 53f320344a..217fac0af1 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