From 65727b78599c0054a2034aa933557acc7e6fb9ee Mon Sep 17 00:00:00 2001 From: James Price Date: Fri, 13 Dec 2024 12:19:21 -0800 Subject: [PATCH] [msl] Move symbol renaming into the backend Instead of running the AST renamer transform in Dawn's Metal backend, we just modify the names when emitting them in the printer. This is a little cleaner than using a transform, as transforms cannot rename structures and struct members without requiring const_cast. This also keeps the list of MSL keywords local to the printer, and means we can retain the meaningful names throughout the `raise` process. Bug: 380043958 Change-Id: Ib5ae9b36947826928fd7babaed9892d06a8c0c29 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/219295 Reviewed-by: Antonio Maiorano Commit-Queue: James Price --- src/dawn/native/metal/ShaderModuleMTL.mm | 28 +- src/tint/cmd/tint/main.cc | 10 +- src/tint/lang/msl/writer/common/options.h | 10 + src/tint/lang/msl/writer/function_test.cc | 12 +- src/tint/lang/msl/writer/printer/printer.cc | 346 ++++++++++++++++-- src/tint/lang/msl/writer/writer_fuzz.cc | 9 +- src/tint/lang/msl/writer/writer_test.cc | 52 +++ .../access/let/matrix.spvasm.expected.ir.msl | 2 +- .../access/let/matrix.wgsl.expected.ir.msl | 2 +- .../access/let/vector.spvasm.expected.ir.msl | 2 +- .../access/let/vector.wgsl.expected.ir.msl | 6 +- test/tint/access/ptr.wgsl.expected.ir.msl | 12 +- .../access/var/matrix.spvasm.expected.ir.msl | 2 +- .../access/var/matrix.wgsl.expected.ir.msl | 2 +- .../access/var/vector.spvasm.expected.ir.msl | 2 +- .../access/var/vector.wgsl.expected.ir.msl | 6 +- ...ssign_to_function_var.wgsl.expected.ir.msl | 12 +- ...assign_to_private_var.wgsl.expected.ir.msl | 12 +- ...assign_to_storage_var.wgsl.expected.ir.msl | 12 +- .../assign_to_subexpr.wgsl.expected.ir.msl | 2 +- ...sign_to_workgroup_var.wgsl.expected.ir.msl | 14 +- .../function_parameter.wgsl.expected.ir.msl | 2 +- .../function_return_type.wgsl.expected.ir.msl | 2 +- test/tint/array/size.wgsl.expected.ir.msl | 2 +- .../type_initializer.wgsl.expected.ir.msl | 6 +- .../dynamic_index/read.wgsl.expected.ir.msl | 6 +- .../read_f16.wgsl.expected.ir.msl | 6 +- .../dynamic_index/write.wgsl.expected.ir.msl | 6 +- .../write_f16.wgsl.expected.ir.msl | 6 +- .../static_index/read.wgsl.expected.ir.msl | 62 ++-- .../read_f16.wgsl.expected.ir.msl | 114 +++--- .../static_index/write.wgsl.expected.ir.msl | 2 +- .../write_f16.wgsl.expected.ir.msl | 2 +- .../types/array4_f16.wgsl.expected.ir.msl | 2 +- .../types/array4_f32.wgsl.expected.ir.msl | 2 +- .../storage/types/f16.wgsl.expected.ir.msl | 2 +- .../storage/types/f32.wgsl.expected.ir.msl | 2 +- .../storage/types/i32.wgsl.expected.ir.msl | 2 +- .../types/mat2x2_f16.wgsl.expected.ir.msl | 2 +- .../types/mat2x2_f32.wgsl.expected.ir.msl | 2 +- .../types/mat2x3_f16.wgsl.expected.ir.msl | 8 +- .../types/mat2x3_f32.wgsl.expected.ir.msl | 8 +- .../types/mat2x4_f16.wgsl.expected.ir.msl | 2 +- .../types/mat2x4_f32.wgsl.expected.ir.msl | 2 +- .../types/mat3x2_f16.wgsl.expected.ir.msl | 2 +- .../types/mat3x2_f32.wgsl.expected.ir.msl | 2 +- .../types/mat3x3_f16.wgsl.expected.ir.msl | 10 +- .../types/mat3x3_f32.wgsl.expected.ir.msl | 10 +- .../types/mat3x4_f16.wgsl.expected.ir.msl | 2 +- .../types/mat3x4_f32.wgsl.expected.ir.msl | 2 +- .../types/mat4x2_f16.wgsl.expected.ir.msl | 2 +- .../types/mat4x2_f32.wgsl.expected.ir.msl | 2 +- .../types/mat4x3_f16.wgsl.expected.ir.msl | 12 +- .../types/mat4x3_f32.wgsl.expected.ir.msl | 12 +- .../types/mat4x4_f16.wgsl.expected.ir.msl | 2 +- .../types/mat4x4_f32.wgsl.expected.ir.msl | 2 +- .../runtime_array_f16.wgsl.expected.ir.msl | 10 +- .../runtime_array_f32.wgsl.expected.ir.msl | 10 +- .../types/struct_f16.wgsl.expected.ir.msl | 2 +- .../types/struct_f32.wgsl.expected.ir.msl | 2 +- .../storage/types/u32.wgsl.expected.ir.msl | 2 +- .../types/vec2_f16.wgsl.expected.ir.msl | 2 +- .../types/vec2_f32.wgsl.expected.ir.msl | 2 +- .../types/vec2_i32.wgsl.expected.ir.msl | 2 +- .../types/vec2_u32.wgsl.expected.ir.msl | 2 +- .../types/vec3_f16.wgsl.expected.ir.msl | 2 +- .../types/vec3_f32.wgsl.expected.ir.msl | 2 +- .../types/vec3_i32.wgsl.expected.ir.msl | 2 +- .../types/vec3_u32.wgsl.expected.ir.msl | 2 +- .../types/vec4_f16.wgsl.expected.ir.msl | 2 +- .../types/vec4_f32.wgsl.expected.ir.msl | 2 +- .../types/vec4_i32.wgsl.expected.ir.msl | 2 +- .../types/vec4_u32.wgsl.expected.ir.msl | 2 +- .../dynamic_index/read.wgsl.expected.ir.msl | 6 +- .../read_f16.wgsl.expected.ir.msl | 6 +- .../static_index/read.wgsl.expected.ir.msl | 62 ++-- .../read_f16.wgsl.expected.ir.msl | 114 +++--- .../uniform/types/f16.wgsl.expected.ir.msl | 2 +- .../uniform/types/f32.wgsl.expected.ir.msl | 2 +- .../uniform/types/i32.wgsl.expected.ir.msl | 2 +- .../types/mat2x2_f16.wgsl.expected.ir.msl | 2 +- .../types/mat2x2_f32.wgsl.expected.ir.msl | 2 +- .../types/mat2x3_f16.wgsl.expected.ir.msl | 8 +- .../types/mat2x3_f32.wgsl.expected.ir.msl | 8 +- .../types/mat2x4_f16.wgsl.expected.ir.msl | 2 +- .../types/mat2x4_f32.wgsl.expected.ir.msl | 2 +- .../types/mat3x2_f16.wgsl.expected.ir.msl | 2 +- .../types/mat3x2_f32.wgsl.expected.ir.msl | 2 +- .../types/mat3x3_f16.wgsl.expected.ir.msl | 10 +- .../types/mat3x3_f32.wgsl.expected.ir.msl | 10 +- .../types/mat3x4_f16.wgsl.expected.ir.msl | 2 +- .../types/mat3x4_f32.wgsl.expected.ir.msl | 2 +- .../types/mat4x2_f16.wgsl.expected.ir.msl | 2 +- .../types/mat4x2_f32.wgsl.expected.ir.msl | 2 +- .../types/mat4x3_f16.wgsl.expected.ir.msl | 12 +- .../types/mat4x3_f32.wgsl.expected.ir.msl | 12 +- .../types/mat4x4_f16.wgsl.expected.ir.msl | 2 +- .../types/mat4x4_f32.wgsl.expected.ir.msl | 2 +- .../types/struct_f16.wgsl.expected.ir.msl | 2 +- .../types/struct_f32.wgsl.expected.ir.msl | 2 +- .../uniform/types/u32.wgsl.expected.ir.msl | 2 +- .../types/vec2_f16.wgsl.expected.ir.msl | 2 +- .../types/vec2_f32.wgsl.expected.ir.msl | 2 +- .../types/vec2_i32.wgsl.expected.ir.msl | 2 +- .../types/vec2_u32.wgsl.expected.ir.msl | 2 +- .../types/vec3_f16.wgsl.expected.ir.msl | 2 +- .../types/vec3_f32.wgsl.expected.ir.msl | 2 +- .../types/vec3_i32.wgsl.expected.ir.msl | 2 +- .../types/vec3_u32.wgsl.expected.ir.msl | 2 +- .../types/vec4_f16.wgsl.expected.ir.msl | 2 +- .../types/vec4_f32.wgsl.expected.ir.msl | 2 +- .../types/vec4_i32.wgsl.expected.ir.msl | 2 +- .../types/vec4_u32.wgsl.expected.ir.msl | 2 +- .../bug/chromium/1236161.wgsl.expected.ir.msl | 4 +- .../bug/chromium/1251009.wgsl.expected.ir.msl | 16 +- .../bug/chromium/1290107.wgsl.expected.ir.msl | 2 +- .../bug/chromium/1341475.wgsl.expected.ir.msl | 2 +- .../bug/chromium/1372963.wgsl.expected.ir.msl | 2 +- .../bug/chromium/1381883.wgsl.expected.ir.msl | 8 +- .../bug/chromium/1430309.wgsl.expected.ir.msl | 12 +- .../chromium/344265982.wgsl.expected.ir.msl | 8 +- .../1112.wgsl.expected.ir.msl | 14 +- .../1206.wgsl.expected.ir.msl | 6 +- ...local_assign_scalar_x.wgsl.expected.ir.msl | 2 +- ...ocal_assign_scalar_xy.wgsl.expected.ir.msl | 2 +- ...local_assign_scalar_y.wgsl.expected.ir.msl | 2 +- .../local_assign_vector.wgsl.expected.ir.msl | 2 +- ...odule_assign_scalar_x.wgsl.expected.ir.msl | 2 +- ...dule_assign_scalar_xy.wgsl.expected.ir.msl | 2 +- ...odule_assign_scalar_y.wgsl.expected.ir.msl | 2 +- .../module_assign_vector.wgsl.expected.ir.msl | 2 +- .../function_var.wgsl.expected.ir.msl | 2 +- .../private_var.wgsl.expected.ir.msl | 2 +- .../storage_var.wgsl.expected.ir.msl | 2 +- .../loop_call_with_loop.wgsl.expected.ir.msl | 2 +- ...oop_call_with_no_loop.wgsl.expected.ir.msl | 2 +- .../loop_types_all.wgsl.expected.ir.msl | 2 +- .../loop_types_repeated.wgsl.expected.ir.msl | 2 +- .../loop_types_some.wgsl.expected.ir.msl | 2 +- .../no_loop.wgsl.expected.ir.msl | 2 +- .../bug/oss-fuzz/57795.spv.expected.ir.msl | 2 +- test/tint/bug/tint/1046.wgsl.expected.ir.msl | 12 +- .../tint/bug/tint/1061.spvasm.expected.ir.msl | 10 +- test/tint/bug/tint/1064.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1076.wgsl.expected.ir.msl | 16 +- test/tint/bug/tint/1081.wgsl.expected.ir.msl | 14 +- .../tint/bug/tint/1088.spvasm.expected.ir.msl | 16 +- test/tint/bug/tint/1118.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/1121.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/1136.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/1321.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1385.wgsl.expected.ir.msl | 2 +- .../tint/bug/tint/1474-a.wgsl.expected.ir.msl | 2 +- .../tint/bug/tint/1474-b.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1509.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/1518.wgsl.expected.ir.msl | 2 +- .../tint/bug/tint/1520.spvasm.expected.ir.msl | 12 +- test/tint/bug/tint/1534.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/1538.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1540.wgsl.expected.ir.msl | 8 +- test/tint/bug/tint/1541.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/1542.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1557.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1573.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1574.wgsl.expected.ir.msl | 14 +- test/tint/bug/tint/1598.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1604.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1605.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1641.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/1666.wgsl.expected.ir.msl | 8 +- .../tint/bug/tint/1670.spvasm.expected.ir.msl | 2 +- test/tint/bug/tint/1677.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/1725.wgsl.expected.ir.msl | 22 +- test/tint/bug/tint/1735.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1739.wgsl.expected.ir.msl | 18 +- test/tint/bug/tint/1764.wgsl.expected.ir.msl | 12 +- .../tint/bug/tint/1776.spvasm.expected.ir.msl | 2 +- test/tint/bug/tint/1776.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/1820.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1860.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/1875.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/1926.wgsl.expected.ir.msl | 12 +- .../tint/bug/tint/1932.spvasm.expected.ir.msl | 2 +- test/tint/bug/tint/1976.wgsl.expected.ir.msl | 6 +- .../tint/bug/tint/2010.spvasm.expected.ir.msl | 14 +- test/tint/bug/tint/2029.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/2038.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/2039.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/2059.wgsl.expected.ir.msl | 10 +- test/tint/bug/tint/2069.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/2100.wgsl.expected.ir.msl | 18 +- test/tint/bug/tint/2121.wgsl.expected.ir.msl | 10 +- test/tint/bug/tint/2146.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/2147.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/2175.wgsl.expected.ir.msl | 10 +- test/tint/bug/tint/2177.wgsl.expected.ir.msl | 8 +- test/tint/bug/tint/219.spvasm.expected.ir.msl | 2 +- test/tint/bug/tint/2201.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/2202.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/221.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/2237.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/292.wgsl.expected.ir.msl | 12 +- .../bug/tint/349291130.wgsl.expected.ir.msl | 8 +- .../bug/tint/354627692.wgsl.expected.ir.msl | 10 +- .../bug/tint/365570202.wgsl.expected.ir.msl | 2 +- .../bug/tint/366314931.wgsl.expected.ir.msl | 12 +- .../bug/tint/379127084.wgsl.expected.ir.msl | 12 +- .../bug/tint/379684039-2.wgsl.expected.ir.msl | 6 +- .../bug/tint/379684039.wgsl.expected.ir.msl | 8 +- test/tint/bug/tint/403.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/413.spvasm.expected.ir.msl | 2 +- test/tint/bug/tint/453.wgsl.expected.ir.msl | 8 +- test/tint/bug/tint/492.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/534.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/744.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/757.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/824.wgsl.expected.ir.msl | 14 +- test/tint/bug/tint/827.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/870.spvasm.expected.ir.msl | 2 +- test/tint/bug/tint/913.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/914.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/922.wgsl.expected.ir.msl | 18 +- test/tint/bug/tint/942.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/948.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/949.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/959.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/977.spvasm.expected.ir.msl | 6 +- test/tint/bug/tint/978.wgsl.expected.ir.msl | 12 +- test/tint/bug/tint/980.wgsl.expected.ir.msl | 6 +- test/tint/bug/tint/993.wgsl.expected.ir.msl | 2 +- test/tint/bug/tint/998.wgsl.expected.ir.msl | 2 +- .../complex_via_let.wgsl.expected.ir.msl | 2 +- ...lex_via_let_no_struct.wgsl.expected.ir.msl | 2 +- .../deprecated.wgsl.expected.ir.msl | 2 +- .../arrayLength/simple.wgsl.expected.ir.msl | 2 +- .../simple_no_struct.wgsl.expected.ir.msl | 2 +- .../arrayLength/via_let.wgsl.expected.ir.msl | 2 +- .../via_let_complex.wgsl.expected.ir.msl | 2 +- ...let_complex_no_struct.wgsl.expected.ir.msl | 2 +- .../via_let_no_struct.wgsl.expected.ir.msl | 2 +- ...te_subgroup_inclusive.wgsl.expected.ir.msl | 2 +- .../builtins/degrees.spvasm.expected.ir.msl | 2 +- test/tint/builtins/frexp.wgsl.expected.ir.msl | 2 +- .../frexp/scalar/const.wgsl.expected.ir.msl | 2 +- .../scalar/const_members.wgsl.expected.ir.msl | 2 +- .../frexp/scalar/mixed.wgsl.expected.ir.msl | 8 +- .../frexp/scalar/runtime.wgsl.expected.ir.msl | 8 +- .../frexp/vector/const.wgsl.expected.ir.msl | 2 +- .../vector/const_members.wgsl.expected.ir.msl | 2 +- .../frexp/vector/mixed.wgsl.expected.ir.msl | 8 +- .../frexp/vector/runtime.wgsl.expected.ir.msl | 8 +- .../modf/scalar/const.wgsl.expected.ir.msl | 2 +- .../scalar/const_members.wgsl.expected.ir.msl | 2 +- .../modf/scalar/mixed.wgsl.expected.ir.msl | 8 +- .../modf/scalar/runtime.wgsl.expected.ir.msl | 8 +- .../modf/vector/const.wgsl.expected.ir.msl | 2 +- .../vector/const_members.wgsl.expected.ir.msl | 2 +- .../modf/vector/mixed.wgsl.expected.ir.msl | 8 +- .../modf/vector/runtime.wgsl.expected.ir.msl | 8 +- .../builtins/radians.spvasm.expected.ir.msl | 2 +- .../repeated_use.wgsl.expected.ir.msl | 2 +- .../builtins/smoothstep.wgsl.expected.ir.msl | 2 +- .../f32/alpha.wgsl.expected.ir.msl | 2 +- .../f32/blue.wgsl.expected.ir.msl | 2 +- .../f32/green.wgsl.expected.ir.msl | 2 +- .../f32/red.wgsl.expected.ir.msl | 2 +- .../i32/alpha.wgsl.expected.ir.msl | 2 +- .../i32/blue.wgsl.expected.ir.msl | 2 +- .../i32/green.wgsl.expected.ir.msl | 2 +- .../i32/red.wgsl.expected.ir.msl | 2 +- .../u32/alpha.wgsl.expected.ir.msl | 2 +- .../u32/blue.wgsl.expected.ir.msl | 2 +- .../u32/green.wgsl.expected.ir.msl | 2 +- .../u32/red.wgsl.expected.ir.msl | 2 +- ...exture_external_param.wgsl.expected.ir.msl | 16 +- .../texture_param.wgsl.expected.ir.msl | 28 +- .../const/global/global.wgsl.expected.ir.msl | 12 +- .../inferred/function.wgsl.expected.ir.msl | 12 +- .../case_body_attribute.wgsl.expected.ir.msl | 8 +- ...d_statement_attribute.wgsl.expected.ir.msl | 8 +- ...t_case_body_attribute.wgsl.expected.ir.msl | 8 +- .../directive.wgsl.expected.ir.msl | 8 +- .../else_body_attribute.wgsl.expected.ir.msl | 8 +- ...lse_if_body_attribute.wgsl.expected.ir.msl | 8 +- .../for_loop_attribute.wgsl.expected.ir.msl | 8 +- ...r_loop_body_attribute.wgsl.expected.ir.msl | 8 +- .../function_attribute.wgsl.expected.ir.msl | 8 +- ...nction_body_attribute.wgsl.expected.ir.msl | 8 +- .../if_body_attribute.wgsl.expected.ir.msl | 8 +- ...f_statement_attribute.wgsl.expected.ir.msl | 8 +- .../loop_attribute.wgsl.expected.ir.msl | 8 +- .../loop_body_attribute.wgsl.expected.ir.msl | 8 +- ..._continuing_attribute.wgsl.expected.ir.msl | 8 +- ...switch_body_attribute.wgsl.expected.ir.msl | 8 +- ...h_statement_attribute.wgsl.expected.ir.msl | 8 +- .../while_loop_attribute.wgsl.expected.ir.msl | 8 +- ...e_loop_body_attribute.wgsl.expected.ir.msl | 8 +- .../mul/mat3x2-vec3/f16.wgsl.expected.ir.msl | 8 +- .../mul/mat3x2-vec3/f32.wgsl.expected.ir.msl | 8 +- .../mul/mat3x3-vec3/f16.wgsl.expected.ir.msl | 14 +- .../mul/mat3x3-vec3/f32.wgsl.expected.ir.msl | 14 +- .../mul/vec3-mat3x3/f16.wgsl.expected.ir.msl | 14 +- .../mul/vec3-mat3x3/f32.wgsl.expected.ir.msl | 14 +- .../mul/vec3-mat4x3/f16.wgsl.expected.ir.msl | 16 +- .../mul/vec3-mat4x3/f32.wgsl.expected.ir.msl | 16 +- ...clip_distances_size_1.wgsl.expected.ir.msl | 14 +- ...clip_distances_size_2.wgsl.expected.ir.msl | 16 +- ...clip_distances_size_3.wgsl.expected.ir.msl | 18 +- ...clip_distances_size_4.wgsl.expected.ir.msl | 20 +- ...clip_distances_size_5.wgsl.expected.ir.msl | 22 +- ...clip_distances_size_6.wgsl.expected.ir.msl | 24 +- ...clip_distances_size_7.wgsl.expected.ir.msl | 26 +- ...clip_distances_size_8.wgsl.expected.ir.msl | 28 +- ...clip_distances_size_1.wgsl.expected.ir.msl | 14 +- ...clip_distances_size_2.wgsl.expected.ir.msl | 16 +- ...clip_distances_size_3.wgsl.expected.ir.msl | 18 +- ...clip_distances_size_4.wgsl.expected.ir.msl | 20 +- ...clip_distances_size_5.wgsl.expected.ir.msl | 22 +- ...clip_distances_size_6.wgsl.expected.ir.msl | 24 +- ...clip_distances_size_7.wgsl.expected.ir.msl | 26 +- ...clip_distances_size_8.wgsl.expected.ir.msl | 28 +- .../parsing/basic.wgsl.expected.ir.msl | 12 +- ...duplicated_extensions.wgsl.expected.ir.msl | 12 +- .../parsing/multiple.wgsl.expected.ir.msl | 12 +- .../underscore/double/fn.wgsl.expected.ir.msl | 2 +- .../double/parameter.wgsl.expected.ir.msl | 2 +- .../prefix/lower/fn.wgsl.expected.ir.msl | 2 +- .../lower/parameter.wgsl.expected.ir.msl | 2 +- .../prefix/upper/fn.wgsl.expected.ir.msl | 2 +- .../upper/parameter.wgsl.expected.ir.msl | 2 +- .../inferred/function.wgsl.expected.ir.msl | 12 +- .../multiple_continues.wgsl.expected.ir.msl | 2 +- ..._continues_robustness.wgsl.expected.ir.msl | 2 +- .../multiple_switch.wgsl.expected.ir.msl | 2 +- ...ple_switch_robustness.wgsl.expected.ir.msl | 2 +- ...sted_loop_loop_switch.wgsl.expected.ir.msl | 2 +- ...oop_switch_robustness.wgsl.expected.ir.msl | 2 +- ...op_switch_loop_switch.wgsl.expected.ir.msl | 2 +- ...oop_switch_robustness.wgsl.expected.ir.msl | 2 +- ...ch_loop_switch_switch.wgsl.expected.ir.msl | 2 +- ...tch_switch_robustness.wgsl.expected.ir.msl | 2 +- ...ed_loop_switch_switch.wgsl.expected.ir.msl | 2 +- ...tch_switch_robustness.wgsl.expected.ir.msl | 2 +- .../single_continue.wgsl.expected.ir.msl | 2 +- ...e_continue_robustness.wgsl.expected.ir.msl | 2 +- .../access/matrix.spvasm.expected.ir.msl | 2 +- .../access/matrix.wgsl.expected.ir.msl | 2 +- .../copy/ptr_copy.spvasm.expected.ir.msl | 2 +- .../load/global/i32.spvasm.expected.ir.msl | 2 +- .../load/global/i32.wgsl.expected.ir.msl | 2 +- .../struct_field.spvasm.expected.ir.msl | 2 +- .../global/struct_field.wgsl.expected.ir.msl | 2 +- .../load/local/i32.spvasm.expected.ir.msl | 2 +- .../load/local/i32.wgsl.expected.ir.msl | 2 +- .../local/ptr_function.wgsl.expected.ir.msl | 2 +- .../local/ptr_private.wgsl.expected.ir.msl | 2 +- .../local/ptr_storage.wgsl.expected.ir.msl | 2 +- .../local/ptr_uniform.wgsl.expected.ir.msl | 2 +- .../local/ptr_workgroup.wgsl.expected.ir.msl | 12 +- .../local/struct_field.spvasm.expected.ir.msl | 2 +- .../local/struct_field.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 2 +- .../param/function/i32.wgsl.expected.ir.msl | 2 +- .../i32_in_struct.wgsl.expected.ir.msl | 2 +- .../struct_in_array.wgsl.expected.ir.msl | 2 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 2 +- .../function/vec4_f32.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 2 +- .../param/private/i32.wgsl.expected.ir.msl | 2 +- .../i32_in_struct.wgsl.expected.ir.msl | 2 +- .../struct_in_array.wgsl.expected.ir.msl | 2 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 2 +- .../private/vec4_f32.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 2 +- .../load/param/ptr.spvasm.expected.ir.msl | 2 +- .../load/param/ptr.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 2 +- .../param/storage/i32.wgsl.expected.ir.msl | 2 +- .../i32_in_struct.wgsl.expected.ir.msl | 2 +- .../struct_in_array.wgsl.expected.ir.msl | 2 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 2 +- .../storage/vec4_f32.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 2 +- .../param/uniform/i32.wgsl.expected.ir.msl | 2 +- .../i32_in_struct.wgsl.expected.ir.msl | 2 +- .../struct_in_array.wgsl.expected.ir.msl | 2 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 2 +- .../uniform/vec4_f32.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 12 +- .../param/workgroup/i32.wgsl.expected.ir.msl | 12 +- .../i32_in_struct.wgsl.expected.ir.msl | 12 +- .../struct_in_array.wgsl.expected.ir.msl | 12 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 12 +- .../workgroup/vec4_f32.wgsl.expected.ir.msl | 12 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 12 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 12 +- .../store/global/i32.spvasm.expected.ir.msl | 2 +- .../store/global/i32.wgsl.expected.ir.msl | 2 +- .../struct_field.spvasm.expected.ir.msl | 2 +- .../store/local/i32.spvasm.expected.ir.msl | 2 +- .../store/local/i32.wgsl.expected.ir.msl | 2 +- .../local/struct_field.spvasm.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 2 +- .../param/function/i32.wgsl.expected.ir.msl | 2 +- .../i32_in_struct.wgsl.expected.ir.msl | 2 +- .../struct_in_array.wgsl.expected.ir.msl | 2 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 2 +- .../function/vec4_f32.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 2 +- .../param/private/i32.wgsl.expected.ir.msl | 2 +- .../i32_in_struct.wgsl.expected.ir.msl | 2 +- .../struct_in_array.wgsl.expected.ir.msl | 2 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 2 +- .../private/vec4_f32.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 2 +- .../store/param/ptr.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 2 +- .../param/storage/i32.wgsl.expected.ir.msl | 2 +- .../i32_in_struct.wgsl.expected.ir.msl | 2 +- .../struct_in_array.wgsl.expected.ir.msl | 2 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 2 +- .../storage/vec4_f32.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 2 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 2 +- .../array_in_struct.wgsl.expected.ir.msl | 12 +- .../param/workgroup/i32.wgsl.expected.ir.msl | 12 +- .../i32_in_struct.wgsl.expected.ir.msl | 12 +- .../struct_in_array.wgsl.expected.ir.msl | 12 +- .../vec2_f32_in_mat2x2.wgsl.expected.ir.msl | 12 +- .../workgroup/vec4_f32.wgsl.expected.ir.msl | 12 +- .../vec4_f32_in_mat2x4.wgsl.expected.ir.msl | 12 +- .../vec4_f32_in_struct.wgsl.expected.ir.msl | 12 +- .../tint/ptr_sugar/array.wgsl.expected.ir.msl | 2 +- .../builtin_struct.wgsl.expected.ir.msl | 2 +- ...compound_assign_index.wgsl.expected.ir.msl | 2 +- ...ompound_assign_member.wgsl.expected.ir.msl | 2 +- .../ptr_sugar/matrix.wgsl.expected.ir.msl | 2 +- .../ptr_sugar/struct.wgsl.expected.ir.msl | 2 +- .../vector_index.wgsl.expected.ir.msl | 2 +- .../vector_member.wgsl.expected.ir.msl | 2 +- .../vector_swizzle.wgsl.expected.ir.msl | 14 +- .../samples/function.wgsl.expected.ir.msl | 4 +- test/tint/samples/simple.wgsl.expected.ir.msl | 12 +- .../simple_vertex.spvasm.expected.ir.msl | 10 +- .../renamer/function.wgsl.expected.ir.msl | 26 +- .../renamer/renamer.wgsl.expected.ir.msl | 14 +- .../renamer/type.wgsl.expected.ir.msl | 26 +- .../in_for_loop_body.wgsl.expected.ir.msl | 2 +- ...n_for_loop_continuing.wgsl.expected.ir.msl | 2 +- .../in_for_loop_init.wgsl.expected.ir.msl | 2 +- ...with_side_effect_func.wgsl.expected.ir.msl | 6 +- .../struct_array.wgsl.expected.ir.msl | 2 +- .../struct_array_array.wgsl.expected.ir.msl | 2 +- .../struct_array_struct.wgsl.expected.ir.msl | 2 +- ...ct_array_struct_array.wgsl.expected.ir.msl | 2 +- .../struct_dynamic_array.wgsl.expected.ir.msl | 2 +- ...ic_array_struct_array.wgsl.expected.ir.msl | 2 +- .../struct_matrix.wgsl.expected.ir.msl | 2 +- ...truct_multiple_arrays.wgsl.expected.ir.msl | 2 +- .../struct_struct_array.wgsl.expected.ir.msl | 2 +- .../struct_vector.wgsl.expected.ir.msl | 2 +- .../vector_assign.wgsl.expected.ir.msl | 2 +- .../via_pointer.wgsl.expected.ir.msl | 2 +- .../via_pointer_arg.wgsl.expected.ir.msl | 2 +- ..._of_non_constructable.wgsl.expected.ir.msl | 2 +- ...addr_of_runtime_array.wgsl.expected.ir.msl | 2 +- .../assign/phony/call.wgsl.expected.ir.msl | 2 +- ...multiple_side_effects.wgsl.expected.ir.msl | 8 +- .../phony/storage_buffer.wgsl.expected.ir.msl | 2 +- .../phony/uniform_buffer.wgsl.expected.ir.msl | 2 +- .../complex_lhs.wgsl.expected.ir.msl | 10 +- .../array_element.wgsl.expected.ir.msl | 8 +- .../decrement/complex.wgsl.expected.ir.msl | 36 +- .../for_loop_continuing.wgsl.expected.ir.msl | 2 +- .../for_loop_initializer.wgsl.expected.ir.msl | 2 +- .../decrement/function.wgsl.expected.ir.msl | 2 +- .../decrement/private.wgsl.expected.ir.msl | 2 +- .../decrement/split.wgsl.expected.ir.msl | 2 +- .../decrement/storage.wgsl.expected.ir.msl | 2 +- .../vector_component.wgsl.expected.ir.msl | 2 +- .../decrement/workgroup.wgsl.expected.ir.msl | 2 +- .../helper_functions.wgsl.expected.ir.msl | 2 +- .../multiple_returns.wgsl.expected.ir.msl | 14 +- .../nested_return.wgsl.expected.ir.msl | 2 +- .../discard/non_uniform.wgsl.expected.ir.msl | 6 +- .../array_element.wgsl.expected.ir.msl | 8 +- .../increment/complex.wgsl.expected.ir.msl | 36 +- .../for_loop_continuing.wgsl.expected.ir.msl | 2 +- .../for_loop_initializer.wgsl.expected.ir.msl | 2 +- .../increment/function.wgsl.expected.ir.msl | 2 +- .../increment/private.wgsl.expected.ir.msl | 2 +- .../increment/storage.wgsl.expected.ir.msl | 2 +- .../vector_component.wgsl.expected.ir.msl | 2 +- .../increment/workgroup.wgsl.expected.ir.msl | 2 +- .../type_initializer.wgsl.expected.ir.msl | 6 +- .../buffers/storage.wgsl.expected.ir.msl | 6 +- .../buffers/uniform.wgsl.expected.ir.msl | 2 +- ...on_scope_declarations.wgsl.expected.ir.msl | 2 +- ...scope_var_conversions.wgsl.expected.ir.msl | 2 +- .../functions/parameters.wgsl.expected.ir.msl | 2 +- .../return_types.wgsl.expected.ir.msl | 2 +- ...ompute_input_builtins.wgsl.expected.ir.msl | 6 +- ...input_builtins_struct.wgsl.expected.ir.msl | 6 +- .../compute_input_mixed.wgsl.expected.ir.msl | 8 +- ...ute_subgroup_builtins.wgsl.expected.ir.msl | 6 +- ...group_builtins_struct.wgsl.expected.ir.msl | 6 +- ..._workgroup_expression.wgsl.expected.ir.msl | 2 +- ...agment_input_builtins.wgsl.expected.ir.msl | 6 +- ...input_builtins_struct.wgsl.expected.ir.msl | 6 +- ...gment_input_locations.wgsl.expected.ir.msl | 8 +- ...t_input_locations_f16.wgsl.expected.ir.msl | 8 +- ...nput_locations_struct.wgsl.expected.ir.msl | 8 +- ..._locations_struct_f16.wgsl.expected.ir.msl | 8 +- .../fragment_input_mixed.wgsl.expected.ir.msl | 10 +- ...gment_input_mixed_f16.wgsl.expected.ir.msl | 10 +- ...utput_builtins_struct.wgsl.expected.ir.msl | 14 +- ...tput_locations_struct.wgsl.expected.ir.msl | 18 +- ..._locations_struct_f16.wgsl.expected.ir.msl | 22 +- ...fragment_output_mixed.wgsl.expected.ir.msl | 22 +- ...ment_output_mixed_f16.wgsl.expected.ir.msl | 26 +- ...ent_subgroup_builtins.wgsl.expected.ir.msl | 6 +- ...group_builtins_struct.wgsl.expected.ir.msl | 6 +- ...late_input_parameters.wgsl.expected.ir.msl | 8 +- ...erpolate_input_struct.wgsl.expected.ir.msl | 8 +- ...rpolate_return_struct.wgsl.expected.ir.msl | 28 +- .../shader_io/invariant.wgsl.expected.ir.msl | 12 +- ...variant_struct_member.wgsl.expected.ir.msl | 10 +- ...vertex_input_builtins.wgsl.expected.ir.msl | 12 +- ...input_builtins_struct.wgsl.expected.ir.msl | 12 +- ...ertex_input_locations.wgsl.expected.ir.msl | 14 +- ...x_input_locations_f16.wgsl.expected.ir.msl | 14 +- ...nput_locations_struct.wgsl.expected.ir.msl | 14 +- ..._locations_struct_f16.wgsl.expected.ir.msl | 14 +- .../vertex_input_mixed.wgsl.expected.ir.msl | 16 +- ...ertex_input_mixed_f16.wgsl.expected.ir.msl | 16 +- ...ertex_output_builtins.wgsl.expected.ir.msl | 12 +- ...utput_builtins_struct.wgsl.expected.ir.msl | 10 +- ...tput_locations_struct.wgsl.expected.ir.msl | 20 +- ..._locations_struct_f16.wgsl.expected.ir.msl | 24 +- .../module_scope_const.wgsl.expected.ir.msl | 2 +- ..._private_initializers.wgsl.expected.ir.msl | 2 +- ...ope_used_in_functions.wgsl.expected.ir.msl | 12 +- .../module_scope_var.wgsl.expected.ir.msl | 12 +- ...scope_var_conversions.wgsl.expected.ir.msl | 2 +- ...cope_var_initializers.wgsl.expected.ir.msl | 2 +- ...e_scope_vars_pointers.wgsl.expected.ir.msl | 12 +- test/tint/types/sampler.wgsl.expected.ir.msl | 2 +- .../short_names.wgsl.expected.ir.msl | 12 +- .../types/struct_members.wgsl.expected.ir.msl | 2 +- .../texture/depth/2d.wgsl.expected.ir.msl | 6 +- .../depth/2d_array.wgsl.expected.ir.msl | 6 +- .../texture/depth/cube.wgsl.expected.ir.msl | 6 +- .../depth/cube_array.wgsl.expected.ir.msl | 6 +- .../multisampled/2d.wgsl.expected.ir.msl | 2 +- .../texture/sampled/1d.wgsl.expected.ir.msl | 2 +- .../texture/sampled/2d.wgsl.expected.ir.msl | 14 +- .../sampled/2d_array.wgsl.expected.ir.msl | 14 +- .../texture/sampled/3d.wgsl.expected.ir.msl | 14 +- .../texture/sampled/cube.wgsl.expected.ir.msl | 14 +- .../sampled/cube_array.wgsl.expected.ir.msl | 14 +- .../texture/storage/1d.wgsl.expected.ir.msl | 2 +- .../texture/storage/2d.wgsl.expected.ir.msl | 2 +- .../storage/2d_array.wgsl.expected.ir.msl | 2 +- .../texture/storage/3d.wgsl.expected.ir.msl | 2 +- .../unicode/comments.wgsl.expected.ir.msl | 2 +- .../unicode/identifiers.wgsl.expected.ir.msl | 10 +- .../inferred/function.wgsl.expected.ir.msl | 12 +- .../array/array_i32.wgsl.expected.ir.msl | 2 +- .../function/array/i32.wgsl.expected.ir.msl | 2 +- .../function/matrix.wgsl.expected.ir.msl | 2 +- .../nested_structs.wgsl.expected.ir.msl | 2 +- .../function/scalar.wgsl.expected.ir.msl | 2 +- .../function/struct.wgsl.expected.ir.msl | 2 +- .../function/vector.wgsl.expected.ir.msl | 2 +- .../array/array_i32.wgsl.expected.ir.msl | 2 +- .../private/array/i32.wgsl.expected.ir.msl | 2 +- .../private/matrix.wgsl.expected.ir.msl | 2 +- .../nested_structs.wgsl.expected.ir.msl | 2 +- .../private/scalar.wgsl.expected.ir.msl | 2 +- .../private/struct.wgsl.expected.ir.msl | 2 +- .../private/vector.wgsl.expected.ir.msl | 2 +- .../array/array_i32.wgsl.expected.ir.msl | 12 +- .../workgroup/array/i32.wgsl.expected.ir.msl | 12 +- .../array/u32_large.wgsl.expected.ir.msl | 12 +- .../array/u32_small.wgsl.expected.ir.msl | 12 +- .../workgroup/matrix.wgsl.expected.ir.msl | 12 +- .../workgroup/scalar.wgsl.expected.ir.msl | 12 +- .../workgroup/struct.wgsl.expected.ir.msl | 12 +- .../workgroup/vector.wgsl.expected.ir.msl | 12 +- .../named/no_init/bool.wgsl.expected.ir.msl | 2 +- .../named/no_init/f32.wgsl.expected.ir.msl | 2 +- .../named/no_init/i32.wgsl.expected.ir.msl | 2 +- .../named/no_init/u32.wgsl.expected.ir.msl | 2 +- .../named/val_init/bool.wgsl.expected.ir.msl | 2 +- .../named/val_init/f32.wgsl.expected.ir.msl | 2 +- .../named/val_init/i32.wgsl.expected.ir.msl | 2 +- .../named/val_init/u32.wgsl.expected.ir.msl | 2 +- .../named/zero_init/bool.wgsl.expected.ir.msl | 2 +- .../named/zero_init/f32.wgsl.expected.ir.msl | 2 +- .../named/zero_init/i32.wgsl.expected.ir.msl | 2 +- .../named/zero_init/u32.wgsl.expected.ir.msl | 2 +- .../no_init/bool.wgsl.expected.ir.msl | 2 +- .../numbered/no_init/f32.wgsl.expected.ir.msl | 2 +- .../numbered/no_init/i32.wgsl.expected.ir.msl | 2 +- .../numbered/no_init/u32.wgsl.expected.ir.msl | 2 +- .../val_init/bool.wgsl.expected.ir.msl | 2 +- .../val_init/f32.wgsl.expected.ir.msl | 2 +- .../val_init/i32.wgsl.expected.ir.msl | 2 +- .../val_init/u32.wgsl.expected.ir.msl | 2 +- .../zero_init/bool.wgsl.expected.ir.msl | 2 +- .../zero_init/f32.wgsl.expected.ir.msl | 2 +- .../zero_init/i32.wgsl.expected.ir.msl | 2 +- .../zero_init/u32.wgsl.expected.ir.msl | 2 +- .../uses/instance_index.wgsl.expected.ir.msl | 12 +- 624 files changed, 2399 insertions(+), 2012 deletions(-) diff --git a/src/dawn/native/metal/ShaderModuleMTL.mm b/src/dawn/native/metal/ShaderModuleMTL.mm index ef7ae6d67c8..1584bf22b4c 100644 --- a/src/dawn/native/metal/ShaderModuleMTL.mm +++ b/src/dawn/native/metal/ShaderModuleMTL.mm @@ -51,6 +51,9 @@ namespace dawn::native::metal { namespace { +// The name to use when remapping entry points. +constexpr char kRemappedEntryPointName[] = "dawn_entry_point"; + using OptionalVertexPullingTransformConfig = std::optional; @@ -274,6 +277,11 @@ req.disableSymbolRenaming = device->IsToggleEnabled(Toggle::DisableSymbolRenaming); req.platform = UnsafeUnkeyedValue(device->GetPlatform()); + req.use_tint_ir = device->IsToggleEnabled(Toggle::UseTintIR); + if (req.use_tint_ir) { + req.tintOptions.strip_all_names = !req.disableSymbolRenaming; + req.tintOptions.remapped_entry_point_name = kRemappedEntryPointName; + } req.tintOptions.disable_robustness = !device->IsRobustnessEnabled(); req.tintOptions.buffer_size_ubo_index = kBufferLengthBufferSlot; req.tintOptions.fixed_sample_mask = sampleMask; @@ -286,7 +294,6 @@ req.tintOptions.array_length_from_uniform = std::move(arrayLengthFromUniform); req.tintOptions.pixel_local_attachments = std::move(pixelLocalAttachments); req.tintOptions.bindings = std::move(bindings); - req.use_tint_ir = device->IsToggleEnabled(Toggle::UseTintIR); req.tintOptions.disable_polyfill_integer_div_mod = device->IsToggleEnabled(Toggle::DisablePolyfillsOnIntegerDivisonAndModulo); @@ -297,7 +304,6 @@ DAWN_TRY_LOAD_OR_RUN( mslCompilation, device, std::move(req), MslCompilation::FromBlob, [](MslCompilationRequest r) -> ResultOrError { - constexpr char kRemappedEntryPointName[] = "dawn_entry_point"; tint::ast::transform::Manager transformManager; tint::ast::transform::DataMap transformInputs; @@ -307,14 +313,16 @@ transformManager.Add(); transformInputs.Add(r.entryPointName); - // Needs to run before all other transforms so that they can use builtin names safely. - tint::ast::transform::Renamer::Remappings requestedNames = { - {r.entryPointName, kRemappedEntryPointName}}; - transformManager.Add(); - transformInputs.Add( - r.disableSymbolRenaming ? tint::ast::transform::Renamer::Target::kMslKeywords - : tint::ast::transform::Renamer::Target::kAll, - std::move(requestedNames)); + if (!r.use_tint_ir) { + // Needs to run before other transforms so that they can use builtin names safely. + tint::ast::transform::Renamer::Remappings requestedNames = { + {r.entryPointName, kRemappedEntryPointName}}; + transformManager.Add(); + transformInputs.Add( + r.disableSymbolRenaming ? tint::ast::transform::Renamer::Target::kMslKeywords + : tint::ast::transform::Renamer::Target::kAll, + std::move(requestedNames)); + } if (r.vertexPullingTransformConfig) { transformManager.Add(); diff --git a/src/tint/cmd/tint/main.cc b/src/tint/cmd/tint/main.cc index 14b85cdc185..d47cacd1ad0 100644 --- a/src/tint/cmd/tint/main.cc +++ b/src/tint/cmd/tint/main.cc @@ -593,6 +593,10 @@ When specified, automatically enables HLSL validation)", tint::ast::transform::DataMap& transform_inputs) { switch (options.format) { case Format::kMsl: { + if (options.use_ir) { + // Renaming is handled in the backend. + break; + } if (!options.rename_all) { transform_inputs.Add( tint::ast::transform::Renamer::Target::kMslKeywords); @@ -888,8 +892,12 @@ bool GenerateMsl([[maybe_unused]] Options& options, input_program = std::move(flattened.value()); } - // TODO(jrprice): Provide a way for the user to set non-default options. + // Set up the backend options. tint::msl::writer::Options gen_options; + if (options.rename_all) { + gen_options.remapped_entry_point_name = "tint_entry_point"; + gen_options.strip_all_names = true; + } gen_options.disable_robustness = !options.enable_robustness; gen_options.disable_workgroup_init = options.disable_workgroup_init; gen_options.pixel_local_attachments = options.pixel_local_attachments; diff --git a/src/tint/lang/msl/writer/common/options.h b/src/tint/lang/msl/writer/common/options.h index 5e744265e33..18f31e8abc6 100644 --- a/src/tint/lang/msl/writer/common/options.h +++ b/src/tint/lang/msl/writer/common/options.h @@ -28,6 +28,8 @@ #ifndef SRC_TINT_LANG_MSL_WRITER_COMMON_OPTIONS_H_ #define SRC_TINT_LANG_MSL_WRITER_COMMON_OPTIONS_H_ +#include +#include #include #include "src/tint/api/common/binding_point.h" @@ -135,6 +137,12 @@ struct Options { /// @returns this Options Options& operator=(const Options&); + /// An optional remapped name to use when emitting the entry point. + std::optional remapped_entry_point_name = {}; + + /// Set to `true` to strip all user-declared identifiers from the module. + bool strip_all_names = false; + /// Set to `true` to disable software robustness that prevents out-of-bounds accesses. bool disable_robustness = false; @@ -171,6 +179,8 @@ struct Options { /// Reflect the fields of this class so that it can be used by tint::ForeachField() TINT_REFLECT(Options, + remapped_entry_point_name, + strip_all_names, disable_robustness, disable_workgroup_init, disable_demote_to_helper, diff --git a/src/tint/lang/msl/writer/function_test.cc b/src/tint/lang/msl/writer/function_test.cc index 779ac0cc53e..9aea912fa11 100644 --- a/src/tint/lang/msl/writer/function_test.cc +++ b/src/tint/lang/msl/writer/function_test.cc @@ -100,8 +100,8 @@ fragment void foo(device int* storage_var [[buffer(1)]], const constant int* uni TEST_F(MslWriterTest, EntryPointParameterHandleBindingPoint) { auto* t = ty.Get(core::type::TextureDimension::k2d, ty.f32()); - auto* texture = b.Var("texture", ty.ptr(t)); - auto* sampler = b.Var("sampler", ty.ptr(ty.sampler())); + auto* texture = b.Var("t", ty.ptr(t)); + auto* sampler = b.Var("s", ty.ptr(ty.sampler())); texture->SetBindingPoint(0, 1); sampler->SetBindingPoint(0, 2); mod.root_block->Append(texture); @@ -119,12 +119,12 @@ TEST_F(MslWriterTest, EntryPointParameterHandleBindingPoint) { using namespace metal; struct tint_module_vars_struct { - texture2d texture; - sampler sampler; + texture2d t; + sampler s; }; -fragment void foo(texture2d texture [[texture(1)]], sampler sampler [[sampler(2)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.texture=texture, .sampler=sampler}; +fragment void foo(texture2d t [[texture(1)]], sampler s [[sampler(2)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; } )"); } diff --git a/src/tint/lang/msl/writer/printer/printer.cc b/src/tint/lang/msl/writer/printer/printer.cc index 6a9daf1e8c9..f7f20536588 100644 --- a/src/tint/lang/msl/writer/printer/printer.cc +++ b/src/tint/lang/msl/writer/printer/printer.cc @@ -110,6 +110,9 @@ using namespace tint::core::fluent_types; // NOLINT namespace tint::msl::writer { namespace { +/// @returns true if @p ident is an MSL keyword that needs to be avoided +bool IsKeyword(std::string_view ident); + /// PIMPL class for the MSL generator class Printer : public tint::TextGenerator { public: @@ -159,15 +162,12 @@ class Printer : public tint::TextGenerator { /// The result of printing the module. Output result_; - /// Map of builtin structure to unique generated name - Hashmap builtin_struct_names_; - core::ir::Module& ir_; /// MSL writer options Options options_; - /// A hashmap of value to name - Hashmap names_; + /// A hashmap of object to name. + Hashmap names_; /// The buffer holding preamble text TextBuffer preamble_buffer_; @@ -316,7 +316,12 @@ class Printer : public tint::TextGenerator { { auto out = Line(); + // Remap the entry point name if requested. auto func_name = NameOf(func); + if (func->IsEntryPoint() && options_.remapped_entry_point_name) { + func_name = *options_.remapped_entry_point_name; + TINT_ASSERT(!IsKeyword(func_name) && !func_name.empty()); + } switch (func->Stage()) { case core::ir::Function::PipelineStage::kCompute: { @@ -883,7 +888,7 @@ class Printer : public tint::TextGenerator { [&](const core::type::Struct* s) { auto* c = index->As(); auto* member = s->Members()[c->Value()->ValueAs()]; - out << "." << member->Name().Name(); + out << "." << NameOf(member); current_type = member->Type(); }, [&](const core::type::Vector*) { // @@ -1223,7 +1228,7 @@ class Printer : public tint::TextGenerator { } // Emit field designators for structures so that we can skip padding members and // arguments that are `undef` or `unused` values. - auto name = struct_ty->Members()[i]->Name().Name(); + auto name = NameOf(struct_ty->Members()[i]); out << "." << name << "="; EmitAndTakeAddressIfNeeded(out, arg); needs_comma = true; @@ -1505,7 +1510,7 @@ class Printer : public tint::TextGenerator { uint32_t msl_offset = 0; for (auto* mem : str->Members()) { auto out = Line(&str_buf); - auto mem_name = mem->Name().Name(); + auto mem_name = NameOf(mem); auto ir_offset = mem->Offset(); if (is_host_shareable) { @@ -1729,7 +1734,7 @@ class Printer : public tint::TextGenerator { if (i > 0) { out << ", "; } - out << "." << members[i]->Name().Name() << "="; + out << "." << NameOf(members[i]) << "="; EmitConstant(out, c->Index(i)); } }, // @@ -1765,17 +1770,38 @@ class Printer : public tint::TextGenerator { TINT_ICE_ON_NO_MATCH); } + /// @returns `true` if @p ident should be renamed + bool ShouldRename(std::string_view ident) { + return options_.strip_all_names || IsKeyword(ident) || !tint::utf8::IsASCII(ident); + } + /// @param s the structure /// @returns the name of the structure, taking special care of builtin structures that start /// with double underscores. If the structure is a builtin, then the returned name will be a /// unique name without the leading underscores. std::string StructName(const core::type::Struct* s) { - auto name = s->Name().Name(); - if (HasPrefix(name, "__")) { - name = - builtin_struct_names_.GetOrAdd(s, [&] { return UniqueIdentifier(name.substr(2)); }); - } - return name; + return names_.GetOrAdd(s, [&] { + auto name = s->Name().Name(); + if (HasPrefix(name, "__")) { + name = UniqueIdentifier(name.substr(2)); + } + if (ShouldRename(name)) { + return UniqueIdentifier("tint_struct"); + } + return name; + }); + } + + /// @param m the struct member + /// @returns the name to use for the struct member + std::string NameOf(const core::type::StructMember* m) { + return names_.GetOrAdd(m, [&] { + auto name = m->Name().Name(); + if (ShouldRename(name)) { + return UniqueIdentifier("tint_member"); + } + return name; + }); } /// @param value the value to get the name of @@ -1783,21 +1809,299 @@ class Printer : public tint::TextGenerator { /// the module. std::string NameOf(const core::ir::Value* value) { return names_.GetOrAdd(value, [&] { - if (auto sym = ir_.NameOf(value); sym.IsValid()) { - return sym.Name(); + auto sym = ir_.NameOf(value); + if (!sym || ShouldRename(sym.NameView())) { + return UniqueIdentifier("v"); } - return UniqueIdentifier("v"); + return sym.Name(); }); } /// @return a new, unique identifier with the given prefix. - /// @param prefix optional prefix to apply to the generated identifier. If empty - /// "tint_symbol" will be used. - std::string UniqueIdentifier(const std::string& prefix /* = "" */) { + /// @param prefix prefix to apply to the generated identifier + std::string UniqueIdentifier(const std::string& prefix) { return ir_.symbols.New(prefix).Name(); } }; +// This list is used for a binary search and must be kept in sorted order. +const char* const kReservedKeywordsMSL[] = { + "HUGE_VALF", + "HUGE_VALH", + "INFINITY", + "MAXFLOAT", + "MAXHALF", + "M_1_PI_F", + "M_1_PI_H", + "M_2_PI_F", + "M_2_PI_H", + "M_2_SQRTPI_F", + "M_2_SQRTPI_H", + "M_E_F", + "M_E_H", + "M_LN10_F", + "M_LN10_H", + "M_LN2_F", + "M_LN2_H", + "M_LOG10E_F", + "M_LOG10E_H", + "M_LOG2E_F", + "M_LOG2E_H", + "M_PI_2_F", + "M_PI_2_H", + "M_PI_4_F", + "M_PI_4_H", + "M_PI_F", + "M_PI_H", + "M_SQRT1_2_F", + "M_SQRT1_2_H", + "M_SQRT2_F", + "M_SQRT2_H", + "NAN", + "access", + "alignas", + "alignof", + "and", + "and_eq", + "array", + "array_ref", + "as_type", + "asm", + "atomic", + "atomic_bool", + "atomic_int", + "atomic_uint", + "auto", + "bitand", + "bitor", + "bool", + "bool2", + "bool3", + "bool4", + "break", + "buffer", + "case", + "catch", + "char", + "char16_t", + "char2", + "char3", + "char32_t", + "char4", + "class", + "compl", + "const", + "const_cast", + "const_reference", + "constant", + "constexpr", + "continue", + "decltype", + "default", + "delete", + "depth2d", + "depth2d_array", + "depth2d_ms", + "depth2d_ms_array", + "depthcube", + "depthcube_array", + "device", + "discard_fragment", + "do", + "double", + "dynamic_cast", + "else", + "enum", + "explicit", + "extern", + "false", + "final", + "float", + "float2", + "float2x2", + "float2x3", + "float2x4", + "float3", + "float3x2", + "float3x3", + "float3x4", + "float4", + "float4x2", + "float4x3", + "float4x4", + "for", + "fragment", + "friend", + "goto", + "half", + "half2", + "half2x2", + "half2x3", + "half2x4", + "half3", + "half3x2", + "half3x3", + "half3x4", + "half4", + "half4x2", + "half4x3", + "half4x4", + "if", + "imageblock", + "infinity", + "inline", + "int", + "int16_t", + "int2", + "int3", + "int32_t", + "int4", + "int64_t", + "int8_t", + "kernel", + "long", + "long2", + "long3", + "long4", + "main", + "matrix", + "metal", + "mutable", + "namespace", + "new", + "noexcept", + "not", + "not_eq", + "nullptr", + "operator", + "or", + "or_eq", + "override", + "packed_bool2", + "packed_bool3", + "packed_bool4", + "packed_char2", + "packed_char3", + "packed_char4", + "packed_float2", + "packed_float3", + "packed_float4", + "packed_half2", + "packed_half3", + "packed_half4", + "packed_int2", + "packed_int3", + "packed_int4", + "packed_short2", + "packed_short3", + "packed_short4", + "packed_uchar2", + "packed_uchar3", + "packed_uchar4", + "packed_uint2", + "packed_uint3", + "packed_uint4", + "packed_ushort2", + "packed_ushort3", + "packed_ushort4", + "patch_control_point", + "private", + "protected", + "ptrdiff_t", + "public", + "r16snorm", + "r16unorm", + "r8unorm", + "reference", + "register", + "reinterpret_cast", + "return", + "rg11b10f", + "rg16snorm", + "rg16unorm", + "rg8snorm", + "rg8unorm", + "rgb10a2", + "rgb9e5", + "rgba16snorm", + "rgba16unorm", + "rgba8snorm", + "rgba8unorm", + "sampler", + "short", + "short2", + "short3", + "short4", + "signed", + "size_t", + "sizeof", + "srgba8unorm", + "static", + "static_assert", + "static_cast", + "struct", + "switch", + "template", + "texture", + "texture1d", + "texture1d_array", + "texture2d", + "texture2d_array", + "texture2d_ms", + "texture2d_ms_array", + "texture3d", + "texture_buffer", + "texturecube", + "texturecube_array", + "this", + "thread", + "thread_local", + "threadgroup", + "threadgroup_imageblock", + "throw", + "true", + "try", + "typedef", + "typeid", + "typename", + "uchar", + "uchar2", + "uchar3", + "uchar4", + "uint", + "uint16_t", + "uint2", + "uint3", + "uint32_t", + "uint4", + "uint64_t", + "uint8_t", + "ulong2", + "ulong3", + "ulong4", + "uniform", + "union", + "unsigned", + "ushort", + "ushort2", + "ushort3", + "ushort4", + "using", + "vec", + "vertex", + "virtual", + "void", + "volatile", + "wchar_t", + "while", + "xor", + "xor_eq", +}; +bool IsKeyword(std::string_view ident) { + return std::binary_search(std::begin(kReservedKeywordsMSL), std::end(kReservedKeywordsMSL), + ident); +} + } // namespace Result Print(core::ir::Module& module, const Options& options) { diff --git a/src/tint/lang/msl/writer/writer_fuzz.cc b/src/tint/lang/msl/writer/writer_fuzz.cc index 0dfd7ce328b..b1b67fe716a 100644 --- a/src/tint/lang/msl/writer/writer_fuzz.cc +++ b/src/tint/lang/msl/writer/writer_fuzz.cc @@ -38,7 +38,12 @@ namespace tint::msl::writer { namespace { -bool CanRun(const core::ir::Module& module) { +bool CanRun(const core::ir::Module& module, const Options& options) { + // If a remapped entry point name is provided, it must not be empty. + if (options.remapped_entry_point_name && options.remapped_entry_point_name->empty()) { + return false; + } + // Check for unsupported module-scope variable address spaces and types. for (auto* inst : *module.root_block) { auto* var = inst->As(); @@ -59,7 +64,7 @@ bool CanRun(const core::ir::Module& module) { Result IRFuzzer(core::ir::Module& module, const fuzz::ir::Context& context, Options options) { - if (!CanRun(module)) { + if (!CanRun(module, options)) { return Failure{"Cannot run module"}; } diff --git a/src/tint/lang/msl/writer/writer_test.cc b/src/tint/lang/msl/writer/writer_test.cc index f44b553b08a..78261867463 100644 --- a/src/tint/lang/msl/writer/writer_test.cc +++ b/src/tint/lang/msl/writer/writer_test.cc @@ -179,5 +179,57 @@ kernel void foo(device tint_array* a [[buffer(0)]], const constant tint EXPECT_TRUE(output_.needs_storage_buffer_sizes); } +TEST_F(MslWriterTest, StripAllNames) { + auto* str = + ty.Struct(mod.symbols.New("MyStruct"), { + {mod.symbols.Register("a"), ty.i32()}, + {mod.symbols.Register("b"), ty.vec4()}, + }); + auto* foo = b.Function("foo", ty.u32()); + auto* param = b.FunctionParam("param", ty.u32()); + foo->AppendParam(param); + b.Append(foo->Block(), [&] { // + b.Return(foo, param); + }); + + auto* func = b.ComputeFunction("main"); + auto* idx = b.FunctionParam("idx", ty.u32()); + idx->SetBuiltin(core::BuiltinValue::kLocalInvocationIndex); + func->AppendParam(idx); + b.Append(func->Block(), [&] { // + auto* var = b.Var("str", ty.ptr(str)); + auto* val = b.Load(var); + mod.SetName(val, "val"); + auto* a = b.Access(val, 0_u); + mod.SetName(a, "a"); + b.Let("let", b.Call(foo, idx)); + b.Return(func); + }); + + Options options; + options.remapped_entry_point_name = "tint_entry_point"; + options.strip_all_names = true; + ASSERT_TRUE(Generate(options)) << err_ << output_.msl; + EXPECT_EQ(output_.msl, MetalHeader() + R"( +struct tint_struct { + int tint_member; + int4 tint_member_1; +}; + +uint v(uint v_1) { + return v_1; +} + +void v_2(uint v_3) { + tint_struct v_4 = {}; + uint const v_5 = v(v_3); +} + +kernel void tint_entry_point(uint v_7 [[thread_index_in_threadgroup]]) { + v_2(v_7); +} +)"); +} + } // namespace } // namespace tint::msl::writer diff --git a/test/tint/access/let/matrix.spvasm.expected.ir.msl b/test/tint/access/let/matrix.spvasm.expected.ir.msl index b1c51cc5940..2fe11d05c86 100644 --- a/test/tint/access/let/matrix.spvasm.expected.ir.msl +++ b/test/tint/access/let/matrix.spvasm.expected.ir.msl @@ -5,6 +5,6 @@ void main_1() { float const x_24 = 5.0f; } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/access/let/matrix.wgsl.expected.ir.msl b/test/tint/access/let/matrix.wgsl.expected.ir.msl index 9bf63653f78..134ca4a044b 100644 --- a/test/tint/access/let/matrix.wgsl.expected.ir.msl +++ b/test/tint/access/let/matrix.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device float* s; }; -kernel void tint_symbol(device float* s [[buffer(0)]]) { +kernel void v_1(device float* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; float3x3 const m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)); float3 const v = m[1u]; diff --git a/test/tint/access/let/vector.spvasm.expected.ir.msl b/test/tint/access/let/vector.spvasm.expected.ir.msl index 6c3fd43ab8b..7cea110f9f4 100644 --- a/test/tint/access/let/vector.spvasm.expected.ir.msl +++ b/test/tint/access/let/vector.spvasm.expected.ir.msl @@ -7,6 +7,6 @@ void main_1() { float3 const x_14 = float3(1.0f, 3.0f, 2.0f); } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/access/let/vector.wgsl.expected.ir.msl b/test/tint/access/let/vector.wgsl.expected.ir.msl index 4db39bd3f5f..6178f5ea64a 100644 --- a/test/tint/access/let/vector.wgsl.expected.ir.msl +++ b/test/tint/access/let/vector.wgsl.expected.ir.msl @@ -5,12 +5,12 @@ struct tint_module_vars_struct { device packed_float3* s; }; -kernel void tint_symbol(device packed_float3* s [[buffer(0)]]) { +kernel void v_1(device packed_float3* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; float3 const v = float3(1.0f, 2.0f, 3.0f); float const scalar = v.y; float2 const swizzle2 = v.xz; float3 const swizzle3 = v.xzy; - float3 const v_1 = float3(scalar); - (*tint_module_vars.s) = packed_float3(((v_1 + float3(swizzle2, 1.0f)) + swizzle3)); + float3 const v_2 = float3(scalar); + (*tint_module_vars.s) = packed_float3(((v_2 + float3(swizzle2, 1.0f)) + swizzle3)); } diff --git a/test/tint/access/ptr.wgsl.expected.ir.msl b/test/tint/access/ptr.wgsl.expected.ir.msl index 482e61bfced..967847d8a28 100644 --- a/test/tint/access/ptr.wgsl.expected.ir.msl +++ b/test/tint/access/ptr.wgsl.expected.ir.msl @@ -11,8 +11,8 @@ struct tint_module_vars_struct { threadgroup atomic_int* g1; }; -struct tint_symbol_2 { - atomic_int tint_symbol_1; +struct tint_symbol_1 { + atomic_int tint_symbol; }; int accept_value(int val) { @@ -52,7 +52,7 @@ int call_builtin_with_mod_scope_ptr(tint_module_vars_struct tint_module_vars) { return atomic_load_explicit(tint_module_vars.g1, memory_order_relaxed); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { atomic_store_explicit(tint_module_vars.g1, 0, memory_order_relaxed); } @@ -70,7 +70,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul (*tint_module_vars.s) = as_type((as_type(as_type((as_type(v_6) + as_type(call_builtin_with_mod_scope_ptr(tint_module_vars))))) + as_type(t1))); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], device int* s [[buffer(0)]], threadgroup tint_symbol_2* v_7 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s, .g1=(&(*v_7).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_7(uint tint_local_index [[thread_index_in_threadgroup]], device int* s [[buffer(0)]], threadgroup tint_symbol_1* v_8 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s, .g1=(&(*v_8).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/access/var/matrix.spvasm.expected.ir.msl b/test/tint/access/var/matrix.spvasm.expected.ir.msl index 62d92b702c0..bb66f330c2d 100644 --- a/test/tint/access/var/matrix.spvasm.expected.ir.msl +++ b/test/tint/access/var/matrix.spvasm.expected.ir.msl @@ -6,6 +6,6 @@ void main_1() { float const x_16 = m[1u].y; } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/access/var/matrix.wgsl.expected.ir.msl b/test/tint/access/var/matrix.wgsl.expected.ir.msl index 916345d7372..56d8bcc738e 100644 --- a/test/tint/access/var/matrix.wgsl.expected.ir.msl +++ b/test/tint/access/var/matrix.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device float* s; }; -kernel void tint_symbol(device float* s [[buffer(0)]]) { +kernel void v_1(device float* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; float3x3 m = float3x3(0.0f); float3 const v = m[1u]; diff --git a/test/tint/access/var/vector.spvasm.expected.ir.msl b/test/tint/access/var/vector.spvasm.expected.ir.msl index 4745a5ca0a2..b17f0ca2b0d 100644 --- a/test/tint/access/var/vector.spvasm.expected.ir.msl +++ b/test/tint/access/var/vector.spvasm.expected.ir.msl @@ -8,6 +8,6 @@ void main_1() { float3 const x_19 = v.xzy; } -kernel void tint_symbol() { +kernel void v_1() { main_1(); } diff --git a/test/tint/access/var/vector.wgsl.expected.ir.msl b/test/tint/access/var/vector.wgsl.expected.ir.msl index 5e98e68047a..39a9182f6dd 100644 --- a/test/tint/access/var/vector.wgsl.expected.ir.msl +++ b/test/tint/access/var/vector.wgsl.expected.ir.msl @@ -5,12 +5,12 @@ struct tint_module_vars_struct { device packed_float3* s; }; -kernel void tint_symbol(device packed_float3* s [[buffer(0)]]) { +kernel void v_1(device packed_float3* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; float3 v = 0.0f; float const scalar = v.y; float2 const swizzle2 = v.xz; float3 const swizzle3 = v.xzy; - float3 const v_1 = float3(scalar); - (*tint_module_vars.s) = packed_float3(((v_1 + float3(swizzle2, 1.0f)) + swizzle3)); + float3 const v_2 = float3(scalar); + (*tint_module_vars.s) = packed_float3(((v_2 + float3(swizzle2, 1.0f)) + swizzle3)); } diff --git a/test/tint/array/assign_to_function_var.wgsl.expected.ir.msl b/test/tint/array/assign_to_function_var.wgsl.expected.ir.msl index 978fdfb1a08..5d41f92c346 100644 --- a/test/tint/array/assign_to_function_var.wgsl.expected.ir.msl +++ b/test/tint/array/assign_to_function_var.wgsl.expected.ir.msl @@ -24,8 +24,8 @@ struct tint_module_vars_struct { device S* src_storage; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; tint_array ret_arr() { @@ -55,7 +55,7 @@ void foo(tint_array src_param, tint_module_vars_struct tint_module_vars dst_nested = src_nested; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -76,8 +76,8 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul foo(val, tint_module_vars); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(1)]]) { +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(1)]]) { thread tint_array src_private = {}; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_2).tint_symbol_1), .src_uniform=src_uniform, .src_storage=src_storage}; - tint_symbol_inner(tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_3).tint_symbol), .src_uniform=src_uniform, .src_storage=src_storage}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/array/assign_to_private_var.wgsl.expected.ir.msl b/test/tint/array/assign_to_private_var.wgsl.expected.ir.msl index 13c9933015b..35b77073cfa 100644 --- a/test/tint/array/assign_to_private_var.wgsl.expected.ir.msl +++ b/test/tint/array/assign_to_private_var.wgsl.expected.ir.msl @@ -26,8 +26,8 @@ struct tint_module_vars_struct { thread tint_array, 3>, 4>* dst_nested; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; tint_array ret_arr() { @@ -55,7 +55,7 @@ void foo(tint_array src_param, tint_module_vars_struct tint_module_vars (*tint_module_vars.dst_nested) = src_nested; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -76,10 +76,10 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul foo(a, tint_module_vars); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(1)]]) { +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(1)]]) { thread tint_array src_private = {}; thread tint_array dst = {}; thread tint_array, 3>, 4> dst_nested = {}; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_2).tint_symbol_1), .src_uniform=src_uniform, .src_storage=src_storage, .dst=(&dst), .dst_nested=(&dst_nested)}; - tint_symbol_inner(tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_3).tint_symbol), .src_uniform=src_uniform, .src_storage=src_storage, .dst=(&dst), .dst_nested=(&dst_nested)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl b/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl index a5d2af7dcfa..914a23893a0 100644 --- a/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl +++ b/test/tint/array/assign_to_storage_var.wgsl.expected.ir.msl @@ -30,8 +30,8 @@ struct tint_module_vars_struct { device S_nested* dst_nested; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; tint_array ret_arr() { @@ -59,7 +59,7 @@ void foo(tint_array src_param, tint_module_vars_struct tint_module_vars (*tint_module_vars.dst_nested).arr = src_nested; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -80,8 +80,8 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul foo(ary, tint_module_vars); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(2)]], device S* dst [[buffer(1)]], device S_nested* dst_nested [[buffer(3)]]) { +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(2)]], device S* dst [[buffer(1)]], device S_nested* dst_nested [[buffer(3)]]) { thread tint_array src_private = {}; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_2).tint_symbol_1), .src_uniform=src_uniform, .src_storage=src_storage, .dst=dst, .dst_nested=dst_nested}; - tint_symbol_inner(tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_3).tint_symbol), .src_uniform=src_uniform, .src_storage=src_storage, .dst=dst, .dst_nested=dst_nested}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/array/assign_to_subexpr.wgsl.expected.ir.msl b/test/tint/array/assign_to_subexpr.wgsl.expected.ir.msl index 574832a1d14..5079fa57685 100644 --- a/test/tint/array/assign_to_subexpr.wgsl.expected.ir.msl +++ b/test/tint/array/assign_to_subexpr.wgsl.expected.ir.msl @@ -37,7 +37,7 @@ int foo() { return as_type((as_type(as_type((as_type((*dst_ptr)[0u]) + as_type((*dst_struct_ptr).arr[0u])))) + as_type((*dst_array_ptr)[0u][0u]))); } -kernel void tint_symbol(device int* s [[buffer(0)]]) { +kernel void v(device int* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; (*tint_module_vars.s) = foo(); } diff --git a/test/tint/array/assign_to_workgroup_var.wgsl.expected.ir.msl b/test/tint/array/assign_to_workgroup_var.wgsl.expected.ir.msl index cade83fd3a4..b7d4511ebec 100644 --- a/test/tint/array/assign_to_workgroup_var.wgsl.expected.ir.msl +++ b/test/tint/array/assign_to_workgroup_var.wgsl.expected.ir.msl @@ -26,10 +26,10 @@ struct tint_module_vars_struct { threadgroup tint_array, 3>, 4>* dst_nested; }; -struct tint_symbol_4 { +struct tint_symbol_3 { + tint_array tint_symbol; tint_array tint_symbol_1; - tint_array tint_symbol_2; - tint_array, 3>, 4> tint_symbol_3; + tint_array, 3>, 4> tint_symbol_2; }; tint_array ret_arr() { @@ -57,7 +57,7 @@ void foo(tint_array src_param, tint_module_vars_struct tint_module_vars (*tint_module_vars.dst_nested) = src_nested; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -94,8 +94,8 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul foo(val, tint_module_vars); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_4* v_4 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(1)]]) { +kernel void v_4(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_3* v_5 [[threadgroup(0)]], const constant S* src_uniform [[buffer(0)]], device S* src_storage [[buffer(1)]]) { thread tint_array src_private = {}; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_4).tint_symbol_1), .src_uniform=src_uniform, .src_storage=src_storage, .dst=(&(*v_4).tint_symbol_2), .dst_nested=(&(*v_4).tint_symbol_3)}; - tint_symbol_inner(tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src_private=(&src_private), .src_workgroup=(&(*v_5).tint_symbol), .src_uniform=src_uniform, .src_storage=src_storage, .dst=(&(*v_5).tint_symbol_1), .dst_nested=(&(*v_5).tint_symbol_2)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/array/function_parameter.wgsl.expected.ir.msl b/test/tint/array/function_parameter.wgsl.expected.ir.msl index 5f14ed8ad82..c2e38c547bb 100644 --- a/test/tint/array/function_parameter.wgsl.expected.ir.msl +++ b/test/tint/array/function_parameter.wgsl.expected.ir.msl @@ -29,7 +29,7 @@ float f3(tint_array, 3>, 2> a) { return a[1u][2u][3u]; } -kernel void tint_symbol(device float* s [[buffer(0)]]) { +kernel void v(device float* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; tint_array const a1 = tint_array{}; tint_array, 3> const a2 = tint_array, 3>{}; diff --git a/test/tint/array/function_return_type.wgsl.expected.ir.msl b/test/tint/array/function_return_type.wgsl.expected.ir.msl index d50b19d088d..07f55699228 100644 --- a/test/tint/array/function_return_type.wgsl.expected.ir.msl +++ b/test/tint/array/function_return_type.wgsl.expected.ir.msl @@ -32,7 +32,7 @@ tint_array, 3>, 2> f3() { return tint_array, 3>, 2>{v_2, f2()}; } -kernel void tint_symbol(device float* s [[buffer(0)]]) { +kernel void v_3(device float* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; tint_array const a1 = f1(); tint_array, 3> const a2 = f2(); diff --git a/test/tint/array/size.wgsl.expected.ir.msl b/test/tint/array/size.wgsl.expected.ir.msl index 6c4e445f801..5af1f1ac335 100644 --- a/test/tint/array/size.wgsl.expected.ir.msl +++ b/test/tint/array/size.wgsl.expected.ir.msl @@ -17,7 +17,7 @@ struct tint_array { T elements[N]; }; -fragment void tint_symbol(device float* s [[buffer(0)]]) { +fragment void v(device float* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; tint_array signed_literal = {}; tint_array unsigned_literal = {}; diff --git a/test/tint/array/type_initializer.wgsl.expected.ir.msl b/test/tint/array/type_initializer.wgsl.expected.ir.msl index 04449be7034..99ed3e2a5f1 100644 --- a/test/tint/array/type_initializer.wgsl.expected.ir.msl +++ b/test/tint/array/type_initializer.wgsl.expected.ir.msl @@ -17,7 +17,7 @@ struct tint_array { T elements[N]; }; -kernel void tint_symbol(device int* s [[buffer(0)]]) { +kernel void v(device int* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; int const x = 42; tint_array const empty = tint_array{}; @@ -25,8 +25,8 @@ kernel void tint_symbol(device int* s [[buffer(0)]]) { tint_array const nonempty_with_expr = tint_array{1, x, as_type((as_type(x) + as_type(1))), nonempty[3u]}; tint_array, 3>, 2> const nested_empty = tint_array, 3>, 2>{}; tint_array, 3>, 2> const nested_nonempty = tint_array, 3>, 2>{tint_array, 3>{tint_array{1, 2, 3, 4}, tint_array{5, 6, 7, 8}, tint_array{9, 10, 11, 12}}, tint_array, 3>{tint_array{13, 14, 15, 16}, tint_array{17, 18, 19, 20}, tint_array{21, 22, 23, 24}}}; - tint_array const v = tint_array{1, 2, x, as_type((as_type(x) + as_type(1)))}; - tint_array, 3>, 2> const nested_nonempty_with_expr = tint_array, 3>, 2>{tint_array, 3>{v, tint_array{5, 6, nonempty[2u], as_type((as_type(nonempty[3u]) + as_type(1)))}, nonempty}, nested_nonempty[1u]}; + tint_array const v_1 = tint_array{1, 2, x, as_type((as_type(x) + as_type(1)))}; + tint_array, 3>, 2> const nested_nonempty_with_expr = tint_array, 3>, 2>{tint_array, 3>{v_1, tint_array{5, 6, nonempty[2u], as_type((as_type(nonempty[3u]) + as_type(1)))}, nonempty}, nested_nonempty[1u]}; int const subexpr_empty = 0; int const subexpr_nonempty = 3; int const subexpr_nonempty_with_expr = tint_array{1, x, as_type((as_type(x) + as_type(1))), nonempty[3u]}[2u]; diff --git a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl index 995b5360568..03702708f26 100644 --- a/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/dynamic_index/read.wgsl.expected.ir.msl @@ -68,7 +68,7 @@ tint_array tint_load_array_packed_vec3(const device tint_array{v, float3((*from)[1u].packed)}; } -void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { +void main_inner(uint idx, tint_module_vars_struct tint_module_vars) { float const scalar_f32 = (*tint_module_vars.sb).arr[min(idx, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 544u) - 1u))].scalar_f32; int const scalar_i32 = (*tint_module_vars.sb).arr[min(idx, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 544u) - 1u))].scalar_i32; uint const scalar_u32 = (*tint_module_vars.sb).arr[min(idx, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 544u) - 1u))].scalar_u32; @@ -120,7 +120,7 @@ void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.s) = as_type((as_type(v_26) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x)))); } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_27(uint idx [[thread_index_in_threadgroup]], const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(idx, tint_module_vars); + main_inner(idx, tint_module_vars); } diff --git a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl index 70a1dd05121..c17ee35da5e 100644 --- a/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/dynamic_index/read_f16.wgsl.expected.ir.msl @@ -95,7 +95,7 @@ tint_array tint_load_array_packed_vec3(const device tint_array{v, float3((*from)[1u].packed)}; } -void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { +void main_inner(uint idx, tint_module_vars_struct tint_module_vars) { float const scalar_f32 = (*tint_module_vars.sb).arr[min(idx, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 800u) - 1u))].scalar_f32; int const scalar_i32 = (*tint_module_vars.sb).arr[min(idx, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 800u) - 1u))].scalar_i32; uint const scalar_u32 = (*tint_module_vars.sb).arr[min(idx, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 800u) - 1u))].scalar_u32; @@ -184,7 +184,7 @@ void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.s) = as_type((as_type(v_49) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x)))); } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_50(uint idx [[thread_index_in_threadgroup]], const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(idx, tint_module_vars); + main_inner(idx, tint_module_vars); } diff --git a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.msl b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.msl index 2c3f4bf1906..cbbf85ca371 100644 --- a/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/dynamic_index/write.wgsl.expected.ir.msl @@ -94,7 +94,7 @@ void tint_store_and_preserve_padding(device tint_array{}); } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S_packed_vec3* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_5(uint idx [[thread_index_in_threadgroup]], device S_packed_vec3* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(idx, tint_module_vars); + main_inner(idx, tint_module_vars); } diff --git a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.msl index c3d0fdd014a..60837b24110 100644 --- a/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/dynamic_index/write_f16.wgsl.expected.ir.msl @@ -135,7 +135,7 @@ void tint_store_and_preserve_padding(device tint_array{}; } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S_packed_vec3* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_6(uint idx [[thread_index_in_threadgroup]], device S_packed_vec3* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(idx, tint_module_vars); + main_inner(idx, tint_module_vars); } diff --git a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl index 0b21728df4e..c2aee2a8d1d 100644 --- a/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/static_index/read.wgsl.expected.ir.msl @@ -71,7 +71,7 @@ tint_array tint_load_array_packed_vec3(const device tint_array{v, float3((*from)[1u].packed)}; } -kernel void tint_symbol(const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]]) { +kernel void v_1(const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s}; float const scalar_f32 = (*tint_module_vars.sb).scalar_f32; int const scalar_i32 = (*tint_module_vars.sb).scalar_i32; @@ -86,42 +86,42 @@ kernel void tint_symbol(const device S_packed_vec3* sb [[buffer(1)]], device int int4 const vec4_i32 = (*tint_module_vars.sb).vec4_i32; uint4 const vec4_u32 = (*tint_module_vars.sb).vec4_u32; float2x2 const mat2x2_f32 = (*tint_module_vars.sb).mat2x2_f32; - tint_array const v_1 = (*tint_module_vars.sb).mat2x3_f32; - float3 const v_2 = float3(v_1[0u].packed); - float2x3 const mat2x3_f32 = float2x3(v_2, float3(v_1[1u].packed)); + tint_array const v_2 = (*tint_module_vars.sb).mat2x3_f32; + float3 const v_3 = float3(v_2[0u].packed); + float2x3 const mat2x3_f32 = float2x3(v_3, float3(v_2[1u].packed)); float2x4 const mat2x4_f32 = (*tint_module_vars.sb).mat2x4_f32; float3x2 const mat3x2_f32 = (*tint_module_vars.sb).mat3x2_f32; - tint_array const v_3 = (*tint_module_vars.sb).mat3x3_f32; - float3 const v_4 = float3(v_3[0u].packed); - float3 const v_5 = float3(v_3[1u].packed); - float3x3 const mat3x3_f32 = float3x3(v_4, v_5, float3(v_3[2u].packed)); + tint_array const v_4 = (*tint_module_vars.sb).mat3x3_f32; + float3 const v_5 = float3(v_4[0u].packed); + float3 const v_6 = float3(v_4[1u].packed); + float3x3 const mat3x3_f32 = float3x3(v_5, v_6, float3(v_4[2u].packed)); float3x4 const mat3x4_f32 = (*tint_module_vars.sb).mat3x4_f32; float4x2 const mat4x2_f32 = (*tint_module_vars.sb).mat4x2_f32; - tint_array const v_6 = (*tint_module_vars.sb).mat4x3_f32; - float3 const v_7 = float3(v_6[0u].packed); - float3 const v_8 = float3(v_6[1u].packed); - float3 const v_9 = float3(v_6[2u].packed); - float4x3 const mat4x3_f32 = float4x3(v_7, v_8, v_9, float3(v_6[3u].packed)); + tint_array const v_7 = (*tint_module_vars.sb).mat4x3_f32; + float3 const v_8 = float3(v_7[0u].packed); + float3 const v_9 = float3(v_7[1u].packed); + float3 const v_10 = float3(v_7[2u].packed); + float4x3 const mat4x3_f32 = float4x3(v_8, v_9, v_10, float3(v_7[3u].packed)); float4x4 const mat4x4_f32 = (*tint_module_vars.sb).mat4x4_f32; tint_array const arr2_vec3_f32 = tint_load_array_packed_vec3((&(*tint_module_vars.sb).arr2_vec3_f32)); Inner const struct_inner = (*tint_module_vars.sb).struct_inner; tint_array const array_struct_inner = (*tint_module_vars.sb).array_struct_inner; - int const v_10 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); - int const v_11 = as_type((as_type(v_10) + as_type(int(scalar_u32)))); - int const v_12 = as_type((as_type(as_type((as_type(v_11) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); - int const v_13 = as_type((as_type(v_12) + as_type(int(vec2_u32.x)))); - int const v_14 = as_type((as_type(as_type((as_type(v_13) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); - int const v_15 = as_type((as_type(v_14) + as_type(int(vec3_u32.y)))); - int const v_16 = as_type((as_type(as_type((as_type(v_15) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); - int const v_17 = as_type((as_type(v_16) + as_type(int(vec4_u32.z)))); - int const v_18 = as_type((as_type(v_17) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); - int const v_19 = as_type((as_type(v_18) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); - int const v_20 = as_type((as_type(v_19) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); - int const v_21 = as_type((as_type(v_20) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); - int const v_22 = as_type((as_type(v_21) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); - int const v_23 = as_type((as_type(v_22) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); - int const v_24 = as_type((as_type(v_23) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); - int const v_25 = as_type((as_type(v_24) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); - int const v_26 = as_type((as_type(v_25) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); - (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_26) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); + int const v_11 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); + int const v_12 = as_type((as_type(v_11) + as_type(int(scalar_u32)))); + int const v_13 = as_type((as_type(as_type((as_type(v_12) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); + int const v_14 = as_type((as_type(v_13) + as_type(int(vec2_u32.x)))); + int const v_15 = as_type((as_type(as_type((as_type(v_14) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); + int const v_16 = as_type((as_type(v_15) + as_type(int(vec3_u32.y)))); + int const v_17 = as_type((as_type(as_type((as_type(v_16) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); + int const v_18 = as_type((as_type(v_17) + as_type(int(vec4_u32.z)))); + int const v_19 = as_type((as_type(v_18) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); + int const v_20 = as_type((as_type(v_19) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); + int const v_21 = as_type((as_type(v_20) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); + int const v_22 = as_type((as_type(v_21) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); + int const v_23 = as_type((as_type(v_22) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); + int const v_24 = as_type((as_type(v_23) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); + int const v_25 = as_type((as_type(v_24) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); + int const v_26 = as_type((as_type(v_25) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); + int const v_27 = as_type((as_type(v_26) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); + (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_27) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); } diff --git a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl index ca5e85327da..41dbd6b23db 100644 --- a/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/static_index/read_f16.wgsl.expected.ir.msl @@ -100,7 +100,7 @@ tint_array tint_load_array_packed_vec3(const device tint_array{v, float3((*from)[1u].packed)}; } -kernel void tint_symbol(const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]]) { +kernel void v_1(const device S_packed_vec3* sb [[buffer(1)]], device int* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .s=s}; float const scalar_f32 = (*tint_module_vars.sb).scalar_f32; int const scalar_i32 = (*tint_module_vars.sb).scalar_i32; @@ -119,75 +119,75 @@ kernel void tint_symbol(const device S_packed_vec3* sb [[buffer(1)]], device int uint4 const vec4_u32 = (*tint_module_vars.sb).vec4_u32; half4 const vec4_f16 = (*tint_module_vars.sb).vec4_f16; float2x2 const mat2x2_f32 = (*tint_module_vars.sb).mat2x2_f32; - tint_array const v_1 = (*tint_module_vars.sb).mat2x3_f32; - float3 const v_2 = float3(v_1[0u].packed); - float2x3 const mat2x3_f32 = float2x3(v_2, float3(v_1[1u].packed)); + tint_array const v_2 = (*tint_module_vars.sb).mat2x3_f32; + float3 const v_3 = float3(v_2[0u].packed); + float2x3 const mat2x3_f32 = float2x3(v_3, float3(v_2[1u].packed)); float2x4 const mat2x4_f32 = (*tint_module_vars.sb).mat2x4_f32; float3x2 const mat3x2_f32 = (*tint_module_vars.sb).mat3x2_f32; - tint_array const v_3 = (*tint_module_vars.sb).mat3x3_f32; - float3 const v_4 = float3(v_3[0u].packed); - float3 const v_5 = float3(v_3[1u].packed); - float3x3 const mat3x3_f32 = float3x3(v_4, v_5, float3(v_3[2u].packed)); + tint_array const v_4 = (*tint_module_vars.sb).mat3x3_f32; + float3 const v_5 = float3(v_4[0u].packed); + float3 const v_6 = float3(v_4[1u].packed); + float3x3 const mat3x3_f32 = float3x3(v_5, v_6, float3(v_4[2u].packed)); float3x4 const mat3x4_f32 = (*tint_module_vars.sb).mat3x4_f32; float4x2 const mat4x2_f32 = (*tint_module_vars.sb).mat4x2_f32; - tint_array const v_6 = (*tint_module_vars.sb).mat4x3_f32; - float3 const v_7 = float3(v_6[0u].packed); - float3 const v_8 = float3(v_6[1u].packed); - float3 const v_9 = float3(v_6[2u].packed); - float4x3 const mat4x3_f32 = float4x3(v_7, v_8, v_9, float3(v_6[3u].packed)); + tint_array const v_7 = (*tint_module_vars.sb).mat4x3_f32; + float3 const v_8 = float3(v_7[0u].packed); + float3 const v_9 = float3(v_7[1u].packed); + float3 const v_10 = float3(v_7[2u].packed); + float4x3 const mat4x3_f32 = float4x3(v_8, v_9, v_10, float3(v_7[3u].packed)); float4x4 const mat4x4_f32 = (*tint_module_vars.sb).mat4x4_f32; half2x2 const mat2x2_f16 = (*tint_module_vars.sb).mat2x2_f16; - tint_array const v_10 = (*tint_module_vars.sb).mat2x3_f16; - half3 const v_11 = half3(v_10[0u].packed_1); - half2x3 const mat2x3_f16 = half2x3(v_11, half3(v_10[1u].packed_1)); + tint_array const v_11 = (*tint_module_vars.sb).mat2x3_f16; + half3 const v_12 = half3(v_11[0u].packed_1); + half2x3 const mat2x3_f16 = half2x3(v_12, half3(v_11[1u].packed_1)); half2x4 const mat2x4_f16 = (*tint_module_vars.sb).mat2x4_f16; half3x2 const mat3x2_f16 = (*tint_module_vars.sb).mat3x2_f16; - tint_array const v_12 = (*tint_module_vars.sb).mat3x3_f16; - half3 const v_13 = half3(v_12[0u].packed_1); - half3 const v_14 = half3(v_12[1u].packed_1); - half3x3 const mat3x3_f16 = half3x3(v_13, v_14, half3(v_12[2u].packed_1)); + tint_array const v_13 = (*tint_module_vars.sb).mat3x3_f16; + half3 const v_14 = half3(v_13[0u].packed_1); + half3 const v_15 = half3(v_13[1u].packed_1); + half3x3 const mat3x3_f16 = half3x3(v_14, v_15, half3(v_13[2u].packed_1)); half3x4 const mat3x4_f16 = (*tint_module_vars.sb).mat3x4_f16; half4x2 const mat4x2_f16 = (*tint_module_vars.sb).mat4x2_f16; - tint_array const v_15 = (*tint_module_vars.sb).mat4x3_f16; - half3 const v_16 = half3(v_15[0u].packed_1); - half3 const v_17 = half3(v_15[1u].packed_1); - half3 const v_18 = half3(v_15[2u].packed_1); - half4x3 const mat4x3_f16 = half4x3(v_16, v_17, v_18, half3(v_15[3u].packed_1)); + tint_array const v_16 = (*tint_module_vars.sb).mat4x3_f16; + half3 const v_17 = half3(v_16[0u].packed_1); + half3 const v_18 = half3(v_16[1u].packed_1); + half3 const v_19 = half3(v_16[2u].packed_1); + half4x3 const mat4x3_f16 = half4x3(v_17, v_18, v_19, half3(v_16[3u].packed_1)); half4x4 const mat4x4_f16 = (*tint_module_vars.sb).mat4x4_f16; tint_array const arr2_vec3_f32 = tint_load_array_packed_vec3((&(*tint_module_vars.sb).arr2_vec3_f32)); tint_array const arr2_mat4x2_f16 = (*tint_module_vars.sb).arr2_mat4x2_f16; Inner const struct_inner = (*tint_module_vars.sb).struct_inner; tint_array const array_struct_inner = (*tint_module_vars.sb).array_struct_inner; - int const v_19 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); - int const v_20 = as_type((as_type(v_19) + as_type(int(scalar_u32)))); - int const v_21 = as_type((as_type(v_20) + as_type(tint_f16_to_i32(scalar_f16)))); - int const v_22 = as_type((as_type(as_type((as_type(v_21) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); - int const v_23 = as_type((as_type(v_22) + as_type(int(vec2_u32.x)))); - int const v_24 = as_type((as_type(v_23) + as_type(tint_f16_to_i32(vec2_f16.x)))); - int const v_25 = as_type((as_type(as_type((as_type(v_24) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); - int const v_26 = as_type((as_type(v_25) + as_type(int(vec3_u32.y)))); - int const v_27 = as_type((as_type(v_26) + as_type(tint_f16_to_i32(vec3_f16.y)))); - int const v_28 = as_type((as_type(as_type((as_type(v_27) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); - int const v_29 = as_type((as_type(v_28) + as_type(int(vec4_u32.z)))); - int const v_30 = as_type((as_type(v_29) + as_type(tint_f16_to_i32(vec4_f16.z)))); - int const v_31 = as_type((as_type(v_30) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); - int const v_32 = as_type((as_type(v_31) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); - int const v_33 = as_type((as_type(v_32) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); - int const v_34 = as_type((as_type(v_33) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); - int const v_35 = as_type((as_type(v_34) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); - int const v_36 = as_type((as_type(v_35) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); - int const v_37 = as_type((as_type(v_36) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); - int const v_38 = as_type((as_type(v_37) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); - int const v_39 = as_type((as_type(v_38) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); - int const v_40 = as_type((as_type(v_39) + as_type(tint_f16_to_i32(mat2x2_f16[0u].x)))); - int const v_41 = as_type((as_type(v_40) + as_type(tint_f16_to_i32(mat2x3_f16[0u].x)))); - int const v_42 = as_type((as_type(v_41) + as_type(tint_f16_to_i32(mat2x4_f16[0u].x)))); - int const v_43 = as_type((as_type(v_42) + as_type(tint_f16_to_i32(mat3x2_f16[0u].x)))); - int const v_44 = as_type((as_type(v_43) + as_type(tint_f16_to_i32(mat3x3_f16[0u].x)))); - int const v_45 = as_type((as_type(v_44) + as_type(tint_f16_to_i32(mat3x4_f16[0u].x)))); - int const v_46 = as_type((as_type(v_45) + as_type(tint_f16_to_i32(mat4x2_f16[0u].x)))); - int const v_47 = as_type((as_type(v_46) + as_type(tint_f16_to_i32(mat4x3_f16[0u].x)))); - int const v_48 = as_type((as_type(v_47) + as_type(tint_f16_to_i32(mat4x4_f16[0u].x)))); - int const v_49 = as_type((as_type(v_48) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x)))); - (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_49) + as_type(tint_f16_to_i32(arr2_mat4x2_f16[0u][0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); + int const v_20 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); + int const v_21 = as_type((as_type(v_20) + as_type(int(scalar_u32)))); + int const v_22 = as_type((as_type(v_21) + as_type(tint_f16_to_i32(scalar_f16)))); + int const v_23 = as_type((as_type(as_type((as_type(v_22) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); + int const v_24 = as_type((as_type(v_23) + as_type(int(vec2_u32.x)))); + int const v_25 = as_type((as_type(v_24) + as_type(tint_f16_to_i32(vec2_f16.x)))); + int const v_26 = as_type((as_type(as_type((as_type(v_25) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); + int const v_27 = as_type((as_type(v_26) + as_type(int(vec3_u32.y)))); + int const v_28 = as_type((as_type(v_27) + as_type(tint_f16_to_i32(vec3_f16.y)))); + int const v_29 = as_type((as_type(as_type((as_type(v_28) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); + int const v_30 = as_type((as_type(v_29) + as_type(int(vec4_u32.z)))); + int const v_31 = as_type((as_type(v_30) + as_type(tint_f16_to_i32(vec4_f16.z)))); + int const v_32 = as_type((as_type(v_31) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); + int const v_33 = as_type((as_type(v_32) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); + int const v_34 = as_type((as_type(v_33) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); + int const v_35 = as_type((as_type(v_34) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); + int const v_36 = as_type((as_type(v_35) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); + int const v_37 = as_type((as_type(v_36) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); + int const v_38 = as_type((as_type(v_37) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); + int const v_39 = as_type((as_type(v_38) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); + int const v_40 = as_type((as_type(v_39) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); + int const v_41 = as_type((as_type(v_40) + as_type(tint_f16_to_i32(mat2x2_f16[0u].x)))); + int const v_42 = as_type((as_type(v_41) + as_type(tint_f16_to_i32(mat2x3_f16[0u].x)))); + int const v_43 = as_type((as_type(v_42) + as_type(tint_f16_to_i32(mat2x4_f16[0u].x)))); + int const v_44 = as_type((as_type(v_43) + as_type(tint_f16_to_i32(mat3x2_f16[0u].x)))); + int const v_45 = as_type((as_type(v_44) + as_type(tint_f16_to_i32(mat3x3_f16[0u].x)))); + int const v_46 = as_type((as_type(v_45) + as_type(tint_f16_to_i32(mat3x4_f16[0u].x)))); + int const v_47 = as_type((as_type(v_46) + as_type(tint_f16_to_i32(mat4x2_f16[0u].x)))); + int const v_48 = as_type((as_type(v_47) + as_type(tint_f16_to_i32(mat4x3_f16[0u].x)))); + int const v_49 = as_type((as_type(v_48) + as_type(tint_f16_to_i32(mat4x4_f16[0u].x)))); + int const v_50 = as_type((as_type(v_49) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x)))); + (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_50) + as_type(tint_f16_to_i32(arr2_mat4x2_f16[0u][0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); } diff --git a/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.msl b/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.msl index 4b1417cc108..f9da3386304 100644 --- a/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/static_index/write.wgsl.expected.ir.msl @@ -97,7 +97,7 @@ void tint_store_and_preserve_padding(device tint_array* out; }; -kernel void tint_symbol(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl index 18442dc734a..3a92e706d04 100644 --- a/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/array4_f32.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { device tint_array* out; }; -kernel void tint_symbol(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl index d3dc37ea9b2..1ad196323c8 100644 --- a/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half* out; }; -kernel void tint_symbol(const device half* in [[buffer(1)]], device half* out [[buffer(0)]]) { +kernel void v(const device half* in [[buffer(1)]], device half* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl index d978fa0682b..232b5f6c0ae 100644 --- a/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float* out; }; -kernel void tint_symbol(const device float* in [[buffer(1)]], device float* out [[buffer(0)]]) { +kernel void v(const device float* in [[buffer(1)]], device float* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl index 93411741389..b62425460af 100644 --- a/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device int* out; }; -kernel void tint_symbol(const device int* in [[buffer(1)]], device int* out [[buffer(0)]]) { +kernel void v(const device int* in [[buffer(1)]], device int* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl index 2b9d2c87c04..ca439244278 100644 --- a/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat2x2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half2x2* out; }; -kernel void tint_symbol(const device half2x2* in [[buffer(1)]], device half2x2* out [[buffer(0)]]) { +kernel void v(const device half2x2* in [[buffer(1)]], device half2x2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl index 83a5ea5bbf5..95b8ef3852f 100644 --- a/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat2x2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float2x2* out; }; -kernel void tint_symbol(const device float2x2* in [[buffer(1)]], device float2x2* out [[buffer(0)]]) { +kernel void v(const device float2x2* in [[buffer(1)]], device float2x2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl index 62010171745..c1718bc07e3 100644 --- a/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat2x3_f16.wgsl.expected.ir.msl @@ -28,9 +28,9 @@ void tint_store_and_preserve_padding(device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; - tint_array const v = (*tint_module_vars.in); - half3 const v_1 = half3(v[0u].packed); - tint_store_and_preserve_padding(tint_module_vars.out, half2x3(v_1, half3(v[1u].packed))); + tint_array const v_1 = (*tint_module_vars.in); + half3 const v_2 = half3(v_1[0u].packed); + tint_store_and_preserve_padding(tint_module_vars.out, half2x3(v_2, half3(v_1[1u].packed))); } diff --git a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl index 77b0507763e..fd5a7c30ace 100644 --- a/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat2x3_f32.wgsl.expected.ir.msl @@ -28,9 +28,9 @@ void tint_store_and_preserve_padding(device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; - tint_array const v = (*tint_module_vars.in); - float3 const v_1 = float3(v[0u].packed); - tint_store_and_preserve_padding(tint_module_vars.out, float2x3(v_1, float3(v[1u].packed))); + tint_array const v_1 = (*tint_module_vars.in); + float3 const v_2 = float3(v_1[0u].packed); + tint_store_and_preserve_padding(tint_module_vars.out, float2x3(v_2, float3(v_1[1u].packed))); } diff --git a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl index efadd5d1499..ace9fe2956f 100644 --- a/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat2x4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half2x4* out; }; -kernel void tint_symbol(const device half2x4* in [[buffer(1)]], device half2x4* out [[buffer(0)]]) { +kernel void v(const device half2x4* in [[buffer(1)]], device half2x4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl index 1d5e3c70d40..dc17b0e9ae4 100644 --- a/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat2x4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float2x4* out; }; -kernel void tint_symbol(const device float2x4* in [[buffer(1)]], device float2x4* out [[buffer(0)]]) { +kernel void v(const device float2x4* in [[buffer(1)]], device float2x4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl index 861737f6b6a..61e2f3e6c3c 100644 --- a/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat3x2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half3x2* out; }; -kernel void tint_symbol(const device half3x2* in [[buffer(1)]], device half3x2* out [[buffer(0)]]) { +kernel void v(const device half3x2* in [[buffer(1)]], device half3x2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl index 54ea56dadbf..6378ab23992 100644 --- a/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat3x2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float3x2* out; }; -kernel void tint_symbol(const device float3x2* in [[buffer(1)]], device float3x2* out [[buffer(0)]]) { +kernel void v(const device float3x2* in [[buffer(1)]], device float3x2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl index 0fe6374d613..ad665c6a87f 100644 --- a/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat3x3_f16.wgsl.expected.ir.msl @@ -29,10 +29,10 @@ void tint_store_and_preserve_padding(device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; - tint_array const v = (*tint_module_vars.in); - half3 const v_1 = half3(v[0u].packed); - half3 const v_2 = half3(v[1u].packed); - tint_store_and_preserve_padding(tint_module_vars.out, half3x3(v_1, v_2, half3(v[2u].packed))); + tint_array const v_1 = (*tint_module_vars.in); + half3 const v_2 = half3(v_1[0u].packed); + half3 const v_3 = half3(v_1[1u].packed); + tint_store_and_preserve_padding(tint_module_vars.out, half3x3(v_2, v_3, half3(v_1[2u].packed))); } diff --git a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl index 13df1c0cb67..b96a640230d 100644 --- a/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat3x3_f32.wgsl.expected.ir.msl @@ -29,10 +29,10 @@ void tint_store_and_preserve_padding(device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; - tint_array const v = (*tint_module_vars.in); - float3 const v_1 = float3(v[0u].packed); - float3 const v_2 = float3(v[1u].packed); - tint_store_and_preserve_padding(tint_module_vars.out, float3x3(v_1, v_2, float3(v[2u].packed))); + tint_array const v_1 = (*tint_module_vars.in); + float3 const v_2 = float3(v_1[0u].packed); + float3 const v_3 = float3(v_1[1u].packed); + tint_store_and_preserve_padding(tint_module_vars.out, float3x3(v_2, v_3, float3(v_1[2u].packed))); } diff --git a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl index acbaf12905d..a0d008ac160 100644 --- a/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat3x4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half3x4* out; }; -kernel void tint_symbol(const device half3x4* in [[buffer(1)]], device half3x4* out [[buffer(0)]]) { +kernel void v(const device half3x4* in [[buffer(1)]], device half3x4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl index f304448e14b..6495f427067 100644 --- a/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat3x4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float3x4* out; }; -kernel void tint_symbol(const device float3x4* in [[buffer(1)]], device float3x4* out [[buffer(0)]]) { +kernel void v(const device float3x4* in [[buffer(1)]], device float3x4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl index ad01205c9b9..5e8c0b395c4 100644 --- a/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat4x2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half4x2* out; }; -kernel void tint_symbol(const device half4x2* in [[buffer(1)]], device half4x2* out [[buffer(0)]]) { +kernel void v(const device half4x2* in [[buffer(1)]], device half4x2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl index 010bdd4c3ee..9de328f0c06 100644 --- a/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat4x2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float4x2* out; }; -kernel void tint_symbol(const device float4x2* in [[buffer(1)]], device float4x2* out [[buffer(0)]]) { +kernel void v(const device float4x2* in [[buffer(1)]], device float4x2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl index bb34e770f9f..1864c088a7b 100644 --- a/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat4x3_f16.wgsl.expected.ir.msl @@ -30,11 +30,11 @@ void tint_store_and_preserve_padding(device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; - tint_array const v = (*tint_module_vars.in); - half3 const v_1 = half3(v[0u].packed); - half3 const v_2 = half3(v[1u].packed); - half3 const v_3 = half3(v[2u].packed); - tint_store_and_preserve_padding(tint_module_vars.out, half4x3(v_1, v_2, v_3, half3(v[3u].packed))); + tint_array const v_1 = (*tint_module_vars.in); + half3 const v_2 = half3(v_1[0u].packed); + half3 const v_3 = half3(v_1[1u].packed); + half3 const v_4 = half3(v_1[2u].packed); + tint_store_and_preserve_padding(tint_module_vars.out, half4x3(v_2, v_3, v_4, half3(v_1[3u].packed))); } diff --git a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl index 7c2fe95c5bd..ce2ef74617d 100644 --- a/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat4x3_f32.wgsl.expected.ir.msl @@ -30,11 +30,11 @@ void tint_store_and_preserve_padding(device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; - tint_array const v = (*tint_module_vars.in); - float3 const v_1 = float3(v[0u].packed); - float3 const v_2 = float3(v[1u].packed); - float3 const v_3 = float3(v[2u].packed); - tint_store_and_preserve_padding(tint_module_vars.out, float4x3(v_1, v_2, v_3, float3(v[3u].packed))); + tint_array const v_1 = (*tint_module_vars.in); + float3 const v_2 = float3(v_1[0u].packed); + float3 const v_3 = float3(v_1[1u].packed); + float3 const v_4 = float3(v_1[2u].packed); + tint_store_and_preserve_padding(tint_module_vars.out, float4x3(v_2, v_3, v_4, float3(v_1[3u].packed))); } diff --git a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl index b2ca0c74d72..16c63b7578e 100644 --- a/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat4x4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half4x4* out; }; -kernel void tint_symbol(const device half4x4* in [[buffer(1)]], device half4x4* out [[buffer(0)]]) { +kernel void v(const device half4x4* in [[buffer(1)]], device half4x4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl index 7bce48eb4f5..12715adfeeb 100644 --- a/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/mat4x4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float4x4* out; }; -kernel void tint_symbol(const device float4x4* in [[buffer(1)]], device float4x4* out [[buffer(0)]]) { +kernel void v(const device float4x4* in [[buffer(1)]], device float4x4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl index 09f7f297cd6..ba25d634086 100644 --- a/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/runtime_array_f16.wgsl.expected.ir.msl @@ -19,10 +19,10 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].y / 2u) - 1u); - device half* const v_1 = (&(*tint_module_vars.out)[min(uint(0), v)]); - uint const v_2 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 2u) - 1u); - (*v_1) = (*tint_module_vars.in)[min(uint(0), v_2)]; + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].y / 2u) - 1u); + device half* const v_2 = (&(*tint_module_vars.out)[min(uint(0), v_1)]); + uint const v_3 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 2u) - 1u); + (*v_2) = (*tint_module_vars.in)[min(uint(0), v_3)]; } diff --git a/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl index 8190bcc498d..7189082f085 100644 --- a/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/runtime_array_f32.wgsl.expected.ir.msl @@ -19,10 +19,10 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device tint_array* in [[buffer(1)]], device tint_array* out [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].y / 4u) - 1u); - device float* const v_1 = (&(*tint_module_vars.out)[min(uint(0), v)]); - uint const v_2 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); - (*v_1) = (*tint_module_vars.in)[min(uint(0), v_2)]; + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].y / 4u) - 1u); + device float* const v_2 = (&(*tint_module_vars.out)[min(uint(0), v_1)]); + uint const v_3 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); + (*v_2) = (*tint_module_vars.in)[min(uint(0), v_3)]; } diff --git a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl index 28a526d0a87..6b3da03ae4f 100644 --- a/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/struct_f16.wgsl.expected.ir.msl @@ -60,7 +60,7 @@ S tint_load_struct_packed_vec3(const device S_packed_vec3* const from) { return S{.inner=tint_load_struct_packed_vec3_1((&(*from).inner))}; } -kernel void tint_symbol(const device S_packed_vec3* in [[buffer(1)]], device S_packed_vec3* out [[buffer(0)]]) { +kernel void v_2(const device S_packed_vec3* in [[buffer(1)]], device S_packed_vec3* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; S const t = tint_load_struct_packed_vec3(tint_module_vars.in); tint_store_and_preserve_padding(tint_module_vars.out, t); diff --git a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl index c06b91dfa5e..cd858d3827c 100644 --- a/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/struct_f32.wgsl.expected.ir.msl @@ -60,7 +60,7 @@ S tint_load_struct_packed_vec3(const device S_packed_vec3* const from) { return S{.inner=tint_load_struct_packed_vec3_1((&(*from).inner))}; } -kernel void tint_symbol(const device S_packed_vec3* in [[buffer(1)]], device S_packed_vec3* out [[buffer(0)]]) { +kernel void v_2(const device S_packed_vec3* in [[buffer(1)]], device S_packed_vec3* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; S const t = tint_load_struct_packed_vec3(tint_module_vars.in); tint_store_and_preserve_padding(tint_module_vars.out, t); diff --git a/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl index df37b78885c..472b09fe816 100644 --- a/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device uint* out; }; -kernel void tint_symbol(const device uint* in [[buffer(1)]], device uint* out [[buffer(0)]]) { +kernel void v(const device uint* in [[buffer(1)]], device uint* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl index 4f39e60f44a..bcd21cb59c1 100644 --- a/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half2* out; }; -kernel void tint_symbol(const device half2* in [[buffer(1)]], device half2* out [[buffer(0)]]) { +kernel void v(const device half2* in [[buffer(1)]], device half2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl index 74c5d41c7a6..ab9fe7547c2 100644 --- a/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float2* out; }; -kernel void tint_symbol(const device float2* in [[buffer(1)]], device float2* out [[buffer(0)]]) { +kernel void v(const device float2* in [[buffer(1)]], device float2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl index faf93ef9caa..52abf0c21b1 100644 --- a/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec2_i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device int2* out; }; -kernel void tint_symbol(const device int2* in [[buffer(1)]], device int2* out [[buffer(0)]]) { +kernel void v(const device int2* in [[buffer(1)]], device int2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl index ef71aa91c2b..f92c909450d 100644 --- a/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec2_u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device uint2* out; }; -kernel void tint_symbol(const device uint2* in [[buffer(1)]], device uint2* out [[buffer(0)]]) { +kernel void v(const device uint2* in [[buffer(1)]], device uint2* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl index 864909cd553..8dcf603bbd3 100644 --- a/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec3_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_half3* out; }; -kernel void tint_symbol(const device packed_half3* in [[buffer(1)]], device packed_half3* out [[buffer(0)]]) { +kernel void v(const device packed_half3* in [[buffer(1)]], device packed_half3* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = packed_half3(half3((*tint_module_vars.in))); } diff --git a/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl index 86ec608d089..2ca0128a651 100644 --- a/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec3_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_float3* out; }; -kernel void tint_symbol(const device packed_float3* in [[buffer(1)]], device packed_float3* out [[buffer(0)]]) { +kernel void v(const device packed_float3* in [[buffer(1)]], device packed_float3* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = packed_float3(float3((*tint_module_vars.in))); } diff --git a/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl index b2dd1a0bcf5..599080403bf 100644 --- a/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec3_i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_int3* out; }; -kernel void tint_symbol(const device packed_int3* in [[buffer(1)]], device packed_int3* out [[buffer(0)]]) { +kernel void v(const device packed_int3* in [[buffer(1)]], device packed_int3* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = packed_int3(int3((*tint_module_vars.in))); } diff --git a/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl index 5d38e8fb09f..c7066499d8b 100644 --- a/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec3_u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_uint3* out; }; -kernel void tint_symbol(const device packed_uint3* in [[buffer(1)]], device packed_uint3* out [[buffer(0)]]) { +kernel void v(const device packed_uint3* in [[buffer(1)]], device packed_uint3* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = packed_uint3(uint3((*tint_module_vars.in))); } diff --git a/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl index a7e33326520..3c3f1875213 100644 --- a/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half4* out; }; -kernel void tint_symbol(const device half4* in [[buffer(1)]], device half4* out [[buffer(0)]]) { +kernel void v(const device half4* in [[buffer(1)]], device half4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl index 825beb2f042..9594d6da19d 100644 --- a/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float4* out; }; -kernel void tint_symbol(const device float4* in [[buffer(1)]], device float4* out [[buffer(0)]]) { +kernel void v(const device float4* in [[buffer(1)]], device float4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl index 1aa74379cfe..2f22130a629 100644 --- a/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec4_i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device int4* out; }; -kernel void tint_symbol(const device int4* in [[buffer(1)]], device int4* out [[buffer(0)]]) { +kernel void v(const device int4* in [[buffer(1)]], device int4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl b/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl index 5984196c8a6..412866645b2 100644 --- a/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/storage/types/vec4_u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device uint4* out; }; -kernel void tint_symbol(const device uint4* in [[buffer(1)]], device uint4* out [[buffer(0)]]) { +kernel void v(const device uint4* in [[buffer(1)]], device uint4* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.msl b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.msl index 4fbdbac2f96..dd6682caa93 100644 --- a/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/dynamic_index/read.wgsl.expected.ir.msl @@ -67,7 +67,7 @@ tint_array tint_load_array_packed_vec3(const constant tint_array{v, float3((*from)[1u].packed)}; } -void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { +void main_inner(uint idx, tint_module_vars_struct tint_module_vars) { float const scalar_f32 = (*tint_module_vars.ub).arr[min(idx, 7u)].scalar_f32; int const scalar_i32 = (*tint_module_vars.ub).arr[min(idx, 7u)].scalar_i32; uint const scalar_u32 = (*tint_module_vars.ub).arr[min(idx, 7u)].scalar_u32; @@ -119,7 +119,7 @@ void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.s) = as_type((as_type(v_26) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x)))); } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { +kernel void v_27(uint idx [[thread_index_in_threadgroup]], const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ub=ub, .s=s}; - tint_symbol_inner(idx, tint_module_vars); + main_inner(idx, tint_module_vars); } diff --git a/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.msl index a0015b05b9b..6800982027a 100644 --- a/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/dynamic_index/read_f16.wgsl.expected.ir.msl @@ -94,7 +94,7 @@ tint_array tint_load_array_packed_vec3(const constant tint_array{v, float3((*from)[1u].packed)}; } -void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { +void main_inner(uint idx, tint_module_vars_struct tint_module_vars) { float const scalar_f32 = (*tint_module_vars.ub).arr[min(idx, 7u)].scalar_f32; int const scalar_i32 = (*tint_module_vars.ub).arr[min(idx, 7u)].scalar_i32; uint const scalar_u32 = (*tint_module_vars.ub).arr[min(idx, 7u)].scalar_u32; @@ -183,7 +183,7 @@ void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.s) = as_type((as_type(v_49) + as_type(tint_f16_to_i32(arr2_mat4x2_f16[0u][0u].x)))); } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { +kernel void v_50(uint idx [[thread_index_in_threadgroup]], const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ub=ub, .s=s}; - tint_symbol_inner(idx, tint_module_vars); + main_inner(idx, tint_module_vars); } diff --git a/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.msl b/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.msl index 1dcd774b9ea..ace7224f500 100644 --- a/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/static_index/read.wgsl.expected.ir.msl @@ -72,7 +72,7 @@ tint_array tint_load_array_packed_vec3(const constant tint_array{v, float3((*from)[1u].packed)}; } -kernel void tint_symbol(const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { +kernel void v_1(const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ub=ub, .s=s}; float const scalar_f32 = (*tint_module_vars.ub).scalar_f32; int const scalar_i32 = (*tint_module_vars.ub).scalar_i32; @@ -87,42 +87,42 @@ kernel void tint_symbol(const constant S_packed_vec3* ub [[buffer(0)]], device i int4 const vec4_i32 = (*tint_module_vars.ub).vec4_i32; uint4 const vec4_u32 = (*tint_module_vars.ub).vec4_u32; float2x2 const mat2x2_f32 = (*tint_module_vars.ub).mat2x2_f32; - tint_array const v_1 = (*tint_module_vars.ub).mat2x3_f32; - float3 const v_2 = float3(v_1[0u].packed); - float2x3 const mat2x3_f32 = float2x3(v_2, float3(v_1[1u].packed)); + tint_array const v_2 = (*tint_module_vars.ub).mat2x3_f32; + float3 const v_3 = float3(v_2[0u].packed); + float2x3 const mat2x3_f32 = float2x3(v_3, float3(v_2[1u].packed)); float2x4 const mat2x4_f32 = (*tint_module_vars.ub).mat2x4_f32; float3x2 const mat3x2_f32 = (*tint_module_vars.ub).mat3x2_f32; - tint_array const v_3 = (*tint_module_vars.ub).mat3x3_f32; - float3 const v_4 = float3(v_3[0u].packed); - float3 const v_5 = float3(v_3[1u].packed); - float3x3 const mat3x3_f32 = float3x3(v_4, v_5, float3(v_3[2u].packed)); + tint_array const v_4 = (*tint_module_vars.ub).mat3x3_f32; + float3 const v_5 = float3(v_4[0u].packed); + float3 const v_6 = float3(v_4[1u].packed); + float3x3 const mat3x3_f32 = float3x3(v_5, v_6, float3(v_4[2u].packed)); float3x4 const mat3x4_f32 = (*tint_module_vars.ub).mat3x4_f32; float4x2 const mat4x2_f32 = (*tint_module_vars.ub).mat4x2_f32; - tint_array const v_6 = (*tint_module_vars.ub).mat4x3_f32; - float3 const v_7 = float3(v_6[0u].packed); - float3 const v_8 = float3(v_6[1u].packed); - float3 const v_9 = float3(v_6[2u].packed); - float4x3 const mat4x3_f32 = float4x3(v_7, v_8, v_9, float3(v_6[3u].packed)); + tint_array const v_7 = (*tint_module_vars.ub).mat4x3_f32; + float3 const v_8 = float3(v_7[0u].packed); + float3 const v_9 = float3(v_7[1u].packed); + float3 const v_10 = float3(v_7[2u].packed); + float4x3 const mat4x3_f32 = float4x3(v_8, v_9, v_10, float3(v_7[3u].packed)); float4x4 const mat4x4_f32 = (*tint_module_vars.ub).mat4x4_f32; tint_array const arr2_vec3_f32 = tint_load_array_packed_vec3((&(*tint_module_vars.ub).arr2_vec3_f32)); Inner const struct_inner = (*tint_module_vars.ub).struct_inner; tint_array const array_struct_inner = (*tint_module_vars.ub).array_struct_inner; - int const v_10 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); - int const v_11 = as_type((as_type(v_10) + as_type(int(scalar_u32)))); - int const v_12 = as_type((as_type(as_type((as_type(v_11) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); - int const v_13 = as_type((as_type(v_12) + as_type(int(vec2_u32.x)))); - int const v_14 = as_type((as_type(as_type((as_type(v_13) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); - int const v_15 = as_type((as_type(v_14) + as_type(int(vec3_u32.y)))); - int const v_16 = as_type((as_type(as_type((as_type(v_15) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); - int const v_17 = as_type((as_type(v_16) + as_type(int(vec4_u32.z)))); - int const v_18 = as_type((as_type(v_17) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); - int const v_19 = as_type((as_type(v_18) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); - int const v_20 = as_type((as_type(v_19) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); - int const v_21 = as_type((as_type(v_20) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); - int const v_22 = as_type((as_type(v_21) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); - int const v_23 = as_type((as_type(v_22) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); - int const v_24 = as_type((as_type(v_23) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); - int const v_25 = as_type((as_type(v_24) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); - int const v_26 = as_type((as_type(v_25) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); - (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_26) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); + int const v_11 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); + int const v_12 = as_type((as_type(v_11) + as_type(int(scalar_u32)))); + int const v_13 = as_type((as_type(as_type((as_type(v_12) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); + int const v_14 = as_type((as_type(v_13) + as_type(int(vec2_u32.x)))); + int const v_15 = as_type((as_type(as_type((as_type(v_14) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); + int const v_16 = as_type((as_type(v_15) + as_type(int(vec3_u32.y)))); + int const v_17 = as_type((as_type(as_type((as_type(v_16) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); + int const v_18 = as_type((as_type(v_17) + as_type(int(vec4_u32.z)))); + int const v_19 = as_type((as_type(v_18) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); + int const v_20 = as_type((as_type(v_19) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); + int const v_21 = as_type((as_type(v_20) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); + int const v_22 = as_type((as_type(v_21) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); + int const v_23 = as_type((as_type(v_22) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); + int const v_24 = as_type((as_type(v_23) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); + int const v_25 = as_type((as_type(v_24) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); + int const v_26 = as_type((as_type(v_25) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); + int const v_27 = as_type((as_type(v_26) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); + (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_27) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); } diff --git a/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.msl index b79b4050418..10041629308 100644 --- a/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/static_index/read_f16.wgsl.expected.ir.msl @@ -99,7 +99,7 @@ tint_array tint_load_array_packed_vec3(const constant tint_array{v, float3((*from)[1u].packed)}; } -kernel void tint_symbol(const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { +kernel void v_1(const constant S_packed_vec3* ub [[buffer(0)]], device int* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.ub=ub, .s=s}; float const scalar_f32 = (*tint_module_vars.ub).scalar_f32; int const scalar_i32 = (*tint_module_vars.ub).scalar_i32; @@ -118,75 +118,75 @@ kernel void tint_symbol(const constant S_packed_vec3* ub [[buffer(0)]], device i uint4 const vec4_u32 = (*tint_module_vars.ub).vec4_u32; half4 const vec4_f16 = (*tint_module_vars.ub).vec4_f16; float2x2 const mat2x2_f32 = (*tint_module_vars.ub).mat2x2_f32; - tint_array const v_1 = (*tint_module_vars.ub).mat2x3_f32; - float3 const v_2 = float3(v_1[0u].packed); - float2x3 const mat2x3_f32 = float2x3(v_2, float3(v_1[1u].packed)); + tint_array const v_2 = (*tint_module_vars.ub).mat2x3_f32; + float3 const v_3 = float3(v_2[0u].packed); + float2x3 const mat2x3_f32 = float2x3(v_3, float3(v_2[1u].packed)); float2x4 const mat2x4_f32 = (*tint_module_vars.ub).mat2x4_f32; float3x2 const mat3x2_f32 = (*tint_module_vars.ub).mat3x2_f32; - tint_array const v_3 = (*tint_module_vars.ub).mat3x3_f32; - float3 const v_4 = float3(v_3[0u].packed); - float3 const v_5 = float3(v_3[1u].packed); - float3x3 const mat3x3_f32 = float3x3(v_4, v_5, float3(v_3[2u].packed)); + tint_array const v_4 = (*tint_module_vars.ub).mat3x3_f32; + float3 const v_5 = float3(v_4[0u].packed); + float3 const v_6 = float3(v_4[1u].packed); + float3x3 const mat3x3_f32 = float3x3(v_5, v_6, float3(v_4[2u].packed)); float3x4 const mat3x4_f32 = (*tint_module_vars.ub).mat3x4_f32; float4x2 const mat4x2_f32 = (*tint_module_vars.ub).mat4x2_f32; - tint_array const v_6 = (*tint_module_vars.ub).mat4x3_f32; - float3 const v_7 = float3(v_6[0u].packed); - float3 const v_8 = float3(v_6[1u].packed); - float3 const v_9 = float3(v_6[2u].packed); - float4x3 const mat4x3_f32 = float4x3(v_7, v_8, v_9, float3(v_6[3u].packed)); + tint_array const v_7 = (*tint_module_vars.ub).mat4x3_f32; + float3 const v_8 = float3(v_7[0u].packed); + float3 const v_9 = float3(v_7[1u].packed); + float3 const v_10 = float3(v_7[2u].packed); + float4x3 const mat4x3_f32 = float4x3(v_8, v_9, v_10, float3(v_7[3u].packed)); float4x4 const mat4x4_f32 = (*tint_module_vars.ub).mat4x4_f32; half2x2 const mat2x2_f16 = (*tint_module_vars.ub).mat2x2_f16; - tint_array const v_10 = (*tint_module_vars.ub).mat2x3_f16; - half3 const v_11 = half3(v_10[0u].packed_1); - half2x3 const mat2x3_f16 = half2x3(v_11, half3(v_10[1u].packed_1)); + tint_array const v_11 = (*tint_module_vars.ub).mat2x3_f16; + half3 const v_12 = half3(v_11[0u].packed_1); + half2x3 const mat2x3_f16 = half2x3(v_12, half3(v_11[1u].packed_1)); half2x4 const mat2x4_f16 = (*tint_module_vars.ub).mat2x4_f16; half3x2 const mat3x2_f16 = (*tint_module_vars.ub).mat3x2_f16; - tint_array const v_12 = (*tint_module_vars.ub).mat3x3_f16; - half3 const v_13 = half3(v_12[0u].packed_1); - half3 const v_14 = half3(v_12[1u].packed_1); - half3x3 const mat3x3_f16 = half3x3(v_13, v_14, half3(v_12[2u].packed_1)); + tint_array const v_13 = (*tint_module_vars.ub).mat3x3_f16; + half3 const v_14 = half3(v_13[0u].packed_1); + half3 const v_15 = half3(v_13[1u].packed_1); + half3x3 const mat3x3_f16 = half3x3(v_14, v_15, half3(v_13[2u].packed_1)); half3x4 const mat3x4_f16 = (*tint_module_vars.ub).mat3x4_f16; half4x2 const mat4x2_f16 = (*tint_module_vars.ub).mat4x2_f16; - tint_array const v_15 = (*tint_module_vars.ub).mat4x3_f16; - half3 const v_16 = half3(v_15[0u].packed_1); - half3 const v_17 = half3(v_15[1u].packed_1); - half3 const v_18 = half3(v_15[2u].packed_1); - half4x3 const mat4x3_f16 = half4x3(v_16, v_17, v_18, half3(v_15[3u].packed_1)); + tint_array const v_16 = (*tint_module_vars.ub).mat4x3_f16; + half3 const v_17 = half3(v_16[0u].packed_1); + half3 const v_18 = half3(v_16[1u].packed_1); + half3 const v_19 = half3(v_16[2u].packed_1); + half4x3 const mat4x3_f16 = half4x3(v_17, v_18, v_19, half3(v_16[3u].packed_1)); half4x4 const mat4x4_f16 = (*tint_module_vars.ub).mat4x4_f16; tint_array const arr2_vec3_f32 = tint_load_array_packed_vec3((&(*tint_module_vars.ub).arr2_vec3_f32)); tint_array const arr2_mat4x2_f16 = (*tint_module_vars.ub).arr2_mat4x2_f16; Inner const struct_inner = (*tint_module_vars.ub).struct_inner; tint_array const array_struct_inner = (*tint_module_vars.ub).array_struct_inner; - int const v_19 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); - int const v_20 = as_type((as_type(v_19) + as_type(int(scalar_u32)))); - int const v_21 = as_type((as_type(v_20) + as_type(tint_f16_to_i32(scalar_f16)))); - int const v_22 = as_type((as_type(as_type((as_type(v_21) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); - int const v_23 = as_type((as_type(v_22) + as_type(int(vec2_u32.x)))); - int const v_24 = as_type((as_type(v_23) + as_type(tint_f16_to_i32(vec2_f16.x)))); - int const v_25 = as_type((as_type(as_type((as_type(v_24) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); - int const v_26 = as_type((as_type(v_25) + as_type(int(vec3_u32.y)))); - int const v_27 = as_type((as_type(v_26) + as_type(tint_f16_to_i32(vec3_f16.y)))); - int const v_28 = as_type((as_type(as_type((as_type(v_27) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); - int const v_29 = as_type((as_type(v_28) + as_type(int(vec4_u32.z)))); - int const v_30 = as_type((as_type(v_29) + as_type(tint_f16_to_i32(vec4_f16.z)))); - int const v_31 = as_type((as_type(v_30) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); - int const v_32 = as_type((as_type(v_31) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); - int const v_33 = as_type((as_type(v_32) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); - int const v_34 = as_type((as_type(v_33) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); - int const v_35 = as_type((as_type(v_34) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); - int const v_36 = as_type((as_type(v_35) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); - int const v_37 = as_type((as_type(v_36) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); - int const v_38 = as_type((as_type(v_37) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); - int const v_39 = as_type((as_type(v_38) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); - int const v_40 = as_type((as_type(v_39) + as_type(tint_f16_to_i32(mat2x2_f16[0u].x)))); - int const v_41 = as_type((as_type(v_40) + as_type(tint_f16_to_i32(mat2x3_f16[0u].x)))); - int const v_42 = as_type((as_type(v_41) + as_type(tint_f16_to_i32(mat2x4_f16[0u].x)))); - int const v_43 = as_type((as_type(v_42) + as_type(tint_f16_to_i32(mat3x2_f16[0u].x)))); - int const v_44 = as_type((as_type(v_43) + as_type(tint_f16_to_i32(mat3x3_f16[0u].x)))); - int const v_45 = as_type((as_type(v_44) + as_type(tint_f16_to_i32(mat3x4_f16[0u].x)))); - int const v_46 = as_type((as_type(v_45) + as_type(tint_f16_to_i32(mat4x2_f16[0u].x)))); - int const v_47 = as_type((as_type(v_46) + as_type(tint_f16_to_i32(mat4x3_f16[0u].x)))); - int const v_48 = as_type((as_type(v_47) + as_type(tint_f16_to_i32(mat4x4_f16[0u].x)))); - int const v_49 = as_type((as_type(v_48) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x)))); - (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_49) + as_type(tint_f16_to_i32(arr2_mat4x2_f16[0u][0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); + int const v_20 = as_type((as_type(tint_f32_to_i32(scalar_f32)) + as_type(scalar_i32))); + int const v_21 = as_type((as_type(v_20) + as_type(int(scalar_u32)))); + int const v_22 = as_type((as_type(v_21) + as_type(tint_f16_to_i32(scalar_f16)))); + int const v_23 = as_type((as_type(as_type((as_type(v_22) + as_type(tint_f32_to_i32(vec2_f32.x))))) + as_type(vec2_i32.x))); + int const v_24 = as_type((as_type(v_23) + as_type(int(vec2_u32.x)))); + int const v_25 = as_type((as_type(v_24) + as_type(tint_f16_to_i32(vec2_f16.x)))); + int const v_26 = as_type((as_type(as_type((as_type(v_25) + as_type(tint_f32_to_i32(vec3_f32.y))))) + as_type(vec3_i32.y))); + int const v_27 = as_type((as_type(v_26) + as_type(int(vec3_u32.y)))); + int const v_28 = as_type((as_type(v_27) + as_type(tint_f16_to_i32(vec3_f16.y)))); + int const v_29 = as_type((as_type(as_type((as_type(v_28) + as_type(tint_f32_to_i32(vec4_f32.z))))) + as_type(vec4_i32.z))); + int const v_30 = as_type((as_type(v_29) + as_type(int(vec4_u32.z)))); + int const v_31 = as_type((as_type(v_30) + as_type(tint_f16_to_i32(vec4_f16.z)))); + int const v_32 = as_type((as_type(v_31) + as_type(tint_f32_to_i32(mat2x2_f32[0u].x)))); + int const v_33 = as_type((as_type(v_32) + as_type(tint_f32_to_i32(mat2x3_f32[0u].x)))); + int const v_34 = as_type((as_type(v_33) + as_type(tint_f32_to_i32(mat2x4_f32[0u].x)))); + int const v_35 = as_type((as_type(v_34) + as_type(tint_f32_to_i32(mat3x2_f32[0u].x)))); + int const v_36 = as_type((as_type(v_35) + as_type(tint_f32_to_i32(mat3x3_f32[0u].x)))); + int const v_37 = as_type((as_type(v_36) + as_type(tint_f32_to_i32(mat3x4_f32[0u].x)))); + int const v_38 = as_type((as_type(v_37) + as_type(tint_f32_to_i32(mat4x2_f32[0u].x)))); + int const v_39 = as_type((as_type(v_38) + as_type(tint_f32_to_i32(mat4x3_f32[0u].x)))); + int const v_40 = as_type((as_type(v_39) + as_type(tint_f32_to_i32(mat4x4_f32[0u].x)))); + int const v_41 = as_type((as_type(v_40) + as_type(tint_f16_to_i32(mat2x2_f16[0u].x)))); + int const v_42 = as_type((as_type(v_41) + as_type(tint_f16_to_i32(mat2x3_f16[0u].x)))); + int const v_43 = as_type((as_type(v_42) + as_type(tint_f16_to_i32(mat2x4_f16[0u].x)))); + int const v_44 = as_type((as_type(v_43) + as_type(tint_f16_to_i32(mat3x2_f16[0u].x)))); + int const v_45 = as_type((as_type(v_44) + as_type(tint_f16_to_i32(mat3x3_f16[0u].x)))); + int const v_46 = as_type((as_type(v_45) + as_type(tint_f16_to_i32(mat3x4_f16[0u].x)))); + int const v_47 = as_type((as_type(v_46) + as_type(tint_f16_to_i32(mat4x2_f16[0u].x)))); + int const v_48 = as_type((as_type(v_47) + as_type(tint_f16_to_i32(mat4x3_f16[0u].x)))); + int const v_49 = as_type((as_type(v_48) + as_type(tint_f16_to_i32(mat4x4_f16[0u].x)))); + int const v_50 = as_type((as_type(v_49) + as_type(tint_f32_to_i32(arr2_vec3_f32[0u].x)))); + (*tint_module_vars.s) = as_type((as_type(as_type((as_type(as_type((as_type(v_50) + as_type(tint_f16_to_i32(arr2_mat4x2_f16[0u][0u].x))))) + as_type(struct_inner.scalar_i32)))) + as_type(array_struct_inner[0u].scalar_i32))); } diff --git a/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.msl index 1601868a0af..785b7bb0110 100644 --- a/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half* s; }; -kernel void tint_symbol(const constant half* u [[buffer(0)]], device half* s [[buffer(1)]]) { +kernel void v(const constant half* u [[buffer(0)]], device half* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.msl index 4f0a054a31a..0d42c6cba33 100644 --- a/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float* s; }; -kernel void tint_symbol(const constant float* u [[buffer(0)]], device float* s [[buffer(1)]]) { +kernel void v(const constant float* u [[buffer(0)]], device float* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.msl index b21386fed4f..35c8b35738a 100644 --- a/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device int* s; }; -kernel void tint_symbol(const constant int* u [[buffer(0)]], device int* s [[buffer(1)]]) { +kernel void v(const constant int* u [[buffer(0)]], device int* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; int const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl index f106ea985a8..6165d13f48b 100644 --- a/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat2x2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half2x2* s; }; -kernel void tint_symbol(const constant half2x2* u [[buffer(0)]], device half2x2* s [[buffer(1)]]) { +kernel void v(const constant half2x2* u [[buffer(0)]], device half2x2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half2x2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl index 6054deac8a2..9a6f1710504 100644 --- a/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat2x2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float2x2* s; }; -kernel void tint_symbol(const constant float2x2* u [[buffer(0)]], device float2x2* s [[buffer(1)]]) { +kernel void v(const constant float2x2* u [[buffer(0)]], device float2x2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float2x2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl index 491e6031113..4d4aec121f6 100644 --- a/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat2x3_f16.wgsl.expected.ir.msl @@ -28,10 +28,10 @@ void tint_store_and_preserve_padding(device tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { +kernel void v(const constant tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; - tint_array const v = (*tint_module_vars.u); - half3 const v_1 = half3(v[0u].packed); - half2x3 const x = half2x3(v_1, half3(v[1u].packed)); + tint_array const v_1 = (*tint_module_vars.u); + half3 const v_2 = half3(v_1[0u].packed); + half2x3 const x = half2x3(v_2, half3(v_1[1u].packed)); tint_store_and_preserve_padding(tint_module_vars.s, x); } diff --git a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl index 798c103ee8c..a2574cf834b 100644 --- a/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat2x3_f32.wgsl.expected.ir.msl @@ -28,10 +28,10 @@ void tint_store_and_preserve_padding(device tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { +kernel void v(const constant tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; - tint_array const v = (*tint_module_vars.u); - float3 const v_1 = float3(v[0u].packed); - float2x3 const x = float2x3(v_1, float3(v[1u].packed)); + tint_array const v_1 = (*tint_module_vars.u); + float3 const v_2 = float3(v_1[0u].packed); + float2x3 const x = float2x3(v_2, float3(v_1[1u].packed)); tint_store_and_preserve_padding(tint_module_vars.s, x); } diff --git a/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl index 51e39629bbf..dcbd302d3e8 100644 --- a/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat2x4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half2x4* s; }; -kernel void tint_symbol(const constant half2x4* u [[buffer(0)]], device half2x4* s [[buffer(1)]]) { +kernel void v(const constant half2x4* u [[buffer(0)]], device half2x4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half2x4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl index 786071b49bb..e306e00802a 100644 --- a/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat2x4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float2x4* s; }; -kernel void tint_symbol(const constant float2x4* u [[buffer(0)]], device float2x4* s [[buffer(1)]]) { +kernel void v(const constant float2x4* u [[buffer(0)]], device float2x4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float2x4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl index 6d7561c5d74..b9de071d4d9 100644 --- a/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat3x2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half3x2* s; }; -kernel void tint_symbol(const constant half3x2* u [[buffer(0)]], device half3x2* s [[buffer(1)]]) { +kernel void v(const constant half3x2* u [[buffer(0)]], device half3x2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half3x2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl index 13457dc7802..b45b7339421 100644 --- a/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat3x2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float3x2* s; }; -kernel void tint_symbol(const constant float3x2* u [[buffer(0)]], device float3x2* s [[buffer(1)]]) { +kernel void v(const constant float3x2* u [[buffer(0)]], device float3x2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float3x2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl index 3af35718d33..6a28ecda8dc 100644 --- a/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat3x3_f16.wgsl.expected.ir.msl @@ -29,11 +29,11 @@ void tint_store_and_preserve_padding(device tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { +kernel void v(const constant tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; - tint_array const v = (*tint_module_vars.u); - half3 const v_1 = half3(v[0u].packed); - half3 const v_2 = half3(v[1u].packed); - half3x3 const x = half3x3(v_1, v_2, half3(v[2u].packed)); + tint_array const v_1 = (*tint_module_vars.u); + half3 const v_2 = half3(v_1[0u].packed); + half3 const v_3 = half3(v_1[1u].packed); + half3x3 const x = half3x3(v_2, v_3, half3(v_1[2u].packed)); tint_store_and_preserve_padding(tint_module_vars.s, x); } diff --git a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl index 58118d59b0a..e9b0a54df89 100644 --- a/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat3x3_f32.wgsl.expected.ir.msl @@ -29,11 +29,11 @@ void tint_store_and_preserve_padding(device tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { +kernel void v(const constant tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; - tint_array const v = (*tint_module_vars.u); - float3 const v_1 = float3(v[0u].packed); - float3 const v_2 = float3(v[1u].packed); - float3x3 const x = float3x3(v_1, v_2, float3(v[2u].packed)); + tint_array const v_1 = (*tint_module_vars.u); + float3 const v_2 = float3(v_1[0u].packed); + float3 const v_3 = float3(v_1[1u].packed); + float3x3 const x = float3x3(v_2, v_3, float3(v_1[2u].packed)); tint_store_and_preserve_padding(tint_module_vars.s, x); } diff --git a/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl index 544882e9164..bd2a44c6c00 100644 --- a/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat3x4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half3x4* s; }; -kernel void tint_symbol(const constant half3x4* u [[buffer(0)]], device half3x4* s [[buffer(1)]]) { +kernel void v(const constant half3x4* u [[buffer(0)]], device half3x4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half3x4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl index ec483bc85c6..bf4a1c004d6 100644 --- a/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat3x4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float3x4* s; }; -kernel void tint_symbol(const constant float3x4* u [[buffer(0)]], device float3x4* s [[buffer(1)]]) { +kernel void v(const constant float3x4* u [[buffer(0)]], device float3x4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float3x4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl index 1a85f4ebe71..af847022d6c 100644 --- a/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat4x2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half4x2* s; }; -kernel void tint_symbol(const constant half4x2* u [[buffer(0)]], device half4x2* s [[buffer(1)]]) { +kernel void v(const constant half4x2* u [[buffer(0)]], device half4x2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half4x2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl index ec660da3027..13b0ef19903 100644 --- a/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat4x2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float4x2* s; }; -kernel void tint_symbol(const constant float4x2* u [[buffer(0)]], device float4x2* s [[buffer(1)]]) { +kernel void v(const constant float4x2* u [[buffer(0)]], device float4x2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float4x2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl index c2313e8f4d5..d86da7de65b 100644 --- a/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat4x3_f16.wgsl.expected.ir.msl @@ -30,12 +30,12 @@ void tint_store_and_preserve_padding(device tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { +kernel void v(const constant tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; - tint_array const v = (*tint_module_vars.u); - half3 const v_1 = half3(v[0u].packed); - half3 const v_2 = half3(v[1u].packed); - half3 const v_3 = half3(v[2u].packed); - half4x3 const x = half4x3(v_1, v_2, v_3, half3(v[3u].packed)); + tint_array const v_1 = (*tint_module_vars.u); + half3 const v_2 = half3(v_1[0u].packed); + half3 const v_3 = half3(v_1[1u].packed); + half3 const v_4 = half3(v_1[2u].packed); + half4x3 const x = half4x3(v_2, v_3, v_4, half3(v_1[3u].packed)); tint_store_and_preserve_padding(tint_module_vars.s, x); } diff --git a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl index f45297fea97..ca1ad0d2b27 100644 --- a/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat4x3_f32.wgsl.expected.ir.msl @@ -30,12 +30,12 @@ void tint_store_and_preserve_padding(device tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { +kernel void v(const constant tint_array* u [[buffer(0)]], device tint_array* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; - tint_array const v = (*tint_module_vars.u); - float3 const v_1 = float3(v[0u].packed); - float3 const v_2 = float3(v[1u].packed); - float3 const v_3 = float3(v[2u].packed); - float4x3 const x = float4x3(v_1, v_2, v_3, float3(v[3u].packed)); + tint_array const v_1 = (*tint_module_vars.u); + float3 const v_2 = float3(v_1[0u].packed); + float3 const v_3 = float3(v_1[1u].packed); + float3 const v_4 = float3(v_1[2u].packed); + float4x3 const x = float4x3(v_2, v_3, v_4, float3(v_1[3u].packed)); tint_store_and_preserve_padding(tint_module_vars.s, x); } diff --git a/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl index 7f6ab534c82..b242525dc94 100644 --- a/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat4x4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half4x4* s; }; -kernel void tint_symbol(const constant half4x4* u [[buffer(0)]], device half4x4* s [[buffer(1)]]) { +kernel void v(const constant half4x4* u [[buffer(0)]], device half4x4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half4x4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl index c9a992635e3..4cff6278923 100644 --- a/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/mat4x4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float4x4* s; }; -kernel void tint_symbol(const constant float4x4* u [[buffer(0)]], device float4x4* s [[buffer(1)]]) { +kernel void v(const constant float4x4* u [[buffer(0)]], device float4x4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float4x4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl index aaea9a68942..09a3ab16e6f 100644 --- a/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/struct_f16.wgsl.expected.ir.msl @@ -60,7 +60,7 @@ S tint_load_struct_packed_vec3(const constant S_packed_vec3* const from) { return S{.inner=tint_load_struct_packed_vec3_1((&(*from).inner))}; } -kernel void tint_symbol(const constant S_packed_vec3* u [[buffer(0)]], device S_packed_vec3* s [[buffer(1)]]) { +kernel void v_2(const constant S_packed_vec3* u [[buffer(0)]], device S_packed_vec3* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; S const x = tint_load_struct_packed_vec3(tint_module_vars.u); tint_store_and_preserve_padding(tint_module_vars.s, x); diff --git a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl index 8ae03b4816e..581dfc68d19 100644 --- a/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/struct_f32.wgsl.expected.ir.msl @@ -60,7 +60,7 @@ S tint_load_struct_packed_vec3(const constant S_packed_vec3* const from) { return S{.inner=tint_load_struct_packed_vec3_1((&(*from).inner))}; } -kernel void tint_symbol(const constant S_packed_vec3* u [[buffer(0)]], device S_packed_vec3* s [[buffer(1)]]) { +kernel void v_2(const constant S_packed_vec3* u [[buffer(0)]], device S_packed_vec3* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; S const x = tint_load_struct_packed_vec3(tint_module_vars.u); tint_store_and_preserve_padding(tint_module_vars.s, x); diff --git a/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.msl index dbe439f98eb..be78d613109 100644 --- a/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device uint* s; }; -kernel void tint_symbol(const constant uint* u [[buffer(0)]], device uint* s [[buffer(1)]]) { +kernel void v(const constant uint* u [[buffer(0)]], device uint* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; uint const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl index c6376aa6d73..9a46c12d0e9 100644 --- a/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec2_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half2* s; }; -kernel void tint_symbol(const constant half2* u [[buffer(0)]], device half2* s [[buffer(1)]]) { +kernel void v(const constant half2* u [[buffer(0)]], device half2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl index a7fac1f839b..c12529b4eaa 100644 --- a/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec2_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float2* s; }; -kernel void tint_symbol(const constant float2* u [[buffer(0)]], device float2* s [[buffer(1)]]) { +kernel void v(const constant float2* u [[buffer(0)]], device float2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl index 565fc80838f..51f1db12eb9 100644 --- a/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec2_i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device int2* s; }; -kernel void tint_symbol(const constant int2* u [[buffer(0)]], device int2* s [[buffer(1)]]) { +kernel void v(const constant int2* u [[buffer(0)]], device int2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; int2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl index 6a4657d0bff..1a8fbe8b83a 100644 --- a/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec2_u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device uint2* s; }; -kernel void tint_symbol(const constant uint2* u [[buffer(0)]], device uint2* s [[buffer(1)]]) { +kernel void v(const constant uint2* u [[buffer(0)]], device uint2* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; uint2 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl index 073b48504dd..21d55a22712 100644 --- a/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec3_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_half3* s; }; -kernel void tint_symbol(const constant packed_half3* u [[buffer(0)]], device packed_half3* s [[buffer(1)]]) { +kernel void v(const constant packed_half3* u [[buffer(0)]], device packed_half3* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half3 const x = half3((*tint_module_vars.u)); (*tint_module_vars.s) = packed_half3(x); diff --git a/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl index 01d7ca4334b..6be97f9224c 100644 --- a/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec3_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_float3* s; }; -kernel void tint_symbol(const constant packed_float3* u [[buffer(0)]], device packed_float3* s [[buffer(1)]]) { +kernel void v(const constant packed_float3* u [[buffer(0)]], device packed_float3* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float3 const x = float3((*tint_module_vars.u)); (*tint_module_vars.s) = packed_float3(x); diff --git a/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl index cb571b1d5b3..4924aa8b291 100644 --- a/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec3_i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_int3* s; }; -kernel void tint_symbol(const constant packed_int3* u [[buffer(0)]], device packed_int3* s [[buffer(1)]]) { +kernel void v(const constant packed_int3* u [[buffer(0)]], device packed_int3* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; int3 const x = int3((*tint_module_vars.u)); (*tint_module_vars.s) = packed_int3(x); diff --git a/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl index 9b99423b67c..4c574e56121 100644 --- a/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec3_u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_uint3* s; }; -kernel void tint_symbol(const constant packed_uint3* u [[buffer(0)]], device packed_uint3* s [[buffer(1)]]) { +kernel void v(const constant packed_uint3* u [[buffer(0)]], device packed_uint3* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; uint3 const x = uint3((*tint_module_vars.u)); (*tint_module_vars.s) = packed_uint3(x); diff --git a/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl index 9884f44f460..d7fffcc3a0c 100644 --- a/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec4_f16.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device half4* s; }; -kernel void tint_symbol(const constant half4* u [[buffer(0)]], device half4* s [[buffer(1)]]) { +kernel void v(const constant half4* u [[buffer(0)]], device half4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; half4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl index ca616e99865..1b84b2e9584 100644 --- a/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec4_f32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device float4* s; }; -kernel void tint_symbol(const constant float4* u [[buffer(0)]], device float4* s [[buffer(1)]]) { +kernel void v(const constant float4* u [[buffer(0)]], device float4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; float4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl index 25b361eb152..945aa37ca54 100644 --- a/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec4_i32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device int4* s; }; -kernel void tint_symbol(const constant int4* u [[buffer(0)]], device int4* s [[buffer(1)]]) { +kernel void v(const constant int4* u [[buffer(0)]], device int4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; int4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl b/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl index 36ca08570e6..36bee6ef2f8 100644 --- a/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl +++ b/test/tint/buffer/uniform/types/vec4_u32.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device uint4* s; }; -kernel void tint_symbol(const constant uint4* u [[buffer(0)]], device uint4* s [[buffer(1)]]) { +kernel void v(const constant uint4* u [[buffer(0)]], device uint4* s [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u, .s=s}; uint4 const x = (*tint_module_vars.u); (*tint_module_vars.s) = x; diff --git a/test/tint/bug/chromium/1236161.wgsl.expected.ir.msl b/test/tint/bug/chromium/1236161.wgsl.expected.ir.msl index b3362e80531..9f6133186e0 100644 --- a/test/tint/bug/chromium/1236161.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/1236161.wgsl.expected.ir.msl @@ -1,6 +1,6 @@ #include using namespace metal; -void tint_symbol() { - float const tint_symbol_1 = 1.0f; +void v() { + float const v_1 = 1.0f; } diff --git a/test/tint/bug/chromium/1251009.wgsl.expected.ir.msl b/test/tint/bug/chromium/1251009.wgsl.expected.ir.msl index e8ae4498507..b658bbb28f3 100644 --- a/test/tint/bug/chromium/1251009.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/1251009.wgsl.expected.ir.msl @@ -11,25 +11,25 @@ struct VertexInputs1 { float4 loc3; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { int VertexInputs0_loc0 [[attribute(0)]]; uint loc1 [[attribute(1)]]; uint VertexInputs1_loc1 [[attribute(2)]]; float4 VertexInputs1_loc3 [[attribute(3)]]; }; -float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { +float4 main_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { uint const foo = (inputs0.vertex_index + instance_index); return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(uint VertexInputs0_vertex_index [[vertex_id]], tint_symbol_inputs inputs [[stage_in]], uint instance_index [[instance_id]]) { - VertexInputs0 const v = VertexInputs0{.vertex_index=VertexInputs0_vertex_index, .loc0=inputs.VertexInputs0_loc0}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(v, inputs.loc1, instance_index, VertexInputs1{.loc1=inputs.VertexInputs1_loc1, .loc3=inputs.VertexInputs1_loc3}); +vertex main_outputs v(uint VertexInputs0_vertex_index [[vertex_id]], main_inputs inputs [[stage_in]], uint instance_index [[instance_id]]) { + VertexInputs0 const v_1 = VertexInputs0{.vertex_index=VertexInputs0_vertex_index, .loc0=inputs.VertexInputs0_loc0}; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(v_1, inputs.loc1, instance_index, VertexInputs1{.loc1=inputs.VertexInputs1_loc1, .loc3=inputs.VertexInputs1_loc3}); return tint_wrapper_result; } diff --git a/test/tint/bug/chromium/1290107.wgsl.expected.ir.msl b/test/tint/bug/chromium/1290107.wgsl.expected.ir.msl index e04e5b68496..ce4e1e7c626 100644 --- a/test/tint/bug/chromium/1290107.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/1290107.wgsl.expected.ir.msl @@ -22,7 +22,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_storage_buffer_sizes=tint_storage_buffer_sizes}; uint const len = ((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u); } diff --git a/test/tint/bug/chromium/1341475.wgsl.expected.ir.msl b/test/tint/bug/chromium/1341475.wgsl.expected.ir.msl index 61396a2619f..72989ccc6ff 100644 --- a/test/tint/bug/chromium/1341475.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/1341475.wgsl.expected.ir.msl @@ -1,6 +1,6 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float const a = 1.0f; } diff --git a/test/tint/bug/chromium/1372963.wgsl.expected.ir.msl b/test/tint/bug/chromium/1372963.wgsl.expected.ir.msl index 96df42760a3..72810e93a48 100644 --- a/test/tint/bug/chromium/1372963.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/1372963.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ int4 g() { return int4(0); } -fragment void tint_symbol() { +fragment void v() { g(); } diff --git a/test/tint/bug/chromium/1381883.wgsl.expected.ir.msl b/test/tint/bug/chromium/1381883.wgsl.expected.ir.msl index 6e59d1091b8..d4628797b20 100644 --- a/test/tint/bug/chromium/1381883.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/1381883.wgsl.expected.ir.msl @@ -1,13 +1,13 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float none [[user(locn2)]]; }; -void tint_symbol_inner(float none) { +void main_inner(float none) { } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.none); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(inputs.none); } diff --git a/test/tint/bug/chromium/1430309.wgsl.expected.ir.msl b/test/tint/bug/chromium/1430309.wgsl.expected.ir.msl index 74c024a3a7c..b6d304b6974 100644 --- a/test/tint/bug/chromium/1430309.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/1430309.wgsl.expected.ir.msl @@ -15,19 +15,19 @@ struct tint_module_vars_struct { thread frexp_result_f32_1* b; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner(tint_module_vars_struct tint_module_vars) { +float4 main_inner(tint_module_vars_struct tint_module_vars) { return float4((*tint_module_vars.a).f, (*tint_module_vars.b).fract, 0.0f, 0.0f); } -fragment tint_symbol_outputs tint_symbol() { +fragment main_outputs v() { thread frexp_result_f32 a = {}; thread frexp_result_f32_1 b = frexp_result_f32_1{.fract=0.5f, .exp=1}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.a=(&a), .b=(&b)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/chromium/344265982.wgsl.expected.ir.msl b/test/tint/bug/chromium/344265982.wgsl.expected.ir.msl index 817e5dd5815..3750d709273 100644 --- a/test/tint/bug/chromium/344265982.wgsl.expected.ir.msl +++ b/test/tint/bug/chromium/344265982.wgsl.expected.ir.msl @@ -14,7 +14,7 @@ struct tint_array { }; struct tint_module_vars_struct { - device tint_array* tint_symbol; + device tint_array* tint_member; }; void foo(device tint_array* const arg) { @@ -52,7 +52,7 @@ void foo(device tint_array* const arg) { } } -fragment void tint_symbol_1(device tint_array* tint_symbol [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol}; - foo(tint_module_vars.tint_symbol); +fragment void v(device tint_array* v_1 [[buffer(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_member=v_1}; + foo(tint_module_vars.tint_member); } diff --git a/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl b/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl index 01c87728277..afb8bf8fe61 100644 --- a/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.ir.msl @@ -6,15 +6,15 @@ struct tint_module_vars_struct { texture2d randomTexture; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float2 vUV [[user(locn0)]]; }; -float4 tint_symbol_inner(float2 vUV, tint_module_vars_struct tint_module_vars) { +float4 main_inner(float2 vUV, tint_module_vars_struct tint_module_vars) { float3 const random = tint_module_vars.randomTexture.sample(tint_module_vars.Sampler, vUV).xyz; int i = 0; { @@ -70,9 +70,9 @@ float4 tint_symbol_inner(float2 vUV, tint_module_vars_struct tint_module_vars) { return float4(1.0f); } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], sampler Sampler [[sampler(0)]], texture2d randomTexture [[texture(0)]]) { +fragment main_outputs v_3(main_inputs inputs [[stage_in]], sampler Sampler [[sampler(0)]], texture2d randomTexture [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Sampler=Sampler, .randomTexture=randomTexture}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(inputs.vUV, tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(inputs.vUV, tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl index ce8154fe738..a48bb557111 100644 --- a/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/indexed_assign_to_array_in_struct/1206.wgsl.expected.ir.msl @@ -66,9 +66,9 @@ Particle tint_load_struct_packed_vec3(const device Particle_packed_vec3* const f return Particle{.position=v_7, .lifetime=v_8, .color=v_9, .velocity=float3((*from).velocity)}; } -kernel void tint_symbol(const device Particles_packed_vec3* particles [[buffer(1)]], const constant Simulation* sim [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_10(const device Particles_packed_vec3* particles [[buffer(1)]], const constant Simulation* sim [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.particles=particles, .sim=sim, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - uint const v_10 = ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 176u) - 1u); - Particle particle = tint_load_struct_packed_vec3((&(*tint_module_vars.particles).p[min(uint(0), v_10)])); + uint const v_11 = ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 176u) - 1u); + Particle particle = tint_load_struct_packed_vec3((&(*tint_module_vars.particles).p[min(uint(0), v_11)])); particle.position[min((*tint_module_vars.sim).i, 7u)] = particle.position[min((*tint_module_vars.sim).i, 7u)]; } diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl index 2ccbfd119f7..ac53811736a 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_x.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct tint_module_vars_struct { const constant Uniforms* uniforms; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; float2x4 m1 = float2x4(0.0f); m1[min((*tint_module_vars.uniforms).i, 1u)].x = 1.0f; diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl index 717b919078e..80301734741 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_xy.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct tint_module_vars_struct { const constant Uniforms* uniforms; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; float2x4 m1 = float2x4(0.0f); m1[min((*tint_module_vars.uniforms).i, 1u)][min((*tint_module_vars.uniforms).j, 3u)] = 1.0f; diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl index 1454815d3e5..6e0ae157177 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_scalar_y.wgsl.expected.ir.msl @@ -11,7 +11,7 @@ struct tint_module_vars_struct { thread float2x4* m1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { thread float2x4 m1 = float2x4(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)}; (*tint_module_vars.m1)[0u][min((*tint_module_vars.uniforms).j, 3u)] = 1.0f; diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl index 1b923a1bac5..ee7f0c2a078 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/local_assign_vector.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct tint_module_vars_struct { const constant Uniforms* uniforms; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; float2x4 m1 = float2x4(0.0f); m1[min((*tint_module_vars.uniforms).i, 1u)] = float4(1.0f); diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl index 78e524873a0..5d33a04ac7a 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_x.wgsl.expected.ir.msl @@ -11,7 +11,7 @@ struct tint_module_vars_struct { thread float2x4* m1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { thread float2x4 m1 = float2x4(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)}; (*tint_module_vars.m1)[min((*tint_module_vars.uniforms).i, 1u)].x = 1.0f; diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl index 9ca7bb3251a..6b642034957 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_xy.wgsl.expected.ir.msl @@ -11,7 +11,7 @@ struct tint_module_vars_struct { thread float2x4* m1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { thread float2x4 m1 = float2x4(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)}; (*tint_module_vars.m1)[min((*tint_module_vars.uniforms).i, 1u)][min((*tint_module_vars.uniforms).j, 3u)] = 1.0f; diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl index 1454815d3e5..6e0ae157177 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_scalar_y.wgsl.expected.ir.msl @@ -11,7 +11,7 @@ struct tint_module_vars_struct { thread float2x4* m1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { thread float2x4 m1 = float2x4(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)}; (*tint_module_vars.m1)[0u][min((*tint_module_vars.uniforms).j, 3u)] = 1.0f; diff --git a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl index a4d36e17953..5251d0f3054 100644 --- a/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/matrix_assignment_dynamic_index/module_assign_vector.wgsl.expected.ir.msl @@ -11,7 +11,7 @@ struct tint_module_vars_struct { thread float2x4* m1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { thread float2x4 m1 = float2x4(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .m1=(&m1)}; (*tint_module_vars.m1)[min((*tint_module_vars.uniforms).i, 1u)] = float4(1.0f); diff --git a/test/tint/bug/fxc/vector_assignment_dynamic_index/function_var.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_dynamic_index/function_var.wgsl.expected.ir.msl index 29fa740a522..3147c9547c1 100644 --- a/test/tint/bug/fxc/vector_assignment_dynamic_index/function_var.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_dynamic_index/function_var.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { const constant uint* i; }; -kernel void tint_symbol(const constant uint* i [[buffer(0)]]) { +kernel void v(const constant uint* i [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=i}; float3 v1 = 0.0f; v1[min((*tint_module_vars.i), 2u)] = 1.0f; diff --git a/test/tint/bug/fxc/vector_assignment_dynamic_index/private_var.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_dynamic_index/private_var.wgsl.expected.ir.msl index e02426a087a..75c2727197b 100644 --- a/test/tint/bug/fxc/vector_assignment_dynamic_index/private_var.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_dynamic_index/private_var.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { thread float3* v1; }; -kernel void tint_symbol(const constant uint* i [[buffer(0)]]) { +kernel void v(const constant uint* i [[buffer(0)]]) { thread float3 v1 = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=i, .v1=(&v1)}; (*tint_module_vars.v1)[min((*tint_module_vars.i), 2u)] = 1.0f; diff --git a/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.msl index 9bf51aac35e..a7654caa7d5 100644 --- a/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_dynamic_index/storage_var.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { device packed_float3* v1; }; -kernel void tint_symbol(const constant uint* i [[buffer(0)]], device packed_float3* v1 [[buffer(1)]]) { +kernel void v(const constant uint* i [[buffer(0)]], device packed_float3* v1 [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=i, .v1=v1}; (*tint_module_vars.v1)[min((*tint_module_vars.i), 2u)] = 1.0f; } diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl index a1d07e862d2..061327989d6 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_loop.wgsl.expected.ir.msl @@ -28,7 +28,7 @@ void foo(tint_module_vars_struct tint_module_vars) { } } -kernel void tint_symbol() { +kernel void v() { thread float2 v2f = 0.0f; thread int3 v3i = 0; thread uint4 v4u = 0u; diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl index 9899e922b87..80fb71ce47d 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_call_with_no_loop.wgsl.expected.ir.msl @@ -16,7 +16,7 @@ void foo(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.v2b)[min(uint(i), 1u)] = true; } -kernel void tint_symbol() { +kernel void v() { thread float2 v2f = 0.0f; thread int3 v3i = 0; thread uint4 v4u = 0u; diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.msl index 65d3c70f3b4..405c8e59188 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_all.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float2 v2f = 0.0f; float3 v3f = 0.0f; float4 v4f = 0.0f; diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.msl index a36baa2932b..ba4155ff016 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_repeated.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float2 v2f = 0.0f; float2 v2f_2 = 0.0f; int3 v3i = 0; diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.msl index 9f7dc9a506b..e2d369d801e 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/loop_types_some.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float2 v2f = 0.0f; float3 v3f = 0.0f; float4 v4f = 0.0f; diff --git a/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.msl b/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.msl index 989a7dc2f95..9ea44b2a861 100644 --- a/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.msl +++ b/test/tint/bug/fxc/vector_assignment_in_loop/no_loop.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float2 v2f = 0.0f; float3 v3f = 0.0f; float4 v4f = 0.0f; diff --git a/test/tint/bug/oss-fuzz/57795.spv.expected.ir.msl b/test/tint/bug/oss-fuzz/57795.spv.expected.ir.msl index e0996e06c89..76d30047ce5 100644 --- a/test/tint/bug/oss-fuzz/57795.spv.expected.ir.msl +++ b/test/tint/bug/oss-fuzz/57795.spv.expected.ir.msl @@ -5,6 +5,6 @@ void main_1() { uint const x_88 = 58u; } -fragment void tint_symbol() { +fragment void v() { main_1(); } diff --git a/test/tint/bug/tint/1046.wgsl.expected.ir.msl b/test/tint/bug/tint/1046.wgsl.expected.ir.msl index c5d5c150f87..43d0d6d8a90 100644 --- a/test/tint/bug/tint/1046.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1046.wgsl.expected.ir.msl @@ -49,26 +49,26 @@ struct tint_module_vars_struct { texture2d myTexture; }; -struct tint_symbol_outputs { +struct main_outputs { float4 FragmentOutput_color [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float4 FragmentInput_view_position [[user(locn0)]]; float4 FragmentInput_normal [[user(locn1)]]; float2 FragmentInput_uv [[user(locn2)]]; float4 FragmentInput_color [[user(locn3)]]; }; -FragmentOutput tint_symbol_inner(FragmentInput tint_symbol_1, tint_module_vars_struct tint_module_vars) { +FragmentOutput main_inner(FragmentInput v, tint_module_vars_struct tint_module_vars) { FragmentOutput output = {}; output.color = float4(1.0f, 0.0f, 0.0f, 1.0f); return output; } -fragment tint_symbol_outputs tint_symbol(float4 FragmentInput_position [[position]], tint_symbol_inputs inputs [[stage_in]], const constant Uniforms* uniforms [[buffer(0)]], sampler mySampler [[sampler(0)]], texture2d myTexture [[texture(0)]]) { +fragment main_outputs v_1(float4 FragmentInput_position [[position]], main_inputs inputs [[stage_in]], const constant Uniforms* uniforms [[buffer(0)]], sampler mySampler [[sampler(0)]], texture2d myTexture [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .mySampler=mySampler, .myTexture=myTexture}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragmentOutput_color = tint_symbol_inner(FragmentInput{.position=FragmentInput_position, .view_position=inputs.FragmentInput_view_position, .normal=inputs.FragmentInput_normal, .uv=inputs.FragmentInput_uv, .color=inputs.FragmentInput_color}, tint_module_vars).color; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragmentOutput_color = main_inner(FragmentInput{.position=FragmentInput_position, .view_position=inputs.FragmentInput_view_position, .normal=inputs.FragmentInput_normal, .uv=inputs.FragmentInput_uv, .color=inputs.FragmentInput_color}, tint_module_vars).color; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1061.spvasm.expected.ir.msl b/test/tint/bug/tint/1061.spvasm.expected.ir.msl index d3ed5cf56c3..042e486ebfb 100644 --- a/test/tint/bug/tint/1061.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/1061.spvasm.expected.ir.msl @@ -14,7 +14,7 @@ struct main_out { float4 x_GLF_color_1; }; -struct tint_symbol_outputs { +struct main_outputs { float4 main_out_x_GLF_color_1 [[color(0)]]; }; @@ -30,15 +30,15 @@ void main_1(tint_module_vars_struct tint_module_vars) { } } -main_out tint_symbol_inner(tint_module_vars_struct tint_module_vars) { +main_out main_inner(tint_module_vars_struct tint_module_vars) { main_1(tint_module_vars); return main_out{.x_GLF_color_1=(*tint_module_vars.x_GLF_color)}; } -fragment tint_symbol_outputs tint_symbol(const constant buf0* x_7 [[buffer(0)]]) { +fragment main_outputs v_1(const constant buf0* x_7 [[buffer(0)]]) { thread float4 x_GLF_color = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_7=x_7, .x_GLF_color=(&x_GLF_color)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.main_out_x_GLF_color_1 = tint_symbol_inner(tint_module_vars).x_GLF_color_1; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.main_out_x_GLF_color_1 = main_inner(tint_module_vars).x_GLF_color_1; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1064.wgsl.expected.ir.msl b/test/tint/bug/tint/1064.wgsl.expected.ir.msl index 821663d62d4..89bb7c2ba1e 100644 --- a/test/tint/bug/tint/1064.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1064.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -fragment void tint_symbol() { +fragment void v() { { uint2 tint_loop_idx = 0u; while(true) { diff --git a/test/tint/bug/tint/1076.wgsl.expected.ir.msl b/test/tint/bug/tint/1076.wgsl.expected.ir.msl index f024bb48a4f..2fc2d0eb209 100644 --- a/test/tint/bug/tint/1076.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1076.wgsl.expected.ir.msl @@ -6,27 +6,27 @@ struct FragIn { uint mask; }; -struct tint_symbol_outputs { +struct main_outputs { float FragIn_a [[color(0)]]; uint FragIn_mask [[sample_mask]]; }; -struct tint_symbol_inputs { +struct main_inputs { float FragIn_a [[user(locn0)]]; float b [[user(locn1)]]; }; -FragIn tint_symbol_inner(FragIn in, float b) { +FragIn main_inner(FragIn in, float b) { if ((in.mask == 0u)) { return in; } return FragIn{.a=b, .mask=1u}; } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], uint FragIn_mask [[sample_mask]]) { - FragIn const v = tint_symbol_inner(FragIn{.a=inputs.FragIn_a, .mask=FragIn_mask}, inputs.b); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragIn_a = v.a; - tint_wrapper_result.FragIn_mask = v.mask; +fragment main_outputs v(main_inputs inputs [[stage_in]], uint FragIn_mask [[sample_mask]]) { + FragIn const v_1 = main_inner(FragIn{.a=inputs.FragIn_a, .mask=FragIn_mask}, inputs.b); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragIn_a = v_1.a; + tint_wrapper_result.FragIn_mask = v_1.mask; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1081.wgsl.expected.ir.msl b/test/tint/bug/tint/1081.wgsl.expected.ir.msl index 6393e13c4cd..b21dd0bc7a2 100644 --- a/test/tint/bug/tint/1081.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1081.wgsl.expected.ir.msl @@ -5,11 +5,11 @@ struct tint_module_vars_struct { thread bool* continue_execution; }; -struct tint_symbol_outputs { - int tint_symbol_1 [[color(2)]]; +struct main_outputs { + int tint_symbol [[color(2)]]; }; -struct tint_symbol_inputs { +struct main_inputs { int3 x [[user(locn1)]] [[flat]]; }; @@ -20,7 +20,7 @@ int f(int x, tint_module_vars_struct tint_module_vars) { return x; } -int tint_symbol_inner(int3 x, tint_module_vars_struct tint_module_vars) { +int main_inner(int3 x, tint_module_vars_struct tint_module_vars) { int y = x.x; { uint2 tint_loop_idx = 0u; @@ -47,10 +47,10 @@ int tint_symbol_inner(int3 x, tint_module_vars_struct tint_module_vars) { return y; } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { +fragment main_outputs v(main_inputs inputs [[stage_in]]) { thread bool continue_execution = true; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.continue_execution=(&continue_execution)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(inputs.x, tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(inputs.x, tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1088.spvasm.expected.ir.msl b/test/tint/bug/tint/1088.spvasm.expected.ir.msl index 84bfcd9e658..76a4b48b1c0 100644 --- a/test/tint/bug/tint/1088.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/1088.spvasm.expected.ir.msl @@ -40,12 +40,12 @@ struct main_out { float2 vUV_1; }; -struct tint_symbol_outputs { +struct main_outputs { float4 main_out_gl_Position [[position]]; float2 main_out_vUV_1 [[user(locn0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float3 position_1_param [[attribute(0)]]; float2 uv_param [[attribute(2)]]; float3 normal_param [[attribute(1)]]; @@ -64,7 +64,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.gl_Position).y = ((*tint_module_vars.gl_Position).y * -1.0f); } -main_out tint_symbol_inner(float3 position_1_param, float2 uv_param, float3 normal_param, tint_module_vars_struct tint_module_vars) { +main_out main_inner(float3 position_1_param, float2 uv_param, float3 normal_param, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.position_1) = position_1_param; (*tint_module_vars.uv) = uv_param; (*tint_module_vars.normal) = normal_param; @@ -72,16 +72,16 @@ main_out tint_symbol_inner(float3 position_1_param, float2 uv_param, float3 norm return main_out{.gl_Position=(*tint_module_vars.gl_Position), .vUV_1=(*tint_module_vars.vUV)}; } -vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const constant LeftOver* x_14 [[buffer(0)]]) { +vertex main_outputs v_1(main_inputs inputs [[stage_in]], const constant LeftOver* x_14 [[buffer(0)]]) { thread float3 position_1 = 0.0f; thread float2 vUV = 0.0f; thread float2 uv = 0.0f; thread float3 normal = 0.0f; thread float4 gl_Position = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.position_1=(&position_1), .x_14=x_14, .vUV=(&vUV), .uv=(&uv), .normal=(&normal), .gl_Position=(&gl_Position)}; - main_out const v_1 = tint_symbol_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param, tint_module_vars); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.main_out_gl_Position = v_1.gl_Position; - tint_wrapper_result.main_out_vUV_1 = v_1.vUV_1; + main_out const v_2 = main_inner(inputs.position_1_param, inputs.uv_param, inputs.normal_param, tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.main_out_gl_Position = v_2.gl_Position; + tint_wrapper_result.main_out_vUV_1 = v_2.vUV_1; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1118.wgsl.expected.ir.msl b/test/tint/bug/tint/1118.wgsl.expected.ir.msl index 32c77005f0e..a0ff8bd99b9 100644 --- a/test/tint/bug/tint/1118.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1118.wgsl.expected.ir.msl @@ -31,11 +31,11 @@ struct main_out { float4 glFragColor_1; }; -struct tint_symbol_outputs { +struct main_outputs { float4 main_out_glFragColor_1 [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float fClipDistance3_param [[user(locn2)]]; float fClipDistance4_param [[user(locn3)]]; }; @@ -117,7 +117,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.glFragColor) = x_147; } -main_out tint_symbol_inner(float fClipDistance3_param, float fClipDistance4_param, tint_module_vars_struct tint_module_vars) { +main_out main_inner(float fClipDistance3_param, float fClipDistance4_param, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.fClipDistance3) = fClipDistance3_param; (*tint_module_vars.fClipDistance4) = fClipDistance4_param; main_1(tint_module_vars); @@ -128,13 +128,13 @@ main_out tint_symbol_inner(float fClipDistance3_param, float fClipDistance4_para return v_2; } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const constant Scene* x_29 [[buffer(0)]], const constant Material_packed_vec3* x_49 [[buffer(1)]], const constant Mesh* x_137 [[buffer(2)]]) { +fragment main_outputs v_3(main_inputs inputs [[stage_in]], const constant Scene* x_29 [[buffer(0)]], const constant Material_packed_vec3* x_49 [[buffer(1)]], const constant Mesh* x_137 [[buffer(2)]]) { thread float fClipDistance3 = 0.0f; thread float fClipDistance4 = 0.0f; thread float4 glFragColor = 0.0f; thread bool continue_execution = true; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.fClipDistance3=(&fClipDistance3), .fClipDistance4=(&fClipDistance4), .x_29=x_29, .x_49=x_49, .x_137=x_137, .glFragColor=(&glFragColor), .continue_execution=(&continue_execution)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.main_out_glFragColor_1 = tint_symbol_inner(inputs.fClipDistance3_param, inputs.fClipDistance4_param, tint_module_vars).glFragColor_1; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.main_out_glFragColor_1 = main_inner(inputs.fClipDistance3_param, inputs.fClipDistance4_param, tint_module_vars).glFragColor_1; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1121.wgsl.expected.ir.msl b/test/tint/bug/tint/1121.wgsl.expected.ir.msl index d94ba3a66c6..689b765592a 100644 --- a/test/tint/bug/tint/1121.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1121.wgsl.expected.ir.msl @@ -57,7 +57,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { uint index = GlobalInvocationID.x; if ((index >= (*tint_module_vars.config).numLights)) { return; @@ -181,7 +181,7 @@ void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_mo } } -kernel void tint_symbol(uint3 GlobalInvocationID [[thread_position_in_grid]], device LightsBuffer_packed_vec3* lightsBuffer [[buffer(2)]], device Tiles* tileLightId [[buffer(3)]], const constant Config* config [[buffer(0)]], const constant Uniforms* uniforms [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_9(uint3 GlobalInvocationID [[thread_position_in_grid]], device LightsBuffer_packed_vec3* lightsBuffer [[buffer(2)]], device Tiles* tileLightId [[buffer(3)]], const constant Config* config [[buffer(0)]], const constant Uniforms* uniforms [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.lightsBuffer=lightsBuffer, .tileLightId=tileLightId, .config=config, .uniforms=uniforms, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(GlobalInvocationID, tint_module_vars); + main_inner(GlobalInvocationID, tint_module_vars); } diff --git a/test/tint/bug/tint/1136.wgsl.expected.ir.msl b/test/tint/bug/tint/1136.wgsl.expected.ir.msl index a2c084c95bf..d93e2c356c4 100644 --- a/test/tint/bug/tint/1136.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1136.wgsl.expected.ir.msl @@ -6,9 +6,9 @@ struct Buffer { }; struct tint_module_vars_struct { - device Buffer* tint_symbol; + device Buffer* tint_member; }; -void tint_symbol_1(tint_module_vars_struct tint_module_vars) { - (*tint_module_vars.tint_symbol).data = ((*tint_module_vars.tint_symbol).data + 1u); +void v(tint_module_vars_struct tint_module_vars) { + (*tint_module_vars.tint_member).data = ((*tint_module_vars.tint_member).data + 1u); } diff --git a/test/tint/bug/tint/1321.wgsl.expected.ir.msl b/test/tint/bug/tint/1321.wgsl.expected.ir.msl index 8e30a1fff81..a86bbd8bfad 100644 --- a/test/tint/bug/tint/1321.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1321.wgsl.expected.ir.msl @@ -17,7 +17,7 @@ int foo() { return 1; } -fragment void tint_symbol() { +fragment void v() { tint_array arr = tint_array{}; { uint2 tint_loop_idx = 0u; diff --git a/test/tint/bug/tint/1385.wgsl.expected.ir.msl b/test/tint/bug/tint/1385.wgsl.expected.ir.msl index d8d941ff9de..0d7711124ff 100644 --- a/test/tint/bug/tint/1385.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1385.wgsl.expected.ir.msl @@ -23,7 +23,7 @@ int foo(tint_module_vars_struct tint_module_vars) { return (*tint_module_vars.data)[min(uint(0), v)]; } -kernel void tint_symbol(const device tint_array* data [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_1(const device tint_array* data [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; foo(tint_module_vars); } diff --git a/test/tint/bug/tint/1474-a.wgsl.expected.ir.msl b/test/tint/bug/tint/1474-a.wgsl.expected.ir.msl index 7f05e0ed86d..4f3fa9dc385 100644 --- a/test/tint/bug/tint/1474-a.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1474-a.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { uint2 tint_loop_idx = 0u; while(true) { diff --git a/test/tint/bug/tint/1474-b.wgsl.expected.ir.msl b/test/tint/bug/tint/1474-b.wgsl.expected.ir.msl index 4e98217c86f..57d9ed63dec 100644 --- a/test/tint/bug/tint/1474-b.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1474-b.wgsl.expected.ir.msl @@ -5,5 +5,5 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { } diff --git a/test/tint/bug/tint/1509.wgsl.expected.ir.msl b/test/tint/bug/tint/1509.wgsl.expected.ir.msl index 9d9c7ed629f..abe03a5bcc4 100644 --- a/test/tint/bug/tint/1509.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1509.wgsl.expected.ir.msl @@ -1004,8 +1004,8 @@ struct tint_module_vars_struct { thread uint* v999; }; -struct tint_symbol_outputs { - uint tint_symbol_1 [[color(0)]]; +struct main_outputs { + uint tint_symbol [[color(0)]]; }; uint foo(tint_module_vars_struct tint_module_vars) { @@ -2013,11 +2013,11 @@ uint foo(tint_module_vars_struct tint_module_vars) { return x; } -uint tint_symbol_inner(tint_module_vars_struct tint_module_vars) { +uint main_inner(tint_module_vars_struct tint_module_vars) { return foo(tint_module_vars); } -fragment tint_symbol_outputs tint_symbol() { +fragment main_outputs v() { thread uint v0 = 0u; thread uint v1 = 0u; thread uint v2 = 0u; @@ -3019,7 +3019,7 @@ fragment tint_symbol_outputs tint_symbol() { thread uint v998 = 0u; thread uint v999 = 0u; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v0=(&v0), .v1=(&v1), .v2=(&v2), .v3=(&v3), .v4=(&v4), .v5=(&v5), .v6=(&v6), .v7=(&v7), .v8=(&v8), .v9=(&v9), .v10=(&v10), .v11=(&v11), .v12=(&v12), .v13=(&v13), .v14=(&v14), .v15=(&v15), .v16=(&v16), .v17=(&v17), .v18=(&v18), .v19=(&v19), .v20=(&v20), .v21=(&v21), .v22=(&v22), .v23=(&v23), .v24=(&v24), .v25=(&v25), .v26=(&v26), .v27=(&v27), .v28=(&v28), .v29=(&v29), .v30=(&v30), .v31=(&v31), .v32=(&v32), .v33=(&v33), .v34=(&v34), .v35=(&v35), .v36=(&v36), .v37=(&v37), .v38=(&v38), .v39=(&v39), .v40=(&v40), .v41=(&v41), .v42=(&v42), .v43=(&v43), .v44=(&v44), .v45=(&v45), .v46=(&v46), .v47=(&v47), .v48=(&v48), .v49=(&v49), .v50=(&v50), .v51=(&v51), .v52=(&v52), .v53=(&v53), .v54=(&v54), .v55=(&v55), .v56=(&v56), .v57=(&v57), .v58=(&v58), .v59=(&v59), .v60=(&v60), .v61=(&v61), .v62=(&v62), .v63=(&v63), .v64=(&v64), .v65=(&v65), .v66=(&v66), .v67=(&v67), .v68=(&v68), .v69=(&v69), .v70=(&v70), .v71=(&v71), .v72=(&v72), .v73=(&v73), .v74=(&v74), .v75=(&v75), .v76=(&v76), .v77=(&v77), .v78=(&v78), .v79=(&v79), .v80=(&v80), .v81=(&v81), .v82=(&v82), .v83=(&v83), .v84=(&v84), .v85=(&v85), .v86=(&v86), .v87=(&v87), .v88=(&v88), .v89=(&v89), .v90=(&v90), .v91=(&v91), .v92=(&v92), .v93=(&v93), .v94=(&v94), .v95=(&v95), .v96=(&v96), .v97=(&v97), .v98=(&v98), .v99=(&v99), .v100=(&v100), .v101=(&v101), .v102=(&v102), .v103=(&v103), .v104=(&v104), .v105=(&v105), .v106=(&v106), .v107=(&v107), .v108=(&v108), .v109=(&v109), .v110=(&v110), .v111=(&v111), .v112=(&v112), .v113=(&v113), .v114=(&v114), .v115=(&v115), .v116=(&v116), .v117=(&v117), .v118=(&v118), .v119=(&v119), .v120=(&v120), .v121=(&v121), .v122=(&v122), .v123=(&v123), .v124=(&v124), .v125=(&v125), .v126=(&v126), .v127=(&v127), .v128=(&v128), .v129=(&v129), .v130=(&v130), .v131=(&v131), .v132=(&v132), .v133=(&v133), .v134=(&v134), .v135=(&v135), .v136=(&v136), .v137=(&v137), .v138=(&v138), .v139=(&v139), .v140=(&v140), .v141=(&v141), .v142=(&v142), .v143=(&v143), .v144=(&v144), .v145=(&v145), .v146=(&v146), .v147=(&v147), .v148=(&v148), .v149=(&v149), .v150=(&v150), .v151=(&v151), .v152=(&v152), .v153=(&v153), .v154=(&v154), .v155=(&v155), .v156=(&v156), .v157=(&v157), .v158=(&v158), .v159=(&v159), .v160=(&v160), .v161=(&v161), .v162=(&v162), .v163=(&v163), .v164=(&v164), .v165=(&v165), .v166=(&v166), .v167=(&v167), .v168=(&v168), .v169=(&v169), .v170=(&v170), .v171=(&v171), .v172=(&v172), .v173=(&v173), .v174=(&v174), .v175=(&v175), .v176=(&v176), .v177=(&v177), .v178=(&v178), .v179=(&v179), .v180=(&v180), .v181=(&v181), .v182=(&v182), .v183=(&v183), .v184=(&v184), .v185=(&v185), .v186=(&v186), .v187=(&v187), .v188=(&v188), .v189=(&v189), .v190=(&v190), .v191=(&v191), .v192=(&v192), .v193=(&v193), .v194=(&v194), .v195=(&v195), .v196=(&v196), .v197=(&v197), .v198=(&v198), .v199=(&v199), .v200=(&v200), .v201=(&v201), .v202=(&v202), .v203=(&v203), .v204=(&v204), .v205=(&v205), .v206=(&v206), .v207=(&v207), .v208=(&v208), .v209=(&v209), .v210=(&v210), .v211=(&v211), .v212=(&v212), .v213=(&v213), .v214=(&v214), .v215=(&v215), .v216=(&v216), .v217=(&v217), .v218=(&v218), .v219=(&v219), .v220=(&v220), .v221=(&v221), .v222=(&v222), .v223=(&v223), .v224=(&v224), .v225=(&v225), .v226=(&v226), .v227=(&v227), .v228=(&v228), .v229=(&v229), .v230=(&v230), .v231=(&v231), .v232=(&v232), .v233=(&v233), .v234=(&v234), .v235=(&v235), .v236=(&v236), .v237=(&v237), .v238=(&v238), .v239=(&v239), .v240=(&v240), .v241=(&v241), .v242=(&v242), .v243=(&v243), .v244=(&v244), .v245=(&v245), .v246=(&v246), .v247=(&v247), .v248=(&v248), .v249=(&v249), .v250=(&v250), .v251=(&v251), .v252=(&v252), .v253=(&v253), .v254=(&v254), .v255=(&v255), .v256=(&v256), .v257=(&v257), .v258=(&v258), .v259=(&v259), .v260=(&v260), .v261=(&v261), .v262=(&v262), .v263=(&v263), .v264=(&v264), .v265=(&v265), .v266=(&v266), .v267=(&v267), .v268=(&v268), .v269=(&v269), .v270=(&v270), .v271=(&v271), .v272=(&v272), .v273=(&v273), .v274=(&v274), .v275=(&v275), .v276=(&v276), .v277=(&v277), .v278=(&v278), .v279=(&v279), .v280=(&v280), .v281=(&v281), .v282=(&v282), .v283=(&v283), .v284=(&v284), .v285=(&v285), .v286=(&v286), .v287=(&v287), .v288=(&v288), .v289=(&v289), .v290=(&v290), .v291=(&v291), .v292=(&v292), .v293=(&v293), .v294=(&v294), .v295=(&v295), .v296=(&v296), .v297=(&v297), .v298=(&v298), .v299=(&v299), .v300=(&v300), .v301=(&v301), .v302=(&v302), .v303=(&v303), .v304=(&v304), .v305=(&v305), .v306=(&v306), .v307=(&v307), .v308=(&v308), .v309=(&v309), .v310=(&v310), .v311=(&v311), .v312=(&v312), .v313=(&v313), .v314=(&v314), .v315=(&v315), .v316=(&v316), .v317=(&v317), .v318=(&v318), .v319=(&v319), .v320=(&v320), .v321=(&v321), .v322=(&v322), .v323=(&v323), .v324=(&v324), .v325=(&v325), .v326=(&v326), .v327=(&v327), .v328=(&v328), .v329=(&v329), .v330=(&v330), .v331=(&v331), .v332=(&v332), .v333=(&v333), .v334=(&v334), .v335=(&v335), .v336=(&v336), .v337=(&v337), .v338=(&v338), .v339=(&v339), .v340=(&v340), .v341=(&v341), .v342=(&v342), .v343=(&v343), .v344=(&v344), .v345=(&v345), .v346=(&v346), .v347=(&v347), .v348=(&v348), .v349=(&v349), .v350=(&v350), .v351=(&v351), .v352=(&v352), .v353=(&v353), .v354=(&v354), .v355=(&v355), .v356=(&v356), .v357=(&v357), .v358=(&v358), .v359=(&v359), .v360=(&v360), .v361=(&v361), .v362=(&v362), .v363=(&v363), .v364=(&v364), .v365=(&v365), .v366=(&v366), .v367=(&v367), .v368=(&v368), .v369=(&v369), .v370=(&v370), .v371=(&v371), .v372=(&v372), .v373=(&v373), .v374=(&v374), .v375=(&v375), .v376=(&v376), .v377=(&v377), .v378=(&v378), .v379=(&v379), .v380=(&v380), .v381=(&v381), .v382=(&v382), .v383=(&v383), .v384=(&v384), .v385=(&v385), .v386=(&v386), .v387=(&v387), .v388=(&v388), .v389=(&v389), .v390=(&v390), .v391=(&v391), .v392=(&v392), .v393=(&v393), .v394=(&v394), .v395=(&v395), .v396=(&v396), .v397=(&v397), .v398=(&v398), .v399=(&v399), .v400=(&v400), .v401=(&v401), .v402=(&v402), .v403=(&v403), .v404=(&v404), .v405=(&v405), .v406=(&v406), .v407=(&v407), .v408=(&v408), .v409=(&v409), .v410=(&v410), .v411=(&v411), .v412=(&v412), .v413=(&v413), .v414=(&v414), .v415=(&v415), .v416=(&v416), .v417=(&v417), .v418=(&v418), .v419=(&v419), .v420=(&v420), .v421=(&v421), .v422=(&v422), .v423=(&v423), .v424=(&v424), .v425=(&v425), .v426=(&v426), .v427=(&v427), .v428=(&v428), .v429=(&v429), .v430=(&v430), .v431=(&v431), .v432=(&v432), .v433=(&v433), .v434=(&v434), .v435=(&v435), .v436=(&v436), .v437=(&v437), .v438=(&v438), .v439=(&v439), .v440=(&v440), .v441=(&v441), .v442=(&v442), .v443=(&v443), .v444=(&v444), .v445=(&v445), .v446=(&v446), .v447=(&v447), .v448=(&v448), .v449=(&v449), .v450=(&v450), .v451=(&v451), .v452=(&v452), .v453=(&v453), .v454=(&v454), .v455=(&v455), .v456=(&v456), .v457=(&v457), .v458=(&v458), .v459=(&v459), .v460=(&v460), .v461=(&v461), .v462=(&v462), .v463=(&v463), .v464=(&v464), .v465=(&v465), .v466=(&v466), .v467=(&v467), .v468=(&v468), .v469=(&v469), .v470=(&v470), .v471=(&v471), .v472=(&v472), .v473=(&v473), .v474=(&v474), .v475=(&v475), .v476=(&v476), .v477=(&v477), .v478=(&v478), .v479=(&v479), .v480=(&v480), .v481=(&v481), .v482=(&v482), .v483=(&v483), .v484=(&v484), .v485=(&v485), .v486=(&v486), .v487=(&v487), .v488=(&v488), .v489=(&v489), .v490=(&v490), .v491=(&v491), .v492=(&v492), .v493=(&v493), .v494=(&v494), .v495=(&v495), .v496=(&v496), .v497=(&v497), .v498=(&v498), .v499=(&v499), .v500=(&v500), .v501=(&v501), .v502=(&v502), .v503=(&v503), .v504=(&v504), .v505=(&v505), .v506=(&v506), .v507=(&v507), .v508=(&v508), .v509=(&v509), .v510=(&v510), .v511=(&v511), .v512=(&v512), .v513=(&v513), .v514=(&v514), .v515=(&v515), .v516=(&v516), .v517=(&v517), .v518=(&v518), .v519=(&v519), .v520=(&v520), .v521=(&v521), .v522=(&v522), .v523=(&v523), .v524=(&v524), .v525=(&v525), .v526=(&v526), .v527=(&v527), .v528=(&v528), .v529=(&v529), .v530=(&v530), .v531=(&v531), .v532=(&v532), .v533=(&v533), .v534=(&v534), .v535=(&v535), .v536=(&v536), .v537=(&v537), .v538=(&v538), .v539=(&v539), .v540=(&v540), .v541=(&v541), .v542=(&v542), .v543=(&v543), .v544=(&v544), .v545=(&v545), .v546=(&v546), .v547=(&v547), .v548=(&v548), .v549=(&v549), .v550=(&v550), .v551=(&v551), .v552=(&v552), .v553=(&v553), .v554=(&v554), .v555=(&v555), .v556=(&v556), .v557=(&v557), .v558=(&v558), .v559=(&v559), .v560=(&v560), .v561=(&v561), .v562=(&v562), .v563=(&v563), .v564=(&v564), .v565=(&v565), .v566=(&v566), .v567=(&v567), .v568=(&v568), .v569=(&v569), .v570=(&v570), .v571=(&v571), .v572=(&v572), .v573=(&v573), .v574=(&v574), .v575=(&v575), .v576=(&v576), .v577=(&v577), .v578=(&v578), .v579=(&v579), .v580=(&v580), .v581=(&v581), .v582=(&v582), .v583=(&v583), .v584=(&v584), .v585=(&v585), .v586=(&v586), .v587=(&v587), .v588=(&v588), .v589=(&v589), .v590=(&v590), .v591=(&v591), .v592=(&v592), .v593=(&v593), .v594=(&v594), .v595=(&v595), .v596=(&v596), .v597=(&v597), .v598=(&v598), .v599=(&v599), .v600=(&v600), .v601=(&v601), .v602=(&v602), .v603=(&v603), .v604=(&v604), .v605=(&v605), .v606=(&v606), .v607=(&v607), .v608=(&v608), .v609=(&v609), .v610=(&v610), .v611=(&v611), .v612=(&v612), .v613=(&v613), .v614=(&v614), .v615=(&v615), .v616=(&v616), .v617=(&v617), .v618=(&v618), .v619=(&v619), .v620=(&v620), .v621=(&v621), .v622=(&v622), .v623=(&v623), .v624=(&v624), .v625=(&v625), .v626=(&v626), .v627=(&v627), .v628=(&v628), .v629=(&v629), .v630=(&v630), .v631=(&v631), .v632=(&v632), .v633=(&v633), .v634=(&v634), .v635=(&v635), .v636=(&v636), .v637=(&v637), .v638=(&v638), .v639=(&v639), .v640=(&v640), .v641=(&v641), .v642=(&v642), .v643=(&v643), .v644=(&v644), .v645=(&v645), .v646=(&v646), .v647=(&v647), .v648=(&v648), .v649=(&v649), .v650=(&v650), .v651=(&v651), .v652=(&v652), .v653=(&v653), .v654=(&v654), .v655=(&v655), .v656=(&v656), .v657=(&v657), .v658=(&v658), .v659=(&v659), .v660=(&v660), .v661=(&v661), .v662=(&v662), .v663=(&v663), .v664=(&v664), .v665=(&v665), .v666=(&v666), .v667=(&v667), .v668=(&v668), .v669=(&v669), .v670=(&v670), .v671=(&v671), .v672=(&v672), .v673=(&v673), .v674=(&v674), .v675=(&v675), .v676=(&v676), .v677=(&v677), .v678=(&v678), .v679=(&v679), .v680=(&v680), .v681=(&v681), .v682=(&v682), .v683=(&v683), .v684=(&v684), .v685=(&v685), .v686=(&v686), .v687=(&v687), .v688=(&v688), .v689=(&v689), .v690=(&v690), .v691=(&v691), .v692=(&v692), .v693=(&v693), .v694=(&v694), .v695=(&v695), .v696=(&v696), .v697=(&v697), .v698=(&v698), .v699=(&v699), .v700=(&v700), .v701=(&v701), .v702=(&v702), .v703=(&v703), .v704=(&v704), .v705=(&v705), .v706=(&v706), .v707=(&v707), .v708=(&v708), .v709=(&v709), .v710=(&v710), .v711=(&v711), .v712=(&v712), .v713=(&v713), .v714=(&v714), .v715=(&v715), .v716=(&v716), .v717=(&v717), .v718=(&v718), .v719=(&v719), .v720=(&v720), .v721=(&v721), .v722=(&v722), .v723=(&v723), .v724=(&v724), .v725=(&v725), .v726=(&v726), .v727=(&v727), .v728=(&v728), .v729=(&v729), .v730=(&v730), .v731=(&v731), .v732=(&v732), .v733=(&v733), .v734=(&v734), .v735=(&v735), .v736=(&v736), .v737=(&v737), .v738=(&v738), .v739=(&v739), .v740=(&v740), .v741=(&v741), .v742=(&v742), .v743=(&v743), .v744=(&v744), .v745=(&v745), .v746=(&v746), .v747=(&v747), .v748=(&v748), .v749=(&v749), .v750=(&v750), .v751=(&v751), .v752=(&v752), .v753=(&v753), .v754=(&v754), .v755=(&v755), .v756=(&v756), .v757=(&v757), .v758=(&v758), .v759=(&v759), .v760=(&v760), .v761=(&v761), .v762=(&v762), .v763=(&v763), .v764=(&v764), .v765=(&v765), .v766=(&v766), .v767=(&v767), .v768=(&v768), .v769=(&v769), .v770=(&v770), .v771=(&v771), .v772=(&v772), .v773=(&v773), .v774=(&v774), .v775=(&v775), .v776=(&v776), .v777=(&v777), .v778=(&v778), .v779=(&v779), .v780=(&v780), .v781=(&v781), .v782=(&v782), .v783=(&v783), .v784=(&v784), .v785=(&v785), .v786=(&v786), .v787=(&v787), .v788=(&v788), .v789=(&v789), .v790=(&v790), .v791=(&v791), .v792=(&v792), .v793=(&v793), .v794=(&v794), .v795=(&v795), .v796=(&v796), .v797=(&v797), .v798=(&v798), .v799=(&v799), .v800=(&v800), .v801=(&v801), .v802=(&v802), .v803=(&v803), .v804=(&v804), .v805=(&v805), .v806=(&v806), .v807=(&v807), .v808=(&v808), .v809=(&v809), .v810=(&v810), .v811=(&v811), .v812=(&v812), .v813=(&v813), .v814=(&v814), .v815=(&v815), .v816=(&v816), .v817=(&v817), .v818=(&v818), .v819=(&v819), .v820=(&v820), .v821=(&v821), .v822=(&v822), .v823=(&v823), .v824=(&v824), .v825=(&v825), .v826=(&v826), .v827=(&v827), .v828=(&v828), .v829=(&v829), .v830=(&v830), .v831=(&v831), .v832=(&v832), .v833=(&v833), .v834=(&v834), .v835=(&v835), .v836=(&v836), .v837=(&v837), .v838=(&v838), .v839=(&v839), .v840=(&v840), .v841=(&v841), .v842=(&v842), .v843=(&v843), .v844=(&v844), .v845=(&v845), .v846=(&v846), .v847=(&v847), .v848=(&v848), .v849=(&v849), .v850=(&v850), .v851=(&v851), .v852=(&v852), .v853=(&v853), .v854=(&v854), .v855=(&v855), .v856=(&v856), .v857=(&v857), .v858=(&v858), .v859=(&v859), .v860=(&v860), .v861=(&v861), .v862=(&v862), .v863=(&v863), .v864=(&v864), .v865=(&v865), .v866=(&v866), .v867=(&v867), .v868=(&v868), .v869=(&v869), .v870=(&v870), .v871=(&v871), .v872=(&v872), .v873=(&v873), .v874=(&v874), .v875=(&v875), .v876=(&v876), .v877=(&v877), .v878=(&v878), .v879=(&v879), .v880=(&v880), .v881=(&v881), .v882=(&v882), .v883=(&v883), .v884=(&v884), .v885=(&v885), .v886=(&v886), .v887=(&v887), .v888=(&v888), .v889=(&v889), .v890=(&v890), .v891=(&v891), .v892=(&v892), .v893=(&v893), .v894=(&v894), .v895=(&v895), .v896=(&v896), .v897=(&v897), .v898=(&v898), .v899=(&v899), .v900=(&v900), .v901=(&v901), .v902=(&v902), .v903=(&v903), .v904=(&v904), .v905=(&v905), .v906=(&v906), .v907=(&v907), .v908=(&v908), .v909=(&v909), .v910=(&v910), .v911=(&v911), .v912=(&v912), .v913=(&v913), .v914=(&v914), .v915=(&v915), .v916=(&v916), .v917=(&v917), .v918=(&v918), .v919=(&v919), .v920=(&v920), .v921=(&v921), .v922=(&v922), .v923=(&v923), .v924=(&v924), .v925=(&v925), .v926=(&v926), .v927=(&v927), .v928=(&v928), .v929=(&v929), .v930=(&v930), .v931=(&v931), .v932=(&v932), .v933=(&v933), .v934=(&v934), .v935=(&v935), .v936=(&v936), .v937=(&v937), .v938=(&v938), .v939=(&v939), .v940=(&v940), .v941=(&v941), .v942=(&v942), .v943=(&v943), .v944=(&v944), .v945=(&v945), .v946=(&v946), .v947=(&v947), .v948=(&v948), .v949=(&v949), .v950=(&v950), .v951=(&v951), .v952=(&v952), .v953=(&v953), .v954=(&v954), .v955=(&v955), .v956=(&v956), .v957=(&v957), .v958=(&v958), .v959=(&v959), .v960=(&v960), .v961=(&v961), .v962=(&v962), .v963=(&v963), .v964=(&v964), .v965=(&v965), .v966=(&v966), .v967=(&v967), .v968=(&v968), .v969=(&v969), .v970=(&v970), .v971=(&v971), .v972=(&v972), .v973=(&v973), .v974=(&v974), .v975=(&v975), .v976=(&v976), .v977=(&v977), .v978=(&v978), .v979=(&v979), .v980=(&v980), .v981=(&v981), .v982=(&v982), .v983=(&v983), .v984=(&v984), .v985=(&v985), .v986=(&v986), .v987=(&v987), .v988=(&v988), .v989=(&v989), .v990=(&v990), .v991=(&v991), .v992=(&v992), .v993=(&v993), .v994=(&v994), .v995=(&v995), .v996=(&v996), .v997=(&v997), .v998=(&v998), .v999=(&v999)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1518.wgsl.expected.ir.msl b/test/tint/bug/tint/1518.wgsl.expected.ir.msl index be0e7d71e24..3a19e3e6d26 100644 --- a/test/tint/bug/tint/1518.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1518.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } else { if (false) { diff --git a/test/tint/bug/tint/1520.spvasm.expected.ir.msl b/test/tint/bug/tint/1520.spvasm.expected.ir.msl index 710329603c8..7b87863e724 100644 --- a/test/tint/bug/tint/1520.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/1520.spvasm.expected.ir.msl @@ -38,11 +38,11 @@ struct main_out { float4 sk_FragColor_1; }; -struct tint_symbol_outputs { +struct main_outputs { float4 main_out_sk_FragColor_1 [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float4 vcolor_S0_param [[user(locn0)]]; }; @@ -179,19 +179,19 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.sk_FragColor) = x_125; } -main_out tint_symbol_inner(bool sk_Clockwise_param, float4 vcolor_S0_param, tint_module_vars_struct tint_module_vars) { +main_out main_inner(bool sk_Clockwise_param, float4 vcolor_S0_param, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.sk_Clockwise) = sk_Clockwise_param; (*tint_module_vars.vcolor_S0) = vcolor_S0_param; main_1(tint_module_vars); return main_out{.sk_FragColor_1=(*tint_module_vars.sk_FragColor)}; } -fragment tint_symbol_outputs tint_symbol(bool sk_Clockwise_param [[front_facing]], tint_symbol_inputs inputs [[stage_in]], const constant UniformBuffer_packed_vec3* x_4 [[buffer(0)]]) { +fragment main_outputs v_3(bool sk_Clockwise_param [[front_facing]], main_inputs inputs [[stage_in]], const constant UniformBuffer_packed_vec3* x_4 [[buffer(0)]]) { thread float4 sk_FragColor = 0.0f; thread bool sk_Clockwise = false; thread float4 vcolor_S0 = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_4=x_4, .sk_FragColor=(&sk_FragColor), .sk_Clockwise=(&sk_Clockwise), .vcolor_S0=(&vcolor_S0)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.main_out_sk_FragColor_1 = tint_symbol_inner(sk_Clockwise_param, inputs.vcolor_S0_param, tint_module_vars).sk_FragColor_1; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.main_out_sk_FragColor_1 = main_inner(sk_Clockwise_param, inputs.vcolor_S0_param, tint_module_vars).sk_FragColor_1; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1534.wgsl.expected.ir.msl b/test/tint/bug/tint/1534.wgsl.expected.ir.msl index e7bbc9392e6..883de5eedc7 100644 --- a/test/tint/bug/tint/1534.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1534.wgsl.expected.ir.msl @@ -31,9 +31,9 @@ uint tint_dot(uint3 lhs, uint3 rhs) { return (((lhs * rhs).x + (lhs * rhs).y) + (lhs * rhs).z); } -kernel void tint_symbol(const constant g_packed_vec3* i [[buffer(0)]], device h* j [[buffer(1)]]) { +kernel void v(const constant g_packed_vec3* i [[buffer(0)]], device h* j [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=i, .j=j}; - uint3 const v = uint3((*tint_module_vars.i).a); - uint const l = tint_dot(v, uint3((*tint_module_vars.i).a)); + uint3 const v_1 = uint3((*tint_module_vars.i).a); + uint const l = tint_dot(v_1, uint3((*tint_module_vars.i).a)); (*tint_module_vars.j).a = (*tint_module_vars.i).a.x; } diff --git a/test/tint/bug/tint/1538.wgsl.expected.ir.msl b/test/tint/bug/tint/1538.wgsl.expected.ir.msl index 4c800ae3261..331ff68b24a 100644 --- a/test/tint/bug/tint/1538.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1538.wgsl.expected.ir.msl @@ -36,7 +36,7 @@ int f() { return 0; } -kernel void tint_symbol(device tint_array* buf [[buffer(0)]]) { +kernel void v(device tint_array* buf [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.buf=buf}; { uint2 tint_loop_idx = 0u; diff --git a/test/tint/bug/tint/1540.wgsl.expected.ir.msl b/test/tint/bug/tint/1540.wgsl.expected.ir.msl index 40e36901d06..529138162b2 100644 --- a/test/tint/bug/tint/1540.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1540.wgsl.expected.ir.msl @@ -5,9 +5,9 @@ struct S { bool e; }; -kernel void tint_symbol() { +kernel void v_1() { bool b = false; - bool const v_1 = b; - uint const v_2 = uint(true); - S v = S{.e=bool((v_2 & uint(v_1)))}; + bool const v_2 = b; + uint const v_3 = uint(true); + S v = S{.e=bool((v_3 & uint(v_2)))}; } diff --git a/test/tint/bug/tint/1541.wgsl.expected.ir.msl b/test/tint/bug/tint/1541.wgsl.expected.ir.msl index e89d83af07d..50979097393 100644 --- a/test/tint/bug/tint/1541.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1541.wgsl.expected.ir.msl @@ -1,8 +1,8 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v_1() { bool const a = true; - uint const v_1 = uint(a); - bool v = select(bool((v_1 & uint(true))), true, false); + uint const v_2 = uint(a); + bool v = select(bool((v_2 & uint(true))), true, false); } diff --git a/test/tint/bug/tint/1542.wgsl.expected.ir.msl b/test/tint/bug/tint/1542.wgsl.expected.ir.msl index c9b2411627b..dc6e7b92f4b 100644 --- a/test/tint/bug/tint/1542.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1542.wgsl.expected.ir.msl @@ -22,7 +22,7 @@ struct tint_module_vars_struct { const constant UniformBuffer_packed_vec3* u_input; }; -kernel void tint_symbol(const constant UniformBuffer_packed_vec3* u_input [[buffer(0)]]) { +kernel void v(const constant UniformBuffer_packed_vec3* u_input [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u_input=u_input}; int3 const temp = as_type((as_type(int3((*tint_module_vars.u_input).d)) << (uint3(0u) & uint3(31u)))); } diff --git a/test/tint/bug/tint/1557.wgsl.expected.ir.msl b/test/tint/bug/tint/1557.wgsl.expected.ir.msl index 1131e164c51..4a677373e4e 100644 --- a/test/tint/bug/tint/1557.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1557.wgsl.expected.ir.msl @@ -33,7 +33,7 @@ void g() { } } -kernel void tint_symbol(const constant int* u [[buffer(0)]]) { +kernel void v(const constant int* u [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u}; switch((*tint_module_vars.u)) { case 0: diff --git a/test/tint/bug/tint/1573.wgsl.expected.ir.msl b/test/tint/bug/tint/1573.wgsl.expected.ir.msl index 2c617a6d33f..f3ea9aab332 100644 --- a/test/tint/bug/tint/1573.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1573.wgsl.expected.ir.msl @@ -16,7 +16,7 @@ atomic_compare_exchange_result_u32 v(device atomic_uint* const atomic_ptr, uint return atomic_compare_exchange_result_u32{.old_value=old_value, .exchanged=v_1}; } -kernel void tint_symbol(device atomic_uint* a [[buffer(0)]]) { +kernel void v_2(device atomic_uint* a [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.a=a}; uint value = 42u; atomic_compare_exchange_result_u32 const result = v(tint_module_vars.a, 0u, value); diff --git a/test/tint/bug/tint/1574.wgsl.expected.ir.msl b/test/tint/bug/tint/1574.wgsl.expected.ir.msl index 9626c76198a..84d0dfefca8 100644 --- a/test/tint/bug/tint/1574.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1574.wgsl.expected.ir.msl @@ -18,9 +18,9 @@ struct tint_module_vars_struct { threadgroup atomic_int* b_i32; }; -struct tint_symbol_3 { - atomic_uint tint_symbol_1; - atomic_int tint_symbol_2; +struct tint_symbol_2 { + atomic_uint tint_symbol; + atomic_int tint_symbol_1; }; atomic_compare_exchange_result_i32 v(threadgroup atomic_int* const atomic_ptr, int cmp, int val) { @@ -47,7 +47,7 @@ atomic_compare_exchange_result_u32 v_6(device atomic_uint* const atomic_ptr, uin return atomic_compare_exchange_result_u32{.old_value=old_value, .exchanged=v_7}; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { atomic_store_explicit(tint_module_vars.b_u32, 0u, memory_order_relaxed); atomic_store_explicit(tint_module_vars.b_i32, 0, memory_order_relaxed); @@ -71,7 +71,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul atomic_compare_exchange_result_i32 const r3_3 = v(tint_module_vars.b_i32, 0, value_3); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], device atomic_uint* a_u32 [[buffer(0)]], device atomic_int* a_i32 [[buffer(1)]], threadgroup tint_symbol_3* v_8 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.a_u32=a_u32, .a_i32=a_i32, .b_u32=(&(*v_8).tint_symbol_1), .b_i32=(&(*v_8).tint_symbol_2)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_8(uint tint_local_index [[thread_index_in_threadgroup]], device atomic_uint* a_u32 [[buffer(0)]], device atomic_int* a_i32 [[buffer(1)]], threadgroup tint_symbol_2* v_9 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.a_u32=a_u32, .a_i32=a_i32, .b_u32=(&(*v_9).tint_symbol), .b_i32=(&(*v_9).tint_symbol_1)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/bug/tint/1598.wgsl.expected.ir.msl b/test/tint/bug/tint/1598.wgsl.expected.ir.msl index 2fd9381dc8a..48e573d0155 100644 --- a/test/tint/bug/tint/1598.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1598.wgsl.expected.ir.msl @@ -13,6 +13,6 @@ struct tint_array { T elements[N]; }; -fragment void tint_symbol() { +fragment void v() { tint_array a = {}; } diff --git a/test/tint/bug/tint/1604.wgsl.expected.ir.msl b/test/tint/bug/tint/1604.wgsl.expected.ir.msl index 0537a769132..40fceb71cc3 100644 --- a/test/tint/bug/tint/1604.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1604.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { const constant int* x; }; -kernel void tint_symbol(const constant int* x [[buffer(0)]]) { +kernel void v(const constant int* x [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x=x}; switch((*tint_module_vars.x)) { case 0: diff --git a/test/tint/bug/tint/1605.wgsl.expected.ir.msl b/test/tint/bug/tint/1605.wgsl.expected.ir.msl index 8e463a4b315..5252fb41dfe 100644 --- a/test/tint/bug/tint/1605.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1605.wgsl.expected.ir.msl @@ -44,7 +44,7 @@ bool func_3(tint_module_vars_struct tint_module_vars) { return false; } -kernel void tint_symbol(const constant int* b [[buffer(0)]]) { +kernel void v(const constant int* b [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.b=b}; func_3(tint_module_vars); } diff --git a/test/tint/bug/tint/1641.wgsl.expected.ir.msl b/test/tint/bug/tint/1641.wgsl.expected.ir.msl index 95c4f3ee836..1525b08a008 100644 --- a/test/tint/bug/tint/1641.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1641.wgsl.expected.ir.msl @@ -17,17 +17,17 @@ struct Normals { float3 f; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { int const zero = 0; return float4(tint_array{Normals{.f=float3(0.0f, 0.0f, 1.0f)}}[min(uint(zero), 0u)].f, 1.0f); } -vertex tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +vertex main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1666.wgsl.expected.ir.msl b/test/tint/bug/tint/1666.wgsl.expected.ir.msl index 72fc61c1f08..0d2da2386cf 100644 --- a/test/tint/bug/tint/1666.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1666.wgsl.expected.ir.msl @@ -23,7 +23,7 @@ void vector() { int const x = int2(1, 2)[min(uint(idx), 1u)]; } -void tint_symbol() { +void v() { int const idx = 4; float2 const x = float2x2(float2(1.0f, 2.0f), float2(3.0f, 4.0f))[min(uint(idx), 1u)]; } @@ -36,14 +36,14 @@ void fixed_size_array() { void runtime_size_array(tint_module_vars_struct tint_module_vars) { int const idx = -1; - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); - float const x = (*tint_module_vars.rarr)[min(uint(idx), v)]; + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); + float const x = (*tint_module_vars.rarr)[min(uint(idx), v_1)]; } kernel void f(const device tint_array* rarr [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.rarr=rarr, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; vector(); - tint_symbol(); + v(); fixed_size_array(); runtime_size_array(tint_module_vars); } diff --git a/test/tint/bug/tint/1670.spvasm.expected.ir.msl b/test/tint/bug/tint/1670.spvasm.expected.ir.msl index dc4782ded06..608ba0da102 100644 --- a/test/tint/bug/tint/1670.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/1670.spvasm.expected.ir.msl @@ -22,6 +22,6 @@ void main_1() { m4i = (v_4 * float4x4(v_5, v_6, v_7, float4((((-(m4[1u].x) * ((m4[2u].y * m4[3u].z) - (m4[2u].z * m4[3u].y))) + (m4[1u].y * ((m4[2u].x * m4[3u].z) - (m4[2u].z * m4[3u].x)))) - (m4[1u].z * ((m4[2u].x * m4[3u].y) - (m4[2u].y * m4[3u].x)))), (((m4[0u].x * ((m4[2u].y * m4[3u].z) - (m4[2u].z * m4[3u].y))) - (m4[0u].y * ((m4[2u].x * m4[3u].z) - (m4[2u].z * m4[3u].x)))) + (m4[0u].z * ((m4[2u].x * m4[3u].y) - (m4[2u].y * m4[3u].x)))), (((-(m4[0u].x) * ((m4[1u].y * m4[3u].z) - (m4[1u].z * m4[3u].y))) + (m4[0u].y * ((m4[1u].x * m4[3u].z) - (m4[1u].z * m4[3u].x)))) - (m4[0u].z * ((m4[1u].x * m4[3u].y) - (m4[1u].y * m4[3u].x)))), (((m4[0u].x * ((m4[1u].y * m4[2u].z) - (m4[1u].z * m4[2u].y))) - (m4[0u].y * ((m4[1u].x * m4[2u].z) - (m4[1u].z * m4[2u].x)))) + (m4[0u].z * ((m4[1u].x * m4[2u].y) - (m4[1u].y * m4[2u].x))))))); } -fragment void tint_symbol() { +fragment void v_8() { main_1(); } diff --git a/test/tint/bug/tint/1677.wgsl.expected.ir.msl b/test/tint/bug/tint/1677.wgsl.expected.ir.msl index ac1a1ec073e..7c085fe66fb 100644 --- a/test/tint/bug/tint/1677.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1677.wgsl.expected.ir.msl @@ -22,11 +22,11 @@ struct tint_module_vars_struct { const device Input_packed_vec3* input; }; -void tint_symbol_inner(uint3 id, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 id, tint_module_vars_struct tint_module_vars) { int3 const pos = as_type((as_type(int3((*tint_module_vars.input).position)) - as_type(int3(0)))); } -kernel void tint_symbol(uint3 id [[thread_position_in_grid]], const device Input_packed_vec3* input [[buffer(0)]]) { +kernel void v(uint3 id [[thread_position_in_grid]], const device Input_packed_vec3* input [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.input=input}; - tint_symbol_inner(id, tint_module_vars); + main_inner(id, tint_module_vars); } diff --git a/test/tint/bug/tint/1725.wgsl.expected.ir.msl b/test/tint/bug/tint/1725.wgsl.expected.ir.msl index aaada1c7d93..6e498da42bb 100644 --- a/test/tint/bug/tint/1725.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1725.wgsl.expected.ir.msl @@ -13,19 +13,19 @@ struct tint_array { T elements[N]; }; -struct tint_module_vars_struct { - const device tint_array* tint_symbol; - const constant tint_array* tint_storage_buffer_sizes; +struct tint_struct { + const device tint_array* tint_member; + const constant tint_array* tint_member_1; }; -void tint_symbol_1_inner(uint tint_symbol_2, tint_module_vars_struct tint_module_vars) { - int const tint_symbol_3 = 0; - int const tint_symbol_4 = 0; - int const tint_symbol_5 = 0; - uint const tint_symbol_6 = (*tint_module_vars.tint_symbol)[min(tint_symbol_2, (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u))]; +void v(uint v_1, tint_struct v_2) { + int const v_3 = 0; + int const v_4 = 0; + int const v_5 = 0; + uint const v_6 = (*v_2.tint_member)[min(v_1, (((*v_2.tint_member_1)[0u].x / 4u) - 1u))]; } -kernel void tint_symbol_1(uint tint_symbol_2 [[thread_index_in_threadgroup]], const device tint_array* tint_symbol [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_1_inner(tint_symbol_2, tint_module_vars); +kernel void tint_entry_point(uint v_8 [[thread_index_in_threadgroup]], const device tint_array* v_9 [[buffer(0)]], const constant tint_array* v_10 [[buffer(30)]]) { + tint_struct const v_11 = tint_struct{.tint_member=v_9, .tint_member_1=v_10}; + v(v_8, v_11); } diff --git a/test/tint/bug/tint/1735.wgsl.expected.ir.msl b/test/tint/bug/tint/1735.wgsl.expected.ir.msl index 44e2147ae60..25ed5397de7 100644 --- a/test/tint/bug/tint/1735.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1735.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct tint_module_vars_struct { device S* out; }; -kernel void tint_symbol(const device S* in [[buffer(1)]], device S* out [[buffer(0)]]) { +kernel void v(const device S* in [[buffer(1)]], device S* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.in=in, .out=out}; (*tint_module_vars.out) = (*tint_module_vars.in); } diff --git a/test/tint/bug/tint/1739.wgsl.expected.ir.msl b/test/tint/bug/tint/1739.wgsl.expected.ir.msl index 1a9e2691913..6db8b6d1671 100644 --- a/test/tint/bug/tint/1739.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1739.wgsl.expected.ir.msl @@ -113,14 +113,14 @@ tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_Exte return tint_ExternalTextureParams{.numPlanes=v_10, .doYuvToRgbConversionOnly=v_11, .yuvToRgbConversionMatrix=v_12, .gammaDecodeParams=v_13, .gammaEncodeParams=v_14, .gamutConversionMatrix=v_18, .sampleTransform=(*from).sampleTransform, .loadTransform=(*from).loadTransform, .samplePlane0RectMin=(*from).samplePlane0RectMin, .samplePlane0RectMax=(*from).samplePlane0RectMax, .samplePlane1RectMin=(*from).samplePlane1RectMin, .samplePlane1RectMax=(*from).samplePlane1RectMax, .apparentSize=(*from).apparentSize, .plane1CoordFactor=(*from).plane1CoordFactor}; } -kernel void tint_symbol(texture2d t_plane0 [[texture(1)]], texture2d t_plane1 [[texture(2)]], const constant tint_ExternalTextureParams_packed_vec3* t_params [[buffer(3)]], texture2d outImage [[texture(0)]]) { +kernel void v_19(texture2d t_plane0 [[texture(1)]], texture2d t_plane1 [[texture(2)]], const constant tint_ExternalTextureParams_packed_vec3* t_params [[buffer(3)]], texture2d outImage [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_plane0=t_plane0, .t_plane1=t_plane1, .t_params=t_params, .outImage=outImage}; - tint_ExternalTextureParams const v_19 = tint_load_struct_packed_vec3(tint_module_vars.t_params); - float4 red = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_19, min(uint2(int2(10)), ((v_19.apparentSize + uint2(1u)) - uint2(1u)))); - float4 const v_20 = red; - tint_module_vars.outImage.write(v_20, uint2(int2(0))); - tint_ExternalTextureParams const v_21 = tint_load_struct_packed_vec3(tint_module_vars.t_params); - float4 green = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_21, min(uint2(int2(70, 118)), ((v_21.apparentSize + uint2(1u)) - uint2(1u)))); - float4 const v_22 = green; - tint_module_vars.outImage.write(v_22, uint2(int2(1, 0))); + tint_ExternalTextureParams const v_20 = tint_load_struct_packed_vec3(tint_module_vars.t_params); + float4 red = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_20, min(uint2(int2(10)), ((v_20.apparentSize + uint2(1u)) - uint2(1u)))); + float4 const v_21 = red; + tint_module_vars.outImage.write(v_21, uint2(int2(0))); + tint_ExternalTextureParams const v_22 = tint_load_struct_packed_vec3(tint_module_vars.t_params); + float4 green = tint_TextureLoadExternal(tint_module_vars.t_plane0, tint_module_vars.t_plane1, v_22, min(uint2(int2(70, 118)), ((v_22.apparentSize + uint2(1u)) - uint2(1u)))); + float4 const v_23 = green; + tint_module_vars.outImage.write(v_23, uint2(int2(1, 0))); } diff --git a/test/tint/bug/tint/1764.wgsl.expected.ir.msl b/test/tint/bug/tint/1764.wgsl.expected.ir.msl index a925757ec4c..412a562c56f 100644 --- a/test/tint/bug/tint/1764.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1764.wgsl.expected.ir.msl @@ -17,11 +17,11 @@ struct tint_module_vars_struct { threadgroup tint_array* W; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -42,7 +42,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul (*p)[0u] = 42; } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.W=(&(*v_2).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.W=(&(*v_3).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/bug/tint/1776.spvasm.expected.ir.msl b/test/tint/bug/tint/1776.spvasm.expected.ir.msl index 22d11dda965..220de0014c1 100644 --- a/test/tint/bug/tint/1776.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/1776.spvasm.expected.ir.msl @@ -33,7 +33,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { S const x_18 = (*tint_module_vars.sb).inner[min(uint(1), v)]; } -kernel void tint_symbol(const device sb_block* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_1(const device sb_block* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; main_1(tint_module_vars); } diff --git a/test/tint/bug/tint/1776.wgsl.expected.ir.msl b/test/tint/bug/tint/1776.wgsl.expected.ir.msl index 845b8f88400..26110741382 100644 --- a/test/tint/bug/tint/1776.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1776.wgsl.expected.ir.msl @@ -24,8 +24,8 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device tint_array* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device tint_array* sb [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sb=sb, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 32u) - 1u); - S const x = (*tint_module_vars.sb)[min(uint(1), v)]; + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 32u) - 1u); + S const x = (*tint_module_vars.sb)[min(uint(1), v_1)]; } diff --git a/test/tint/bug/tint/1820.wgsl.expected.ir.msl b/test/tint/bug/tint/1820.wgsl.expected.ir.msl index b5b5c72bbdf..3165670804c 100644 --- a/test/tint/bug/tint/1820.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1820.wgsl.expected.ir.msl @@ -32,5 +32,5 @@ void bar(float x, tint_module_vars_struct tint_module_vars) { } } -void tint_symbol() { +void v() { } diff --git a/test/tint/bug/tint/1860.wgsl.expected.ir.msl b/test/tint/bug/tint/1860.wgsl.expected.ir.msl index 2776477940a..8bca157f628 100644 --- a/test/tint/bug/tint/1860.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1860.wgsl.expected.ir.msl @@ -9,17 +9,17 @@ struct tint_module_vars_struct { const constant DeclaredAfterUsage* declared_after_usage; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner(tint_module_vars_struct tint_module_vars) { +float4 main_inner(tint_module_vars_struct tint_module_vars) { return float4((*tint_module_vars.declared_after_usage).f); } -vertex tint_symbol_outputs tint_symbol(const constant DeclaredAfterUsage* declared_after_usage [[buffer(0)]]) { +vertex main_outputs v(const constant DeclaredAfterUsage* declared_after_usage [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.declared_after_usage=declared_after_usage}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/1875.wgsl.expected.ir.msl b/test/tint/bug/tint/1875.wgsl.expected.ir.msl index e772cca6984..63d1d9d2003 100644 --- a/test/tint/bug/tint/1875.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1875.wgsl.expected.ir.msl @@ -28,7 +28,7 @@ void push_output(uint value, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.count) = ((*tint_module_vars.count) + 1u); } -kernel void tint_symbol(device Outputs* outputs [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(device Outputs* outputs [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { thread uint count = 0u; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.count=(&count), .outputs=outputs, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; uint a = 0u; diff --git a/test/tint/bug/tint/1926.wgsl.expected.ir.msl b/test/tint/bug/tint/1926.wgsl.expected.ir.msl index 57ed80cb5ce..ec279eac791 100644 --- a/test/tint/bug/tint/1926.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1926.wgsl.expected.ir.msl @@ -6,11 +6,11 @@ struct tint_module_vars_struct { device uint* output; }; -struct tint_symbol_2 { - uint tint_symbol_1; +struct tint_symbol_1 { + uint tint_symbol; }; -void tint_symbol_inner(uint3 global_id, uint3 local_id, uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 global_id, uint3 local_id, uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.sh_atomic_failed) = 0u; } @@ -24,7 +24,7 @@ void tint_symbol_inner(uint3 global_id, uint3 local_id, uint tint_local_index, t } } -kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], uint3 local_id [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]], device uint* output [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sh_atomic_failed=(&(*v_1).tint_symbol_1), .output=output}; - tint_symbol_inner(global_id, local_id, tint_local_index, tint_module_vars); +kernel void v_1(uint3 global_id [[thread_position_in_grid]], uint3 local_id [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_2 [[threadgroup(0)]], device uint* output [[buffer(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sh_atomic_failed=(&(*v_2).tint_symbol), .output=output}; + main_inner(global_id, local_id, tint_local_index, tint_module_vars); } diff --git a/test/tint/bug/tint/1932.spvasm.expected.ir.msl b/test/tint/bug/tint/1932.spvasm.expected.ir.msl index 9a9e2083e08..befec9f7e49 100644 --- a/test/tint/bug/tint/1932.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/1932.spvasm.expected.ir.msl @@ -5,6 +5,6 @@ void main_1() { float const x_10 = 0.0f; } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/bug/tint/1976.wgsl.expected.ir.msl b/test/tint/bug/tint/1976.wgsl.expected.ir.msl index c1337fd4581..ad13d61f939 100644 --- a/test/tint/bug/tint/1976.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/1976.wgsl.expected.ir.msl @@ -22,8 +22,8 @@ struct tint_module_vars_struct { device Results* results; }; -kernel void tint_symbol(texture2d_ms texture0 [[texture(0)]], device Results* results [[buffer(0)]]) { +kernel void v(texture2d_ms texture0 [[texture(0)]], device Results* results [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.texture0=texture0, .results=results}; - uint2 const v = (uint2(tint_module_vars.texture0.get_width(), tint_module_vars.texture0.get_height()) - uint2(1u)); - (*tint_module_vars.results).colorSamples[0u] = tint_module_vars.texture0.read(min(uint2(int2(0)), v), 0).x; + uint2 const v_1 = (uint2(tint_module_vars.texture0.get_width(), tint_module_vars.texture0.get_height()) - uint2(1u)); + (*tint_module_vars.results).colorSamples[0u] = tint_module_vars.texture0.read(min(uint2(int2(0)), v_1), 0).x; } diff --git a/test/tint/bug/tint/2010.spvasm.expected.ir.msl b/test/tint/bug/tint/2010.spvasm.expected.ir.msl index c02405385e4..c9b9e8691cf 100644 --- a/test/tint/bug/tint/2010.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/2010.spvasm.expected.ir.msl @@ -47,12 +47,12 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -struct tint_symbol_6 { - tint_array tint_symbol_1; +struct tint_symbol_5 { + tint_array tint_symbol; + atomic_uint tint_symbol_1; atomic_uint tint_symbol_2; atomic_uint tint_symbol_3; atomic_uint tint_symbol_4; - atomic_uint tint_symbol_5; }; void main_1(tint_module_vars_struct tint_module_vars) { @@ -159,7 +159,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*v_1) = float4(as_type(atomic_load_explicit(tint_module_vars.x_34, memory_order_relaxed)), as_type(atomic_load_explicit(tint_module_vars.x_35, memory_order_relaxed)), as_type(atomic_load_explicit(tint_module_vars.x_36, memory_order_relaxed)), as_type(atomic_load_explicit(tint_module_vars.x_37, memory_order_relaxed))); } -void tint_symbol_inner(uint3 x_3_param, uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 x_3_param, uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { atomic_store_explicit(tint_module_vars.x_34, 0u, memory_order_relaxed); atomic_store_explicit(tint_module_vars.x_35, 0u, memory_order_relaxed); @@ -186,8 +186,8 @@ void tint_symbol_inner(uint3 x_3_param, uint tint_local_index, tint_module_vars_ main_1(tint_module_vars); } -kernel void tint_symbol(uint3 x_3_param [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_6* v_4 [[threadgroup(0)]], const constant S_2* x_6 [[buffer(0)]], const device S_3* x_9 [[buffer(2)]], device S_4* x_12 [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_4(uint3 x_3_param [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_5* v_5 [[threadgroup(0)]], const constant S_2* x_6 [[buffer(0)]], const device S_3* x_9 [[buffer(2)]], device S_4* x_12 [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { thread uint3 x_3 = 0u; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_28=(&(*v_4).tint_symbol_1), .x_34=(&(*v_4).tint_symbol_2), .x_35=(&(*v_4).tint_symbol_3), .x_36=(&(*v_4).tint_symbol_4), .x_37=(&(*v_4).tint_symbol_5), .x_3=(&x_3), .x_6=x_6, .x_9=x_9, .x_12=x_12, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(x_3_param, tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_28=(&(*v_5).tint_symbol), .x_34=(&(*v_5).tint_symbol_1), .x_35=(&(*v_5).tint_symbol_2), .x_36=(&(*v_5).tint_symbol_3), .x_37=(&(*v_5).tint_symbol_4), .x_3=(&x_3), .x_6=x_6, .x_9=x_9, .x_12=x_12, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; + main_inner(x_3_param, tint_local_index, tint_module_vars); } diff --git a/test/tint/bug/tint/2029.wgsl.expected.ir.msl b/test/tint/bug/tint/2029.wgsl.expected.ir.msl index c2e9c417957..057d2257340 100644 --- a/test/tint/bug/tint/2029.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2029.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device packed_int3* s; }; -kernel void tint_symbol(device packed_int3* s [[buffer(0)]]) { +kernel void v(device packed_int3* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; (*tint_module_vars.s) = packed_int3(int3(1)); } diff --git a/test/tint/bug/tint/2038.wgsl.expected.ir.msl b/test/tint/bug/tint/2038.wgsl.expected.ir.msl index db68d68a429..67f746ac233 100644 --- a/test/tint/bug/tint/2038.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2038.wgsl.expected.ir.msl @@ -17,7 +17,7 @@ struct tint_module_vars_struct { device tint_array* output; }; -kernel void tint_symbol(device tint_array* output [[buffer(0)]]) { +kernel void v(device tint_array* output [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.output=output}; if (false) { (*tint_module_vars.output)[0u] = 1u; diff --git a/test/tint/bug/tint/2039.wgsl.expected.ir.msl b/test/tint/bug/tint/2039.wgsl.expected.ir.msl index a31577cc838..e30964f6cc0 100644 --- a/test/tint/bug/tint/2039.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2039.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { uint out = 0u; { uint2 tint_loop_idx = 0u; diff --git a/test/tint/bug/tint/2059.wgsl.expected.ir.msl b/test/tint/bug/tint/2059.wgsl.expected.ir.msl index c2b1451c9ff..c887e5e2993 100644 --- a/test/tint/bug/tint/2059.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2059.wgsl.expected.ir.msl @@ -137,7 +137,7 @@ void tint_store_and_preserve_padding_4(device S3_packed_vec3* const target, S3 v tint_store_and_preserve_padding_1((&(*target).s), value_param.s); } -kernel void tint_symbol(device tint_array* buffer0 [[buffer(0)]], device S_packed_vec3* buffer1 [[buffer(1)]], device S2_packed_vec3* buffer2 [[buffer(2)]], device S3_packed_vec3* buffer3 [[buffer(3)]], device S4_packed_vec3* buffer4 [[buffer(4)]], device tint_array, 1>* buffer5 [[buffer(5)]], device tint_array* buffer6 [[buffer(6)]], device tint_array* buffer7 [[buffer(7)]]) { +kernel void v_6(device tint_array* buffer0 [[buffer(0)]], device S_packed_vec3* buffer1 [[buffer(1)]], device S2_packed_vec3* buffer2 [[buffer(2)]], device S3_packed_vec3* buffer3 [[buffer(3)]], device S4_packed_vec3* buffer4 [[buffer(4)]], device tint_array, 1>* buffer5 [[buffer(5)]], device tint_array* buffer6 [[buffer(6)]], device tint_array* buffer7 [[buffer(7)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.buffer0=buffer0, .buffer1=buffer1, .buffer2=buffer2, .buffer3=buffer3, .buffer4=buffer4, .buffer5=buffer5, .buffer6=buffer6, .buffer7=buffer7}; float3x3 m = float3x3(0.0f); { @@ -147,10 +147,10 @@ kernel void tint_symbol(device tint_array } else { break; } - thread float3* const v_6 = (&m[min(c, 2u)]); - float const v_7 = float(((c * 3u) + 1u)); - float const v_8 = float(((c * 3u) + 2u)); - (*v_6) = float3(v_7, v_8, float(((c * 3u) + 3u))); + thread float3* const v_7 = (&m[min(c, 2u)]); + float const v_8 = float(((c * 3u) + 1u)); + float const v_9 = float(((c * 3u) + 2u)); + (*v_7) = float3(v_8, v_9, float(((c * 3u) + 3u))); { c = (c + 1u); } diff --git a/test/tint/bug/tint/2069.wgsl.expected.ir.msl b/test/tint/bug/tint/2069.wgsl.expected.ir.msl index 5e618dd9cfa..33747d46940 100644 --- a/test/tint/bug/tint/2069.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2069.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct tint_module_vars_struct { thread modf_result_f32* v; }; -kernel void tint_symbol() { +kernel void v_1() { thread modf_result_f32 v = modf_result_f32{.fract=0.0f, .whole=1.0f}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&v)}; } diff --git a/test/tint/bug/tint/2100.wgsl.expected.ir.msl b/test/tint/bug/tint/2100.wgsl.expected.ir.msl index 363edb85e83..eed2c06d850 100644 --- a/test/tint/bug/tint/2100.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2100.wgsl.expected.ir.msl @@ -24,21 +24,21 @@ struct S_packed_vec3 { }; struct tint_module_vars_struct { - const constant S_packed_vec3* tint_symbol; + const constant S_packed_vec3* tint_member; }; -struct tint_symbol_1_outputs { - float4 tint_symbol_2 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_1_inner(tint_module_vars_struct tint_module_vars) { - float const x = (*tint_module_vars.tint_symbol).matrix_view[0u].z; +float4 main_inner(tint_module_vars_struct tint_module_vars) { + float const x = (*tint_module_vars.tint_member).matrix_view[0u].z; return float4(x, 0.0f, 0.0f, 1.0f); } -vertex tint_symbol_1_outputs tint_symbol_1(const constant S_packed_vec3* tint_symbol [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol}; - tint_symbol_1_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_2 = tint_symbol_1_inner(tint_module_vars); +vertex main_outputs v(const constant S_packed_vec3* v_1 [[buffer(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_member=v_1}; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/2121.wgsl.expected.ir.msl b/test/tint/bug/tint/2121.wgsl.expected.ir.msl index 49aa17043f7..4cc7dcbd5e6 100644 --- a/test/tint/bug/tint/2121.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2121.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct VSOut { float4 pos; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VSOut_pos [[position]]; }; @@ -14,14 +14,14 @@ void foo(thread VSOut* const out) { (*out).pos = pos; } -VSOut tint_symbol_inner() { +VSOut main_inner() { VSOut out = {}; foo((&out)); return out; } -vertex tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VSOut_pos = tint_symbol_inner().pos; +vertex main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VSOut_pos = main_inner().pos; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/2146.wgsl.expected.ir.msl b/test/tint/bug/tint/2146.wgsl.expected.ir.msl index 2b689f99eb7..fcd7d1465e8 100644 --- a/test/tint/bug/tint/2146.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2146.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { half4 a = half4(0.0h); half const b = 1.0h; a.x = (a.x + b); diff --git a/test/tint/bug/tint/2147.wgsl.expected.ir.msl b/test/tint/bug/tint/2147.wgsl.expected.ir.msl index 0fb36348c9f..06ba635d507 100644 --- a/test/tint/bug/tint/2147.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2147.wgsl.expected.ir.msl @@ -11,8 +11,8 @@ struct tint_module_vars_struct { thread bool* continue_execution; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; atomic_compare_exchange_result_i32 v(device atomic_int* const atomic_ptr, int cmp, int val) { @@ -21,7 +21,7 @@ atomic_compare_exchange_result_i32 v(device atomic_int* const atomic_ptr, int cm return atomic_compare_exchange_result_i32{.old_value=old_value, .exchanged=v_1}; } -float4 tint_symbol_inner(tint_module_vars_struct tint_module_vars) { +float4 main_inner(tint_module_vars_struct tint_module_vars) { if (false) { (*tint_module_vars.continue_execution) = false; } @@ -37,10 +37,10 @@ float4 tint_symbol_inner(tint_module_vars_struct tint_module_vars) { return v_3; } -fragment tint_symbol_outputs tint_symbol(device atomic_int* S [[buffer(0)]]) { +fragment main_outputs v_4(device atomic_int* S [[buffer(0)]]) { thread bool continue_execution = true; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S, .continue_execution=(&continue_execution)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/2175.wgsl.expected.ir.msl b/test/tint/bug/tint/2175.wgsl.expected.ir.msl index ce3408f3dc9..3778dd08d2e 100644 --- a/test/tint/bug/tint/2175.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2175.wgsl.expected.ir.msl @@ -1,11 +1,11 @@ #include using namespace metal; -struct tint_module_vars_struct { - device uint* tint_symbol_2; +struct tint_struct { + device uint* tint_member; }; -kernel void tint_symbol_3(device uint* tint_symbol_2 [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol_2=tint_symbol_2}; - (*tint_module_vars.tint_symbol_2) = 0u; +kernel void tint_entry_point(device uint* v_1 [[buffer(0)]]) { + tint_struct const v_2 = tint_struct{.tint_member=v_1}; + (*v_2.tint_member) = 0u; } diff --git a/test/tint/bug/tint/2177.wgsl.expected.ir.msl b/test/tint/bug/tint/2177.wgsl.expected.ir.msl index e0362eb527e..e95a09ffd30 100644 --- a/test/tint/bug/tint/2177.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2177.wgsl.expected.ir.msl @@ -30,9 +30,9 @@ uint f0(device tint_array* const p, uint tint_array_length) { return f1(p, tint_array_length); } -kernel void tint_symbol(device tint_array* arr [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(device tint_array* arr [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arr=arr, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); - device uint* const v_1 = (&(*tint_module_vars.arr)[min(uint(0), v)]); - (*v_1) = f0(tint_module_vars.arr, ((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u)); + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); + device uint* const v_2 = (&(*tint_module_vars.arr)[min(uint(0), v_1)]); + (*v_2) = f0(tint_module_vars.arr, ((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u)); } diff --git a/test/tint/bug/tint/219.spvasm.expected.ir.msl b/test/tint/bug/tint/219.spvasm.expected.ir.msl index 53df62a666a..f9436501e40 100644 --- a/test/tint/bug/tint/219.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/219.spvasm.expected.ir.msl @@ -11,6 +11,6 @@ void main_1() { float const x_12 = x_200((&x_11)); } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/bug/tint/2201.wgsl.expected.ir.msl b/test/tint/bug/tint/2201.wgsl.expected.ir.msl index f9f6e8ed463..b901095aacc 100644 --- a/test/tint/bug/tint/2201.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2201.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { uint2 tint_loop_idx = 0u; while(true) { diff --git a/test/tint/bug/tint/2202.wgsl.expected.ir.msl b/test/tint/bug/tint/2202.wgsl.expected.ir.msl index c1348e4d8b4..0d247794125 100644 --- a/test/tint/bug/tint/2202.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2202.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { uint2 tint_loop_idx = 0u; while(true) { diff --git a/test/tint/bug/tint/221.wgsl.expected.ir.msl b/test/tint/bug/tint/221.wgsl.expected.ir.msl index 5f8e08f8641..529768fce48 100644 --- a/test/tint/bug/tint/221.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/221.wgsl.expected.ir.msl @@ -26,7 +26,7 @@ uint tint_mod_u32(uint lhs, uint rhs) { return (lhs - ((lhs / select(rhs, 1u, (rhs == 0u))) * select(rhs, 1u, (rhs == 0u)))); } -kernel void tint_symbol(device Buf* b [[buffer(0)]]) { +kernel void v(device Buf* b [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.b=b}; uint i = 0u; { diff --git a/test/tint/bug/tint/2237.wgsl.expected.ir.msl b/test/tint/bug/tint/2237.wgsl.expected.ir.msl index 7f7906ce2f7..f9846acdaca 100644 --- a/test/tint/bug/tint/2237.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/2237.wgsl.expected.ir.msl @@ -2,7 +2,7 @@ using namespace metal; struct tint_module_vars_struct { - device uint* tint_symbol; + device uint* tint_member; }; template @@ -18,11 +18,11 @@ struct tint_array { }; uint foo(tint_module_vars_struct tint_module_vars) { - return tint_array{0u, 1u, 2u, 4u}[min((*tint_module_vars.tint_symbol), 3u)]; + return tint_array{0u, 1u, 2u, 4u}[min((*tint_module_vars.tint_member), 3u)]; } -kernel void tint_symbol_1(device uint* tint_symbol [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol}; - uint const v = tint_array{0u, 1u, 2u, 4u}[min((*tint_module_vars.tint_symbol), 3u)]; - (*tint_module_vars.tint_symbol) = (v + foo(tint_module_vars)); +kernel void v_1(device uint* v_2 [[buffer(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_member=v_2}; + uint const v = tint_array{0u, 1u, 2u, 4u}[min((*tint_module_vars.tint_member), 3u)]; + (*tint_module_vars.tint_member) = (v + foo(tint_module_vars)); } diff --git a/test/tint/bug/tint/292.wgsl.expected.ir.msl b/test/tint/bug/tint/292.wgsl.expected.ir.msl index def2ad2606c..82614c9e275 100644 --- a/test/tint/bug/tint/292.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/292.wgsl.expected.ir.msl @@ -1,18 +1,18 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { float3 light = float3(1.20000004768371582031f, 1.0f, 2.0f); float3 negative_light = -(light); return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +vertex main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/349291130.wgsl.expected.ir.msl b/test/tint/bug/tint/349291130.wgsl.expected.ir.msl index 25b8bded66d..c6e3951287c 100644 --- a/test/tint/bug/tint/349291130.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/349291130.wgsl.expected.ir.msl @@ -2,14 +2,14 @@ using namespace metal; struct tint_module_vars_struct { - texture2d tint_symbol; + texture2d tint_member; }; -kernel void e(texture2d tint_symbol [[texture(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol}; +kernel void e(texture2d v [[texture(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_member=v}; { uint2 tint_loop_idx = 0u; - uint level = tint_module_vars.tint_symbol.get_num_mip_levels(); + uint level = tint_module_vars.tint_member.get_num_mip_levels(); while(true) { if (all((tint_loop_idx == uint2(4294967295u)))) { break; diff --git a/test/tint/bug/tint/354627692.wgsl.expected.ir.msl b/test/tint/bug/tint/354627692.wgsl.expected.ir.msl index 428f1f4503b..e60bdc2e120 100644 --- a/test/tint/bug/tint/354627692.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/354627692.wgsl.expected.ir.msl @@ -2,12 +2,12 @@ using namespace metal; struct tint_module_vars_struct { - device int* tint_symbol; + device int* tint_member; }; -kernel void tint_symbol_1(device int* tint_symbol [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol}; - int i = (*tint_module_vars.tint_symbol); +kernel void v(device int* v_1 [[buffer(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_member=v_1}; + int i = (*tint_module_vars.tint_member); { uint2 tint_loop_idx = 0u; while(true) { @@ -40,5 +40,5 @@ kernel void tint_symbol_1(device int* tint_symbol [[buffer(0)]]) { continue; } } - (*tint_module_vars.tint_symbol) = i; + (*tint_module_vars.tint_member) = i; } diff --git a/test/tint/bug/tint/365570202.wgsl.expected.ir.msl b/test/tint/bug/tint/365570202.wgsl.expected.ir.msl index fedee4543a6..73d424e8989 100644 --- a/test/tint/bug/tint/365570202.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/365570202.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { texture2d tex; }; -kernel void tint_symbol(texture2d tex [[texture(0)]]) { +kernel void v(texture2d tex [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tex=tex}; tint_module_vars.tex.write(float4(0.0f), uint2(int2(0))); const_castthread &>(tint_module_vars.tex).fence(); diff --git a/test/tint/bug/tint/366314931.wgsl.expected.ir.msl b/test/tint/bug/tint/366314931.wgsl.expected.ir.msl index 58f78cf1197..ddc16d68a9b 100644 --- a/test/tint/bug/tint/366314931.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/366314931.wgsl.expected.ir.msl @@ -11,11 +11,11 @@ struct tint_module_vars_struct { device S_packed_vec3* output; }; -struct tint_symbol_2 { - S_packed_vec3 tint_symbol_1; +struct tint_symbol_1 { + S_packed_vec3 tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.wgvar).v = packed_uint3(uint3(0u)); atomic_store_explicit((&(*tint_module_vars.wgvar).u), 0u, memory_order_relaxed); @@ -25,7 +25,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul atomic_store_explicit((&(*tint_module_vars.output).u), x, memory_order_relaxed); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]], device S_packed_vec3* output [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.wgvar=(&(*v_1).tint_symbol_1), .output=output}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_1(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_2 [[threadgroup(0)]], device S_packed_vec3* output [[buffer(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.wgvar=(&(*v_2).tint_symbol), .output=output}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/bug/tint/379127084.wgsl.expected.ir.msl b/test/tint/bug/tint/379127084.wgsl.expected.ir.msl index 47fc6217304..db6fa19afe7 100644 --- a/test/tint/bug/tint/379127084.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/379127084.wgsl.expected.ir.msl @@ -50,11 +50,11 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -struct tint_symbol_outputs { +struct main_outputs { float4 FSOut_sk_FragColor [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { uint2 FSIn_ssboIndicesVar [[user(locn0)]] [[flat]]; float2 FSIn_localCoordsVar [[user(locn1)]]; }; @@ -237,16 +237,16 @@ void _skslMain(FSIn _stageIn, thread FSOut* const _stageOut, tint_module_vars_st (*_stageOut).sk_FragColor = outColor_0; } -FSOut tint_symbol_inner(FSIn _stageIn, tint_module_vars_struct tint_module_vars) { +FSOut main_inner(FSIn _stageIn, tint_module_vars_struct tint_module_vars) { FSOut _stageOut = {}; _skslMain(_stageIn, (&_stageOut), tint_module_vars); return _stageOut; } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const device FSUniforms* _storage1 [[buffer(0)]], sampler permutationsSampler_1_Sampler [[sampler(0)]], texture2d permutationsSampler_1_Texture [[texture(0)]], sampler noiseSampler_1_Sampler [[sampler(1)]], texture2d noiseSampler_1_Texture [[texture(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +fragment main_outputs v_14(main_inputs inputs [[stage_in]], const device FSUniforms* _storage1 [[buffer(0)]], sampler permutationsSampler_1_Sampler [[sampler(0)]], texture2d permutationsSampler_1_Texture [[texture(0)]], sampler noiseSampler_1_Sampler [[sampler(1)]], texture2d noiseSampler_1_Texture [[texture(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { thread uint shadingSsboIndex = 0u; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{._storage1=_storage1, .shadingSsboIndex=(&shadingSsboIndex), .permutationsSampler_1_Sampler=permutationsSampler_1_Sampler, .permutationsSampler_1_Texture=permutationsSampler_1_Texture, .noiseSampler_1_Sampler=noiseSampler_1_Sampler, .noiseSampler_1_Texture=noiseSampler_1_Texture, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FSOut_sk_FragColor = tint_symbol_inner(FSIn{.ssboIndicesVar=inputs.FSIn_ssboIndicesVar, .localCoordsVar=inputs.FSIn_localCoordsVar}, tint_module_vars).sk_FragColor; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FSOut_sk_FragColor = main_inner(FSIn{.ssboIndicesVar=inputs.FSIn_ssboIndicesVar, .localCoordsVar=inputs.FSIn_localCoordsVar}, tint_module_vars).sk_FragColor; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/379684039-2.wgsl.expected.ir.msl b/test/tint/bug/tint/379684039-2.wgsl.expected.ir.msl index 74a79a7504b..8be31b7ee10 100644 --- a/test/tint/bug/tint/379684039-2.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/379684039-2.wgsl.expected.ir.msl @@ -28,15 +28,15 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { - int2 tint_symbol_1 = int2(0); +void v(tint_module_vars_struct tint_module_vars) { + int2 v_1 = int2(0); { uint2 tint_loop_idx = 0u; while(true) { if (all((tint_loop_idx == uint2(4294967295u)))) { break; } - if ((tint_symbol_1.y >= (*tint_module_vars._storage).fsUniformData[min((*tint_module_vars.idx), ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 128u) - 1u))].size.y)) { + if ((v_1.y >= (*tint_module_vars._storage).fsUniformData[min((*tint_module_vars.idx), ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 128u) - 1u))].size.y)) { break; } { diff --git a/test/tint/bug/tint/379684039.wgsl.expected.ir.msl b/test/tint/bug/tint/379684039.wgsl.expected.ir.msl index a245b5c5072..6eedcce7bb6 100644 --- a/test/tint/bug/tint/379684039.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/379684039.wgsl.expected.ir.msl @@ -5,18 +5,18 @@ struct tint_module_vars_struct { const device int2* _storage; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { - int2 tint_symbol_1 = int2(0); +void v(tint_module_vars_struct tint_module_vars) { + int2 v_1 = int2(0); { uint2 tint_loop_idx = 0u; while(true) { if (all((tint_loop_idx == uint2(4294967295u)))) { break; } - if ((tint_symbol_1.y >= (*tint_module_vars._storage).y)) { + if ((v_1.y >= (*tint_module_vars._storage).y)) { break; } - if ((tint_symbol_1.y >= 0)) { + if ((v_1.y >= 0)) { break; } { diff --git a/test/tint/bug/tint/403.wgsl.expected.ir.msl b/test/tint/bug/tint/403.wgsl.expected.ir.msl index 06a7de688a4..d29433e4dab 100644 --- a/test/tint/bug/tint/403.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/403.wgsl.expected.ir.msl @@ -26,11 +26,11 @@ struct tint_array { T elements[N]; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner(uint gl_VertexIndex, tint_module_vars_struct tint_module_vars) { +float4 main_inner(uint gl_VertexIndex, tint_module_vars_struct tint_module_vars) { tint_array indexable = {}; float2x2 const x_23 = (*tint_module_vars.x_20).transform1; float2x2 const x_28 = (*tint_module_vars.x_26).transform2; @@ -41,9 +41,9 @@ float4 tint_symbol_inner(uint gl_VertexIndex, tint_module_vars_struct tint_modul return float4(x_52.x, x_52.y, 0.0f, 1.0f); } -vertex tint_symbol_outputs tint_symbol(uint gl_VertexIndex [[vertex_id]], const constant vertexUniformBuffer1* x_20 [[buffer(0)]], const constant vertexUniformBuffer2* x_26 [[buffer(1)]]) { +vertex main_outputs v(uint gl_VertexIndex [[vertex_id]], const constant vertexUniformBuffer1* x_20 [[buffer(0)]], const constant vertexUniformBuffer2* x_26 [[buffer(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_20=x_20, .x_26=x_26}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(gl_VertexIndex, tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(gl_VertexIndex, tint_module_vars); return tint_wrapper_result; } diff --git a/test/tint/bug/tint/413.spvasm.expected.ir.msl b/test/tint/bug/tint/413.spvasm.expected.ir.msl index 7e0712c6c60..f926232ea12 100644 --- a/test/tint/bug/tint/413.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/413.spvasm.expected.ir.msl @@ -16,7 +16,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { tint_module_vars.Dst.write(x_27, uint2(int2(0))); } -kernel void tint_symbol(texture2d Src [[texture(0)]], texture2d Dst [[texture(1)]]) { +kernel void v_2(texture2d Src [[texture(0)]], texture2d Dst [[texture(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Src=Src, .Dst=Dst}; main_1(tint_module_vars); } diff --git a/test/tint/bug/tint/453.wgsl.expected.ir.msl b/test/tint/bug/tint/453.wgsl.expected.ir.msl index e563e8eaa33..97ae8732841 100644 --- a/test/tint/bug/tint/453.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/453.wgsl.expected.ir.msl @@ -6,12 +6,12 @@ struct tint_module_vars_struct { texture2d Dst; }; -kernel void tint_symbol(texture2d Src [[texture(0)]], texture2d Dst [[texture(1)]]) { +kernel void v(texture2d Src [[texture(0)]], texture2d Dst [[texture(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.Src=Src, .Dst=Dst}; uint4 srcValue = 0u; - uint const v = min(uint(0), (tint_module_vars.Src.get_num_mip_levels() - 1u)); - uint2 const v_1 = (uint2(tint_module_vars.Src.get_width(v), tint_module_vars.Src.get_height(v)) - uint2(1u)); - uint4 const x_22 = tint_module_vars.Src.read(min(uint2(int2(0)), v_1), v); + uint const v_1 = min(uint(0), (tint_module_vars.Src.get_num_mip_levels() - 1u)); + uint2 const v_2 = (uint2(tint_module_vars.Src.get_width(v_1), tint_module_vars.Src.get_height(v_1)) - uint2(1u)); + uint4 const x_22 = tint_module_vars.Src.read(min(uint2(int2(0)), v_2), v_1); srcValue = x_22; uint const x_24 = srcValue.x; uint const x_25 = (x_24 + 1u); diff --git a/test/tint/bug/tint/492.wgsl.expected.ir.msl b/test/tint/bug/tint/492.wgsl.expected.ir.msl index 94196391965..ed82c39c9e6 100644 --- a/test/tint/bug/tint/492.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/492.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ struct tint_module_vars_struct { device S* buf; }; -kernel void tint_symbol(device S* buf [[buffer(0)]]) { +kernel void v(device S* buf [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.buf=buf}; device int* const p = (&(*tint_module_vars.buf).a); (*p) = 12; diff --git a/test/tint/bug/tint/534.wgsl.expected.ir.msl b/test/tint/bug/tint/534.wgsl.expected.ir.msl index 865ddbf1f0d..eaa511cb263 100644 --- a/test/tint/bug/tint/534.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/534.wgsl.expected.ir.msl @@ -40,7 +40,7 @@ uint4 tint_v4f32_to_v4u32(float4 value) { return select(uint4(4294967295u), select(uint4(0u), uint4(value), (value >= float4(0.0f))), (value <= float4(4294967040.0f))); } -void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { uint2 size = uint2(tint_module_vars.src.get_width(0u), tint_module_vars.src.get_height(0u)); uint2 dstTexCoord = GlobalInvocationID.xy; uint2 srcTexCoord = dstTexCoord; @@ -94,7 +94,7 @@ void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_mo } } -kernel void tint_symbol(uint3 GlobalInvocationID [[thread_position_in_grid]], texture2d src [[texture(0)]], texture2d dst [[texture(1)]], device OutputBuf* output [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_6(uint3 GlobalInvocationID [[thread_position_in_grid]], texture2d src [[texture(0)]], texture2d dst [[texture(1)]], device OutputBuf* output [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src=src, .dst=dst, .output=output, .uniforms=uniforms, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(GlobalInvocationID, tint_module_vars); + main_inner(GlobalInvocationID, tint_module_vars); } diff --git a/test/tint/bug/tint/744.wgsl.expected.ir.msl b/test/tint/bug/tint/744.wgsl.expected.ir.msl index 1c87c10bb7a..c40e9db918a 100644 --- a/test/tint/bug/tint/744.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/744.wgsl.expected.ir.msl @@ -31,7 +31,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(uint3 global_id, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 global_id, tint_module_vars_struct tint_module_vars) { uint2 const resultCell = uint2(global_id.y, global_id.x); uint const dimInner = (*tint_module_vars.uniforms).aShape.y; uint const dimOutter = (*tint_module_vars.uniforms).outShape.y; @@ -56,7 +56,7 @@ void tint_symbol_inner(uint3 global_id, tint_module_vars_struct tint_module_vars (*tint_module_vars.resultMatrix).numbers[min(index, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].z - 0u) / 4u) - 1u))] = result; } -kernel void tint_symbol(uint3 global_id [[thread_position_in_grid]], const device Matrix* firstMatrix [[buffer(2)]], const device Matrix* secondMatrix [[buffer(3)]], device Matrix* resultMatrix [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(uint3 global_id [[thread_position_in_grid]], const device Matrix* firstMatrix [[buffer(2)]], const device Matrix* secondMatrix [[buffer(3)]], device Matrix* resultMatrix [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.firstMatrix=firstMatrix, .secondMatrix=secondMatrix, .resultMatrix=resultMatrix, .uniforms=uniforms, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(global_id, tint_module_vars); + main_inner(global_id, tint_module_vars); } diff --git a/test/tint/bug/tint/757.wgsl.expected.ir.msl b/test/tint/bug/tint/757.wgsl.expected.ir.msl index dd0f5ee1433..aa77c38276e 100644 --- a/test/tint/bug/tint/757.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/757.wgsl.expected.ir.msl @@ -23,7 +23,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { uint flatIndex = (((4u * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x); flatIndex = (flatIndex * 1u); int2 const v = int2(GlobalInvocationID.xy); @@ -47,7 +47,7 @@ void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_mo } } -kernel void tint_symbol(uint3 GlobalInvocationID [[thread_position_in_grid]], texture2d_array myTexture [[texture(0)]], device Result* result [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_4(uint3 GlobalInvocationID [[thread_position_in_grid]], texture2d_array myTexture [[texture(0)]], device Result* result [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.myTexture=myTexture, .result=result, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(GlobalInvocationID, tint_module_vars); + main_inner(GlobalInvocationID, tint_module_vars); } diff --git a/test/tint/bug/tint/824.wgsl.expected.ir.msl b/test/tint/bug/tint/824.wgsl.expected.ir.msl index 7c1a4f45a33..ec074737f36 100644 --- a/test/tint/bug/tint/824.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/824.wgsl.expected.ir.msl @@ -18,12 +18,12 @@ struct tint_array { T elements[N]; }; -struct tint_symbol_outputs { +struct main_outputs { float4 Output_Position [[position]]; float4 Output_color [[user(locn0)]]; }; -Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) { +Output main_inner(uint VertexIndex, uint InstanceIndex) { tint_array const zv = tint_array{float2(0.20000000298023223877f), float2(0.30000001192092895508f), float2(-0.10000000149011611938f), float2(1.10000002384185791016f)}; float const z = zv[min(InstanceIndex, 3u)].x; Output output = {}; @@ -33,10 +33,10 @@ Output tint_symbol_inner(uint VertexIndex, uint InstanceIndex) { return output; } -vertex tint_symbol_outputs tint_symbol(uint VertexIndex [[vertex_id]], uint InstanceIndex [[instance_id]]) { - Output const v = tint_symbol_inner(VertexIndex, InstanceIndex); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.Output_Position = v.Position; - tint_wrapper_result.Output_color = v.color; +vertex main_outputs v(uint VertexIndex [[vertex_id]], uint InstanceIndex [[instance_id]]) { + Output const v_1 = main_inner(VertexIndex, InstanceIndex); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.Output_Position = v_1.Position; + tint_wrapper_result.Output_color = v_1.color; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/827.wgsl.expected.ir.msl b/test/tint/bug/tint/827.wgsl.expected.ir.msl index 68cb3df43a4..a079f5bf6c5 100644 --- a/test/tint/bug/tint/827.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/827.wgsl.expected.ir.msl @@ -23,7 +23,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(uint3 GlobalInvocationId, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 GlobalInvocationId, tint_module_vars_struct tint_module_vars) { device float* const v = (&(*tint_module_vars.result).values[min(((GlobalInvocationId.y * 128u) + GlobalInvocationId.x), ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 4u) - 1u))]); int const v_1 = int(GlobalInvocationId.x); int2 const v_2 = int2(v_1, int(GlobalInvocationId.y)); @@ -32,7 +32,7 @@ void tint_symbol_inner(uint3 GlobalInvocationId, tint_module_vars_struct tint_mo (*v) = tint_module_vars.tex.read(min(uint2(v_2), v_4), v_3); } -kernel void tint_symbol(uint3 GlobalInvocationId [[thread_position_in_grid]], depth2d tex [[texture(0)]], device Result* result [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_5(uint3 GlobalInvocationId [[thread_position_in_grid]], depth2d tex [[texture(0)]], device Result* result [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tex=tex, .result=result, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(GlobalInvocationId, tint_module_vars); + main_inner(GlobalInvocationId, tint_module_vars); } diff --git a/test/tint/bug/tint/870.spvasm.expected.ir.msl b/test/tint/bug/tint/870.spvasm.expected.ir.msl index 2f7f1029352..d56e1a82f5f 100644 --- a/test/tint/bug/tint/870.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/870.spvasm.expected.ir.msl @@ -40,7 +40,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { orientation[5u] = x_23[5u]; } -fragment void tint_symbol(const device x_B4_BuildInformation* sspp962805860buildInformation [[buffer(0)]]) { +fragment void v(const device x_B4_BuildInformation* sspp962805860buildInformation [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.sspp962805860buildInformation=sspp962805860buildInformation}; main_1(tint_module_vars); } diff --git a/test/tint/bug/tint/913.wgsl.expected.ir.msl b/test/tint/bug/tint/913.wgsl.expected.ir.msl index bba1fdb47ee..f860570a579 100644 --- a/test/tint/bug/tint/913.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/913.wgsl.expected.ir.msl @@ -37,7 +37,7 @@ bool aboutEqual(float value, float expect) { return (abs((value - expect)) < 0.00100000004749745131f); } -void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_module_vars) { uint2 const srcSize = uint2(tint_module_vars.src.get_width(0u), tint_module_vars.src.get_height(0u)); uint2 const dstSize = uint2(tint_module_vars.dst.get_width(0u), tint_module_vars.dst.get_height(0u)); uint2 const dstTexCoord = uint2(GlobalInvocationID.xy); @@ -135,7 +135,7 @@ void tint_symbol_inner(uint3 GlobalInvocationID, tint_module_vars_struct tint_mo } } -kernel void tint_symbol(uint3 GlobalInvocationID [[thread_position_in_grid]], texture2d src [[texture(0)]], texture2d dst [[texture(1)]], device OutputBuf* output [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_19(uint3 GlobalInvocationID [[thread_position_in_grid]], texture2d src [[texture(0)]], texture2d dst [[texture(1)]], device OutputBuf* output [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.src=src, .dst=dst, .output=output, .uniforms=uniforms, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(GlobalInvocationID, tint_module_vars); + main_inner(GlobalInvocationID, tint_module_vars); } diff --git a/test/tint/bug/tint/914.wgsl.expected.ir.msl b/test/tint/bug/tint/914.wgsl.expected.ir.msl index a0fcba99b7b..1c33e6075f0 100644 --- a/test/tint/bug/tint/914.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/914.wgsl.expected.ir.msl @@ -33,9 +33,9 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -struct tint_symbol_3 { +struct tint_symbol_2 { + tint_array, 64> tint_symbol; tint_array, 64> tint_symbol_1; - tint_array, 64> tint_symbol_2; }; float mm_readA(uint row, uint col, tint_module_vars_struct tint_module_vars) { @@ -83,7 +83,7 @@ uint tint_div_u32(uint lhs, uint rhs) { return (lhs / select(rhs, 1u, (rhs == 0u))); } -void tint_symbol_inner(uint3 local_id, uint3 global_id, uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 local_id, uint3 global_id, uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v_3 = 0u; v_3 = tint_local_index; @@ -287,7 +287,7 @@ void tint_symbol_inner(uint3 local_id, uint3 global_id, uint tint_local_index, t } } -kernel void tint_symbol(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint tint_local_index [[thread_index_in_threadgroup]], const device Matrix* firstMatrix [[buffer(2)]], const device Matrix* secondMatrix [[buffer(3)]], device Matrix* resultMatrix [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], threadgroup tint_symbol_3* v_6 [[threadgroup(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.firstMatrix=firstMatrix, .secondMatrix=secondMatrix, .resultMatrix=resultMatrix, .uniforms=uniforms, .mm_Asub=(&(*v_6).tint_symbol_1), .mm_Bsub=(&(*v_6).tint_symbol_2), .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(local_id, global_id, tint_local_index, tint_module_vars); +kernel void v_6(uint3 local_id [[thread_position_in_threadgroup]], uint3 global_id [[thread_position_in_grid]], uint tint_local_index [[thread_index_in_threadgroup]], const device Matrix* firstMatrix [[buffer(2)]], const device Matrix* secondMatrix [[buffer(3)]], device Matrix* resultMatrix [[buffer(1)]], const constant Uniforms* uniforms [[buffer(0)]], threadgroup tint_symbol_2* v_7 [[threadgroup(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.firstMatrix=firstMatrix, .secondMatrix=secondMatrix, .resultMatrix=resultMatrix, .uniforms=uniforms, .mm_Asub=(&(*v_7).tint_symbol), .mm_Bsub=(&(*v_7).tint_symbol_1), .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; + main_inner(local_id, global_id, tint_local_index, tint_module_vars); } diff --git a/test/tint/bug/tint/922.wgsl.expected.ir.msl b/test/tint/bug/tint/922.wgsl.expected.ir.msl index ceb07f44ae0..00637e33193 100644 --- a/test/tint/bug/tint/922.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/922.wgsl.expected.ir.msl @@ -64,13 +64,13 @@ struct VertexOutput { float4 member; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutput_v_Color [[user(locn0)]]; float2 VertexOutput_v_TexCoord [[user(locn1)]]; float4 VertexOutput_member [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { float3 a_Position [[attribute(0)]]; float2 a_UV [[attribute(1)]]; float4 a_Color [[attribute(2)]]; @@ -186,7 +186,7 @@ void main1(tint_module_vars_struct tint_module_vars) { /* unreachable */ } -VertexOutput tint_symbol_inner(float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, tint_module_vars_struct tint_module_vars) { +VertexOutput main_inner(float3 a_Position, float2 a_UV, float4 a_Color, float3 a_Normal, float a_PosMtxIdx, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.a_Position1) = a_Position; (*tint_module_vars.a_UV1) = a_UV; (*tint_module_vars.a_Color1) = a_Color; @@ -199,7 +199,7 @@ VertexOutput tint_symbol_inner(float3 a_Position, float2 a_UV, float4 a_Color, f return VertexOutput{.v_Color=x_e11, .v_TexCoord=x_e13, .member=x_e15}; } -vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const constant ub_SceneParams* global [[buffer(1)]], const constant ub_MaterialParams* global1 [[buffer(2)]], const constant ub_PacketParams* global2 [[buffer(0)]]) { +vertex main_outputs v_1(main_inputs inputs [[stage_in]], const constant ub_SceneParams* global [[buffer(1)]], const constant ub_MaterialParams* global1 [[buffer(2)]], const constant ub_PacketParams* global2 [[buffer(0)]]) { thread float3 a_Position1 = 0.0f; thread float2 a_UV1 = 0.0f; thread float4 a_Color1 = 0.0f; @@ -209,10 +209,10 @@ vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], c thread float2 v_TexCoord = 0.0f; thread float4 gl_Position = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.global=global, .global1=global1, .global2=global2, .a_Position1=(&a_Position1), .a_UV1=(&a_UV1), .a_Color1=(&a_Color1), .a_Normal1=(&a_Normal1), .a_PosMtxIdx1=(&a_PosMtxIdx1), .v_Color=(&v_Color), .v_TexCoord=(&v_TexCoord), .gl_Position=(&gl_Position)}; - VertexOutput const v_1 = tint_symbol_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx, tint_module_vars); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutput_v_Color = v_1.v_Color; - tint_wrapper_result.VertexOutput_v_TexCoord = v_1.v_TexCoord; - tint_wrapper_result.VertexOutput_member = v_1.member; + VertexOutput const v_2 = main_inner(inputs.a_Position, inputs.a_UV, inputs.a_Color, inputs.a_Normal, inputs.a_PosMtxIdx, tint_module_vars); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutput_v_Color = v_2.v_Color; + tint_wrapper_result.VertexOutput_v_TexCoord = v_2.v_TexCoord; + tint_wrapper_result.VertexOutput_member = v_2.member; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/942.wgsl.expected.ir.msl b/test/tint/bug/tint/942.wgsl.expected.ir.msl index 20cd744bfc7..0832199cf3a 100644 --- a/test/tint/bug/tint/942.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/942.wgsl.expected.ir.msl @@ -35,15 +35,15 @@ struct tint_module_vars_struct { threadgroup tint_array, 4>* tile; }; -struct tint_symbol_2 { - tint_array, 4> tint_symbol_1; +struct tint_symbol_1 { + tint_array, 4> tint_symbol; }; uint tint_div_u32(uint lhs, uint rhs) { return (lhs / select(rhs, 1u, (rhs == 0u))); } -void tint_symbol_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -175,7 +175,7 @@ void tint_symbol_inner(uint3 WorkGroupID, uint3 LocalInvocationID, uint tint_loc } } -kernel void tint_symbol(uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], sampler samp [[sampler(0)]], const constant Params* params [[buffer(0)]], texture2d inputTex [[texture(0)]], texture2d outputTex [[texture(1)]], const constant Flip* flip [[buffer(1)]], threadgroup tint_symbol_2* v_12 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.samp=samp, .params=params, .inputTex=inputTex, .outputTex=outputTex, .flip=flip, .tile=(&(*v_12).tint_symbol_1)}; - tint_symbol_inner(WorkGroupID, LocalInvocationID, tint_local_index, tint_module_vars); +kernel void v_12(uint3 WorkGroupID [[threadgroup_position_in_grid]], uint3 LocalInvocationID [[thread_position_in_threadgroup]], uint tint_local_index [[thread_index_in_threadgroup]], sampler samp [[sampler(0)]], const constant Params* params [[buffer(0)]], texture2d inputTex [[texture(0)]], texture2d outputTex [[texture(1)]], const constant Flip* flip [[buffer(1)]], threadgroup tint_symbol_1* v_13 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.samp=samp, .params=params, .inputTex=inputTex, .outputTex=outputTex, .flip=flip, .tile=(&(*v_13).tint_symbol)}; + main_inner(WorkGroupID, LocalInvocationID, tint_local_index, tint_module_vars); } diff --git a/test/tint/bug/tint/948.wgsl.expected.ir.msl b/test/tint/bug/tint/948.wgsl.expected.ir.msl index cd13982ddab..cfdbfe1d505 100644 --- a/test/tint/bug/tint/948.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/948.wgsl.expected.ir.msl @@ -52,11 +52,11 @@ struct main_out { float4 glFragColor_1; }; -struct tint_symbol_outputs { +struct main_outputs { float4 main_out_glFragColor_1 [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float2 tUV_param [[user(locn2)]]; float2 tileID_1_param [[user(locn5)]]; float2 levelUnits_param [[user(locn4)]]; @@ -262,7 +262,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.glFragColor) = x_318; } -main_out tint_symbol_inner(float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param, tint_module_vars_struct tint_module_vars) { +main_out main_inner(float2 tUV_param, float2 tileID_1_param, float2 levelUnits_param, float2 stageUnits_1_param, float3 vPosition_param, float2 vUV_param, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.tUV) = tUV_param; (*tint_module_vars.tileID_1) = tileID_1_param; (*tint_module_vars.levelUnits) = levelUnits_param; @@ -273,7 +273,7 @@ main_out tint_symbol_inner(float2 tUV_param, float2 tileID_1_param, float2 level return main_out{.glFragColor_1=(*tint_module_vars.glFragColor)}; } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], const constant LeftOver_packed_vec3* x_20 [[buffer(0)]], texture2d frameMapTexture [[texture(3)]], sampler frameMapSampler [[sampler(2)]], texture2d tileMapsTexture0 [[texture(1)]], sampler tileMapsSampler [[sampler(0)]], texture2d tileMapsTexture1 [[texture(0)]], texture2d animationMapTexture [[texture(2)]], sampler animationMapSampler [[sampler(1)]], texture2d spriteSheetTexture [[texture(4)]], sampler spriteSheetSampler [[sampler(3)]]) { +fragment main_outputs v_9(main_inputs inputs [[stage_in]], const constant LeftOver_packed_vec3* x_20 [[buffer(0)]], texture2d frameMapTexture [[texture(3)]], sampler frameMapSampler [[sampler(2)]], texture2d tileMapsTexture0 [[texture(1)]], sampler tileMapsSampler [[sampler(0)]], texture2d tileMapsTexture1 [[texture(0)]], texture2d animationMapTexture [[texture(2)]], sampler animationMapSampler [[sampler(1)]], texture2d spriteSheetTexture [[texture(4)]], sampler spriteSheetSampler [[sampler(3)]]) { thread float2 tUV = 0.0f; thread float mt = 0.0f; thread float4 glFragColor = 0.0f; @@ -283,7 +283,7 @@ fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], thread float3 vPosition = 0.0f; thread float2 vUV = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.x_20=x_20, .frameMapTexture=frameMapTexture, .frameMapSampler=frameMapSampler, .tUV=(&tUV), .tileMapsTexture0=tileMapsTexture0, .tileMapsSampler=tileMapsSampler, .tileMapsTexture1=tileMapsTexture1, .animationMapTexture=animationMapTexture, .animationMapSampler=animationMapSampler, .mt=(&mt), .spriteSheetTexture=spriteSheetTexture, .spriteSheetSampler=spriteSheetSampler, .glFragColor=(&glFragColor), .tileID_1=(&tileID_1), .levelUnits=(&levelUnits), .stageUnits_1=(&stageUnits_1), .vPosition=(&vPosition), .vUV=(&vUV)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.main_out_glFragColor_1 = tint_symbol_inner(inputs.tUV_param, inputs.tileID_1_param, inputs.levelUnits_param, inputs.stageUnits_1_param, inputs.vPosition_param, inputs.vUV_param, tint_module_vars).glFragColor_1; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.main_out_glFragColor_1 = main_inner(inputs.tUV_param, inputs.tileID_1_param, inputs.levelUnits_param, inputs.stageUnits_1_param, inputs.vPosition_param, inputs.vUV_param, tint_module_vars).glFragColor_1; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/949.wgsl.expected.ir.msl b/test/tint/bug/tint/949.wgsl.expected.ir.msl index 1542cb1bf19..c4018b7a854 100644 --- a/test/tint/bug/tint/949.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/949.wgsl.expected.ir.msl @@ -63,11 +63,11 @@ struct main_out { float4 glFragColor_1; }; -struct tint_symbol_outputs { +struct main_outputs { float4 main_out_glFragColor_1 [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float2 vMainuv_param [[user(locn1)]]; float4 v_output1_param [[user(locn0)]]; float2 v_uv_param [[user(locn3)]]; @@ -462,7 +462,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.glFragColor) = float4(x_548.x, x_548.y, x_548.z, 1.0f); } -main_out tint_symbol_inner(float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, tint_module_vars_struct tint_module_vars) { +main_out main_inner(float2 vMainuv_param, float4 v_output1_param, bool gl_FrontFacing_param, float2 v_uv_param, float4 v_output2_param, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.vMainuv) = vMainuv_param; (*tint_module_vars.v_output1) = v_output1_param; (*tint_module_vars.gl_FrontFacing) = gl_FrontFacing_param; @@ -472,7 +472,7 @@ main_out tint_symbol_inner(float2 vMainuv_param, float4 v_output1_param, bool gl return main_out{.glFragColor_1=(*tint_module_vars.glFragColor)}; } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], bool gl_FrontFacing_param [[front_facing]], texture2d TextureSamplerTexture [[texture(0)]], sampler TextureSamplerSampler [[sampler(0)]], const constant LeftOver_packed_vec3* x_269 [[buffer(0)]], texture2d TextureSampler1Texture [[texture(1)]], sampler TextureSampler1Sampler [[sampler(1)]], const constant Light0_packed_vec3* light0 [[buffer(1)]]) { +fragment main_outputs v_4(main_inputs inputs [[stage_in]], bool gl_FrontFacing_param [[front_facing]], texture2d TextureSamplerTexture [[texture(0)]], sampler TextureSamplerSampler [[sampler(0)]], const constant LeftOver_packed_vec3* x_269 [[buffer(0)]], texture2d TextureSampler1Texture [[texture(1)]], sampler TextureSampler1Sampler [[sampler(1)]], const constant Light0_packed_vec3* light0 [[buffer(1)]]) { thread float u_Float = 0.0f; thread float3 u_Color = 0.0f; thread float2 vMainuv = 0.0f; @@ -482,7 +482,7 @@ fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], thread float4 v_output2 = 0.0f; thread float4 glFragColor = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u_Float=(&u_Float), .u_Color=(&u_Color), .TextureSamplerTexture=TextureSamplerTexture, .TextureSamplerSampler=TextureSamplerSampler, .vMainuv=(&vMainuv), .x_269=x_269, .v_output1=(&v_output1), .gl_FrontFacing=(&gl_FrontFacing), .v_uv=(&v_uv), .v_output2=(&v_output2), .TextureSampler1Texture=TextureSampler1Texture, .TextureSampler1Sampler=TextureSampler1Sampler, .light0=light0, .glFragColor=(&glFragColor)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.main_out_glFragColor_1 = tint_symbol_inner(inputs.vMainuv_param, inputs.v_output1_param, gl_FrontFacing_param, inputs.v_uv_param, inputs.v_output2_param, tint_module_vars).glFragColor_1; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.main_out_glFragColor_1 = main_inner(inputs.vMainuv_param, inputs.v_output1_param, gl_FrontFacing_param, inputs.v_uv_param, inputs.v_output2_param, tint_module_vars).glFragColor_1; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/959.wgsl.expected.ir.msl b/test/tint/bug/tint/959.wgsl.expected.ir.msl index c40d6667140..7a1b235c179 100644 --- a/test/tint/bug/tint/959.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/959.wgsl.expected.ir.msl @@ -56,6 +56,6 @@ struct tint_module_vars_struct { sampler s15; }; -fragment void tint_symbol(const device S* b0 [[buffer(8)]], const device S* b1 [[buffer(9)]], const device S* b2 [[buffer(10)]], const device S* b3 [[buffer(11)]], const device S* b4 [[buffer(12)]], const device S* b5 [[buffer(13)]], const device S* b6 [[buffer(14)]], const device S* b7 [[buffer(15)]], const constant S* b8 [[buffer(0)]], const constant S* b9 [[buffer(1)]], const constant S* b10 [[buffer(2)]], const constant S* b11 [[buffer(3)]], const constant S* b12 [[buffer(4)]], const constant S* b13 [[buffer(5)]], const constant S* b14 [[buffer(6)]], const constant S* b15 [[buffer(7)]], texture2d t0 [[texture(0)]], texture2d t1 [[texture(1)]], texture2d t2 [[texture(2)]], texture2d t3 [[texture(3)]], texture2d t4 [[texture(4)]], texture2d t5 [[texture(5)]], texture2d t6 [[texture(6)]], texture2d t7 [[texture(7)]], depth2d t8 [[texture(8)]], depth2d t9 [[texture(9)]], depth2d t10 [[texture(10)]], depth2d t11 [[texture(11)]], depth2d t12 [[texture(12)]], depth2d t13 [[texture(13)]], depth2d t14 [[texture(14)]], depth2d t15 [[texture(15)]], sampler s0 [[sampler(0)]], sampler s1 [[sampler(1)]], sampler s2 [[sampler(2)]], sampler s3 [[sampler(3)]], sampler s4 [[sampler(4)]], sampler s5 [[sampler(5)]], sampler s6 [[sampler(6)]], sampler s7 [[sampler(7)]], sampler s8 [[sampler(8)]], sampler s9 [[sampler(9)]], sampler s10 [[sampler(10)]], sampler s11 [[sampler(11)]], sampler s12 [[sampler(12)]], sampler s13 [[sampler(13)]], sampler s14 [[sampler(14)]], sampler s15 [[sampler(15)]]) { +fragment void v(const device S* b0 [[buffer(8)]], const device S* b1 [[buffer(9)]], const device S* b2 [[buffer(10)]], const device S* b3 [[buffer(11)]], const device S* b4 [[buffer(12)]], const device S* b5 [[buffer(13)]], const device S* b6 [[buffer(14)]], const device S* b7 [[buffer(15)]], const constant S* b8 [[buffer(0)]], const constant S* b9 [[buffer(1)]], const constant S* b10 [[buffer(2)]], const constant S* b11 [[buffer(3)]], const constant S* b12 [[buffer(4)]], const constant S* b13 [[buffer(5)]], const constant S* b14 [[buffer(6)]], const constant S* b15 [[buffer(7)]], texture2d t0 [[texture(0)]], texture2d t1 [[texture(1)]], texture2d t2 [[texture(2)]], texture2d t3 [[texture(3)]], texture2d t4 [[texture(4)]], texture2d t5 [[texture(5)]], texture2d t6 [[texture(6)]], texture2d t7 [[texture(7)]], depth2d t8 [[texture(8)]], depth2d t9 [[texture(9)]], depth2d t10 [[texture(10)]], depth2d t11 [[texture(11)]], depth2d t12 [[texture(12)]], depth2d t13 [[texture(13)]], depth2d t14 [[texture(14)]], depth2d t15 [[texture(15)]], sampler s0 [[sampler(0)]], sampler s1 [[sampler(1)]], sampler s2 [[sampler(2)]], sampler s3 [[sampler(3)]], sampler s4 [[sampler(4)]], sampler s5 [[sampler(5)]], sampler s6 [[sampler(6)]], sampler s7 [[sampler(7)]], sampler s8 [[sampler(8)]], sampler s9 [[sampler(9)]], sampler s10 [[sampler(10)]], sampler s11 [[sampler(11)]], sampler s12 [[sampler(12)]], sampler s13 [[sampler(13)]], sampler s14 [[sampler(14)]], sampler s15 [[sampler(15)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.b0=b0, .b1=b1, .b2=b2, .b3=b3, .b4=b4, .b5=b5, .b6=b6, .b7=b7, .b8=b8, .b9=b9, .b10=b10, .b11=b11, .b12=b12, .b13=b13, .b14=b14, .b15=b15, .t0=t0, .t1=t1, .t2=t2, .t3=t3, .t4=t4, .t5=t5, .t6=t6, .t7=t7, .t8=t8, .t9=t9, .t10=t10, .t11=t11, .t12=t12, .t13=t13, .t14=t14, .t15=t15, .s0=s0, .s1=s1, .s2=s2, .s3=s3, .s4=s4, .s5=s5, .s6=s6, .s7=s7, .s8=s8, .s9=s9, .s10=s10, .s11=s11, .s12=s12, .s13=s13, .s14=s14, .s15=s15}; } diff --git a/test/tint/bug/tint/977.spvasm.expected.ir.msl b/test/tint/bug/tint/977.spvasm.expected.ir.msl index 4e0be0c6cf8..f1600c91818 100644 --- a/test/tint/bug/tint/977.spvasm.expected.ir.msl +++ b/test/tint/bug/tint/977.spvasm.expected.ir.msl @@ -53,13 +53,13 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.resultMatrix).numbers[min(uint(x_63), v)] = x_68; } -void tint_symbol_1_inner(uint3 gl_GlobalInvocationID_param, tint_module_vars_struct tint_module_vars) { +void main_inner(uint3 gl_GlobalInvocationID_param, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.gl_GlobalInvocationID) = gl_GlobalInvocationID_param; main_1(tint_module_vars); } -kernel void tint_symbol_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], device ResultMatrix* resultMatrix [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_1(uint3 gl_GlobalInvocationID_param [[thread_position_in_grid]], device ResultMatrix* resultMatrix [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { thread uint3 gl_GlobalInvocationID = 0u; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.gl_GlobalInvocationID=(&gl_GlobalInvocationID), .resultMatrix=resultMatrix, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_1_inner(gl_GlobalInvocationID_param, tint_module_vars); + main_inner(gl_GlobalInvocationID_param, tint_module_vars); } diff --git a/test/tint/bug/tint/978.wgsl.expected.ir.msl b/test/tint/bug/tint/978.wgsl.expected.ir.msl index 47388522433..4e8f4aa0ae2 100644 --- a/test/tint/bug/tint/978.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/978.wgsl.expected.ir.msl @@ -14,15 +14,15 @@ struct tint_module_vars_struct { sampler texSampler; }; -struct tint_symbol_outputs { +struct main_outputs { float4 FragmentOutput_color [[color(0)]]; }; -struct tint_symbol_inputs { +struct main_inputs { float2 FragmentInput_vUv [[user(locn2)]]; }; -FragmentOutput tint_symbol_inner(FragmentInput fIn, tint_module_vars_struct tint_module_vars) { +FragmentOutput main_inner(FragmentInput fIn, tint_module_vars_struct tint_module_vars) { float const sample = tint_module_vars.depthMap.sample(tint_module_vars.texSampler, fIn.vUv); float3 const color = float3(sample, sample, sample); FragmentOutput fOut = {}; @@ -30,9 +30,9 @@ FragmentOutput tint_symbol_inner(FragmentInput fIn, tint_module_vars_struct tint return fOut; } -fragment tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]], depth2d depthMap [[texture(0)]], sampler texSampler [[sampler(0)]]) { +fragment main_outputs v(main_inputs inputs [[stage_in]], depth2d depthMap [[texture(0)]], sampler texSampler [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.depthMap=depthMap, .texSampler=texSampler}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragmentOutput_color = tint_symbol_inner(FragmentInput{.vUv=inputs.FragmentInput_vUv}, tint_module_vars).color; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragmentOutput_color = main_inner(FragmentInput{.vUv=inputs.FragmentInput_vUv}, tint_module_vars).color; return tint_wrapper_result; } diff --git a/test/tint/bug/tint/980.wgsl.expected.ir.msl b/test/tint/bug/tint/980.wgsl.expected.ir.msl index b42731af940..3fdc7c264b9 100644 --- a/test/tint/bug/tint/980.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/980.wgsl.expected.ir.msl @@ -16,12 +16,12 @@ float3 Bad(uint index, float3 rd) { return normalize(normal); } -void tint_symbol_inner(uint idx, tint_module_vars_struct tint_module_vars) { +void main_inner(uint idx, tint_module_vars_struct tint_module_vars) { uint const v_1 = (*tint_module_vars.io).i; (*tint_module_vars.io).v = packed_float3(Bad(v_1, float3((*tint_module_vars.io).v))); } -kernel void tint_symbol(uint idx [[thread_index_in_threadgroup]], device S_packed_vec3* io [[buffer(0)]]) { +kernel void v_2(uint idx [[thread_index_in_threadgroup]], device S_packed_vec3* io [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.io=io}; - tint_symbol_inner(idx, tint_module_vars); + main_inner(idx, tint_module_vars); } diff --git a/test/tint/bug/tint/993.wgsl.expected.ir.msl b/test/tint/bug/tint/993.wgsl.expected.ir.msl index d1c8f817f54..43dacfbced3 100644 --- a/test/tint/bug/tint/993.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/993.wgsl.expected.ir.msl @@ -35,7 +35,7 @@ int runTest(tint_module_vars_struct tint_module_vars) { return atomic_load_explicit((&(*tint_module_vars.s).data[min((0u + uint((*tint_module_vars.constants).zero)), 2u)]), memory_order_relaxed); } -kernel void tint_symbol(const constant Constants* constants [[buffer(0)]], device Result* result [[buffer(1)]], device TestData* s [[buffer(2)]]) { +kernel void v(const constant Constants* constants [[buffer(0)]], device Result* result [[buffer(1)]], device TestData* s [[buffer(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.constants=constants, .result=result, .s=s}; (*tint_module_vars.result).value = uint(runTest(tint_module_vars)); } diff --git a/test/tint/bug/tint/998.wgsl.expected.ir.msl b/test/tint/bug/tint/998.wgsl.expected.ir.msl index 910eaefb7dd..dfcbc5bcb56 100644 --- a/test/tint/bug/tint/998.wgsl.expected.ir.msl +++ b/test/tint/bug/tint/998.wgsl.expected.ir.msl @@ -26,7 +26,7 @@ struct tint_module_vars_struct { thread S* s; }; -kernel void tint_symbol(const constant Constants* constants [[buffer(0)]]) { +kernel void v(const constant Constants* constants [[buffer(0)]]) { thread S s = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.constants=constants, .s=(&s)}; (*tint_module_vars.s).data[min((*tint_module_vars.constants).zero, 2u)] = 0u; diff --git a/test/tint/builtins/arrayLength/complex_via_let.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/complex_via_let.wgsl.expected.ir.msl index 29c34930f6e..f5b43be71e8 100644 --- a/test/tint/builtins/arrayLength/complex_via_let.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/complex_via_let.wgsl.expected.ir.msl @@ -22,7 +22,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; const device S* const p = tint_module_vars.G; const device tint_array* const p2 = (&(*p).a); diff --git a/test/tint/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.ir.msl index 3b0cab7cfbf..abfebb4a583 100644 --- a/test/tint/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/complex_via_let_no_struct.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device tint_array* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device tint_array* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; const device tint_array* const p = tint_module_vars.G; const device tint_array* const p2 = p; diff --git a/test/tint/builtins/arrayLength/deprecated.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/deprecated.wgsl.expected.ir.msl index 33273a0e7b3..3d4746333c9 100644 --- a/test/tint/builtins/arrayLength/deprecated.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/deprecated.wgsl.expected.ir.msl @@ -22,7 +22,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; uint const l1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 4u); const device tint_array* const p = (&(*tint_module_vars.G).a); diff --git a/test/tint/builtins/arrayLength/simple.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/simple.wgsl.expected.ir.msl index d3fd52e12a4..a3f9ca2e1ed 100644 --- a/test/tint/builtins/arrayLength/simple.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/simple.wgsl.expected.ir.msl @@ -22,7 +22,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; uint const l1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 4u); } diff --git a/test/tint/builtins/arrayLength/simple_no_struct.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/simple_no_struct.wgsl.expected.ir.msl index f41c500c03d..4af9dbeefdd 100644 --- a/test/tint/builtins/arrayLength/simple_no_struct.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/simple_no_struct.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_storage_buffer_sizes=tint_storage_buffer_sizes}; uint const l1 = ((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u); } diff --git a/test/tint/builtins/arrayLength/via_let.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/via_let.wgsl.expected.ir.msl index cab3b626b38..2b4e657c02f 100644 --- a/test/tint/builtins/arrayLength/via_let.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/via_let.wgsl.expected.ir.msl @@ -22,7 +22,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; const device tint_array* const p = (&(*tint_module_vars.G).a); const device tint_array* const p2 = p; diff --git a/test/tint/builtins/arrayLength/via_let_complex.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/via_let_complex.wgsl.expected.ir.msl index 76014935272..eb390746567 100644 --- a/test/tint/builtins/arrayLength/via_let_complex.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/via_let_complex.wgsl.expected.ir.msl @@ -22,7 +22,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device S* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; const device S* const p = tint_module_vars.G; const device S* const p2 = p; diff --git a/test/tint/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.ir.msl index 05ae1d66190..0918dd396b2 100644 --- a/test/tint/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/via_let_complex_no_struct.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device tint_array* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device tint_array* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; const device tint_array* const p = tint_module_vars.G; const device tint_array* const p2 = p; diff --git a/test/tint/builtins/arrayLength/via_let_no_struct.wgsl.expected.ir.msl b/test/tint/builtins/arrayLength/via_let_no_struct.wgsl.expected.ir.msl index 3b0cab7cfbf..abfebb4a583 100644 --- a/test/tint/builtins/arrayLength/via_let_no_struct.wgsl.expected.ir.msl +++ b/test/tint/builtins/arrayLength/via_let_no_struct.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const device tint_array* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(const device tint_array* G [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.G=G, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; const device tint_array* const p = tint_module_vars.G; const device tint_array* const p2 = p; diff --git a/test/tint/builtins/compute_subgroup_inclusive.wgsl.expected.ir.msl b/test/tint/builtins/compute_subgroup_inclusive.wgsl.expected.ir.msl index abbeefc830b..db91116f402 100644 --- a/test/tint/builtins/compute_subgroup_inclusive.wgsl.expected.ir.msl +++ b/test/tint/builtins/compute_subgroup_inclusive.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float const val = 2.0f; float const subadd = simd_prefix_inclusive_sum(val); float const submul = simd_prefix_inclusive_product(val); diff --git a/test/tint/builtins/degrees.spvasm.expected.ir.msl b/test/tint/builtins/degrees.spvasm.expected.ir.msl index fa188f761d6..c9c604d765d 100644 --- a/test/tint/builtins/degrees.spvasm.expected.ir.msl +++ b/test/tint/builtins/degrees.spvasm.expected.ir.msl @@ -8,6 +8,6 @@ void main_1() { b = (a * 57.295780181884765625f); } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/builtins/frexp.wgsl.expected.ir.msl b/test/tint/builtins/frexp.wgsl.expected.ir.msl index 8f2c321303d..bf091d01dcc 100644 --- a/test/tint/builtins/frexp.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct frexp_result_f32 { int exp; }; -kernel void tint_symbol() { +kernel void v() { frexp_result_f32 const res = frexp_result_f32{.fract=0.61500000953674316406f, .exp=1}; int const exp = res.exp; float const fract = res.fract; diff --git a/test/tint/builtins/frexp/scalar/const.wgsl.expected.ir.msl b/test/tint/builtins/frexp/scalar/const.wgsl.expected.ir.msl index 695bc22d2b1..deff00ed25b 100644 --- a/test/tint/builtins/frexp/scalar/const.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/scalar/const.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct frexp_result_f32 { int exp; }; -kernel void tint_symbol() { +kernel void v() { frexp_result_f32 const res = frexp_result_f32{.fract=0.625f, .exp=1}; float const fract = res.fract; int const exp = res.exp; diff --git a/test/tint/builtins/frexp/scalar/const_members.wgsl.expected.ir.msl b/test/tint/builtins/frexp/scalar/const_members.wgsl.expected.ir.msl index c355e18bbaf..b2622591908 100644 --- a/test/tint/builtins/frexp/scalar/const_members.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/scalar/const_members.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float const fract = 0.625f; int const exp = 1; } diff --git a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl index 0b3019fe9e7..120d9409bfa 100644 --- a/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.ir.msl @@ -6,12 +6,12 @@ struct frexp_result_f32 { int exp; }; -kernel void tint_symbol() { +kernel void v() { float const runtime_in = 1.25f; frexp_result_f32 res = frexp_result_f32{.fract=0.625f, .exp=1}; - frexp_result_f32 v = {}; - v.fract = frexp(runtime_in, v.exp); - res = v; + frexp_result_f32 v_1 = {}; + v_1.fract = frexp(runtime_in, v_1.exp); + res = v_1; res = frexp_result_f32{.fract=0.625f, .exp=1}; float const fract = res.fract; int const exp = res.exp; diff --git a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl index 4dfce7ebc0c..7e467db8076 100644 --- a/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/scalar/runtime.wgsl.expected.ir.msl @@ -6,11 +6,11 @@ struct frexp_result_f32 { int exp; }; -kernel void tint_symbol() { +kernel void v() { float const in = 1.25f; - frexp_result_f32 v = {}; - v.fract = frexp(in, v.exp); - frexp_result_f32 const res = v; + frexp_result_f32 v_1 = {}; + v_1.fract = frexp(in, v_1.exp); + frexp_result_f32 const res = v_1; float const fract = res.fract; int const exp = res.exp; } diff --git a/test/tint/builtins/frexp/vector/const.wgsl.expected.ir.msl b/test/tint/builtins/frexp/vector/const.wgsl.expected.ir.msl index 396a14cc94b..cfc2d983492 100644 --- a/test/tint/builtins/frexp/vector/const.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/vector/const.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct frexp_result_vec2_f32 { int2 exp; }; -kernel void tint_symbol() { +kernel void v() { frexp_result_vec2_f32 const res = frexp_result_vec2_f32{.fract=float2(0.625f, 0.9375f), .exp=int2(1, 2)}; float2 const fract = res.fract; int2 const exp = res.exp; diff --git a/test/tint/builtins/frexp/vector/const_members.wgsl.expected.ir.msl b/test/tint/builtins/frexp/vector/const_members.wgsl.expected.ir.msl index dd9c6c7336d..326eb324ed8 100644 --- a/test/tint/builtins/frexp/vector/const_members.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/vector/const_members.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float2 const fract = float2(0.625f, 0.9375f); int2 const exp = int2(1, 2); } diff --git a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl index 6cef24c1e00..9ea4f5ec8b0 100644 --- a/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/vector/mixed.wgsl.expected.ir.msl @@ -6,12 +6,12 @@ struct frexp_result_vec2_f32 { int2 exp; }; -kernel void tint_symbol() { +kernel void v() { float2 const runtime_in = float2(1.25f, 3.75f); frexp_result_vec2_f32 res = frexp_result_vec2_f32{.fract=float2(0.625f, 0.9375f), .exp=int2(1, 2)}; - frexp_result_vec2_f32 v = {}; - v.fract = frexp(runtime_in, v.exp); - res = v; + frexp_result_vec2_f32 v_1 = {}; + v_1.fract = frexp(runtime_in, v_1.exp); + res = v_1; res = frexp_result_vec2_f32{.fract=float2(0.625f, 0.9375f), .exp=int2(1, 2)}; float2 const fract = res.fract; int2 const exp = res.exp; diff --git a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl index 4d27fb0a988..7aefe3f0b13 100644 --- a/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl +++ b/test/tint/builtins/frexp/vector/runtime.wgsl.expected.ir.msl @@ -6,11 +6,11 @@ struct frexp_result_vec2_f32 { int2 exp; }; -kernel void tint_symbol() { +kernel void v() { float2 const in = float2(1.25f, 3.75f); - frexp_result_vec2_f32 v = {}; - v.fract = frexp(in, v.exp); - frexp_result_vec2_f32 const res = v; + frexp_result_vec2_f32 v_1 = {}; + v_1.fract = frexp(in, v_1.exp); + frexp_result_vec2_f32 const res = v_1; float2 const fract = res.fract; int2 const exp = res.exp; } diff --git a/test/tint/builtins/modf/scalar/const.wgsl.expected.ir.msl b/test/tint/builtins/modf/scalar/const.wgsl.expected.ir.msl index a0a34df08d3..58b1b4d52a9 100644 --- a/test/tint/builtins/modf/scalar/const.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/scalar/const.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct modf_result_f32 { float whole; }; -kernel void tint_symbol() { +kernel void v() { modf_result_f32 const res = modf_result_f32{.fract=0.25f, .whole=1.0f}; float const fract = res.fract; float const whole = res.whole; diff --git a/test/tint/builtins/modf/scalar/const_members.wgsl.expected.ir.msl b/test/tint/builtins/modf/scalar/const_members.wgsl.expected.ir.msl index b934c8e6e1f..16e22a5177f 100644 --- a/test/tint/builtins/modf/scalar/const_members.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/scalar/const_members.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float const fract = 0.25f; float const whole = 1.0f; } diff --git a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl index e51943aac3c..5cafd7f7a15 100644 --- a/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/scalar/mixed.wgsl.expected.ir.msl @@ -6,12 +6,12 @@ struct modf_result_f32 { float whole; }; -kernel void tint_symbol() { +kernel void v() { float const runtime_in = 1.25f; modf_result_f32 res = modf_result_f32{.fract=0.25f, .whole=1.0f}; - modf_result_f32 v = {}; - v.fract = modf(runtime_in, v.whole); - res = v; + modf_result_f32 v_1 = {}; + v_1.fract = modf(runtime_in, v_1.whole); + res = v_1; res = modf_result_f32{.fract=0.25f, .whole=1.0f}; float const fract = res.fract; float const whole = res.whole; diff --git a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl index fb2b6678666..78afbf9b947 100644 --- a/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/scalar/runtime.wgsl.expected.ir.msl @@ -6,11 +6,11 @@ struct modf_result_f32 { float whole; }; -kernel void tint_symbol() { +kernel void v() { float const in = 1.25f; - modf_result_f32 v = {}; - v.fract = modf(in, v.whole); - modf_result_f32 const res = v; + modf_result_f32 v_1 = {}; + v_1.fract = modf(in, v_1.whole); + modf_result_f32 const res = v_1; float const fract = res.fract; float const whole = res.whole; } diff --git a/test/tint/builtins/modf/vector/const.wgsl.expected.ir.msl b/test/tint/builtins/modf/vector/const.wgsl.expected.ir.msl index 3f9b4c711f5..60242cdf688 100644 --- a/test/tint/builtins/modf/vector/const.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/vector/const.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct modf_result_vec2_f32 { float2 whole; }; -kernel void tint_symbol() { +kernel void v() { modf_result_vec2_f32 const res = modf_result_vec2_f32{.fract=float2(0.25f, 0.75f), .whole=float2(1.0f, 3.0f)}; float2 const fract = res.fract; float2 const whole = res.whole; diff --git a/test/tint/builtins/modf/vector/const_members.wgsl.expected.ir.msl b/test/tint/builtins/modf/vector/const_members.wgsl.expected.ir.msl index 05122a95e30..10528e24a61 100644 --- a/test/tint/builtins/modf/vector/const_members.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/vector/const_members.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float2 const fract = float2(0.25f, 0.75f); float2 const whole = float2(1.0f, 3.0f); } diff --git a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl index 33408f9a847..f7a1a46940e 100644 --- a/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/vector/mixed.wgsl.expected.ir.msl @@ -6,12 +6,12 @@ struct modf_result_vec2_f32 { float2 whole; }; -kernel void tint_symbol() { +kernel void v() { float2 const runtime_in = float2(1.25f, 3.75f); modf_result_vec2_f32 res = modf_result_vec2_f32{.fract=float2(0.25f, 0.75f), .whole=float2(1.0f, 3.0f)}; - modf_result_vec2_f32 v = {}; - v.fract = modf(runtime_in, v.whole); - res = v; + modf_result_vec2_f32 v_1 = {}; + v_1.fract = modf(runtime_in, v_1.whole); + res = v_1; res = modf_result_vec2_f32{.fract=float2(0.25f, 0.75f), .whole=float2(1.0f, 3.0f)}; float2 const fract = res.fract; float2 const whole = res.whole; diff --git a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl index 9cb2a79452e..16eff2f1ff1 100644 --- a/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl +++ b/test/tint/builtins/modf/vector/runtime.wgsl.expected.ir.msl @@ -6,11 +6,11 @@ struct modf_result_vec2_f32 { float2 whole; }; -kernel void tint_symbol() { +kernel void v() { float2 const in = float2(1.25f, 3.75f); - modf_result_vec2_f32 v = {}; - v.fract = modf(in, v.whole); - modf_result_vec2_f32 const res = v; + modf_result_vec2_f32 v_1 = {}; + v_1.fract = modf(in, v_1.whole); + modf_result_vec2_f32 const res = v_1; float2 const fract = res.fract; float2 const whole = res.whole; } diff --git a/test/tint/builtins/radians.spvasm.expected.ir.msl b/test/tint/builtins/radians.spvasm.expected.ir.msl index d01b84be401..f7797069677 100644 --- a/test/tint/builtins/radians.spvasm.expected.ir.msl +++ b/test/tint/builtins/radians.spvasm.expected.ir.msl @@ -8,6 +8,6 @@ void main_1() { b = (a * 0.01745329238474369049f); } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/builtins/repeated_use.wgsl.expected.ir.msl b/test/tint/builtins/repeated_use.wgsl.expected.ir.msl index a901cf9f01c..1f3bd608932 100644 --- a/test/tint/builtins/repeated_use.wgsl.expected.ir.msl +++ b/test/tint/builtins/repeated_use.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float4 const va = float4(0.0f); float4 const a = (va * 57.295780181884765625f); float4 const vb = float4(1.0f); diff --git a/test/tint/builtins/smoothstep.wgsl.expected.ir.msl b/test/tint/builtins/smoothstep.wgsl.expected.ir.msl index 6ca00e96868..512835aa52a 100644 --- a/test/tint/builtins/smoothstep.wgsl.expected.ir.msl +++ b/test/tint/builtins/smoothstep.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { float const low = 1.0f; float const high = 0.0f; float const x_val = 0.5f; diff --git a/test/tint/builtins/textureGather/f32/alpha.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/f32/alpha.wgsl.expected.ir.msl index b82e853e2b4..dbb0ad5ce70 100644 --- a/test/tint/builtins/textureGather/f32/alpha.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/f32/alpha.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; float4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::w); } diff --git a/test/tint/builtins/textureGather/f32/blue.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/f32/blue.wgsl.expected.ir.msl index 4cd02ea523c..b17ebcffbdc 100644 --- a/test/tint/builtins/textureGather/f32/blue.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/f32/blue.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; float4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::z); } diff --git a/test/tint/builtins/textureGather/f32/green.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/f32/green.wgsl.expected.ir.msl index b1d09799d97..1bbe4cd2851 100644 --- a/test/tint/builtins/textureGather/f32/green.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/f32/green.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; float4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::y); } diff --git a/test/tint/builtins/textureGather/f32/red.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/f32/red.wgsl.expected.ir.msl index e35685a7369..1d8f00110c1 100644 --- a/test/tint/builtins/textureGather/f32/red.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/f32/red.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; float4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::x); } diff --git a/test/tint/builtins/textureGather/i32/alpha.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/i32/alpha.wgsl.expected.ir.msl index 576f94a9fd5..2a0a5b0bafb 100644 --- a/test/tint/builtins/textureGather/i32/alpha.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/i32/alpha.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; int4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::w); } diff --git a/test/tint/builtins/textureGather/i32/blue.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/i32/blue.wgsl.expected.ir.msl index 928a1e6b76f..4f220015f2f 100644 --- a/test/tint/builtins/textureGather/i32/blue.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/i32/blue.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; int4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::z); } diff --git a/test/tint/builtins/textureGather/i32/green.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/i32/green.wgsl.expected.ir.msl index 37f6c7befef..06e6ee3f69b 100644 --- a/test/tint/builtins/textureGather/i32/green.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/i32/green.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; int4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::y); } diff --git a/test/tint/builtins/textureGather/i32/red.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/i32/red.wgsl.expected.ir.msl index 3b572f8cc5e..0d89b7b834a 100644 --- a/test/tint/builtins/textureGather/i32/red.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/i32/red.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; int4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::x); } diff --git a/test/tint/builtins/textureGather/u32/alpha.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/u32/alpha.wgsl.expected.ir.msl index 6b0f2159973..3724e86e824 100644 --- a/test/tint/builtins/textureGather/u32/alpha.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/u32/alpha.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; uint4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::w); } diff --git a/test/tint/builtins/textureGather/u32/blue.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/u32/blue.wgsl.expected.ir.msl index ae83b740150..0bb287d40ea 100644 --- a/test/tint/builtins/textureGather/u32/blue.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/u32/blue.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; uint4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::z); } diff --git a/test/tint/builtins/textureGather/u32/green.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/u32/green.wgsl.expected.ir.msl index 9549962115a..ba14d764c1a 100644 --- a/test/tint/builtins/textureGather/u32/green.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/u32/green.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; uint4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::y); } diff --git a/test/tint/builtins/textureGather/u32/red.wgsl.expected.ir.msl b/test/tint/builtins/textureGather/u32/red.wgsl.expected.ir.msl index 0ec68fccc1d..75e2d28d223 100644 --- a/test/tint/builtins/textureGather/u32/red.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureGather/u32/red.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { sampler s; }; -fragment void tint_symbol(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; uint4 res = tint_module_vars.t.gather(tint_module_vars.s, float2(0.0f), int2(0), component::x); } diff --git a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl index 30fc7361ec1..ae0a3474545 100644 --- a/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureLoad/texture_external_param.wgsl.expected.ir.msl @@ -74,7 +74,7 @@ struct tint_module_vars_struct { }; struct vertex_main_outputs { - float4 tint_symbol_1 [[position]]; + float4 tint_symbol [[position]]; }; float3 tint_GammaCorrection(float3 v, tint_GammaTransferParams params) { @@ -106,8 +106,8 @@ float4 tint_TextureLoadExternal(texture2d plane_0, textur return float4(v_9, v_5); } -float4 textureLoad2d(texture2d tint_symbol_plane0, texture2d tint_symbol_plane1, tint_ExternalTextureParams tint_symbol_params, int2 coords) { - return tint_TextureLoadExternal(tint_symbol_plane0, tint_symbol_plane1, tint_symbol_params, min(uint2(coords), ((tint_symbol_params.apparentSize + uint2(1u)) - uint2(1u)))); +float4 textureLoad2d(texture2d texture_plane0, texture2d texture_plane1, tint_ExternalTextureParams texture_params, int2 coords) { + return tint_TextureLoadExternal(texture_plane0, texture_plane1, texture_params, min(uint2(coords), ((texture_params.apparentSize + uint2(1u)) - uint2(1u)))); } tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) { @@ -135,7 +135,7 @@ float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(texture2d arg_0_plane0 [[texture(0)]], texture2d arg_0_plane1 [[texture(1)]], const constant tint_ExternalTextureParams_packed_vec3* arg_0_params [[buffer(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0_plane0=arg_0_plane0, .arg_0_plane1=arg_0_plane1, .arg_0_params=arg_0_params}; vertex_main_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = vertex_main_inner(tint_module_vars); + tint_wrapper_result.tint_symbol = vertex_main_inner(tint_module_vars); return tint_wrapper_result; } // @@ -242,8 +242,8 @@ float4 tint_TextureLoadExternal(texture2d plane_0, textur return float4(v_9, v_5); } -float4 textureLoad2d(texture2d tint_symbol_plane0, texture2d tint_symbol_plane1, tint_ExternalTextureParams tint_symbol_params, int2 coords) { - return tint_TextureLoadExternal(tint_symbol_plane0, tint_symbol_plane1, tint_symbol_params, min(uint2(coords), ((tint_symbol_params.apparentSize + uint2(1u)) - uint2(1u)))); +float4 textureLoad2d(texture2d texture_plane0, texture2d texture_plane1, tint_ExternalTextureParams texture_params, int2 coords) { + return tint_TextureLoadExternal(texture_plane0, texture_plane1, texture_params, min(uint2(coords), ((texture_params.apparentSize + uint2(1u)) - uint2(1u)))); } tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) { @@ -371,8 +371,8 @@ float4 tint_TextureLoadExternal(texture2d plane_0, textur return float4(v_9, v_5); } -float4 textureLoad2d(texture2d tint_symbol_plane0, texture2d tint_symbol_plane1, tint_ExternalTextureParams tint_symbol_params, int2 coords) { - return tint_TextureLoadExternal(tint_symbol_plane0, tint_symbol_plane1, tint_symbol_params, min(uint2(coords), ((tint_symbol_params.apparentSize + uint2(1u)) - uint2(1u)))); +float4 textureLoad2d(texture2d texture_plane0, texture2d texture_plane1, tint_ExternalTextureParams texture_params, int2 coords) { + return tint_TextureLoadExternal(texture_plane0, texture_plane1, texture_params, min(uint2(coords), ((texture_params.apparentSize + uint2(1u)) - uint2(1u)))); } tint_ExternalTextureParams tint_load_struct_packed_vec3(const constant tint_ExternalTextureParams_packed_vec3* const from) { diff --git a/test/tint/builtins/textureLoad/texture_param.wgsl.expected.ir.msl b/test/tint/builtins/textureLoad/texture_param.wgsl.expected.ir.msl index 1fcc016d0c3..1f11eb874c5 100644 --- a/test/tint/builtins/textureLoad/texture_param.wgsl.expected.ir.msl +++ b/test/tint/builtins/textureLoad/texture_param.wgsl.expected.ir.msl @@ -9,13 +9,13 @@ struct tint_module_vars_struct { }; struct vertex_main_outputs { - float4 tint_symbol_1 [[position]]; + float4 tint_symbol [[position]]; }; -int4 textureLoad2d(texture2d tint_symbol, int2 coords, int level) { - uint const v = min(uint(level), (tint_symbol.get_num_mip_levels() - 1u)); - uint2 const v_1 = (uint2(tint_symbol.get_width(v), tint_symbol.get_height(v)) - uint2(1u)); - return tint_symbol.read(min(uint2(coords), v_1), v); +int4 textureLoad2d(texture2d v, int2 coords, int level) { + uint const v_1 = min(uint(level), (v.get_num_mip_levels() - 1u)); + uint2 const v_2 = (uint2(v.get_width(v_1), v.get_height(v_1)) - uint2(1u)); + return v.read(min(uint2(coords), v_2), v_1); } void doTextureLoad(tint_module_vars_struct tint_module_vars) { @@ -30,7 +30,7 @@ float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) { vertex vertex_main_outputs vertex_main(texture2d arg_0 [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0}; vertex_main_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = vertex_main_inner(tint_module_vars); + tint_wrapper_result.tint_symbol = vertex_main_inner(tint_module_vars); return tint_wrapper_result; } // @@ -43,10 +43,10 @@ struct tint_module_vars_struct { texture2d arg_0; }; -int4 textureLoad2d(texture2d tint_symbol, int2 coords, int level) { - uint const v = min(uint(level), (tint_symbol.get_num_mip_levels() - 1u)); - uint2 const v_1 = (uint2(tint_symbol.get_width(v), tint_symbol.get_height(v)) - uint2(1u)); - return tint_symbol.read(min(uint2(coords), v_1), v); +int4 textureLoad2d(texture2d v, int2 coords, int level) { + uint const v_1 = min(uint(level), (v.get_num_mip_levels() - 1u)); + uint2 const v_2 = (uint2(v.get_width(v_1), v.get_height(v_1)) - uint2(1u)); + return v.read(min(uint2(coords), v_2), v_1); } void doTextureLoad(tint_module_vars_struct tint_module_vars) { @@ -67,10 +67,10 @@ struct tint_module_vars_struct { texture2d arg_0; }; -int4 textureLoad2d(texture2d tint_symbol, int2 coords, int level) { - uint const v = min(uint(level), (tint_symbol.get_num_mip_levels() - 1u)); - uint2 const v_1 = (uint2(tint_symbol.get_width(v), tint_symbol.get_height(v)) - uint2(1u)); - return tint_symbol.read(min(uint2(coords), v_1), v); +int4 textureLoad2d(texture2d v, int2 coords, int level) { + uint const v_1 = min(uint(level), (v.get_num_mip_levels() - 1u)); + uint2 const v_2 = (uint2(v.get_width(v_1), v.get_height(v_1)) - uint2(1u)); + return v.read(min(uint2(coords), v_2), v_1); } void doTextureLoad(tint_module_vars_struct tint_module_vars) { diff --git a/test/tint/const/global/global.wgsl.expected.ir.msl b/test/tint/const/global/global.wgsl.expected.ir.msl index b2e1f6b875d..c46939a3685 100644 --- a/test/tint/const/global/global.wgsl.expected.ir.msl +++ b/test/tint/const/global/global.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ struct tint_array { T elements[N]; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { int v1 = 1; uint v2 = 1u; float v3 = 1.0f; @@ -29,8 +29,8 @@ float4 tint_symbol_inner() { return float4(0.0f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/const/inferred/function.wgsl.expected.ir.msl b/test/tint/const/inferred/function.wgsl.expected.ir.msl index 6c6f131bdec..a33b3256220 100644 --- a/test/tint/const/inferred/function.wgsl.expected.ir.msl +++ b/test/tint/const/inferred/function.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(0.0f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/diagnostic_filtering/case_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/case_body_attribute.wgsl.expected.ir.msl index 793d7b18472..a4a42e8ede2 100644 --- a/test/tint/diagnostic_filtering/case_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/case_body_attribute.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; @@ -26,7 +26,7 @@ int tint_f32_to_i32(float value) { return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f)); } -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { switch(tint_f32_to_i32(x)) { case 0: { @@ -40,7 +40,7 @@ void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/compound_statement_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/compound_statement_attribute.wgsl.expected.ir.msl index 1730a231634..aaeeebe04e7 100644 --- a/test/tint/diagnostic_filtering/compound_statement_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/compound_statement_attribute.wgsl.expected.ir.msl @@ -18,17 +18,17 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { if ((x > 0.0f)) { tint_module_vars.t.sample(tint_module_vars.s, float2(0.0f)); } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/default_case_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/default_case_body_attribute.wgsl.expected.ir.msl index f78ce7e8336..5bf9b6cc034 100644 --- a/test/tint/diagnostic_filtering/default_case_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/default_case_body_attribute.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; @@ -26,7 +26,7 @@ int tint_f32_to_i32(float value) { return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f)); } -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { switch(tint_f32_to_i32(x)) { default: { @@ -36,7 +36,7 @@ void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/directive.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/directive.wgsl.expected.ir.msl index 225746ee23e..c1fc6dd4f06 100644 --- a/test/tint/diagnostic_filtering/directive.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/directive.wgsl.expected.ir.msl @@ -18,17 +18,17 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { if ((x > 0.0f)) { tint_module_vars.t.sample(tint_module_vars.s, float2(0.0f)); } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/else_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/else_body_attribute.wgsl.expected.ir.msl index d9149e3b86c..65105c121c4 100644 --- a/test/tint/diagnostic_filtering/else_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/else_body_attribute.wgsl.expected.ir.msl @@ -18,18 +18,18 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { if ((x > 0.0f)) { } else { tint_module_vars.t.sample(tint_module_vars.s, float2(0.0f)); } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/else_if_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/else_if_body_attribute.wgsl.expected.ir.msl index 5fe4c301f72..29f37fadde0 100644 --- a/test/tint/diagnostic_filtering/else_if_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/else_if_body_attribute.wgsl.expected.ir.msl @@ -18,11 +18,11 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { if ((x > 0.0f)) { } else { if ((x < 0.0f)) { @@ -31,7 +31,7 @@ void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/for_loop_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/for_loop_attribute.wgsl.expected.ir.msl index 52f75f92ab3..9221fbac1d2 100644 --- a/test/tint/diagnostic_filtering/for_loop_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/for_loop_attribute.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x) { +void main_inner(float x) { float4 v = float4(0.0f); { uint2 tint_loop_idx = 0u; @@ -46,6 +46,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v_2(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/for_loop_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/for_loop_body_attribute.wgsl.expected.ir.msl index a18913c78d7..4826c1116d2 100644 --- a/test/tint/diagnostic_filtering/for_loop_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/for_loop_body_attribute.wgsl.expected.ir.msl @@ -18,11 +18,11 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { float4 v = float4(0.0f); { uint2 tint_loop_idx = 0u; @@ -46,7 +46,7 @@ void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v_1(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/function_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/function_attribute.wgsl.expected.ir.msl index b0d6b61e53f..1cedd4ea160 100644 --- a/test/tint/diagnostic_filtering/function_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/function_attribute.wgsl.expected.ir.msl @@ -18,17 +18,17 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { if ((x > 0.0f)) { tint_module_vars.t.sample(tint_module_vars.s, float2(0.0f)); } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/function_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/function_body_attribute.wgsl.expected.ir.msl index d479bbdcf84..249a17edf8b 100644 --- a/test/tint/diagnostic_filtering/function_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/function_body_attribute.wgsl.expected.ir.msl @@ -18,17 +18,17 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { if ((x > 0.0f)) { tint_module_vars.t.sample(tint_module_vars.s, float2(0.0f)); } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/if_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/if_body_attribute.wgsl.expected.ir.msl index 6fda6f522e5..08b6e97b197 100644 --- a/test/tint/diagnostic_filtering/if_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/if_body_attribute.wgsl.expected.ir.msl @@ -18,17 +18,17 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { if ((x > 0.0f)) { tint_module_vars.t.sample(tint_module_vars.s, float2(0.0f)); } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/diagnostic_filtering/if_statement_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/if_statement_attribute.wgsl.expected.ir.msl index da8b01c7071..ed98d5908de 100644 --- a/test/tint/diagnostic_filtering/if_statement_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/if_statement_attribute.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x) { +void main_inner(float x) { if ((x > 0.0f)) { } else { if ((dfdx(1.0f) > 0.0f)) { @@ -25,6 +25,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/loop_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/loop_attribute.wgsl.expected.ir.msl index 9690ca13a04..bf0750d34f0 100644 --- a/test/tint/diagnostic_filtering/loop_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/loop_attribute.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x) { +void main_inner(float x) { { uint2 tint_loop_idx = 0u; while(true) { @@ -37,6 +37,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/loop_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/loop_body_attribute.wgsl.expected.ir.msl index a9a2a62ebe8..a7f6a669254 100644 --- a/test/tint/diagnostic_filtering/loop_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/loop_body_attribute.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x) { +void main_inner(float x) { { uint2 tint_loop_idx = 0u; while(true) { @@ -37,6 +37,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/loop_continuing_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/loop_continuing_attribute.wgsl.expected.ir.msl index f9a4f82da97..13df83dce10 100644 --- a/test/tint/diagnostic_filtering/loop_continuing_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/loop_continuing_attribute.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x) { +void main_inner(float x) { { uint2 tint_loop_idx = 0u; while(true) { @@ -37,6 +37,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/switch_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/switch_body_attribute.wgsl.expected.ir.msl index d6189131d27..ea7e8951e15 100644 --- a/test/tint/diagnostic_filtering/switch_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/switch_body_attribute.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; @@ -21,7 +21,7 @@ int tint_f32_to_i32(float value) { return select(2147483647, select((-2147483647 - 1), int(value), (value >= -2147483648.0f)), (value <= 2147483520.0f)); } -void tint_symbol_inner(float x) { +void main_inner(float x) { switch(tint_f32_to_i32(x)) { default: { @@ -31,6 +31,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/switch_statement_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/switch_statement_attribute.wgsl.expected.ir.msl index 3ceb7a0efd8..ec87326be43 100644 --- a/test/tint/diagnostic_filtering/switch_statement_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/switch_statement_attribute.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x) { +void main_inner(float x) { bool v = false; if ((x == 0.0f)) { v = (dfdx(1.0f) == 0.0f); @@ -32,6 +32,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v_1(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/while_loop_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/while_loop_attribute.wgsl.expected.ir.msl index 0fd40ae449a..008b86440ca 100644 --- a/test/tint/diagnostic_filtering/while_loop_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/while_loop_attribute.wgsl.expected.ir.msl @@ -13,11 +13,11 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x) { +void main_inner(float x) { float4 v = float4(0.0f); { uint2 tint_loop_idx = 0u; @@ -46,6 +46,6 @@ void tint_symbol_inner(float x) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.x); +fragment void v_2(main_inputs inputs [[stage_in]]) { + main_inner(inputs.x); } diff --git a/test/tint/diagnostic_filtering/while_loop_body_attribute.wgsl.expected.ir.msl b/test/tint/diagnostic_filtering/while_loop_body_attribute.wgsl.expected.ir.msl index c907128ac13..a34ede5ff82 100644 --- a/test/tint/diagnostic_filtering/while_loop_body_attribute.wgsl.expected.ir.msl +++ b/test/tint/diagnostic_filtering/while_loop_body_attribute.wgsl.expected.ir.msl @@ -18,11 +18,11 @@ struct tint_module_vars_struct { sampler s; }; -struct tint_symbol_inputs { +struct main_inputs { float x [[user(locn0)]]; }; -void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { +void main_inner(float x, tint_module_vars_struct tint_module_vars) { float4 v = float4(0.0f); { uint2 tint_loop_idx = 0u; @@ -46,7 +46,7 @@ void tint_symbol_inner(float x, tint_module_vars_struct tint_module_vars) { } } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { +fragment void v_1(main_inputs inputs [[stage_in]], texture2d t [[texture(0)]], sampler s [[sampler(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .s=s}; - tint_symbol_inner(inputs.x, tint_module_vars); + main_inner(inputs.x, tint_module_vars); } diff --git a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl index e213492f99d..fd302435c6c 100644 --- a/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f16.wgsl.expected.ir.msl @@ -14,7 +14,7 @@ struct tint_array { }; struct S_packed_vec3 { - /* 0x0000 */ half3x2 tint_symbol; + /* 0x0000 */ half3x2 tint_member; /* 0x000c */ tint_array tint_pad; /* 0x0010 */ packed_half3 vector; /* 0x0016 */ tint_array tint_pad_1; @@ -24,8 +24,8 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - half3x2 const v = (*tint_module_vars.data).tint_symbol; - half2 const x = (v * half3((*tint_module_vars.data).vector)); + half3x2 const v_1 = (*tint_module_vars.data).tint_member; + half2 const x = (v_1 * half3((*tint_module_vars.data).vector)); } diff --git a/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl index aceade980a2..4aad0e85e70 100644 --- a/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/mat3x2-vec3/f32.wgsl.expected.ir.msl @@ -14,7 +14,7 @@ struct tint_array { }; struct S_packed_vec3 { - /* 0x0000 */ float3x2 tint_symbol; + /* 0x0000 */ float3x2 tint_member; /* 0x0018 */ tint_array tint_pad; /* 0x0020 */ packed_float3 vector; /* 0x002c */ tint_array tint_pad_1; @@ -24,8 +24,8 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - float3x2 const v = (*tint_module_vars.data).tint_symbol; - float2 const x = (v * float3((*tint_module_vars.data).vector)); + float3x2 const v_1 = (*tint_module_vars.data).tint_member; + float2 const x = (v_1 * float3((*tint_module_vars.data).vector)); } diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl index 1c00105e9df..b04e11ab711 100644 --- a/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f16.wgsl.expected.ir.msl @@ -19,7 +19,7 @@ struct tint_packed_vec3_f16_array_element { }; struct S_packed_vec3 { - /* 0x0000 */ tint_array tint_symbol; + /* 0x0000 */ tint_array tint_member; /* 0x0018 */ packed_half3 vector; /* 0x001e */ tint_array tint_pad_1; }; @@ -28,11 +28,11 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - tint_array const v = (*tint_module_vars.data).tint_symbol; - half3 const v_1 = half3(v[0u].packed); - half3 const v_2 = half3(v[1u].packed); - half3x3 const v_3 = half3x3(v_1, v_2, half3(v[2u].packed)); - half3 const x = (v_3 * half3((*tint_module_vars.data).vector)); + tint_array const v_1 = (*tint_module_vars.data).tint_member; + half3 const v_2 = half3(v_1[0u].packed); + half3 const v_3 = half3(v_1[1u].packed); + half3x3 const v_4 = half3x3(v_2, v_3, half3(v_1[2u].packed)); + half3 const x = (v_4 * half3((*tint_module_vars.data).vector)); } diff --git a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl index 5a4eb612b6e..ec6f25e49a8 100644 --- a/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/mat3x3-vec3/f32.wgsl.expected.ir.msl @@ -19,7 +19,7 @@ struct tint_packed_vec3_f32_array_element { }; struct S_packed_vec3 { - /* 0x0000 */ tint_array tint_symbol; + /* 0x0000 */ tint_array tint_member; /* 0x0030 */ packed_float3 vector; /* 0x003c */ tint_array tint_pad_1; }; @@ -28,11 +28,11 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - tint_array const v = (*tint_module_vars.data).tint_symbol; - float3 const v_1 = float3(v[0u].packed); - float3 const v_2 = float3(v[1u].packed); - float3x3 const v_3 = float3x3(v_1, v_2, float3(v[2u].packed)); - float3 const x = (v_3 * float3((*tint_module_vars.data).vector)); + tint_array const v_1 = (*tint_module_vars.data).tint_member; + float3 const v_2 = float3(v_1[0u].packed); + float3 const v_3 = float3(v_1[1u].packed); + float3x3 const v_4 = float3x3(v_2, v_3, float3(v_1[2u].packed)); + float3 const x = (v_4 * float3((*tint_module_vars.data).vector)); } diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl index a9f04c16c8e..289c4740595 100644 --- a/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f16.wgsl.expected.ir.msl @@ -19,7 +19,7 @@ struct tint_packed_vec3_f16_array_element { }; struct S_packed_vec3 { - /* 0x0000 */ tint_array tint_symbol; + /* 0x0000 */ tint_array tint_member; /* 0x0018 */ packed_half3 vector; /* 0x001e */ tint_array tint_pad_1; }; @@ -28,11 +28,11 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - half3 const v = half3((*tint_module_vars.data).vector); - tint_array const v_1 = (*tint_module_vars.data).tint_symbol; - half3 const v_2 = half3(v_1[0u].packed); - half3 const v_3 = half3(v_1[1u].packed); - half3 const x = (v * half3x3(v_2, v_3, half3(v_1[2u].packed))); + half3 const v_1 = half3((*tint_module_vars.data).vector); + tint_array const v_2 = (*tint_module_vars.data).tint_member; + half3 const v_3 = half3(v_2[0u].packed); + half3 const v_4 = half3(v_2[1u].packed); + half3 const x = (v_1 * half3x3(v_3, v_4, half3(v_2[2u].packed))); } diff --git a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl index 5cc83059a1a..a2884dd3a68 100644 --- a/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/vec3-mat3x3/f32.wgsl.expected.ir.msl @@ -19,7 +19,7 @@ struct tint_packed_vec3_f32_array_element { }; struct S_packed_vec3 { - /* 0x0000 */ tint_array tint_symbol; + /* 0x0000 */ tint_array tint_member; /* 0x0030 */ packed_float3 vector; /* 0x003c */ tint_array tint_pad_1; }; @@ -28,11 +28,11 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - float3 const v = float3((*tint_module_vars.data).vector); - tint_array const v_1 = (*tint_module_vars.data).tint_symbol; - float3 const v_2 = float3(v_1[0u].packed); - float3 const v_3 = float3(v_1[1u].packed); - float3 const x = (v * float3x3(v_2, v_3, float3(v_1[2u].packed))); + float3 const v_1 = float3((*tint_module_vars.data).vector); + tint_array const v_2 = (*tint_module_vars.data).tint_member; + float3 const v_3 = float3(v_2[0u].packed); + float3 const v_4 = float3(v_2[1u].packed); + float3 const x = (v_1 * float3x3(v_3, v_4, float3(v_2[2u].packed))); } diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl index 186723fc460..eae4e3689a6 100644 --- a/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f16.wgsl.expected.ir.msl @@ -19,7 +19,7 @@ struct tint_packed_vec3_f16_array_element { }; struct S_packed_vec3 { - /* 0x0000 */ tint_array tint_symbol; + /* 0x0000 */ tint_array tint_member; /* 0x0020 */ packed_half3 vector; /* 0x0026 */ tint_array tint_pad_1; }; @@ -28,12 +28,12 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - half3 const v = half3((*tint_module_vars.data).vector); - tint_array const v_1 = (*tint_module_vars.data).tint_symbol; - half3 const v_2 = half3(v_1[0u].packed); - half3 const v_3 = half3(v_1[1u].packed); - half3 const v_4 = half3(v_1[2u].packed); - half4 const x = (v * half4x3(v_2, v_3, v_4, half3(v_1[3u].packed))); + half3 const v_1 = half3((*tint_module_vars.data).vector); + tint_array const v_2 = (*tint_module_vars.data).tint_member; + half3 const v_3 = half3(v_2[0u].packed); + half3 const v_4 = half3(v_2[1u].packed); + half3 const v_5 = half3(v_2[2u].packed); + half4 const x = (v_1 * half4x3(v_3, v_4, v_5, half3(v_2[3u].packed))); } diff --git a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl index e50da795ba7..be5d6a22a64 100644 --- a/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl +++ b/test/tint/expressions/binary/mul/vec3-mat4x3/f32.wgsl.expected.ir.msl @@ -19,7 +19,7 @@ struct tint_packed_vec3_f32_array_element { }; struct S_packed_vec3 { - /* 0x0000 */ tint_array tint_symbol; + /* 0x0000 */ tint_array tint_member; /* 0x0040 */ packed_float3 vector; /* 0x004c */ tint_array tint_pad_1; }; @@ -28,12 +28,12 @@ struct tint_module_vars_struct { const constant S_packed_vec3* data; }; -fragment void tint_symbol_1(const constant S_packed_vec3* data [[buffer(0)]]) { +fragment void v(const constant S_packed_vec3* data [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.data=data}; - float3 const v = float3((*tint_module_vars.data).vector); - tint_array const v_1 = (*tint_module_vars.data).tint_symbol; - float3 const v_2 = float3(v_1[0u].packed); - float3 const v_3 = float3(v_1[1u].packed); - float3 const v_4 = float3(v_1[2u].packed); - float4 const x = (v * float4x3(v_2, v_3, v_4, float3(v_1[3u].packed))); + float3 const v_1 = float3((*tint_module_vars.data).vector); + tint_array const v_2 = (*tint_module_vars.data).tint_member; + float3 const v_3 = float3(v_2[0u].packed); + float3 const v_4 = float3(v_2[1u].packed); + float3 const v_5 = float3(v_2[2u].packed); + float4 const x = (v_1 * float4x3(v_3, v_4, v_5, float3(v_2[3u].packed))); } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_1.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_1.wgsl.expected.ir.msl index ddb5b47224d..0c59307d805 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_1.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_1.wgsl.expected.ir.msl @@ -18,19 +18,19 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [1]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_2.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_2.wgsl.expected.ir.msl index f3ac456239b..3711d89cc4b 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_2.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_2.wgsl.expected.ir.msl @@ -18,20 +18,20 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [2]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_3.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_3.wgsl.expected.ir.msl index 49dded86fea..b8c14603a5d 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_3.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_3.wgsl.expected.ir.msl @@ -18,21 +18,21 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [3]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_4.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_4.wgsl.expected.ir.msl index a931af8ffba..7ff13620b79 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_4.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_4.wgsl.expected.ir.msl @@ -18,22 +18,22 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [4]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_5.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_5.wgsl.expected.ir.msl index 6fbb24d5aea..97722aedeee 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_5.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_5.wgsl.expected.ir.msl @@ -18,23 +18,23 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [5]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_6.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_6.wgsl.expected.ir.msl index f11356de8a8..a0401451818 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_6.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_6.wgsl.expected.ir.msl @@ -18,24 +18,24 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [6]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; - tint_wrapper_result.VertexOutputs_clipDistance[5u] = v.clipDistance[5u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; + tint_wrapper_result.VertexOutputs_clipDistance[5u] = v_1.clipDistance[5u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_7.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_7.wgsl.expected.ir.msl index 36182aedd95..6b4adb5ffb8 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_7.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_7.wgsl.expected.ir.msl @@ -18,25 +18,25 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [7]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; - tint_wrapper_result.VertexOutputs_clipDistance[5u] = v.clipDistance[5u]; - tint_wrapper_result.VertexOutputs_clipDistance[6u] = v.clipDistance[6u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; + tint_wrapper_result.VertexOutputs_clipDistance[5u] = v_1.clipDistance[5u]; + tint_wrapper_result.VertexOutputs_clipDistance[6u] = v_1.clipDistance[6u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/first_member/clip_distances_size_8.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/first_member/clip_distances_size_8.wgsl.expected.ir.msl index 442650f88d9..4912e5bda05 100644 --- a/test/tint/extensions/clip_distances/first_member/clip_distances_size_8.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/first_member/clip_distances_size_8.wgsl.expected.ir.msl @@ -18,26 +18,26 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float VertexOutputs_clipDistance [[clip_distance]] [8]; float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.clipDistance=tint_array{}, .position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; - tint_wrapper_result.VertexOutputs_clipDistance[5u] = v.clipDistance[5u]; - tint_wrapper_result.VertexOutputs_clipDistance[6u] = v.clipDistance[6u]; - tint_wrapper_result.VertexOutputs_clipDistance[7u] = v.clipDistance[7u]; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; + tint_wrapper_result.VertexOutputs_clipDistance[5u] = v_1.clipDistance[5u]; + tint_wrapper_result.VertexOutputs_clipDistance[6u] = v_1.clipDistance[6u]; + tint_wrapper_result.VertexOutputs_clipDistance[7u] = v_1.clipDistance[7u]; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_1.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_1.wgsl.expected.ir.msl index 6b5b0ef9bfc..b5238a87d99 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_1.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_1.wgsl.expected.ir.msl @@ -18,19 +18,19 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [1]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_2.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_2.wgsl.expected.ir.msl index 92594eddd41..6d911a2730c 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_2.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_2.wgsl.expected.ir.msl @@ -18,20 +18,20 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [2]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_3.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_3.wgsl.expected.ir.msl index a740646c2fe..48abda758c4 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_3.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_3.wgsl.expected.ir.msl @@ -18,21 +18,21 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [3]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_4.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_4.wgsl.expected.ir.msl index 213db5c1d16..3df10a1d244 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_4.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_4.wgsl.expected.ir.msl @@ -18,22 +18,22 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [4]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_5.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_5.wgsl.expected.ir.msl index a5f9af9ec7d..3162ce2da1c 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_5.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_5.wgsl.expected.ir.msl @@ -18,23 +18,23 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [5]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_6.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_6.wgsl.expected.ir.msl index 5de0a0e8c0f..33ebaff73fb 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_6.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_6.wgsl.expected.ir.msl @@ -18,24 +18,24 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [6]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; - tint_wrapper_result.VertexOutputs_clipDistance[5u] = v.clipDistance[5u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; + tint_wrapper_result.VertexOutputs_clipDistance[5u] = v_1.clipDistance[5u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_7.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_7.wgsl.expected.ir.msl index 23db2462f72..82e320f5b2c 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_7.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_7.wgsl.expected.ir.msl @@ -18,25 +18,25 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [7]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; - tint_wrapper_result.VertexOutputs_clipDistance[5u] = v.clipDistance[5u]; - tint_wrapper_result.VertexOutputs_clipDistance[6u] = v.clipDistance[6u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; + tint_wrapper_result.VertexOutputs_clipDistance[5u] = v_1.clipDistance[5u]; + tint_wrapper_result.VertexOutputs_clipDistance[6u] = v_1.clipDistance[6u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/clip_distances/last_member/clip_distances_size_8.wgsl.expected.ir.msl b/test/tint/extensions/clip_distances/last_member/clip_distances_size_8.wgsl.expected.ir.msl index 444a16bb803..7bd01754c49 100644 --- a/test/tint/extensions/clip_distances/last_member/clip_distances_size_8.wgsl.expected.ir.msl +++ b/test/tint/extensions/clip_distances/last_member/clip_distances_size_8.wgsl.expected.ir.msl @@ -18,26 +18,26 @@ struct VertexOutputs { tint_array clipDistance; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; float VertexOutputs_clipDistance [[clip_distance]] [8]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f), .clipDistance=tint_array{}}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_clipDistance[0u] = v.clipDistance[0u]; - tint_wrapper_result.VertexOutputs_clipDistance[1u] = v.clipDistance[1u]; - tint_wrapper_result.VertexOutputs_clipDistance[2u] = v.clipDistance[2u]; - tint_wrapper_result.VertexOutputs_clipDistance[3u] = v.clipDistance[3u]; - tint_wrapper_result.VertexOutputs_clipDistance[4u] = v.clipDistance[4u]; - tint_wrapper_result.VertexOutputs_clipDistance[5u] = v.clipDistance[5u]; - tint_wrapper_result.VertexOutputs_clipDistance[6u] = v.clipDistance[6u]; - tint_wrapper_result.VertexOutputs_clipDistance[7u] = v.clipDistance[7u]; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_clipDistance[0u] = v_1.clipDistance[0u]; + tint_wrapper_result.VertexOutputs_clipDistance[1u] = v_1.clipDistance[1u]; + tint_wrapper_result.VertexOutputs_clipDistance[2u] = v_1.clipDistance[2u]; + tint_wrapper_result.VertexOutputs_clipDistance[3u] = v_1.clipDistance[3u]; + tint_wrapper_result.VertexOutputs_clipDistance[4u] = v_1.clipDistance[4u]; + tint_wrapper_result.VertexOutputs_clipDistance[5u] = v_1.clipDistance[5u]; + tint_wrapper_result.VertexOutputs_clipDistance[6u] = v_1.clipDistance[6u]; + tint_wrapper_result.VertexOutputs_clipDistance[7u] = v_1.clipDistance[7u]; return tint_wrapper_result; } diff --git a/test/tint/extensions/parsing/basic.wgsl.expected.ir.msl b/test/tint/extensions/parsing/basic.wgsl.expected.ir.msl index 229585638ce..7545ce5c772 100644 --- a/test/tint/extensions/parsing/basic.wgsl.expected.ir.msl +++ b/test/tint/extensions/parsing/basic.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(0.10000000149011611938f, 0.20000000298023223877f, 0.30000001192092895508f, 0.40000000596046447754f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/extensions/parsing/duplicated_extensions.wgsl.expected.ir.msl b/test/tint/extensions/parsing/duplicated_extensions.wgsl.expected.ir.msl index 229585638ce..7545ce5c772 100644 --- a/test/tint/extensions/parsing/duplicated_extensions.wgsl.expected.ir.msl +++ b/test/tint/extensions/parsing/duplicated_extensions.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(0.10000000149011611938f, 0.20000000298023223877f, 0.30000001192092895508f, 0.40000000596046447754f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/extensions/parsing/multiple.wgsl.expected.ir.msl b/test/tint/extensions/parsing/multiple.wgsl.expected.ir.msl index 229585638ce..7545ce5c772 100644 --- a/test/tint/extensions/parsing/multiple.wgsl.expected.ir.msl +++ b/test/tint/extensions/parsing/multiple.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(0.10000000149011611938f, 0.20000000298023223877f, 0.30000001192092895508f, 0.40000000596046447754f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/identifiers/underscore/double/fn.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/fn.wgsl.expected.ir.msl index 60f3b31e0ac..b79023738b8 100644 --- a/test/tint/identifiers/underscore/double/fn.wgsl.expected.ir.msl +++ b/test/tint/identifiers/underscore/double/fn.wgsl.expected.ir.msl @@ -15,7 +15,7 @@ void b__() { a__(); } -kernel void tint_symbol() { +kernel void v() { b(); b__(); } diff --git a/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.msl index 160fe84ae64..fd3908232d5 100644 --- a/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.msl +++ b/test/tint/identifiers/underscore/double/parameter.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ void f(int a__, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.s) = b; } -kernel void tint_symbol(device int* s [[buffer(0)]]) { +kernel void v(device int* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; f(1, tint_module_vars); } diff --git a/test/tint/identifiers/underscore/prefix/lower/fn.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/fn.wgsl.expected.ir.msl index 2613d8fef90..62bea759663 100644 --- a/test/tint/identifiers/underscore/prefix/lower/fn.wgsl.expected.ir.msl +++ b/test/tint/identifiers/underscore/prefix/lower/fn.wgsl.expected.ir.msl @@ -15,7 +15,7 @@ void _b() { _a(); } -kernel void tint_symbol() { +kernel void v() { b(); _b(); } diff --git a/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl index e0502018baf..d18eab03ebd 100644 --- a/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl +++ b/test/tint/identifiers/underscore/prefix/lower/parameter.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ void f(int _a, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.s) = b; } -kernel void tint_symbol(device int* s [[buffer(0)]]) { +kernel void v(device int* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; f(1, tint_module_vars); } diff --git a/test/tint/identifiers/underscore/prefix/upper/fn.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/upper/fn.wgsl.expected.ir.msl index b1b7839af57..6e4ba86eca7 100644 --- a/test/tint/identifiers/underscore/prefix/upper/fn.wgsl.expected.ir.msl +++ b/test/tint/identifiers/underscore/prefix/upper/fn.wgsl.expected.ir.msl @@ -15,7 +15,7 @@ void _B() { _A(); } -kernel void tint_symbol() { +kernel void v() { B(); _B(); } diff --git a/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl b/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl index 1d86ba450de..d6f5a914188 100644 --- a/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl +++ b/test/tint/identifiers/underscore/prefix/upper/parameter.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ void f(int _A, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.s) = B; } -kernel void tint_symbol(device int* s [[buffer(0)]]) { +kernel void v(device int* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; f(1, tint_module_vars); } diff --git a/test/tint/let/inferred/function.wgsl.expected.ir.msl b/test/tint/let/inferred/function.wgsl.expected.ir.msl index 6c6f131bdec..a33b3256220 100644 --- a/test/tint/let/inferred/function.wgsl.expected.ir.msl +++ b/test/tint/let/inferred/function.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(0.0f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/loops/multiple_continues.wgsl.expected.ir.msl b/test/tint/loops/multiple_continues.wgsl.expected.ir.msl index 1b954c827b1..88643f23f47 100644 --- a/test/tint/loops/multiple_continues.wgsl.expected.ir.msl +++ b/test/tint/loops/multiple_continues.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { int i = 0; while(true) { diff --git a/test/tint/loops/multiple_continues_robustness.wgsl.expected.ir.msl b/test/tint/loops/multiple_continues_robustness.wgsl.expected.ir.msl index 1b954c827b1..88643f23f47 100644 --- a/test/tint/loops/multiple_continues_robustness.wgsl.expected.ir.msl +++ b/test/tint/loops/multiple_continues_robustness.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { int i = 0; while(true) { diff --git a/test/tint/loops/multiple_switch.wgsl.expected.ir.msl b/test/tint/loops/multiple_switch.wgsl.expected.ir.msl index 84d60f7e3d2..1d6093318c3 100644 --- a/test/tint/loops/multiple_switch.wgsl.expected.ir.msl +++ b/test/tint/loops/multiple_switch.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int i = 0; { int i_1 = 0; diff --git a/test/tint/loops/multiple_switch_robustness.wgsl.expected.ir.msl b/test/tint/loops/multiple_switch_robustness.wgsl.expected.ir.msl index 84d60f7e3d2..1d6093318c3 100644 --- a/test/tint/loops/multiple_switch_robustness.wgsl.expected.ir.msl +++ b/test/tint/loops/multiple_switch_robustness.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int i = 0; { int i_1 = 0; diff --git a/test/tint/loops/nested_loop_loop_switch.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_loop_switch.wgsl.expected.ir.msl index e2e9bcdbcaa..21d0cc80ce4 100644 --- a/test/tint/loops/nested_loop_loop_switch.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_loop_switch.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { uint2 tint_loop_idx = 0u; int i = 0; diff --git a/test/tint/loops/nested_loop_loop_switch_robustness.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_loop_switch_robustness.wgsl.expected.ir.msl index e2e9bcdbcaa..21d0cc80ce4 100644 --- a/test/tint/loops/nested_loop_loop_switch_robustness.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_loop_switch_robustness.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { uint2 tint_loop_idx = 0u; int i = 0; diff --git a/test/tint/loops/nested_loop_switch_loop_switch.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_switch_loop_switch.wgsl.expected.ir.msl index 4d89c60d7c7..c217e695c6b 100644 --- a/test/tint/loops/nested_loop_switch_loop_switch.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_switch_loop_switch.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { uint2 tint_loop_idx = 0u; int i = 0; diff --git a/test/tint/loops/nested_loop_switch_loop_switch_robustness.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_switch_loop_switch_robustness.wgsl.expected.ir.msl index 4d89c60d7c7..c217e695c6b 100644 --- a/test/tint/loops/nested_loop_switch_loop_switch_robustness.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_switch_loop_switch_robustness.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { uint2 tint_loop_idx = 0u; int i = 0; diff --git a/test/tint/loops/nested_loop_switch_loop_switch_switch.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_switch_loop_switch_switch.wgsl.expected.ir.msl index f91ee208038..e123b5df146 100644 --- a/test/tint/loops/nested_loop_switch_loop_switch_switch.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_switch_loop_switch_switch.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int k = 0; { uint2 tint_loop_idx = 0u; diff --git a/test/tint/loops/nested_loop_switch_loop_switch_switch_robustness.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_switch_loop_switch_switch_robustness.wgsl.expected.ir.msl index f91ee208038..e123b5df146 100644 --- a/test/tint/loops/nested_loop_switch_loop_switch_switch_robustness.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_switch_loop_switch_switch_robustness.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int k = 0; { uint2 tint_loop_idx = 0u; diff --git a/test/tint/loops/nested_loop_switch_switch.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_switch_switch.wgsl.expected.ir.msl index 59cb65414eb..af2bd7fa5e8 100644 --- a/test/tint/loops/nested_loop_switch_switch.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_switch_switch.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int j = 0; { uint2 tint_loop_idx = 0u; diff --git a/test/tint/loops/nested_loop_switch_switch_robustness.wgsl.expected.ir.msl b/test/tint/loops/nested_loop_switch_switch_robustness.wgsl.expected.ir.msl index 59cb65414eb..af2bd7fa5e8 100644 --- a/test/tint/loops/nested_loop_switch_switch_robustness.wgsl.expected.ir.msl +++ b/test/tint/loops/nested_loop_switch_switch_robustness.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int j = 0; { uint2 tint_loop_idx = 0u; diff --git a/test/tint/loops/single_continue.wgsl.expected.ir.msl b/test/tint/loops/single_continue.wgsl.expected.ir.msl index 810434a54ea..62835780af5 100644 --- a/test/tint/loops/single_continue.wgsl.expected.ir.msl +++ b/test/tint/loops/single_continue.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { int i = 0; while(true) { diff --git a/test/tint/loops/single_continue_robustness.wgsl.expected.ir.msl b/test/tint/loops/single_continue_robustness.wgsl.expected.ir.msl index 810434a54ea..62835780af5 100644 --- a/test/tint/loops/single_continue_robustness.wgsl.expected.ir.msl +++ b/test/tint/loops/single_continue_robustness.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { { int i = 0; while(true) { diff --git a/test/tint/ptr_ref/access/matrix.spvasm.expected.ir.msl b/test/tint/ptr_ref/access/matrix.spvasm.expected.ir.msl index d1235e722d3..d7210e4f33e 100644 --- a/test/tint/ptr_ref/access/matrix.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/access/matrix.spvasm.expected.ir.msl @@ -7,6 +7,6 @@ void main_1() { m[1u] = float3(5.0f); } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl b/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl index 6d62f58ce28..3a34340e1f7 100644 --- a/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/access/matrix.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v_1() { float3x3 m = float3x3(float3(1.0f, 2.0f, 3.0f), float3(4.0f, 5.0f, 6.0f), float3(7.0f, 8.0f, 9.0f)); thread float3* const v = (&m[1u]); (*v) = float3(5.0f); diff --git a/test/tint/ptr_ref/copy/ptr_copy.spvasm.expected.ir.msl b/test/tint/ptr_ref/copy/ptr_copy.spvasm.expected.ir.msl index 5fd7605743c..31e8d197dae 100644 --- a/test/tint/ptr_ref/copy/ptr_copy.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/copy/ptr_copy.spvasm.expected.ir.msl @@ -5,6 +5,6 @@ void main_1() { uint x_10 = 0u; } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl index 87d115fdfc2..488937c33f0 100644 --- a/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/load/global/i32.spvasm.expected.ir.msl @@ -9,7 +9,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { int const x_11 = as_type((as_type((*tint_module_vars.I)) + as_type(1))); } -kernel void tint_symbol() { +kernel void v() { thread int I = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.I=(&I)}; main_1(tint_module_vars); diff --git a/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl index bdddc662bb7..751771e86b8 100644 --- a/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/global/i32.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { thread int* I; }; -kernel void tint_symbol() { +kernel void v() { thread int I = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.I=(&I)}; int const i = (*tint_module_vars.I); diff --git a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl index ea43f43dce8..3e91a7a3e17 100644 --- a/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/load/global/struct_field.spvasm.expected.ir.msl @@ -14,7 +14,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { i = (*tint_module_vars.V).i; } -kernel void tint_symbol() { +kernel void v() { thread S V = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.V=(&V)}; main_1(tint_module_vars); diff --git a/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl index f61083807d4..fcd3aede35e 100644 --- a/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/global/struct_field.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ struct tint_module_vars_struct { thread S* V; }; -kernel void tint_symbol() { +kernel void v() { thread S V = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.V=(&V)}; int const i = (*tint_module_vars.V).i; diff --git a/test/tint/ptr_ref/load/local/i32.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/local/i32.spvasm.expected.ir.msl index f1096fdeedc..d80f8d1678e 100644 --- a/test/tint/ptr_ref/load/local/i32.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/i32.spvasm.expected.ir.msl @@ -7,6 +7,6 @@ void main_1() { int const x_12 = as_type((as_type(i) + as_type(1))); } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/ptr_ref/load/local/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/i32.wgsl.expected.ir.msl index 3eaf72375a1..9cd747d240e 100644 --- a/test/tint/ptr_ref/load/local/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int i = 123; int const u = as_type((as_type(i) + as_type(1))); } diff --git a/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl index 2670a93c34e..2c151b34b33 100644 --- a/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/ptr_function.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int i = 123; thread int* const p = (&i); int const u = as_type((as_type((*p)) + as_type(1))); diff --git a/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl index bfaf75c495c..bcb182d45eb 100644 --- a/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/ptr_private.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { thread int* i; }; -kernel void tint_symbol() { +kernel void v() { thread int i = 123; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=(&i)}; thread int* const p = tint_module_vars.i; diff --git a/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl index bbb20e2c65f..17bf8c73c18 100644 --- a/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/ptr_storage.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ struct tint_module_vars_struct { device S* v; }; -kernel void tint_symbol(device S* v [[buffer(0)]]) { +kernel void v_1(device S* v [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=v}; device int* const p = (&(*tint_module_vars.v).a); int const u = as_type((as_type((*p)) + as_type(1))); diff --git a/test/tint/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl index 73985468066..605ef3a2605 100644 --- a/test/tint/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/ptr_uniform.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ struct tint_module_vars_struct { const constant S* v; }; -kernel void tint_symbol(const constant S* v [[buffer(0)]]) { +kernel void v_1(const constant S* v [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=v}; const constant int* const p = (&(*tint_module_vars.v).a); int const u = as_type((as_type((*p)) + as_type(1))); diff --git a/test/tint/ptr_ref/load/local/ptr_workgroup.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/ptr_workgroup.wgsl.expected.ir.msl index ae1b0b06aa2..15f05719725 100644 --- a/test/tint/ptr_ref/load/local/ptr_workgroup.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/ptr_workgroup.wgsl.expected.ir.msl @@ -5,11 +5,11 @@ struct tint_module_vars_struct { threadgroup int* i; }; -struct tint_symbol_2 { - int tint_symbol_1; +struct tint_symbol_1 { + int tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.i) = 0; } @@ -19,7 +19,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul int const u = as_type((as_type((*p)) + as_type(1))); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.i=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/local/struct_field.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/local/struct_field.spvasm.expected.ir.msl index d7aeceefbb6..655a653618e 100644 --- a/test/tint/ptr_ref/load/local/struct_field.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/struct_field.spvasm.expected.ir.msl @@ -11,6 +11,6 @@ void main_1() { i = V.i; } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/ptr_ref/load/local/struct_field.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/local/struct_field.wgsl.expected.ir.msl index 15cba8cf87a..0c6977c319b 100644 --- a/test/tint/ptr_ref/load/local/struct_field.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/local/struct_field.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct S { int i; }; -kernel void tint_symbol() { +kernel void v() { S V = {}; int i = V.i; } diff --git a/test/tint/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl index bef5b4f5bcf..6328327946d 100644 --- a/test/tint/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/array_in_struct.wgsl.expected.ir.msl @@ -21,7 +21,7 @@ tint_array func(thread tint_array* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { str F = {}; tint_array const r = func((&F.arr)); } diff --git a/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl index 81e0279ebdd..65e22113970 100644 --- a/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/i32.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ int func(thread int* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { int F = 0; int const r = func((&F)); } diff --git a/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl index e08d128e74b..3783d1b660c 100644 --- a/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/i32_in_struct.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ int func(thread int* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { str F = {}; int const r = func((&F.i)); } diff --git a/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl index 44f25d01e82..917e25a84ad 100644 --- a/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/struct_in_array.wgsl.expected.ir.msl @@ -21,7 +21,7 @@ str func(thread str* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { tint_array F = {}; str const r = func((&F[2u])); } diff --git a/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index 70cd3ec4adb..aab43f1ceaf 100644 --- a/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ float2 func(thread float2* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { float2x2 F = float2x2(0.0f); float2 const r = func((&F[1u])); } diff --git a/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl index a855543bb5c..3a44c7b5853 100644 --- a/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/vec4_f32.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ float4 func(thread float4* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { float4 F = 0.0f; float4 const r = func((&F)); } diff --git a/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 2e99e088300..e73dbc5aa35 100644 --- a/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ float4 func(thread float4* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { float2x4 F = float2x4(0.0f); float4 const r = func((&F[1u])); } diff --git a/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl index b4fe48d29ee..04ac8b4298f 100644 --- a/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float4 func(thread float4* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { str F = {}; float4 const r = func((&F.i)); } diff --git a/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl index 1ab4cd2524e..a22815cc00c 100644 --- a/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/array_in_struct.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ tint_array func(thread tint_array* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread str P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; tint_array const r = func((&(*tint_module_vars.P).arr)); diff --git a/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl index d85fb701956..90fae690a72 100644 --- a/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/i32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ int func(thread int* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread int P = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; int const r = func(tint_module_vars.P); diff --git a/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl index 75153c9de32..d1862f37966 100644 --- a/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/i32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ int func(thread int* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread str P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; int const r = func((&(*tint_module_vars.P).i)); diff --git a/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl index 22339aaa25b..8add608bb95 100644 --- a/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/struct_in_array.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ str func(thread str* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread tint_array P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; str const r = func((&(*tint_module_vars.P)[2u])); diff --git a/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index a32ddb00d8d..219ea8eff27 100644 --- a/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float2 func(thread float2* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread float2x2 P = float2x2(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; float2 const r = func((&(*tint_module_vars.P)[1u])); diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl index 0b816093d41..74f8abca72f 100644 --- a/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/vec4_f32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float4 func(thread float4* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread float4 P = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; float4 const r = func(tint_module_vars.P); diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 658ea65083c..eaa109ba00f 100644 --- a/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float4 func(thread float4* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread float2x4 P = float2x4(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; float4 const r = func((&(*tint_module_vars.P)[1u])); diff --git a/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl index 6e5e933db20..cfcd1965c85 100644 --- a/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ float4 func(thread float4* const pointer) { return (*pointer); } -kernel void tint_symbol() { +kernel void v() { thread str P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; float4 const r = func((&(*tint_module_vars.P).i)); diff --git a/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl b/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl index 756596b6ff9..9d67d83f480 100644 --- a/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/ptr.spvasm.expected.ir.msl @@ -13,6 +13,6 @@ void main_1() { int const x_18 = func(x_19, (&i)); } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl index fa1b10fce53..b19f6ec4067 100644 --- a/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/ptr.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ int func(int value, thread int* const pointer) { return as_type((as_type(value) + as_type((*pointer)))); } -kernel void tint_symbol() { +kernel void v() { int i = 123; int const r = func(i, (&i)); } diff --git a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl index fcd67360117..4b5759eca90 100644 --- a/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/array_in_struct.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ tint_array func(const device tint_array* const pointer) { return (*pointer); } -kernel void tint_symbol(const device str* S [[buffer(0)]]) { +kernel void v(const device str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; tint_array const r = func((&(*tint_module_vars.S).arr)); } diff --git a/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl index c4c87317d69..0731cff0cd9 100644 --- a/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/i32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ int func(const device int* const pointer) { return (*pointer); } -kernel void tint_symbol(const device int* S [[buffer(0)]]) { +kernel void v(const device int* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; int const r = func(tint_module_vars.S); } diff --git a/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl index 55858cd651b..9db4ebcb862 100644 --- a/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/i32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ int func(const device int* const pointer) { return (*pointer); } -kernel void tint_symbol(const device str* S [[buffer(0)]]) { +kernel void v(const device str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; int const r = func((&(*tint_module_vars.S).i)); } diff --git a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl index ca042b3091d..75717f8ebd9 100644 --- a/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/struct_in_array.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ str func(const device str* const pointer) { return (*pointer); } -kernel void tint_symbol(const device tint_array* S [[buffer(0)]]) { +kernel void v(const device tint_array* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; str const r = func((&(*tint_module_vars.S)[2u])); } diff --git a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index ed00a0600dc..117288eaf5b 100644 --- a/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float2 func(const device float2* const pointer) { return (*pointer); } -kernel void tint_symbol(const device float2x2* S [[buffer(0)]]) { +kernel void v(const device float2x2* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float2 const r = func((&(*tint_module_vars.S)[1u])); } diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl index 844a1e1e8ca..e54447f34cf 100644 --- a/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/vec4_f32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float4 func(const device float4* const pointer) { return (*pointer); } -kernel void tint_symbol(const device float4* S [[buffer(0)]]) { +kernel void v(const device float4* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float4 const r = func(tint_module_vars.S); } diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 49f3edc5eeb..28e2a7b92c7 100644 --- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float4 func(const device float4* const pointer) { return (*pointer); } -kernel void tint_symbol(const device float2x4* S [[buffer(0)]]) { +kernel void v(const device float2x4* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float4 const r = func((&(*tint_module_vars.S)[1u])); } diff --git a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl index 2f360539f47..170eca73d3f 100644 --- a/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ float4 func(const device float4* const pointer) { return (*pointer); } -kernel void tint_symbol(const device str* S [[buffer(0)]]) { +kernel void v(const device str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float4 const r = func((&(*tint_module_vars.S).i)); } diff --git a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl index f230b7ed96e..94c34e7c1f6 100644 --- a/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/array_in_struct.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ tint_array func(const constant tint_array* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant str* S [[buffer(0)]]) { +kernel void v(const constant str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; tint_array const r = func((&(*tint_module_vars.S).arr)); } diff --git a/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl index 1f0b9aa7f68..481dba2ec79 100644 --- a/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/i32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ int func(const constant int* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant int* S [[buffer(0)]]) { +kernel void v(const constant int* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; int const r = func(tint_module_vars.S); } diff --git a/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl index eb715b01210..42605e0c3c5 100644 --- a/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/i32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ int func(const constant int* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant str* S [[buffer(0)]]) { +kernel void v(const constant str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; int const r = func((&(*tint_module_vars.S).i)); } diff --git a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl index 28234f42f7d..e60fdfed92a 100644 --- a/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/struct_in_array.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ str func(const constant str* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant tint_array* S [[buffer(0)]]) { +kernel void v(const constant tint_array* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; str const r = func((&(*tint_module_vars.S)[2u])); } diff --git a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index c9a1444a8d8..bebcbcd795d 100644 --- a/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float2 func(const constant float2* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant float2x2* S [[buffer(0)]]) { +kernel void v(const constant float2x2* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float2 const r = func((&(*tint_module_vars.S)[1u])); } diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl index b506f1a90eb..c077bee51d8 100644 --- a/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float4 func(const constant float4* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant float4* S [[buffer(0)]]) { +kernel void v(const constant float4* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float4 const r = func(tint_module_vars.S); } diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 778f4588666..4f4cdbc9605 100644 --- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ float4 func(const constant float4* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant float2x4* S [[buffer(0)]]) { +kernel void v(const constant float2x4* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float4 const r = func((&(*tint_module_vars.S)[1u])); } diff --git a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl index d72db235a3c..8fad7daaef7 100644 --- a/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/uniform/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ float4 func(const constant float4* const pointer) { return (*pointer); } -kernel void tint_symbol(const constant str* S [[buffer(0)]]) { +kernel void v(const constant str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; float4 const r = func((&(*tint_module_vars.S).i)); } diff --git a/test/tint/ptr_ref/load/param/workgroup/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/array_in_struct.wgsl.expected.ir.msl index 0301bb0ae9e..cae3cc57303 100644 --- a/test/tint/ptr_ref/load/param/workgroup/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/array_in_struct.wgsl.expected.ir.msl @@ -21,15 +21,15 @@ struct tint_module_vars_struct { threadgroup str* S; }; -struct tint_symbol_2 { - str tint_symbol_1; +struct tint_symbol_1 { + str tint_symbol; }; tint_array func(threadgroup tint_array* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -49,7 +49,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul tint_array const r = func((&(*tint_module_vars.S).arr)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_2).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_3).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/param/workgroup/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/i32.wgsl.expected.ir.msl index e97028a449a..fa4e8af3136 100644 --- a/test/tint/ptr_ref/load/param/workgroup/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/i32.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup int* S; }; -struct tint_symbol_2 { - int tint_symbol_1; +struct tint_symbol_1 { + int tint_symbol; }; int func(threadgroup int* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = 0; } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul int const r = func(tint_module_vars.S); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/param/workgroup/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/i32_in_struct.wgsl.expected.ir.msl index b765e2f621c..12e0a97787a 100644 --- a/test/tint/ptr_ref/load/param/workgroup/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/i32_in_struct.wgsl.expected.ir.msl @@ -9,15 +9,15 @@ struct tint_module_vars_struct { threadgroup str* S; }; -struct tint_symbol_2 { - str tint_symbol_1; +struct tint_symbol_1 { + str tint_symbol; }; int func(threadgroup int* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = str{}; } @@ -25,7 +25,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul int const r = func((&(*tint_module_vars.S).i)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/param/workgroup/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/struct_in_array.wgsl.expected.ir.msl index 30eca594304..e903a441f47 100644 --- a/test/tint/ptr_ref/load/param/workgroup/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/struct_in_array.wgsl.expected.ir.msl @@ -21,15 +21,15 @@ struct tint_module_vars_struct { threadgroup tint_array* S; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; str func(threadgroup str* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -49,7 +49,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul str const r = func((&(*tint_module_vars.S)[2u])); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_2).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_3).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index 703d247d941..9dbf26cede0 100644 --- a/test/tint/ptr_ref/load/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup float2x2* S; }; -struct tint_symbol_2 { - float2x2 tint_symbol_1; +struct tint_symbol_1 { + float2x2 tint_symbol; }; float2 func(threadgroup float2* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = float2x2(float2(0.0f), float2(0.0f)); } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul float2 const r = func((&(*tint_module_vars.S)[1u])); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/param/workgroup/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/vec4_f32.wgsl.expected.ir.msl index abfcc116eed..060bf8a05af 100644 --- a/test/tint/ptr_ref/load/param/workgroup/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/vec4_f32.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup float4* S; }; -struct tint_symbol_2 { - float4 tint_symbol_1; +struct tint_symbol_1 { + float4 tint_symbol; }; float4 func(threadgroup float4* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = float4(0.0f); } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul float4 const r = func(tint_module_vars.S); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 7c3e62d3a3a..50d44d7d10c 100644 --- a/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup float2x4* S; }; -struct tint_symbol_2 { - float2x4 tint_symbol_1; +struct tint_symbol_1 { + float2x4 tint_symbol; }; float4 func(threadgroup float4* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = float2x4(float4(0.0f), float4(0.0f)); } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul float4 const r = func((&(*tint_module_vars.S)[1u])); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl index bce70e9c3de..40de4dd96a1 100644 --- a/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/load/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -9,15 +9,15 @@ struct tint_module_vars_struct { threadgroup str* S; }; -struct tint_symbol_2 { - str tint_symbol_1; +struct tint_symbol_1 { + str tint_symbol; }; float4 func(threadgroup float4* const pointer) { return (*pointer); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = str{}; } @@ -25,7 +25,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul float4 const r = func((&(*tint_module_vars.S).i)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/global/i32.spvasm.expected.ir.msl b/test/tint/ptr_ref/store/global/i32.spvasm.expected.ir.msl index 9ab12030228..5b4b0098d3b 100644 --- a/test/tint/ptr_ref/store/global/i32.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/store/global/i32.spvasm.expected.ir.msl @@ -10,7 +10,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.I) = 123; } -kernel void tint_symbol() { +kernel void v() { thread int I = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.I=(&I)}; main_1(tint_module_vars); diff --git a/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl index 7e86179dbb3..5aa66247268 100644 --- a/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/global/i32.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { thread int* I; }; -kernel void tint_symbol() { +kernel void v() { thread int I = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.I=(&I)}; (*tint_module_vars.I) = 123; diff --git a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl index a9c0ea68bf4..02a0df9ef18 100644 --- a/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/store/global/struct_field.spvasm.expected.ir.msl @@ -13,7 +13,7 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.V).i = 5; } -kernel void tint_symbol() { +kernel void v() { thread S V = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.V=(&V)}; main_1(tint_module_vars); diff --git a/test/tint/ptr_ref/store/local/i32.spvasm.expected.ir.msl b/test/tint/ptr_ref/store/local/i32.spvasm.expected.ir.msl index 1a57b24076d..a9c0cd02249 100644 --- a/test/tint/ptr_ref/store/local/i32.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/store/local/i32.spvasm.expected.ir.msl @@ -8,6 +8,6 @@ void main_1() { i = 123; } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl index 86d7b9e2f08..ef4c3bbb22d 100644 --- a/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/local/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { int i = 123; thread int* const p = (&i); (*p) = 123; diff --git a/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.ir.msl b/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.ir.msl index 17b6a6a96f0..d403f44962a 100644 --- a/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.ir.msl +++ b/test/tint/ptr_ref/store/local/struct_field.spvasm.expected.ir.msl @@ -10,6 +10,6 @@ void main_1() { V.i = 5; } -kernel void tint_symbol() { +kernel void v() { main_1(); } diff --git a/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl index cf4acca2d49..225701b2c10 100644 --- a/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/array_in_struct.wgsl.expected.ir.msl @@ -21,7 +21,7 @@ void func(thread tint_array* const pointer) { (*pointer) = tint_array{}; } -kernel void tint_symbol() { +kernel void v() { str F = {}; func((&F.arr)); } diff --git a/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl index ee2ca0e166b..973574cb2e6 100644 --- a/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/i32.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ void func(thread int* const pointer) { (*pointer) = 42; } -kernel void tint_symbol() { +kernel void v() { int F = 0; func((&F)); } diff --git a/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl index 63466292ab9..3168b9d8eff 100644 --- a/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/i32_in_struct.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(thread int* const pointer) { (*pointer) = 42; } -kernel void tint_symbol() { +kernel void v() { str F = {}; func((&F.i)); } diff --git a/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl index 04ad25a96cc..c75fe981cd0 100644 --- a/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/struct_in_array.wgsl.expected.ir.msl @@ -21,7 +21,7 @@ void func(thread str* const pointer) { (*pointer) = str{}; } -kernel void tint_symbol() { +kernel void v() { tint_array F = {}; func((&F[2u])); } diff --git a/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index 8e01a00763b..4042d0e3c81 100644 --- a/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ void func(thread float2* const pointer) { (*pointer) = float2(0.0f); } -kernel void tint_symbol() { +kernel void v() { float2x2 F = float2x2(0.0f); func((&F[1u])); } diff --git a/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl index 37aa54e6a43..fcec37309ac 100644 --- a/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/vec4_f32.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ void func(thread float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol() { +kernel void v() { float4 F = 0.0f; func((&F)); } diff --git a/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index c187b7da267..2c205a25c59 100644 --- a/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ void func(thread float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol() { +kernel void v() { float2x4 F = float2x4(0.0f); func((&F[1u])); } diff --git a/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl index 0c602d4a1a1..4cd338d1ff1 100644 --- a/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/function/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(thread float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol() { +kernel void v() { str F = {}; func((&F.i)); } diff --git a/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl index 5fcbc21cbdd..e92d45b2228 100644 --- a/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/array_in_struct.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ void func(thread tint_array* const pointer) { (*pointer) = tint_array{}; } -kernel void tint_symbol() { +kernel void v() { thread str P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func((&(*tint_module_vars.P).arr)); diff --git a/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl index ab075de9939..e82ed4cc412 100644 --- a/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/i32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(thread int* const pointer) { (*pointer) = 42; } -kernel void tint_symbol() { +kernel void v() { thread int P = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func(tint_module_vars.P); diff --git a/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl index 4fb5c10d9f2..d6002020d9a 100644 --- a/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/i32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ void func(thread int* const pointer) { (*pointer) = 42; } -kernel void tint_symbol() { +kernel void v() { thread str P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func((&(*tint_module_vars.P).i)); diff --git a/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl index 37aa09afc21..d4447045df6 100644 --- a/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/struct_in_array.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ void func(thread str* const pointer) { (*pointer) = str{}; } -kernel void tint_symbol() { +kernel void v() { thread tint_array P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func((&(*tint_module_vars.P)[2u])); diff --git a/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index eea3a267ee1..23f3766c044 100644 --- a/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(thread float2* const pointer) { (*pointer) = float2(0.0f); } -kernel void tint_symbol() { +kernel void v() { thread float2x2 P = float2x2(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func((&(*tint_module_vars.P)[1u])); diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl index 924f3125436..e1ca5801f0d 100644 --- a/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/vec4_f32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(thread float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol() { +kernel void v() { thread float4 P = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func(tint_module_vars.P); diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 4d7f1d77393..a4a8fcc311a 100644 --- a/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(thread float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol() { +kernel void v() { thread float2x4 P = float2x4(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func((&(*tint_module_vars.P)[1u])); diff --git a/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl index e185ffa7526..26225081945 100644 --- a/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/private/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ void func(thread float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol() { +kernel void v() { thread str P = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P)}; func((&(*tint_module_vars.P).i)); diff --git a/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl index ab902276f80..553a134cd33 100644 --- a/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/ptr.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ void func(int value, thread int* const pointer) { (*pointer) = value; } -kernel void tint_symbol() { +kernel void v() { int i = 123; func(123, (&i)); } diff --git a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl index e46394eeed6..4929c2c786d 100644 --- a/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/array_in_struct.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ void func(device tint_array* const pointer) { (*pointer) = tint_array{}; } -kernel void tint_symbol(device str* S [[buffer(0)]]) { +kernel void v(device str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func((&(*tint_module_vars.S).arr)); } diff --git a/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl index fe1f2b2e07f..f39afb8cbe1 100644 --- a/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/i32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(device int* const pointer) { (*pointer) = 42; } -kernel void tint_symbol(device int* S [[buffer(0)]]) { +kernel void v(device int* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func(tint_module_vars.S); } diff --git a/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl index 92a5fbedc01..d13c4325b9c 100644 --- a/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/i32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ void func(device int* const pointer) { (*pointer) = 42; } -kernel void tint_symbol(device str* S [[buffer(0)]]) { +kernel void v(device str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func((&(*tint_module_vars.S).i)); } diff --git a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl index bd3a08ee8ad..d8bd7553b5a 100644 --- a/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/struct_in_array.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ void func(device str* const pointer) { (*pointer) = str{}; } -kernel void tint_symbol(device tint_array* S [[buffer(0)]]) { +kernel void v(device tint_array* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func((&(*tint_module_vars.S)[2u])); } diff --git a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index 3469dd060c3..42fdfa54942 100644 --- a/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(device float2* const pointer) { (*pointer) = float2(0.0f); } -kernel void tint_symbol(device float2x2* S [[buffer(0)]]) { +kernel void v(device float2x2* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func((&(*tint_module_vars.S)[1u])); } diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl index 129ac6d7bc5..dd2482bb8b4 100644 --- a/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/vec4_f32.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(device float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol(device float4* S [[buffer(0)]]) { +kernel void v(device float4* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func(tint_module_vars.S); } diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 5f46d9f159b..dd5d74197b1 100644 --- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ void func(device float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol(device float2x4* S [[buffer(0)]]) { +kernel void v(device float2x4* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func((&(*tint_module_vars.S)[1u])); } diff --git a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl index baaf6c61f6c..077b63d9e30 100644 --- a/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/storage/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ void func(device float4* const pointer) { (*pointer) = float4(0.0f); } -kernel void tint_symbol(device str* S [[buffer(0)]]) { +kernel void v(device str* S [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=S}; func((&(*tint_module_vars.S).i)); } diff --git a/test/tint/ptr_ref/store/param/workgroup/array_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/array_in_struct.wgsl.expected.ir.msl index 2b87be79236..d60bf06b7ea 100644 --- a/test/tint/ptr_ref/store/param/workgroup/array_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/array_in_struct.wgsl.expected.ir.msl @@ -21,15 +21,15 @@ struct tint_module_vars_struct { threadgroup str* S; }; -struct tint_symbol_2 { - str tint_symbol_1; +struct tint_symbol_1 { + str tint_symbol; }; void func(threadgroup tint_array* const pointer) { (*pointer) = tint_array{}; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -49,7 +49,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func((&(*tint_module_vars.S).arr)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_2).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_3).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/param/workgroup/i32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/i32.wgsl.expected.ir.msl index 384cd66f83e..f7db19fd254 100644 --- a/test/tint/ptr_ref/store/param/workgroup/i32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/i32.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup int* S; }; -struct tint_symbol_2 { - int tint_symbol_1; +struct tint_symbol_1 { + int tint_symbol; }; void func(threadgroup int* const pointer) { (*pointer) = 42; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = 0; } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func(tint_module_vars.S); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/param/workgroup/i32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/i32_in_struct.wgsl.expected.ir.msl index d3896c66abc..04a8c5ae766 100644 --- a/test/tint/ptr_ref/store/param/workgroup/i32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/i32_in_struct.wgsl.expected.ir.msl @@ -9,15 +9,15 @@ struct tint_module_vars_struct { threadgroup str* S; }; -struct tint_symbol_2 { - str tint_symbol_1; +struct tint_symbol_1 { + str tint_symbol; }; void func(threadgroup int* const pointer) { (*pointer) = 42; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = str{}; } @@ -25,7 +25,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func((&(*tint_module_vars.S).i)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/param/workgroup/struct_in_array.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/struct_in_array.wgsl.expected.ir.msl index cac795ee98f..bf81749559e 100644 --- a/test/tint/ptr_ref/store/param/workgroup/struct_in_array.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/struct_in_array.wgsl.expected.ir.msl @@ -21,15 +21,15 @@ struct tint_module_vars_struct { threadgroup tint_array* S; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; void func(threadgroup str* const pointer) { (*pointer) = str{}; } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v = 0u; v = tint_local_index; @@ -49,7 +49,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func((&(*tint_module_vars.S)[2u])); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_2).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_3).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl index 649ccb77fd0..518dffdf437 100644 --- a/test/tint/ptr_ref/store/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/vec2_f32_in_mat2x2.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup float2x2* S; }; -struct tint_symbol_2 { - float2x2 tint_symbol_1; +struct tint_symbol_1 { + float2x2 tint_symbol; }; void func(threadgroup float2* const pointer) { (*pointer) = float2(0.0f); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = float2x2(float2(0.0f), float2(0.0f)); } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func((&(*tint_module_vars.S)[1u])); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/param/workgroup/vec4_f32.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/vec4_f32.wgsl.expected.ir.msl index 8bc7a65d0f1..c3684982356 100644 --- a/test/tint/ptr_ref/store/param/workgroup/vec4_f32.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/vec4_f32.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup float4* S; }; -struct tint_symbol_2 { - float4 tint_symbol_1; +struct tint_symbol_1 { + float4 tint_symbol; }; void func(threadgroup float4* const pointer) { (*pointer) = float4(0.0f); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = float4(0.0f); } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func(tint_module_vars.S); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl index 936e906b175..02f72144376 100644 --- a/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_mat2x4.wgsl.expected.ir.msl @@ -5,15 +5,15 @@ struct tint_module_vars_struct { threadgroup float2x4* S; }; -struct tint_symbol_2 { - float2x4 tint_symbol_1; +struct tint_symbol_1 { + float2x4 tint_symbol; }; void func(threadgroup float4* const pointer) { (*pointer) = float4(0.0f); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = float2x4(float4(0.0f), float4(0.0f)); } @@ -21,7 +21,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func((&(*tint_module_vars.S)[1u])); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl b/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl index 38959110e27..8a5a24ef339 100644 --- a/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_ref/store/param/workgroup/vec4_f32_in_struct.wgsl.expected.ir.msl @@ -9,15 +9,15 @@ struct tint_module_vars_struct { threadgroup str* S; }; -struct tint_symbol_2 { - str tint_symbol_1; +struct tint_symbol_1 { + str tint_symbol; }; void func(threadgroup float4* const pointer) { (*pointer) = float4(0.0f); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.S) = str{}; } @@ -25,7 +25,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul func((&(*tint_module_vars.S).i)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.S=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/ptr_sugar/array.wgsl.expected.ir.msl b/test/tint/ptr_sugar/array.wgsl.expected.ir.msl index 11882beb118..edfb5113da8 100644 --- a/test/tint/ptr_sugar/array.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/array.wgsl.expected.ir.msl @@ -59,7 +59,7 @@ void no_deref_var() { (*p)[0u] = 42; } -kernel void tint_symbol() { +kernel void v() { deref_const(); no_deref_const(); deref_let(); diff --git a/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl b/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl index 246534df65e..823fcc21c4b 100644 --- a/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/builtin_struct.wgsl.expected.ir.msl @@ -39,7 +39,7 @@ void no_deref_frexp() { int exp = (*p).exp; } -kernel void tint_symbol() { +kernel void v() { deref_modf(); no_deref_modf(); deref_frexp(); diff --git a/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl b/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl index c871de8802c..aab38411a17 100644 --- a/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/compound_assign_index.wgsl.expected.ir.msl @@ -25,7 +25,7 @@ void no_deref_inc() { (*p).x = as_type((as_type((*p).x) + as_type(1))); } -kernel void tint_symbol() { +kernel void v() { deref(); no_deref(); deref_inc(); diff --git a/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl b/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl index 5d0547690d8..6e946e98bf0 100644 --- a/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/compound_assign_member.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ void no_deref() { (*p).x = as_type((as_type((*p).x) + as_type(42))); } -kernel void tint_symbol() { +kernel void v() { deref(); no_deref(); } diff --git a/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl b/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl index ee54bb2ba86..96b07690da2 100644 --- a/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/matrix.wgsl.expected.ir.msl @@ -15,7 +15,7 @@ void no_deref() { (*p)[0u] = float3(1.0f, 2.0f, 3.0f); } -kernel void tint_symbol() { +kernel void v() { deref(); no_deref(); } diff --git a/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl b/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl index e8f669c47c2..bc669991683 100644 --- a/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/struct.wgsl.expected.ir.msl @@ -19,7 +19,7 @@ void no_deref() { (*p).x = 42; } -kernel void tint_symbol() { +kernel void v() { deref(); no_deref(); } diff --git a/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl b/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl index 6ab9c134d95..658ebe71430 100644 --- a/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/vector_index.wgsl.expected.ir.msl @@ -47,7 +47,7 @@ void no_deref_var() { (*p).x = 42; } -kernel void tint_symbol() { +kernel void v() { deref_const(); no_deref_const(); deref_let(); diff --git a/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl b/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl index ec0616fd31e..9c1aa599663 100644 --- a/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/vector_member.wgsl.expected.ir.msl @@ -15,7 +15,7 @@ void no_deref() { (*p).x = 42; } -kernel void tint_symbol() { +kernel void v() { deref(); no_deref(); } diff --git a/test/tint/ptr_sugar/vector_swizzle.wgsl.expected.ir.msl b/test/tint/ptr_sugar/vector_swizzle.wgsl.expected.ir.msl index 5b58134c4c7..9203f40e19b 100644 --- a/test/tint/ptr_sugar/vector_swizzle.wgsl.expected.ir.msl +++ b/test/tint/ptr_sugar/vector_swizzle.wgsl.expected.ir.msl @@ -2,21 +2,21 @@ using namespace metal; struct tint_module_vars_struct { - device int4* tint_symbol; + device int4* tint_member; }; void deref(tint_module_vars_struct tint_module_vars) { - device int4* const p = tint_module_vars.tint_symbol; - (*tint_module_vars.tint_symbol) = (*p).wzyx; + device int4* const p = tint_module_vars.tint_member; + (*tint_module_vars.tint_member) = (*p).wzyx; } void no_deref(tint_module_vars_struct tint_module_vars) { - device int4* const p = tint_module_vars.tint_symbol; - (*tint_module_vars.tint_symbol) = (*p).wzyx; + device int4* const p = tint_module_vars.tint_member; + (*tint_module_vars.tint_member) = (*p).wzyx; } -kernel void tint_symbol_1(device int4* tint_symbol [[buffer(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_symbol=tint_symbol}; +kernel void v(device int4* v_1 [[buffer(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.tint_member=v_1}; deref(tint_module_vars); no_deref(tint_module_vars); } diff --git a/test/tint/samples/function.wgsl.expected.ir.msl b/test/tint/samples/function.wgsl.expected.ir.msl index 3871038e923..dbfffec57fe 100644 --- a/test/tint/samples/function.wgsl.expected.ir.msl +++ b/test/tint/samples/function.wgsl.expected.ir.msl @@ -1,10 +1,10 @@ #include using namespace metal; -float tint_symbol() { +float v() { return 0.40000000596046447754f; } kernel void ep() { - float const a = tint_symbol(); + float const a = v(); } diff --git a/test/tint/samples/simple.wgsl.expected.ir.msl b/test/tint/samples/simple.wgsl.expected.ir.msl index 80b62f28250..ab482c3cd37 100644 --- a/test/tint/samples/simple.wgsl.expected.ir.msl +++ b/test/tint/samples/simple.wgsl.expected.ir.msl @@ -1,21 +1,21 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; void bar() { } -float4 tint_symbol_inner() { +float4 main_inner() { float2 a = float2(0.0f); bar(); return float4(0.40000000596046447754f, 0.40000000596046447754f, 0.80000001192092895508f, 1.0f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/samples/simple_vertex.spvasm.expected.ir.msl b/test/tint/samples/simple_vertex.spvasm.expected.ir.msl index 6574b6b5fde..f2a517ca71a 100644 --- a/test/tint/samples/simple_vertex.spvasm.expected.ir.msl +++ b/test/tint/samples/simple_vertex.spvasm.expected.ir.msl @@ -9,7 +9,7 @@ struct main_out { float4 gl_Position; }; -struct tint_symbol_outputs { +struct main_outputs { float4 main_out_gl_Position [[position]]; }; @@ -17,15 +17,15 @@ void main_1(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.gl_Position) = float4(0.0f); } -main_out tint_symbol_inner(tint_module_vars_struct tint_module_vars) { +main_out main_inner(tint_module_vars_struct tint_module_vars) { main_1(tint_module_vars); return main_out{.gl_Position=(*tint_module_vars.gl_Position)}; } -vertex tint_symbol_outputs tint_symbol() { +vertex main_outputs v() { thread float4 gl_Position = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.gl_Position=(&gl_Position)}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.main_out_gl_Position = tint_symbol_inner(tint_module_vars).gl_Position; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.main_out_gl_Position = main_inner(tint_module_vars).gl_Position; return tint_wrapper_result; } diff --git a/test/tint/shadowing/short_names/renamer/function.wgsl.expected.ir.msl b/test/tint/shadowing/short_names/renamer/function.wgsl.expected.ir.msl index 01d3e468767..efef473b05e 100644 --- a/test/tint/shadowing/short_names/renamer/function.wgsl.expected.ir.msl +++ b/test/tint/shadowing/short_names/renamer/function.wgsl.expected.ir.msl @@ -1,28 +1,28 @@ #include using namespace metal; -struct tint_symbol_5_outputs { - float4 tint_symbol_7 [[position]]; +struct tint_struct { + float4 tint_member [[position]]; }; -int tint_symbol() { +int v() { return 0; } -float tint_symbol_1(int tint_symbol_2) { - return float(tint_symbol_2); +float v_1(int v_2) { + return float(v_2); } -bool tint_symbol_3(float tint_symbol_4) { - return bool(tint_symbol_4); +bool v_3(float v_4) { + return bool(v_4); } -float4 tint_symbol_5_inner(uint tint_symbol_6) { - return select(float4(0.0f), float4(1.0f), tint_symbol_3(tint_symbol_1(tint_symbol()))); +float4 v_5(uint v_6) { + return select(float4(0.0f), float4(1.0f), v_3(v_1(v()))); } -vertex tint_symbol_5_outputs tint_symbol_5(uint tint_symbol_6 [[vertex_id]]) { - tint_symbol_5_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_7 = tint_symbol_5_inner(tint_symbol_6); - return tint_wrapper_result; +vertex tint_struct tint_entry_point(uint v_8 [[vertex_id]]) { + tint_struct v_9 = {}; + v_9.tint_member = v_5(v_8); + return v_9; } diff --git a/test/tint/shadowing/short_names/renamer/renamer.wgsl.expected.ir.msl b/test/tint/shadowing/short_names/renamer/renamer.wgsl.expected.ir.msl index b75a19fe37a..4a77d278bf2 100644 --- a/test/tint/shadowing/short_names/renamer/renamer.wgsl.expected.ir.msl +++ b/test/tint/shadowing/short_names/renamer/renamer.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_2 [[position]]; +struct tint_struct { + float4 tint_member [[position]]; }; -float4 tint_symbol_inner(uint tint_symbol_1) { +float4 v(uint v_1) { return float4(0.0f, 0.0f, 0.0f, 1.0f); } -vertex tint_symbol_outputs tint_symbol(uint tint_symbol_1 [[vertex_id]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_2 = tint_symbol_inner(tint_symbol_1); - return tint_wrapper_result; +vertex tint_struct tint_entry_point(uint v_3 [[vertex_id]]) { + tint_struct v_4 = {}; + v_4.tint_member = v(v_3); + return v_4; } diff --git a/test/tint/shadowing/short_names/renamer/type.wgsl.expected.ir.msl b/test/tint/shadowing/short_names/renamer/type.wgsl.expected.ir.msl index 70fcef676cd..88cd82ed789 100644 --- a/test/tint/shadowing/short_names/renamer/type.wgsl.expected.ir.msl +++ b/test/tint/shadowing/short_names/renamer/type.wgsl.expected.ir.msl @@ -1,23 +1,23 @@ #include using namespace metal; -struct tint_symbol { - int tint_symbol_1; +struct tint_struct { + int tint_member; }; -struct tint_symbol_4_outputs { - float4 tint_symbol_2 [[position]]; +struct tint_struct_1 { + float4 tint_member_1 [[position]]; }; -float4 tint_symbol_4_inner(uint tint_symbol_5) { - tint_symbol const tint_symbol_6 = tint_symbol{.tint_symbol_1=1}; - float const tint_symbol_7 = float(tint_symbol_6.tint_symbol_1); - bool const tint_symbol_8 = bool(tint_symbol_7); - return select(float4(0.0f), float4(1.0f), tint_symbol_8); +float4 v(uint v_1) { + tint_struct const v_2 = tint_struct{.tint_member=1}; + float const v_3 = float(v_2.tint_member); + bool const v_4 = bool(v_3); + return select(float4(0.0f), float4(1.0f), v_4); } -vertex tint_symbol_4_outputs tint_symbol_4(uint tint_symbol_5 [[vertex_id]]) { - tint_symbol_4_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_2 = tint_symbol_4_inner(tint_symbol_5); - return tint_wrapper_result; +vertex tint_struct_1 tint_entry_point(uint v_6 [[vertex_id]]) { + tint_struct_1 v_7 = {}; + v_7.tint_member_1 = v(v_6); + return v_7; } diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl index 1506f8ff156..a4df5bcf5ae 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_body.wgsl.expected.ir.msl @@ -29,7 +29,7 @@ struct OuterS { tint_array a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl index 748b54be3cb..e86b9724d49 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_continuing.wgsl.expected.ir.msl @@ -29,7 +29,7 @@ struct OuterS { tint_array a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl index a60c76cef3b..f52269e03f3 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/in_for_loop_init.wgsl.expected.ir.msl @@ -29,7 +29,7 @@ struct OuterS { tint_array a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl index 6e0925c2ad2..2c6122d9168 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/indexing_with_side_effect_func.wgsl.expected.ir.msl @@ -40,11 +40,11 @@ uint getNextIndex(tint_module_vars_struct tint_module_vars) { return (*tint_module_vars.nextIndex); } -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { thread uint nextIndex = 0u; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.nextIndex=(&nextIndex), .uniforms=uniforms}; InnerS v = {}; OuterS s = {}; - uint const v_1 = getNextIndex(tint_module_vars); - s.a1[min(v_1, 7u)].a2[min((*tint_module_vars.uniforms).j, 7u)] = v; + uint const v_2 = getNextIndex(tint_module_vars); + s.a1[min(v_2, 7u)].a2[min((*tint_module_vars.uniforms).j, 7u)] = v; } diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl index d17c1976580..69994ca6f09 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array.wgsl.expected.ir.msl @@ -29,7 +29,7 @@ struct OuterS { tint_array a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl index 545f5c66041..40d240df12e 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_array.wgsl.expected.ir.msl @@ -30,7 +30,7 @@ struct OuterS { tint_array, 8> a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl index 1b8d638d689..b664762d33a 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct.wgsl.expected.ir.msl @@ -33,7 +33,7 @@ struct OuterS { tint_array a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl index ba953136cd6..74ac2d6e100 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_array_struct_array.wgsl.expected.ir.msl @@ -34,7 +34,7 @@ struct OuterS { tint_array a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl index fc287c21e24..a7e31313e09 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array.wgsl.expected.ir.msl @@ -31,7 +31,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]], device OuterS* s1 [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]], device OuterS* s1 [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .s1=s1, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; InnerS v = {}; (*tint_module_vars.s1).a1[min((*tint_module_vars.uniforms).i, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 4u) - 1u))] = v; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl index 411387e99ee..c9f23db697f 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_dynamic_array_struct_array.wgsl.expected.ir.msl @@ -36,7 +36,7 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]], device OuterS* s [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]], device OuterS* s [[buffer(1)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms, .s=s, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; InnerS v = {}; (*tint_module_vars.s).a1[min((*tint_module_vars.uniforms).i, ((((*tint_module_vars.tint_storage_buffer_sizes)[0u].x - 0u) / 32u) - 1u))].a2[min((*tint_module_vars.uniforms).j, 7u)] = v; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl index f8c1e80e8f4..540bc41543c 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_matrix.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ struct OuterS { float2x4 m1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; OuterS s1 = {}; s1.m1[min((*tint_module_vars.uniforms).i, 1u)] = float4(1.0f); diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl index 04bb2e29296..d75f1380e05 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_multiple_arrays.wgsl.expected.ir.msl @@ -30,7 +30,7 @@ struct OuterS { tint_array a2; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl index dc7aa80fbf0..2775968f56d 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_struct_array.wgsl.expected.ir.msl @@ -33,7 +33,7 @@ struct OuterS { S1 s2; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl index 289751409c4..f797bbd5429 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/struct_vector.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ struct OuterS { float3 v1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; OuterS s1 = {}; s1.v1[min((*tint_module_vars.uniforms).i, 2u)] = 1.0f; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl index 5e0bf393c4d..0deeebf3aa9 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/vector_assign.wgsl.expected.ir.msl @@ -29,7 +29,7 @@ uint f(uint i) { return (i + 1u); } -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; OuterS s1 = {}; float3 v = 0.0f; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl index 8ea0e0decbd..71d36c7ee7a 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer.wgsl.expected.ir.msl @@ -29,7 +29,7 @@ struct OuterS { tint_array a1; }; -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; InnerS v = {}; OuterS s1 = {}; diff --git a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl index 9ef6794323d..2f620ba1718 100644 --- a/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/indexed_assign_to_array_in_struct/via_pointer_arg.wgsl.expected.ir.msl @@ -34,7 +34,7 @@ void f(thread OuterS* const p, tint_module_vars_struct tint_module_vars) { (*p).a1[min((*tint_module_vars.uniforms).i, 7u)] = v; } -kernel void tint_symbol(const constant Uniforms* uniforms [[buffer(0)]]) { +kernel void v_1(const constant Uniforms* uniforms [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.uniforms=uniforms}; OuterS s1 = {}; f((&s1), tint_module_vars); diff --git a/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.msl b/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.msl index 0097f9ad9de..98098b01c15 100644 --- a/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/phony/addr_of_non_constructable.wgsl.expected.ir.msl @@ -1,5 +1,5 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { } diff --git a/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.msl b/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.msl index 9b13c27306d..29bcf5cd3bc 100644 --- a/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/phony/addr_of_runtime_array.wgsl.expected.ir.msl @@ -21,6 +21,6 @@ struct tint_module_vars_struct { device S* s; }; -kernel void tint_symbol(device S* s [[buffer(0)]]) { +kernel void v(device S* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; } diff --git a/test/tint/statements/assign/phony/call.wgsl.expected.ir.msl b/test/tint/statements/assign/phony/call.wgsl.expected.ir.msl index f0273331404..2c41efd4a61 100644 --- a/test/tint/statements/assign/phony/call.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/phony/call.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ int f(int a, int b, int c) { return as_type((as_type(as_type((as_type(a) * as_type(b)))) + as_type(c))); } -kernel void tint_symbol() { +kernel void v() { f(1, 2, 3); } diff --git a/test/tint/statements/assign/phony/multiple_side_effects.wgsl.expected.ir.msl b/test/tint/statements/assign/phony/multiple_side_effects.wgsl.expected.ir.msl index 5475ee22d2d..de2adcfd55c 100644 --- a/test/tint/statements/assign/phony/multiple_side_effects.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/phony/multiple_side_effects.wgsl.expected.ir.msl @@ -5,8 +5,8 @@ int f(int a, int b, int c) { return as_type((as_type(as_type((as_type(a) * as_type(b)))) + as_type(c))); } -kernel void tint_symbol() { - int const v = f(1, 2, 3); - int const v_1 = f(4, 5, 6); - as_type((as_type(v) + as_type(as_type((as_type(v_1) * as_type(f(7, f(8, 9, 10), 11))))))); +kernel void v() { + int const v_1 = f(1, 2, 3); + int const v_2 = f(4, 5, 6); + as_type((as_type(v_1) + as_type(as_type((as_type(v_2) * as_type(f(7, f(8, 9, 10), 11))))))); } diff --git a/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.msl b/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.msl index be578f69267..f09a109da1a 100644 --- a/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/phony/storage_buffer.wgsl.expected.ir.msl @@ -9,6 +9,6 @@ struct tint_module_vars_struct { device S* s; }; -kernel void tint_symbol(device S* s [[buffer(0)]]) { +kernel void v(device S* s [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.s=s}; } diff --git a/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.msl b/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.msl index f90d812c1ae..28a69260785 100644 --- a/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.msl +++ b/test/tint/statements/assign/phony/uniform_buffer.wgsl.expected.ir.msl @@ -9,6 +9,6 @@ struct tint_module_vars_struct { const constant S* u; }; -kernel void tint_symbol(const constant S* u [[buffer(0)]]) { +kernel void v(const constant S* u [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.u=u}; } diff --git a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl index a3aeb714f2a..4804ec72db3 100644 --- a/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl +++ b/test/tint/statements/compound_assign/complex_lhs.wgsl.expected.ir.msl @@ -31,11 +31,11 @@ int bar(tint_module_vars_struct tint_module_vars) { return (*tint_module_vars.counter); } -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { S x = S{}; thread S* const p = (&x); - thread int4* const v = (&(*p).a[min(uint(foo(tint_module_vars)), 3u)]); - int const v_1 = bar(tint_module_vars); - int const v_2 = as_type((as_type((*v)[min(uint(v_1), 3u)]) + as_type(5))); - (*v)[min(uint(v_1), 3u)] = v_2; + thread int4* const v_1 = (&(*p).a[min(uint(foo(tint_module_vars)), 3u)]); + int const v_2 = bar(tint_module_vars); + int const v_3 = as_type((as_type((*v_1)[min(uint(v_2), 3u)]) + as_type(5))); + (*v_1)[min(uint(v_2), 3u)] = v_3; } diff --git a/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl b/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl index 8042e3b4f6c..ca2ce340948 100644 --- a/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/array_element.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); - device uint* const v_1 = (&(*tint_module_vars.a)[min(uint(1), v)]); - (*v_1) = ((*v_1) - 1u); +void v(tint_module_vars_struct tint_module_vars) { + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); + device uint* const v_2 = (&(*tint_module_vars.a)[min(uint(1), v_1)]); + (*v_2) = ((*v_2) - 1u); } diff --git a/test/tint/statements/decrement/complex.wgsl.expected.ir.msl b/test/tint/statements/decrement/complex.wgsl.expected.ir.msl index f2fcd00ea7b..886ecaa7a81 100644 --- a/test/tint/statements/decrement/complex.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/complex.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct S { }; struct tint_module_vars_struct { - device tint_array* tint_symbol; + device tint_array* tint_member; thread uint* v; const constant tint_array* tint_storage_buffer_sizes; }; @@ -53,17 +53,17 @@ int idx6(tint_module_vars_struct tint_module_vars) { return 2; } -void tint_symbol_1(tint_module_vars_struct tint_module_vars) { +void v_1(tint_module_vars_struct tint_module_vars) { { uint2 tint_loop_idx = 0u; - int const v_1 = idx1(tint_module_vars); - int const v_2 = idx2(tint_module_vars); - uint const v_3 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); - uint const v_4 = min(uint(v_1), v_3); - device int4* const v_5 = (&(*tint_module_vars.tint_symbol)[v_4].a[min(uint(v_2), 3u)]); - int const v_6 = idx3(tint_module_vars); - int const v_7 = as_type((as_type((*v_5)[min(uint(v_6), 3u)]) - as_type(1))); - (*v_5)[min(uint(v_6), 3u)] = v_7; + int const v_2 = idx1(tint_module_vars); + int const v_3 = idx2(tint_module_vars); + uint const v_4 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); + uint const v_5 = min(uint(v_2), v_4); + device int4* const v_6 = (&(*tint_module_vars.tint_member)[v_5].a[min(uint(v_3), 3u)]); + int const v_7 = idx3(tint_module_vars); + int const v_8 = as_type((as_type((*v_6)[min(uint(v_7), 3u)]) - as_type(1))); + (*v_6)[min(uint(v_7), 3u)] = v_8; while(true) { if (all((tint_loop_idx == uint2(4294967295u)))) { break; @@ -77,14 +77,14 @@ void tint_symbol_1(tint_module_vars_struct tint_module_vars) { tint_loop_idx.x = tint_low_inc; uint const tint_carry = uint((tint_low_inc == 0u)); tint_loop_idx.y = (tint_loop_idx.y + tint_carry); - int const v_8 = idx4(tint_module_vars); - int const v_9 = idx5(tint_module_vars); - uint const v_10 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); - uint const v_11 = min(uint(v_8), v_10); - device int4* const v_12 = (&(*tint_module_vars.tint_symbol)[v_11].a[min(uint(v_9), 3u)]); - int const v_13 = idx6(tint_module_vars); - int const v_14 = as_type((as_type((*v_12)[min(uint(v_13), 3u)]) - as_type(1))); - (*v_12)[min(uint(v_13), 3u)] = v_14; + int const v_9 = idx4(tint_module_vars); + int const v_10 = idx5(tint_module_vars); + uint const v_11 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); + uint const v_12 = min(uint(v_9), v_11); + device int4* const v_13 = (&(*tint_module_vars.tint_member)[v_12].a[min(uint(v_10), 3u)]); + int const v_14 = idx6(tint_module_vars); + int const v_15 = as_type((as_type((*v_13)[min(uint(v_14), 3u)]) - as_type(1))); + (*v_13)[min(uint(v_14), 3u)] = v_15; } continue; } diff --git a/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.msl b/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.msl index f2d8efa6f3d..b2aaffb40b0 100644 --- a/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/for_loop_continuing.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device uint* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { { uint2 tint_loop_idx = 0u; while(true) { diff --git a/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.msl b/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.msl index ce23f4dc51a..2e0e0469c2b 100644 --- a/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/for_loop_initializer.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device uint* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { { uint2 tint_loop_idx = 0u; (*tint_module_vars.i) = ((*tint_module_vars.i) - 1u); diff --git a/test/tint/statements/decrement/function.wgsl.expected.ir.msl b/test/tint/statements/decrement/function.wgsl.expected.ir.msl index de99bff9e2c..be20f7a0257 100644 --- a/test/tint/statements/decrement/function.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/function.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -void tint_symbol() { +void v() { int i = 0; i = as_type((as_type(i) - as_type(1))); } diff --git a/test/tint/statements/decrement/private.wgsl.expected.ir.msl b/test/tint/statements/decrement/private.wgsl.expected.ir.msl index 02bbb7cdbf9..278198a07b6 100644 --- a/test/tint/statements/decrement/private.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/private.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ struct tint_module_vars_struct { thread int* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.i) = as_type((as_type((*tint_module_vars.i)) - as_type(1))); } diff --git a/test/tint/statements/decrement/split.wgsl.expected.ir.msl b/test/tint/statements/decrement/split.wgsl.expected.ir.msl index f3f9e83ca82..365a0f9d7c2 100644 --- a/test/tint/statements/decrement/split.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/split.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -void tint_symbol() { +void v() { int b = 2; int c = as_type((as_type(b) - as_type(as_type((~(as_type(b)) + 1u))))); } diff --git a/test/tint/statements/decrement/storage.wgsl.expected.ir.msl b/test/tint/statements/decrement/storage.wgsl.expected.ir.msl index 6b16dbe9ca0..400fbdf689f 100644 --- a/test/tint/statements/decrement/storage.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/storage.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ struct tint_module_vars_struct { device uint* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.i) = ((*tint_module_vars.i) - 1u); } diff --git a/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl b/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl index 587baf393c7..348aa96743f 100644 --- a/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/vector_component.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device uint4* a; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.a).y = ((*tint_module_vars.a).y - 1u); (*tint_module_vars.a).z = ((*tint_module_vars.a).z - 1u); } diff --git a/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl b/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl index acd8cb44b2c..042717febf8 100644 --- a/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl +++ b/test/tint/statements/decrement/workgroup.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ struct tint_module_vars_struct { threadgroup int* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.i) = as_type((as_type((*tint_module_vars.i)) - as_type(1))); } diff --git a/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl b/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl index 6f0f4d0075e..b18e6e0db15 100644 --- a/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl +++ b/test/tint/statements/discard/helper_functions.wgsl.expected.ir.msl @@ -20,7 +20,7 @@ void bar(tint_module_vars_struct tint_module_vars) { } } -fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) { +fragment void v_1(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) { thread bool continue_execution = true; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)}; foo(tint_module_vars); diff --git a/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl b/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl index 01e3d1f90f9..d10c82a9117 100644 --- a/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl +++ b/test/tint/statements/discard/multiple_returns.wgsl.expected.ir.msl @@ -7,15 +7,15 @@ struct tint_module_vars_struct { thread bool* continue_execution; }; -fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) { +fragment void v(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) { thread bool continue_execution = true; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)}; if (((*tint_module_vars.non_uniform_global) < 0)) { (*tint_module_vars.continue_execution) = false; } - float const v = dfdx(1.0f); + float const v_1 = dfdx(1.0f); if ((*tint_module_vars.continue_execution)) { - (*tint_module_vars.output) = v; + (*tint_module_vars.output) = v_1; } if (((*tint_module_vars.output) < 0.0f)) { int i = 0; @@ -25,11 +25,11 @@ fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device f if (all((tint_loop_idx == uint2(4294967295u)))) { break; } - float const v_1 = (*tint_module_vars.output); - if ((v_1 > float(i))) { - float const v_2 = float(i); + float const v_2 = (*tint_module_vars.output); + if ((v_2 > float(i))) { + float const v_3 = float(i); if ((*tint_module_vars.continue_execution)) { - (*tint_module_vars.output) = v_2; + (*tint_module_vars.output) = v_3; } if (!((*tint_module_vars.continue_execution))) { discard_fragment(); diff --git a/test/tint/statements/discard/nested_return.wgsl.expected.ir.msl b/test/tint/statements/discard/nested_return.wgsl.expected.ir.msl index db76627ed3a..0524cc58f4b 100644 --- a/test/tint/statements/discard/nested_return.wgsl.expected.ir.msl +++ b/test/tint/statements/discard/nested_return.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { thread bool* continue_execution; }; -fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]]) { +fragment void v(device int* non_uniform_global [[buffer(0)]]) { thread bool continue_execution = true; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.non_uniform_global=non_uniform_global, .continue_execution=(&continue_execution)}; if (((*tint_module_vars.non_uniform_global) < 0)) { diff --git a/test/tint/statements/discard/non_uniform.wgsl.expected.ir.msl b/test/tint/statements/discard/non_uniform.wgsl.expected.ir.msl index 440a85142e6..b2de8d803f3 100644 --- a/test/tint/statements/discard/non_uniform.wgsl.expected.ir.msl +++ b/test/tint/statements/discard/non_uniform.wgsl.expected.ir.msl @@ -7,15 +7,15 @@ struct tint_module_vars_struct { thread bool* continue_execution; }; -fragment void tint_symbol(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) { +fragment void v(device int* non_uniform_global [[buffer(0)]], device float* output [[buffer(1)]]) { thread bool continue_execution = true; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.non_uniform_global=non_uniform_global, .output=output, .continue_execution=(&continue_execution)}; if (((*tint_module_vars.non_uniform_global) < 0)) { (*tint_module_vars.continue_execution) = false; } - float const v = dfdx(1.0f); + float const v_1 = dfdx(1.0f); if ((*tint_module_vars.continue_execution)) { - (*tint_module_vars.output) = v; + (*tint_module_vars.output) = v_1; } if (!((*tint_module_vars.continue_execution))) { discard_fragment(); diff --git a/test/tint/statements/increment/array_element.wgsl.expected.ir.msl b/test/tint/statements/increment/array_element.wgsl.expected.ir.msl index 98aa379c63d..b9bb7221878 100644 --- a/test/tint/statements/increment/array_element.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/array_element.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); - device uint* const v_1 = (&(*tint_module_vars.a)[min(uint(1), v)]); - (*v_1) = ((*v_1) + 1u); +void v(tint_module_vars_struct tint_module_vars) { + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); + device uint* const v_2 = (&(*tint_module_vars.a)[min(uint(1), v_1)]); + (*v_2) = ((*v_2) + 1u); } diff --git a/test/tint/statements/increment/complex.wgsl.expected.ir.msl b/test/tint/statements/increment/complex.wgsl.expected.ir.msl index 9888f9eea7c..33639daec79 100644 --- a/test/tint/statements/increment/complex.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/complex.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct S { }; struct tint_module_vars_struct { - device tint_array* tint_symbol; + device tint_array* tint_member; thread uint* v; const constant tint_array* tint_storage_buffer_sizes; }; @@ -53,17 +53,17 @@ int idx6(tint_module_vars_struct tint_module_vars) { return 2; } -void tint_symbol_1(tint_module_vars_struct tint_module_vars) { +void v_1(tint_module_vars_struct tint_module_vars) { { uint2 tint_loop_idx = 0u; - int const v_1 = idx1(tint_module_vars); - int const v_2 = idx2(tint_module_vars); - uint const v_3 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); - uint const v_4 = min(uint(v_1), v_3); - device int4* const v_5 = (&(*tint_module_vars.tint_symbol)[v_4].a[min(uint(v_2), 3u)]); - int const v_6 = idx3(tint_module_vars); - int const v_7 = as_type((as_type((*v_5)[min(uint(v_6), 3u)]) + as_type(1))); - (*v_5)[min(uint(v_6), 3u)] = v_7; + int const v_2 = idx1(tint_module_vars); + int const v_3 = idx2(tint_module_vars); + uint const v_4 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); + uint const v_5 = min(uint(v_2), v_4); + device int4* const v_6 = (&(*tint_module_vars.tint_member)[v_5].a[min(uint(v_3), 3u)]); + int const v_7 = idx3(tint_module_vars); + int const v_8 = as_type((as_type((*v_6)[min(uint(v_7), 3u)]) + as_type(1))); + (*v_6)[min(uint(v_7), 3u)] = v_8; while(true) { if (all((tint_loop_idx == uint2(4294967295u)))) { break; @@ -77,14 +77,14 @@ void tint_symbol_1(tint_module_vars_struct tint_module_vars) { tint_loop_idx.x = tint_low_inc; uint const tint_carry = uint((tint_low_inc == 0u)); tint_loop_idx.y = (tint_loop_idx.y + tint_carry); - int const v_8 = idx4(tint_module_vars); - int const v_9 = idx5(tint_module_vars); - uint const v_10 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); - uint const v_11 = min(uint(v_8), v_10); - device int4* const v_12 = (&(*tint_module_vars.tint_symbol)[v_11].a[min(uint(v_9), 3u)]); - int const v_13 = idx6(tint_module_vars); - int const v_14 = as_type((as_type((*v_12)[min(uint(v_13), 3u)]) + as_type(1))); - (*v_12)[min(uint(v_13), 3u)] = v_14; + int const v_9 = idx4(tint_module_vars); + int const v_10 = idx5(tint_module_vars); + uint const v_11 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 64u) - 1u); + uint const v_12 = min(uint(v_9), v_11); + device int4* const v_13 = (&(*tint_module_vars.tint_member)[v_12].a[min(uint(v_10), 3u)]); + int const v_14 = idx6(tint_module_vars); + int const v_15 = as_type((as_type((*v_13)[min(uint(v_14), 3u)]) + as_type(1))); + (*v_13)[min(uint(v_14), 3u)] = v_15; } continue; } diff --git a/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.msl b/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.msl index a5d709e9196..a2f6c619155 100644 --- a/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/for_loop_continuing.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device uint* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { { uint2 tint_loop_idx = 0u; while(true) { diff --git a/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.msl b/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.msl index 2c57299aba3..732a4a46cce 100644 --- a/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/for_loop_initializer.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device uint* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { { uint2 tint_loop_idx = 0u; (*tint_module_vars.i) = ((*tint_module_vars.i) + 1u); diff --git a/test/tint/statements/increment/function.wgsl.expected.ir.msl b/test/tint/statements/increment/function.wgsl.expected.ir.msl index 3ba0be2c565..83fc19204cd 100644 --- a/test/tint/statements/increment/function.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/function.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -void tint_symbol() { +void v() { int i = 0; i = as_type((as_type(i) + as_type(1))); } diff --git a/test/tint/statements/increment/private.wgsl.expected.ir.msl b/test/tint/statements/increment/private.wgsl.expected.ir.msl index 1d4431c2b2c..d915b2d4311 100644 --- a/test/tint/statements/increment/private.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/private.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ struct tint_module_vars_struct { thread int* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.i) = as_type((as_type((*tint_module_vars.i)) + as_type(1))); } diff --git a/test/tint/statements/increment/storage.wgsl.expected.ir.msl b/test/tint/statements/increment/storage.wgsl.expected.ir.msl index 7e1b3e09ddb..a951f754184 100644 --- a/test/tint/statements/increment/storage.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/storage.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ struct tint_module_vars_struct { device uint* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.i) = ((*tint_module_vars.i) + 1u); } diff --git a/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl b/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl index 5f2c4aaf09d..9516a3221ae 100644 --- a/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/vector_component.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { device uint4* a; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.a).y = ((*tint_module_vars.a).y + 1u); (*tint_module_vars.a).z = ((*tint_module_vars.a).z + 1u); } diff --git a/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl b/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl index decca87869e..83ac68d14fa 100644 --- a/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl +++ b/test/tint/statements/increment/workgroup.wgsl.expected.ir.msl @@ -5,6 +5,6 @@ struct tint_module_vars_struct { threadgroup int* i; }; -void tint_symbol(tint_module_vars_struct tint_module_vars) { +void v(tint_module_vars_struct tint_module_vars) { (*tint_module_vars.i) = as_type((as_type((*tint_module_vars.i)) + as_type(1))); } diff --git a/test/tint/struct/type_initializer.wgsl.expected.ir.msl b/test/tint/struct/type_initializer.wgsl.expected.ir.msl index 8b5ae82edd1..ab9f3eb3c46 100644 --- a/test/tint/struct/type_initializer.wgsl.expected.ir.msl +++ b/test/tint/struct/type_initializer.wgsl.expected.ir.msl @@ -35,15 +35,15 @@ struct T { tint_array a; }; -kernel void tint_symbol() { +kernel void v() { int const x = 42; S1 const empty = S1{}; S1 const nonempty = S1{.a=1, .b=2, .c=3, .d=4}; S1 const nonempty_with_expr = S1{.a=1, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nonempty.d}; S3 const nested_empty = S3{}; S3 const nested_nonempty = S3{.g=1, .h=S1{.a=2, .b=3, .c=4, .d=5}, .i=S2{.e=6, .f=S1{.a=7, .b=8, .c=9, .d=10}}}; - S1 const v = S1{.a=2, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nested_nonempty.i.f.d}; - S3 const nested_nonempty_with_expr = S3{.g=1, .h=v, .i=S2{.e=6, .f=nonempty}}; + S1 const v_1 = S1{.a=2, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nested_nonempty.i.f.d}; + S3 const nested_nonempty_with_expr = S3{.g=1, .h=v_1, .i=S2{.e=6, .f=nonempty}}; int const subexpr_empty = 0; int const subexpr_nonempty = 2; int const subexpr_nonempty_with_expr = S1{.a=1, .b=x, .c=as_type((as_type(x) + as_type(1))), .d=nonempty.d}.c; diff --git a/test/tint/types/buffers/storage.wgsl.expected.ir.msl b/test/tint/types/buffers/storage.wgsl.expected.ir.msl index 4a1d4ea1940..394b45e322c 100644 --- a/test/tint/types/buffers/storage.wgsl.expected.ir.msl +++ b/test/tint/types/buffers/storage.wgsl.expected.ir.msl @@ -18,8 +18,8 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -fragment void tint_symbol(const device tint_array* weights [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +fragment void v(const device tint_array* weights [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.weights=weights, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - uint const v = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); - float a = (*tint_module_vars.weights)[min(uint(0), v)]; + uint const v_1 = (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u); + float a = (*tint_module_vars.weights)[min(uint(0), v_1)]; } diff --git a/test/tint/types/buffers/uniform.wgsl.expected.ir.msl b/test/tint/types/buffers/uniform.wgsl.expected.ir.msl index bfcb8edb7f8..7c4a3bfce73 100644 --- a/test/tint/types/buffers/uniform.wgsl.expected.ir.msl +++ b/test/tint/types/buffers/uniform.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { const constant float2* weights; }; -fragment void tint_symbol(const constant float2* weights [[buffer(0)]]) { +fragment void v(const constant float2* weights [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.weights=weights}; float a = (*tint_module_vars.weights).x; } diff --git a/test/tint/types/function_scope_declarations.wgsl.expected.ir.msl b/test/tint/types/function_scope_declarations.wgsl.expected.ir.msl index 83ed46a0651..d2b16d82141 100644 --- a/test/tint/types/function_scope_declarations.wgsl.expected.ir.msl +++ b/test/tint/types/function_scope_declarations.wgsl.expected.ir.msl @@ -17,7 +17,7 @@ struct S { float a; }; -kernel void tint_symbol() { +kernel void v() { bool bool_var = false; bool const bool_let = false; int i32_var = 0; diff --git a/test/tint/types/function_scope_var_conversions.wgsl.expected.ir.msl b/test/tint/types/function_scope_var_conversions.wgsl.expected.ir.msl index cbbfdb03c39..d7680d425aa 100644 --- a/test/tint/types/function_scope_var_conversions.wgsl.expected.ir.msl +++ b/test/tint/types/function_scope_var_conversions.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ void constant_with_non_constant() { float2 b = float2(1.0f, a); } -kernel void tint_symbol() { +kernel void v() { bool bool_var1 = true; bool bool_var2 = true; bool bool_var3 = true; diff --git a/test/tint/types/functions/parameters.wgsl.expected.ir.msl b/test/tint/types/functions/parameters.wgsl.expected.ir.msl index b3d269e14b9..f43f2aff9fa 100644 --- a/test/tint/types/functions/parameters.wgsl.expected.ir.msl +++ b/test/tint/types/functions/parameters.wgsl.expected.ir.msl @@ -20,7 +20,7 @@ struct S { void foo(bool param_bool, int param_i32, uint param_u32, float param_f32, int2 param_v2i32, uint3 param_v3u32, float4 param_v4f32, float2x3 param_m2x3, tint_array param_arr, S param_struct, thread float* const param_ptr_f32, thread float4* const param_ptr_vec, thread tint_array* const param_ptr_arr) { } -kernel void tint_symbol() { +kernel void v() { tint_array const a = tint_array{}; float b = 1.0f; float4 c = float4(0.0f); diff --git a/test/tint/types/functions/return_types.wgsl.expected.ir.msl b/test/tint/types/functions/return_types.wgsl.expected.ir.msl index 3824328ff64..2b8b04fc669 100644 --- a/test/tint/types/functions/return_types.wgsl.expected.ir.msl +++ b/test/tint/types/functions/return_types.wgsl.expected.ir.msl @@ -57,7 +57,7 @@ S ret_struct() { return S{}; } -kernel void tint_symbol() { +kernel void v() { bool const a = ret_bool(); int const b = ret_i32(); uint const c = ret_u32(); diff --git a/test/tint/types/functions/shader_io/compute_input_builtins.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/compute_input_builtins.wgsl.expected.ir.msl index e9d963585ac..5fde405a49b 100644 --- a/test/tint/types/functions/shader_io/compute_input_builtins.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/compute_input_builtins.wgsl.expected.ir.msl @@ -1,10 +1,10 @@ #include using namespace metal; -void tint_symbol_inner(uint3 local_invocation_id, uint local_invocation_index, uint3 global_invocation_id, uint3 workgroup_id, uint3 num_workgroups) { +void main_inner(uint3 local_invocation_id, uint local_invocation_index, uint3 global_invocation_id, uint3 workgroup_id, uint3 num_workgroups) { uint const foo = ((((local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + workgroup_id.x) + num_workgroups.x); } -kernel void tint_symbol(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]], uint3 num_workgroups [[threadgroups_per_grid]]) { - tint_symbol_inner(local_invocation_id, local_invocation_index, global_invocation_id, workgroup_id, num_workgroups); +kernel void v(uint3 local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 workgroup_id [[threadgroup_position_in_grid]], uint3 num_workgroups [[threadgroups_per_grid]]) { + main_inner(local_invocation_id, local_invocation_index, global_invocation_id, workgroup_id, num_workgroups); } diff --git a/test/tint/types/functions/shader_io/compute_input_builtins_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/compute_input_builtins_struct.wgsl.expected.ir.msl index d6278d80b2c..1c20ef96c2b 100644 --- a/test/tint/types/functions/shader_io/compute_input_builtins_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/compute_input_builtins_struct.wgsl.expected.ir.msl @@ -9,10 +9,10 @@ struct ComputeInputs { uint3 num_workgroups; }; -void tint_symbol_inner(ComputeInputs inputs) { +void main_inner(ComputeInputs inputs) { uint const foo = ((((inputs.local_invocation_id.x + inputs.local_invocation_index) + inputs.global_invocation_id.x) + inputs.workgroup_id.x) + inputs.num_workgroups.x); } -kernel void tint_symbol(uint3 ComputeInputs_local_invocation_id [[thread_position_in_threadgroup]], uint ComputeInputs_local_invocation_index [[thread_index_in_threadgroup]], uint3 ComputeInputs_global_invocation_id [[thread_position_in_grid]], uint3 ComputeInputs_workgroup_id [[threadgroup_position_in_grid]], uint3 ComputeInputs_num_workgroups [[threadgroups_per_grid]]) { - tint_symbol_inner(ComputeInputs{.local_invocation_id=ComputeInputs_local_invocation_id, .local_invocation_index=ComputeInputs_local_invocation_index, .global_invocation_id=ComputeInputs_global_invocation_id, .workgroup_id=ComputeInputs_workgroup_id, .num_workgroups=ComputeInputs_num_workgroups}); +kernel void v(uint3 ComputeInputs_local_invocation_id [[thread_position_in_threadgroup]], uint ComputeInputs_local_invocation_index [[thread_index_in_threadgroup]], uint3 ComputeInputs_global_invocation_id [[thread_position_in_grid]], uint3 ComputeInputs_workgroup_id [[threadgroup_position_in_grid]], uint3 ComputeInputs_num_workgroups [[threadgroups_per_grid]]) { + main_inner(ComputeInputs{.local_invocation_id=ComputeInputs_local_invocation_id, .local_invocation_index=ComputeInputs_local_invocation_index, .global_invocation_id=ComputeInputs_global_invocation_id, .workgroup_id=ComputeInputs_workgroup_id, .num_workgroups=ComputeInputs_num_workgroups}); } diff --git a/test/tint/types/functions/shader_io/compute_input_mixed.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/compute_input_mixed.wgsl.expected.ir.msl index 0c5adafc963..01aac61e5a4 100644 --- a/test/tint/types/functions/shader_io/compute_input_mixed.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/compute_input_mixed.wgsl.expected.ir.msl @@ -9,11 +9,11 @@ struct ComputeInputs1 { uint3 workgroup_id; }; -void tint_symbol_inner(ComputeInputs0 inputs0, uint local_invocation_index, uint3 global_invocation_id, ComputeInputs1 inputs1) { +void main_inner(ComputeInputs0 inputs0, uint local_invocation_index, uint3 global_invocation_id, ComputeInputs1 inputs1) { uint const foo = (((inputs0.local_invocation_id.x + local_invocation_index) + global_invocation_id.x) + inputs1.workgroup_id.x); } -kernel void tint_symbol(uint3 ComputeInputs0_local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 ComputeInputs1_workgroup_id [[threadgroup_position_in_grid]]) { - ComputeInputs0 const v = ComputeInputs0{.local_invocation_id=ComputeInputs0_local_invocation_id}; - tint_symbol_inner(v, local_invocation_index, global_invocation_id, ComputeInputs1{.workgroup_id=ComputeInputs1_workgroup_id}); +kernel void v(uint3 ComputeInputs0_local_invocation_id [[thread_position_in_threadgroup]], uint local_invocation_index [[thread_index_in_threadgroup]], uint3 global_invocation_id [[thread_position_in_grid]], uint3 ComputeInputs1_workgroup_id [[threadgroup_position_in_grid]]) { + ComputeInputs0 const v_1 = ComputeInputs0{.local_invocation_id=ComputeInputs0_local_invocation_id}; + main_inner(v_1, local_invocation_index, global_invocation_id, ComputeInputs1{.workgroup_id=ComputeInputs1_workgroup_id}); } diff --git a/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.msl index f313ca450ea..f7e121f9a2e 100644 --- a/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/compute_subgroup_builtins.wgsl.expected.ir.msl @@ -18,11 +18,11 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(uint subgroup_invocation_id, uint subgroup_size, tint_module_vars_struct tint_module_vars) { +void main_inner(uint subgroup_invocation_id, uint subgroup_size, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.output)[min(subgroup_invocation_id, (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u))] = subgroup_size; } -kernel void tint_symbol(uint subgroup_invocation_id [[thread_index_in_simdgroup]], uint subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(uint subgroup_invocation_id [[thread_index_in_simdgroup]], uint subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.output=output, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(subgroup_invocation_id, subgroup_size, tint_module_vars); + main_inner(subgroup_invocation_id, subgroup_size, tint_module_vars); } diff --git a/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.msl index fb90a3f5b3c..a96ab6ecb1d 100644 --- a/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/compute_subgroup_builtins_struct.wgsl.expected.ir.msl @@ -23,11 +23,11 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(ComputeInputs inputs, tint_module_vars_struct tint_module_vars) { +void main_inner(ComputeInputs inputs, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.output)[min(inputs.subgroup_invocation_id, (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u))] = inputs.subgroup_size; } -kernel void tint_symbol(uint ComputeInputs_subgroup_invocation_id [[thread_index_in_simdgroup]], uint ComputeInputs_subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v(uint ComputeInputs_subgroup_invocation_id [[thread_index_in_simdgroup]], uint ComputeInputs_subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.output=output, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(ComputeInputs{.subgroup_invocation_id=ComputeInputs_subgroup_invocation_id, .subgroup_size=ComputeInputs_subgroup_size}, tint_module_vars); + main_inner(ComputeInputs{.subgroup_invocation_id=ComputeInputs_subgroup_invocation_id, .subgroup_size=ComputeInputs_subgroup_size}, tint_module_vars); } diff --git a/test/tint/types/functions/shader_io/compute_workgroup_expression.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/compute_workgroup_expression.wgsl.expected.ir.msl index 0097f9ad9de..98098b01c15 100644 --- a/test/tint/types/functions/shader_io/compute_workgroup_expression.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/compute_workgroup_expression.wgsl.expected.ir.msl @@ -1,5 +1,5 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { } diff --git a/test/tint/types/functions/shader_io/fragment_input_builtins.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_builtins.wgsl.expected.ir.msl index 224822636dd..9d026ba8d1b 100644 --- a/test/tint/types/functions/shader_io/fragment_input_builtins.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_builtins.wgsl.expected.ir.msl @@ -1,13 +1,13 @@ #include using namespace metal; -void tint_symbol_inner(float4 position, bool front_facing, uint sample_index, uint sample_mask) { +void main_inner(float4 position, bool front_facing, uint sample_index, uint sample_mask) { if (front_facing) { float4 const foo = position; uint const bar = (sample_index + sample_mask); } } -fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) { - tint_symbol_inner(position, front_facing, sample_index, sample_mask); +fragment void v(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) { + main_inner(position, front_facing, sample_index, sample_mask); } diff --git a/test/tint/types/functions/shader_io/fragment_input_builtins_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_builtins_struct.wgsl.expected.ir.msl index 8a070a1b050..b5f04c719d1 100644 --- a/test/tint/types/functions/shader_io/fragment_input_builtins_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_builtins_struct.wgsl.expected.ir.msl @@ -8,13 +8,13 @@ struct FragmentInputs { uint sample_mask; }; -void tint_symbol_inner(FragmentInputs inputs) { +void main_inner(FragmentInputs inputs) { if (inputs.front_facing) { float4 const foo = inputs.position; uint const bar = (inputs.sample_index + inputs.sample_mask); } } -fragment void tint_symbol(float4 FragmentInputs_position [[position]], bool FragmentInputs_front_facing [[front_facing]], uint FragmentInputs_sample_index [[sample_id]], uint FragmentInputs_sample_mask [[sample_mask]]) { - tint_symbol_inner(FragmentInputs{.position=FragmentInputs_position, .front_facing=FragmentInputs_front_facing, .sample_index=FragmentInputs_sample_index, .sample_mask=FragmentInputs_sample_mask}); +fragment void v(float4 FragmentInputs_position [[position]], bool FragmentInputs_front_facing [[front_facing]], uint FragmentInputs_sample_index [[sample_id]], uint FragmentInputs_sample_mask [[sample_mask]]) { + main_inner(FragmentInputs{.position=FragmentInputs_position, .front_facing=FragmentInputs_front_facing, .sample_index=FragmentInputs_sample_index, .sample_mask=FragmentInputs_sample_mask}); } diff --git a/test/tint/types/functions/shader_io/fragment_input_locations.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_locations.wgsl.expected.ir.msl index 1486bd615ee..c2cd9361e52 100644 --- a/test/tint/types/functions/shader_io/fragment_input_locations.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_locations.wgsl.expected.ir.msl @@ -1,20 +1,20 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { int loc0 [[user(locn0)]] [[flat]]; uint loc1 [[user(locn1)]] [[flat]]; float loc2 [[user(locn2)]]; float4 loc3 [[user(locn3)]]; }; -void tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3) { +void main_inner(int loc0, uint loc1, float loc2, float4 loc3) { int const i = loc0; uint const u = loc1; float const f = loc2; float4 const v = loc3; } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3); +fragment void v_1(main_inputs inputs [[stage_in]]) { + main_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3); } diff --git a/test/tint/types/functions/shader_io/fragment_input_locations_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_locations_f16.wgsl.expected.ir.msl index 0e1a9a829d2..2a01825e586 100644 --- a/test/tint/types/functions/shader_io/fragment_input_locations_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_locations_f16.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { int loc0 [[user(locn0)]] [[flat]]; uint loc1 [[user(locn1)]] [[flat]]; float loc2 [[user(locn2)]]; @@ -10,7 +10,7 @@ struct tint_symbol_inputs { half3 loc5 [[user(locn5)]]; }; -void tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3, half loc4, half3 loc5) { +void main_inner(int loc0, uint loc1, float loc2, float4 loc3, half loc4, half3 loc5) { int const i = loc0; uint const u = loc1; float const f = loc2; @@ -19,6 +19,6 @@ void tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3, half loc4, half3 const y = loc5; } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3, inputs.loc4, inputs.loc5); +fragment void v_1(main_inputs inputs [[stage_in]]) { + main_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3, inputs.loc4, inputs.loc5); } diff --git a/test/tint/types/functions/shader_io/fragment_input_locations_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_locations_struct.wgsl.expected.ir.msl index 2d1dd252d4c..b7d1eb8c479 100644 --- a/test/tint/types/functions/shader_io/fragment_input_locations_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_locations_struct.wgsl.expected.ir.msl @@ -8,20 +8,20 @@ struct FragmentInputs { float4 loc3; }; -struct tint_symbol_inputs { +struct main_inputs { int FragmentInputs_loc0 [[user(locn0)]] [[flat]]; uint FragmentInputs_loc1 [[user(locn1)]] [[flat]]; float FragmentInputs_loc2 [[user(locn2)]]; float4 FragmentInputs_loc3 [[user(locn3)]]; }; -void tint_symbol_inner(FragmentInputs inputs) { +void main_inner(FragmentInputs inputs) { int const i = inputs.loc0; uint const u = inputs.loc1; float const f = inputs.loc2; float4 const v = inputs.loc3; } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(FragmentInputs{.loc0=inputs.FragmentInputs_loc0, .loc1=inputs.FragmentInputs_loc1, .loc2=inputs.FragmentInputs_loc2, .loc3=inputs.FragmentInputs_loc3}); +fragment void v_1(main_inputs inputs [[stage_in]]) { + main_inner(FragmentInputs{.loc0=inputs.FragmentInputs_loc0, .loc1=inputs.FragmentInputs_loc1, .loc2=inputs.FragmentInputs_loc2, .loc3=inputs.FragmentInputs_loc3}); } diff --git a/test/tint/types/functions/shader_io/fragment_input_locations_struct_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_locations_struct_f16.wgsl.expected.ir.msl index ad3780d7287..af2c837c3c2 100644 --- a/test/tint/types/functions/shader_io/fragment_input_locations_struct_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_locations_struct_f16.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct FragmentInputs { half3 loc5; }; -struct tint_symbol_inputs { +struct main_inputs { int FragmentInputs_loc0 [[user(locn0)]] [[flat]]; uint FragmentInputs_loc1 [[user(locn1)]] [[flat]]; float FragmentInputs_loc2 [[user(locn2)]]; @@ -19,7 +19,7 @@ struct tint_symbol_inputs { half3 FragmentInputs_loc5 [[user(locn5)]]; }; -void tint_symbol_inner(FragmentInputs inputs) { +void main_inner(FragmentInputs inputs) { int const i = inputs.loc0; uint const u = inputs.loc1; float const f = inputs.loc2; @@ -28,6 +28,6 @@ void tint_symbol_inner(FragmentInputs inputs) { half3 const y = inputs.loc5; } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(FragmentInputs{.loc0=inputs.FragmentInputs_loc0, .loc1=inputs.FragmentInputs_loc1, .loc2=inputs.FragmentInputs_loc2, .loc3=inputs.FragmentInputs_loc3, .loc4=inputs.FragmentInputs_loc4, .loc5=inputs.FragmentInputs_loc5}); +fragment void v_1(main_inputs inputs [[stage_in]]) { + main_inner(FragmentInputs{.loc0=inputs.FragmentInputs_loc0, .loc1=inputs.FragmentInputs_loc1, .loc2=inputs.FragmentInputs_loc2, .loc3=inputs.FragmentInputs_loc3, .loc4=inputs.FragmentInputs_loc4, .loc5=inputs.FragmentInputs_loc5}); } diff --git a/test/tint/types/functions/shader_io/fragment_input_mixed.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_mixed.wgsl.expected.ir.msl index 6f842f5090e..7f93779ec6c 100644 --- a/test/tint/types/functions/shader_io/fragment_input_mixed.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_mixed.wgsl.expected.ir.msl @@ -11,14 +11,14 @@ struct FragmentInputs1 { uint sample_mask; }; -struct tint_symbol_inputs { +struct main_inputs { int FragmentInputs0_loc0 [[user(locn0)]] [[flat]]; uint loc1 [[user(locn1)]] [[flat]]; float4 FragmentInputs1_loc3 [[user(locn3)]]; float loc2 [[user(locn2)]]; }; -void tint_symbol_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2) { +void main_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2) { if (front_facing) { float4 const foo = inputs0.position; uint const bar = (sample_index + inputs1.sample_mask); @@ -29,7 +29,7 @@ void tint_symbol_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, ui } } -fragment void tint_symbol(float4 FragmentInputs0_position [[position]], tint_symbol_inputs inputs [[stage_in]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint FragmentInputs1_sample_mask [[sample_mask]]) { - FragmentInputs0 const v_1 = FragmentInputs0{.position=FragmentInputs0_position, .loc0=inputs.FragmentInputs0_loc0}; - tint_symbol_inner(v_1, front_facing, inputs.loc1, sample_index, FragmentInputs1{.loc3=inputs.FragmentInputs1_loc3, .sample_mask=FragmentInputs1_sample_mask}, inputs.loc2); +fragment void v_1(float4 FragmentInputs0_position [[position]], main_inputs inputs [[stage_in]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint FragmentInputs1_sample_mask [[sample_mask]]) { + FragmentInputs0 const v_2 = FragmentInputs0{.position=FragmentInputs0_position, .loc0=inputs.FragmentInputs0_loc0}; + main_inner(v_2, front_facing, inputs.loc1, sample_index, FragmentInputs1{.loc3=inputs.FragmentInputs1_loc3, .sample_mask=FragmentInputs1_sample_mask}, inputs.loc2); } diff --git a/test/tint/types/functions/shader_io/fragment_input_mixed_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_input_mixed_f16.wgsl.expected.ir.msl index 8ca24e39cf4..b9204a64542 100644 --- a/test/tint/types/functions/shader_io/fragment_input_mixed_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_input_mixed_f16.wgsl.expected.ir.msl @@ -12,7 +12,7 @@ struct FragmentInputs1 { uint sample_mask; }; -struct tint_symbol_inputs { +struct main_inputs { int FragmentInputs0_loc0 [[user(locn0)]] [[flat]]; uint loc1 [[user(locn1)]] [[flat]]; float4 FragmentInputs1_loc3 [[user(locn3)]]; @@ -21,7 +21,7 @@ struct tint_symbol_inputs { half loc4 [[user(locn4)]]; }; -void tint_symbol_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2, half loc4) { +void main_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, uint sample_index, FragmentInputs1 inputs1, float loc2, half loc4) { if (front_facing) { float4 const foo = inputs0.position; uint const bar = (sample_index + inputs1.sample_mask); @@ -34,7 +34,7 @@ void tint_symbol_inner(FragmentInputs0 inputs0, bool front_facing, uint loc1, ui } } -fragment void tint_symbol(float4 FragmentInputs0_position [[position]], tint_symbol_inputs inputs [[stage_in]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint FragmentInputs1_sample_mask [[sample_mask]]) { - FragmentInputs0 const v_1 = FragmentInputs0{.position=FragmentInputs0_position, .loc0=inputs.FragmentInputs0_loc0}; - tint_symbol_inner(v_1, front_facing, inputs.loc1, sample_index, FragmentInputs1{.loc3=inputs.FragmentInputs1_loc3, .loc5=inputs.FragmentInputs1_loc5, .sample_mask=FragmentInputs1_sample_mask}, inputs.loc2, inputs.loc4); +fragment void v_1(float4 FragmentInputs0_position [[position]], main_inputs inputs [[stage_in]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint FragmentInputs1_sample_mask [[sample_mask]]) { + FragmentInputs0 const v_2 = FragmentInputs0{.position=FragmentInputs0_position, .loc0=inputs.FragmentInputs0_loc0}; + main_inner(v_2, front_facing, inputs.loc1, sample_index, FragmentInputs1{.loc3=inputs.FragmentInputs1_loc3, .loc5=inputs.FragmentInputs1_loc5, .sample_mask=FragmentInputs1_sample_mask}, inputs.loc2, inputs.loc4); } diff --git a/test/tint/types/functions/shader_io/fragment_output_builtins_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_output_builtins_struct.wgsl.expected.ir.msl index 6bc998c22ec..47e298974be 100644 --- a/test/tint/types/functions/shader_io/fragment_output_builtins_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_output_builtins_struct.wgsl.expected.ir.msl @@ -6,19 +6,19 @@ struct FragmentOutputs { uint sample_mask; }; -struct tint_symbol_outputs { +struct main_outputs { float FragmentOutputs_frag_depth [[depth(any)]]; uint FragmentOutputs_sample_mask [[sample_mask]]; }; -FragmentOutputs tint_symbol_inner() { +FragmentOutputs main_inner() { return FragmentOutputs{.frag_depth=1.0f, .sample_mask=1u}; } -fragment tint_symbol_outputs tint_symbol() { - FragmentOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragmentOutputs_frag_depth = v.frag_depth; - tint_wrapper_result.FragmentOutputs_sample_mask = v.sample_mask; +fragment main_outputs v() { + FragmentOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragmentOutputs_frag_depth = v_1.frag_depth; + tint_wrapper_result.FragmentOutputs_sample_mask = v_1.sample_mask; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/fragment_output_locations_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_output_locations_struct.wgsl.expected.ir.msl index 7d8cb070de1..2621e2ec438 100644 --- a/test/tint/types/functions/shader_io/fragment_output_locations_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_output_locations_struct.wgsl.expected.ir.msl @@ -8,23 +8,23 @@ struct FragmentOutputs { float4 loc3; }; -struct tint_symbol_outputs { +struct main_outputs { int FragmentOutputs_loc0 [[color(0)]]; uint FragmentOutputs_loc1 [[color(1)]]; float FragmentOutputs_loc2 [[color(2)]]; float4 FragmentOutputs_loc3 [[color(3)]]; }; -FragmentOutputs tint_symbol_inner() { +FragmentOutputs main_inner() { return FragmentOutputs{.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -fragment tint_symbol_outputs tint_symbol() { - FragmentOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragmentOutputs_loc0 = v.loc0; - tint_wrapper_result.FragmentOutputs_loc1 = v.loc1; - tint_wrapper_result.FragmentOutputs_loc2 = v.loc2; - tint_wrapper_result.FragmentOutputs_loc3 = v.loc3; +fragment main_outputs v() { + FragmentOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragmentOutputs_loc0 = v_1.loc0; + tint_wrapper_result.FragmentOutputs_loc1 = v_1.loc1; + tint_wrapper_result.FragmentOutputs_loc2 = v_1.loc2; + tint_wrapper_result.FragmentOutputs_loc3 = v_1.loc3; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/fragment_output_locations_struct_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_output_locations_struct_f16.wgsl.expected.ir.msl index d063fdcd85e..9c9efd0ee22 100644 --- a/test/tint/types/functions/shader_io/fragment_output_locations_struct_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_output_locations_struct_f16.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct FragmentOutputs { half3 loc5; }; -struct tint_symbol_outputs { +struct main_outputs { int FragmentOutputs_loc0 [[color(0)]]; uint FragmentOutputs_loc1 [[color(1)]]; float FragmentOutputs_loc2 [[color(2)]]; @@ -19,18 +19,18 @@ struct tint_symbol_outputs { half3 FragmentOutputs_loc5 [[color(5)]]; }; -FragmentOutputs tint_symbol_inner() { +FragmentOutputs main_inner() { return FragmentOutputs{.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f), .loc4=2.25h, .loc5=half3(3.0h, 5.0h, 8.0h)}; } -fragment tint_symbol_outputs tint_symbol() { - FragmentOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragmentOutputs_loc0 = v.loc0; - tint_wrapper_result.FragmentOutputs_loc1 = v.loc1; - tint_wrapper_result.FragmentOutputs_loc2 = v.loc2; - tint_wrapper_result.FragmentOutputs_loc3 = v.loc3; - tint_wrapper_result.FragmentOutputs_loc4 = v.loc4; - tint_wrapper_result.FragmentOutputs_loc5 = v.loc5; +fragment main_outputs v() { + FragmentOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragmentOutputs_loc0 = v_1.loc0; + tint_wrapper_result.FragmentOutputs_loc1 = v_1.loc1; + tint_wrapper_result.FragmentOutputs_loc2 = v_1.loc2; + tint_wrapper_result.FragmentOutputs_loc3 = v_1.loc3; + tint_wrapper_result.FragmentOutputs_loc4 = v_1.loc4; + tint_wrapper_result.FragmentOutputs_loc5 = v_1.loc5; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/fragment_output_mixed.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_output_mixed.wgsl.expected.ir.msl index ca3df46e74f..8d704805beb 100644 --- a/test/tint/types/functions/shader_io/fragment_output_mixed.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_output_mixed.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct FragmentOutputs { float4 loc3; }; -struct tint_symbol_outputs { +struct main_outputs { int FragmentOutputs_loc0 [[color(0)]]; float FragmentOutputs_frag_depth [[depth(any)]]; uint FragmentOutputs_loc1 [[color(1)]]; @@ -19,18 +19,18 @@ struct tint_symbol_outputs { float4 FragmentOutputs_loc3 [[color(3)]]; }; -FragmentOutputs tint_symbol_inner() { +FragmentOutputs main_inner() { return FragmentOutputs{.loc0=1, .frag_depth=2.0f, .loc1=1u, .loc2=1.0f, .sample_mask=2u, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -fragment tint_symbol_outputs tint_symbol() { - FragmentOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragmentOutputs_loc0 = v.loc0; - tint_wrapper_result.FragmentOutputs_frag_depth = v.frag_depth; - tint_wrapper_result.FragmentOutputs_loc1 = v.loc1; - tint_wrapper_result.FragmentOutputs_loc2 = v.loc2; - tint_wrapper_result.FragmentOutputs_sample_mask = v.sample_mask; - tint_wrapper_result.FragmentOutputs_loc3 = v.loc3; +fragment main_outputs v() { + FragmentOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragmentOutputs_loc0 = v_1.loc0; + tint_wrapper_result.FragmentOutputs_frag_depth = v_1.frag_depth; + tint_wrapper_result.FragmentOutputs_loc1 = v_1.loc1; + tint_wrapper_result.FragmentOutputs_loc2 = v_1.loc2; + tint_wrapper_result.FragmentOutputs_sample_mask = v_1.sample_mask; + tint_wrapper_result.FragmentOutputs_loc3 = v_1.loc3; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/fragment_output_mixed_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_output_mixed_f16.wgsl.expected.ir.msl index 44b93ef0600..601355b9d29 100644 --- a/test/tint/types/functions/shader_io/fragment_output_mixed_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_output_mixed_f16.wgsl.expected.ir.msl @@ -12,7 +12,7 @@ struct FragmentOutputs { half3 loc5; }; -struct tint_symbol_outputs { +struct main_outputs { int FragmentOutputs_loc0 [[color(0)]]; float FragmentOutputs_frag_depth [[depth(any)]]; uint FragmentOutputs_loc1 [[color(1)]]; @@ -23,20 +23,20 @@ struct tint_symbol_outputs { half3 FragmentOutputs_loc5 [[color(5)]]; }; -FragmentOutputs tint_symbol_inner() { +FragmentOutputs main_inner() { return FragmentOutputs{.loc0=1, .frag_depth=2.0f, .loc1=1u, .loc2=1.0f, .sample_mask=2u, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f), .loc4=2.25h, .loc5=half3(3.0h, 5.0h, 8.0h)}; } -fragment tint_symbol_outputs tint_symbol() { - FragmentOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.FragmentOutputs_loc0 = v.loc0; - tint_wrapper_result.FragmentOutputs_frag_depth = v.frag_depth; - tint_wrapper_result.FragmentOutputs_loc1 = v.loc1; - tint_wrapper_result.FragmentOutputs_loc2 = v.loc2; - tint_wrapper_result.FragmentOutputs_sample_mask = v.sample_mask; - tint_wrapper_result.FragmentOutputs_loc3 = v.loc3; - tint_wrapper_result.FragmentOutputs_loc4 = v.loc4; - tint_wrapper_result.FragmentOutputs_loc5 = v.loc5; +fragment main_outputs v() { + FragmentOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.FragmentOutputs_loc0 = v_1.loc0; + tint_wrapper_result.FragmentOutputs_frag_depth = v_1.frag_depth; + tint_wrapper_result.FragmentOutputs_loc1 = v_1.loc1; + tint_wrapper_result.FragmentOutputs_loc2 = v_1.loc2; + tint_wrapper_result.FragmentOutputs_sample_mask = v_1.sample_mask; + tint_wrapper_result.FragmentOutputs_loc3 = v_1.loc3; + tint_wrapper_result.FragmentOutputs_loc4 = v_1.loc4; + tint_wrapper_result.FragmentOutputs_loc5 = v_1.loc5; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.msl index 773a08f27a1..8ab1550967c 100644 --- a/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_subgroup_builtins.wgsl.expected.ir.msl @@ -18,11 +18,11 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(uint subgroup_invocation_id, uint subgroup_size, tint_module_vars_struct tint_module_vars) { +void main_inner(uint subgroup_invocation_id, uint subgroup_size, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.output)[min(subgroup_invocation_id, (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u))] = subgroup_size; } -fragment void tint_symbol(uint subgroup_invocation_id [[thread_index_in_simdgroup]], uint subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +fragment void v(uint subgroup_invocation_id [[thread_index_in_simdgroup]], uint subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.output=output, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(subgroup_invocation_id, subgroup_size, tint_module_vars); + main_inner(subgroup_invocation_id, subgroup_size, tint_module_vars); } diff --git a/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.msl index d64b910e3be..375ae2a5a1f 100644 --- a/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/fragment_subgroup_builtins_struct.wgsl.expected.ir.msl @@ -23,11 +23,11 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -void tint_symbol_inner(FragmentInputs inputs, tint_module_vars_struct tint_module_vars) { +void main_inner(FragmentInputs inputs, tint_module_vars_struct tint_module_vars) { (*tint_module_vars.output)[min(inputs.subgroup_invocation_id, (((*tint_module_vars.tint_storage_buffer_sizes)[0u].x / 4u) - 1u))] = inputs.subgroup_size; } -fragment void tint_symbol(uint FragmentInputs_subgroup_invocation_id [[thread_index_in_simdgroup]], uint FragmentInputs_subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +fragment void v(uint FragmentInputs_subgroup_invocation_id [[thread_index_in_simdgroup]], uint FragmentInputs_subgroup_size [[threads_per_simdgroup]], device tint_array* output [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.output=output, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(FragmentInputs{.subgroup_invocation_id=FragmentInputs_subgroup_invocation_id, .subgroup_size=FragmentInputs_subgroup_size}, tint_module_vars); + main_inner(FragmentInputs{.subgroup_invocation_id=FragmentInputs_subgroup_invocation_id, .subgroup_size=FragmentInputs_subgroup_size}, tint_module_vars); } diff --git a/test/tint/types/functions/shader_io/interpolate_input_parameters.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/interpolate_input_parameters.wgsl.expected.ir.msl index 3223a9a9f41..950ddd2683b 100644 --- a/test/tint/types/functions/shader_io/interpolate_input_parameters.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/interpolate_input_parameters.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -struct tint_symbol_inputs { +struct main_inputs { float none [[user(locn0)]]; float flat [[user(locn1)]] [[flat]]; float perspective_center [[user(locn2)]] [[center_perspective]]; @@ -14,9 +14,9 @@ struct tint_symbol_inputs { float linear_default [[user(locn9)]] [[center_no_perspective]]; }; -void tint_symbol_inner(float none, float flat, float perspective_center, float perspective_centroid, float perspective_sample, float linear_center, float linear_centroid, float linear_sample, float perspective_default, float linear_default) { +void main_inner(float none, float flat, float perspective_center, float perspective_centroid, float perspective_sample, float linear_center, float linear_centroid, float linear_sample, float perspective_default, float linear_default) { } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(inputs.none, inputs.flat, inputs.perspective_center, inputs.perspective_centroid, inputs.perspective_sample, inputs.linear_center, inputs.linear_centroid, inputs.linear_sample, inputs.perspective_default, inputs.linear_default); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(inputs.none, inputs.flat, inputs.perspective_center, inputs.perspective_centroid, inputs.perspective_sample, inputs.linear_center, inputs.linear_centroid, inputs.linear_sample, inputs.perspective_default, inputs.linear_default); } diff --git a/test/tint/types/functions/shader_io/interpolate_input_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/interpolate_input_struct.wgsl.expected.ir.msl index d8a735148e0..71e79306708 100644 --- a/test/tint/types/functions/shader_io/interpolate_input_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/interpolate_input_struct.wgsl.expected.ir.msl @@ -14,7 +14,7 @@ struct In { float linear_default; }; -struct tint_symbol_inputs { +struct main_inputs { float In_none [[user(locn0)]]; float In_flat [[user(locn1)]] [[flat]]; float In_perspective_center [[user(locn2)]] [[center_perspective]]; @@ -27,9 +27,9 @@ struct tint_symbol_inputs { float In_linear_default [[user(locn9)]] [[center_no_perspective]]; }; -void tint_symbol_inner(In in) { +void main_inner(In in) { } -fragment void tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_inner(In{.none=inputs.In_none, .flat=inputs.In_flat, .perspective_center=inputs.In_perspective_center, .perspective_centroid=inputs.In_perspective_centroid, .perspective_sample=inputs.In_perspective_sample, .linear_center=inputs.In_linear_center, .linear_centroid=inputs.In_linear_centroid, .linear_sample=inputs.In_linear_sample, .perspective_default=inputs.In_perspective_default, .linear_default=inputs.In_linear_default}); +fragment void v(main_inputs inputs [[stage_in]]) { + main_inner(In{.none=inputs.In_none, .flat=inputs.In_flat, .perspective_center=inputs.In_perspective_center, .perspective_centroid=inputs.In_perspective_centroid, .perspective_sample=inputs.In_perspective_sample, .linear_center=inputs.In_linear_center, .linear_centroid=inputs.In_linear_centroid, .linear_sample=inputs.In_linear_sample, .perspective_default=inputs.In_perspective_default, .linear_default=inputs.In_linear_default}); } diff --git a/test/tint/types/functions/shader_io/interpolate_return_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/interpolate_return_struct.wgsl.expected.ir.msl index 0138a4bae2a..6af86b89653 100644 --- a/test/tint/types/functions/shader_io/interpolate_return_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/interpolate_return_struct.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ struct Out { float linear_sample; }; -struct tint_symbol_outputs { +struct main_outputs { float4 Out_pos [[position]]; float Out_none [[user(locn0)]]; float Out_flat [[user(locn1)]] [[flat]]; @@ -25,21 +25,21 @@ struct tint_symbol_outputs { float Out_linear_sample [[user(locn7)]] [[sample_no_perspective]]; }; -Out tint_symbol_inner() { +Out main_inner() { return Out{}; } -vertex tint_symbol_outputs tint_symbol() { - Out const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.Out_pos = v.pos; - tint_wrapper_result.Out_none = v.none; - tint_wrapper_result.Out_flat = v.flat; - tint_wrapper_result.Out_perspective_center = v.perspective_center; - tint_wrapper_result.Out_perspective_centroid = v.perspective_centroid; - tint_wrapper_result.Out_perspective_sample = v.perspective_sample; - tint_wrapper_result.Out_linear_center = v.linear_center; - tint_wrapper_result.Out_linear_centroid = v.linear_centroid; - tint_wrapper_result.Out_linear_sample = v.linear_sample; +vertex main_outputs v() { + Out const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.Out_pos = v_1.pos; + tint_wrapper_result.Out_none = v_1.none; + tint_wrapper_result.Out_flat = v_1.flat; + tint_wrapper_result.Out_perspective_center = v_1.perspective_center; + tint_wrapper_result.Out_perspective_centroid = v_1.perspective_centroid; + tint_wrapper_result.Out_perspective_sample = v_1.perspective_sample; + tint_wrapper_result.Out_linear_center = v_1.linear_center; + tint_wrapper_result.Out_linear_centroid = v_1.linear_centroid; + tint_wrapper_result.Out_linear_sample = v_1.linear_sample; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl index 0bbe8d8708b..3b3e27071d3 100644 --- a/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/invariant.wgsl.expected.ir.msl @@ -8,16 +8,16 @@ using namespace metal; #endif -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]] TINT_INVARIANT; +struct main_outputs { + float4 tint_symbol [[position]] TINT_INVARIANT; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +vertex main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl index d96d70ae88c..73020bf6553 100644 --- a/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/invariant_struct_member.wgsl.expected.ir.msl @@ -12,16 +12,16 @@ struct Out { #endif -struct tint_symbol_outputs { +struct main_outputs { float4 Out_pos [[position]] TINT_INVARIANT; }; -Out tint_symbol_inner() { +Out main_inner() { return Out{}; } -vertex tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.Out_pos = tint_symbol_inner().pos; +vertex main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.Out_pos = main_inner().pos; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_builtins.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_builtins.wgsl.expected.ir.msl index cc935018945..2af5558009c 100644 --- a/test/tint/types/functions/shader_io/vertex_input_builtins.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_builtins.wgsl.expected.ir.msl @@ -1,17 +1,17 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner(uint vertex_index, uint instance_index) { +float4 main_inner(uint vertex_index, uint instance_index) { uint const foo = (vertex_index + instance_index); return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(vertex_index, instance_index); +vertex main_outputs v(uint vertex_index [[vertex_id]], uint instance_index [[instance_id]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(vertex_index, instance_index); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_builtins_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_builtins_struct.wgsl.expected.ir.msl index 63ea2750d75..0079c9da8e2 100644 --- a/test/tint/types/functions/shader_io/vertex_input_builtins_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_builtins_struct.wgsl.expected.ir.msl @@ -6,17 +6,17 @@ struct VertexInputs { uint instance_index; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner(VertexInputs inputs) { +float4 main_inner(VertexInputs inputs) { uint const foo = (inputs.vertex_index + inputs.instance_index); return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(uint VertexInputs_vertex_index [[vertex_id]], uint VertexInputs_instance_index [[instance_id]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(VertexInputs{.vertex_index=VertexInputs_vertex_index, .instance_index=VertexInputs_instance_index}); +vertex main_outputs v(uint VertexInputs_vertex_index [[vertex_id]], uint VertexInputs_instance_index [[instance_id]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(VertexInputs{.vertex_index=VertexInputs_vertex_index, .instance_index=VertexInputs_instance_index}); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_locations.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_locations.wgsl.expected.ir.msl index e0dbfdf9f0a..de5e0aff5d0 100644 --- a/test/tint/types/functions/shader_io/vertex_input_locations.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_locations.wgsl.expected.ir.msl @@ -1,18 +1,18 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { int loc0 [[attribute(0)]]; uint loc1 [[attribute(1)]]; float loc2 [[attribute(2)]]; float4 loc3 [[attribute(3)]]; }; -float4 tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3) { +float4 main_inner(int loc0, uint loc1, float loc2, float4 loc3) { int const i = loc0; uint const u = loc1; float const f = loc2; @@ -20,8 +20,8 @@ float4 tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3) { return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3); +vertex main_outputs v_1(main_inputs inputs [[stage_in]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_locations_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_locations_f16.wgsl.expected.ir.msl index c0a128736ea..9fa06aef3de 100644 --- a/test/tint/types/functions/shader_io/vertex_input_locations_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_locations_f16.wgsl.expected.ir.msl @@ -1,11 +1,11 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { int loc0 [[attribute(0)]]; uint loc1 [[attribute(1)]]; float loc2 [[attribute(2)]]; @@ -14,7 +14,7 @@ struct tint_symbol_inputs { half3 loc5 [[attribute(5)]]; }; -float4 tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3, half loc4, half3 loc5) { +float4 main_inner(int loc0, uint loc1, float loc2, float4 loc3, half loc4, half3 loc5) { int const i = loc0; uint const u = loc1; float const f = loc2; @@ -24,8 +24,8 @@ float4 tint_symbol_inner(int loc0, uint loc1, float loc2, float4 loc3, half loc4 return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3, inputs.loc4, inputs.loc5); +vertex main_outputs v_1(main_inputs inputs [[stage_in]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(inputs.loc0, inputs.loc1, inputs.loc2, inputs.loc3, inputs.loc4, inputs.loc5); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_locations_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_locations_struct.wgsl.expected.ir.msl index 64b2c2c94e1..3f07bce81ff 100644 --- a/test/tint/types/functions/shader_io/vertex_input_locations_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_locations_struct.wgsl.expected.ir.msl @@ -8,18 +8,18 @@ struct VertexInputs { float4 loc3; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { int VertexInputs_loc0 [[attribute(0)]]; uint VertexInputs_loc1 [[attribute(1)]]; float VertexInputs_loc2 [[attribute(2)]]; float4 VertexInputs_loc3 [[attribute(3)]]; }; -float4 tint_symbol_inner(VertexInputs inputs) { +float4 main_inner(VertexInputs inputs) { int const i = inputs.loc0; uint const u = inputs.loc1; float const f = inputs.loc2; @@ -27,8 +27,8 @@ float4 tint_symbol_inner(VertexInputs inputs) { return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(VertexInputs{.loc0=inputs.VertexInputs_loc0, .loc1=inputs.VertexInputs_loc1, .loc2=inputs.VertexInputs_loc2, .loc3=inputs.VertexInputs_loc3}); +vertex main_outputs v_1(main_inputs inputs [[stage_in]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(VertexInputs{.loc0=inputs.VertexInputs_loc0, .loc1=inputs.VertexInputs_loc1, .loc2=inputs.VertexInputs_loc2, .loc3=inputs.VertexInputs_loc3}); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_locations_struct_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_locations_struct_f16.wgsl.expected.ir.msl index d240a26f70e..9071289fd23 100644 --- a/test/tint/types/functions/shader_io/vertex_input_locations_struct_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_locations_struct_f16.wgsl.expected.ir.msl @@ -10,11 +10,11 @@ struct VertexInputs { half3 loc5; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { int VertexInputs_loc0 [[attribute(0)]]; uint VertexInputs_loc1 [[attribute(1)]]; float VertexInputs_loc2 [[attribute(2)]]; @@ -23,7 +23,7 @@ struct tint_symbol_inputs { half3 VertexInputs_loc5 [[attribute(5)]]; }; -float4 tint_symbol_inner(VertexInputs inputs) { +float4 main_inner(VertexInputs inputs) { int const i = inputs.loc0; uint const u = inputs.loc1; float const f = inputs.loc2; @@ -33,8 +33,8 @@ float4 tint_symbol_inner(VertexInputs inputs) { return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(tint_symbol_inputs inputs [[stage_in]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(VertexInputs{.loc0=inputs.VertexInputs_loc0, .loc1=inputs.VertexInputs_loc1, .loc2=inputs.VertexInputs_loc2, .loc3=inputs.VertexInputs_loc3, .loc4=inputs.VertexInputs_loc4, .loc5=inputs.VertexInputs_loc5}); +vertex main_outputs v_1(main_inputs inputs [[stage_in]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(VertexInputs{.loc0=inputs.VertexInputs_loc0, .loc1=inputs.VertexInputs_loc1, .loc2=inputs.VertexInputs_loc2, .loc3=inputs.VertexInputs_loc3, .loc4=inputs.VertexInputs_loc4, .loc5=inputs.VertexInputs_loc5}); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_mixed.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_mixed.wgsl.expected.ir.msl index edb6496ab9f..0dda3d31873 100644 --- a/test/tint/types/functions/shader_io/vertex_input_mixed.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_mixed.wgsl.expected.ir.msl @@ -11,18 +11,18 @@ struct VertexInputs1 { float4 loc3; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { int VertexInputs0_loc0 [[attribute(0)]]; uint loc1 [[attribute(1)]]; float VertexInputs1_loc2 [[attribute(2)]]; float4 VertexInputs1_loc3 [[attribute(3)]]; }; -float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { +float4 main_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1) { uint const foo = (inputs0.vertex_index + instance_index); int const i = inputs0.loc0; uint const u = loc1; @@ -31,9 +31,9 @@ float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(uint VertexInputs0_vertex_index [[vertex_id]], tint_symbol_inputs inputs [[stage_in]], uint instance_index [[instance_id]]) { - VertexInputs0 const v_1 = VertexInputs0{.vertex_index=VertexInputs0_vertex_index, .loc0=inputs.VertexInputs0_loc0}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(v_1, inputs.loc1, instance_index, VertexInputs1{.loc2=inputs.VertexInputs1_loc2, .loc3=inputs.VertexInputs1_loc3}); +vertex main_outputs v_1(uint VertexInputs0_vertex_index [[vertex_id]], main_inputs inputs [[stage_in]], uint instance_index [[instance_id]]) { + VertexInputs0 const v_2 = VertexInputs0{.vertex_index=VertexInputs0_vertex_index, .loc0=inputs.VertexInputs0_loc0}; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(v_2, inputs.loc1, instance_index, VertexInputs1{.loc2=inputs.VertexInputs1_loc2, .loc3=inputs.VertexInputs1_loc3}); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_input_mixed_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_input_mixed_f16.wgsl.expected.ir.msl index efd98db180c..c26c21b713d 100644 --- a/test/tint/types/functions/shader_io/vertex_input_mixed_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_input_mixed_f16.wgsl.expected.ir.msl @@ -12,11 +12,11 @@ struct VertexInputs1 { half3 loc5; }; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -struct tint_symbol_inputs { +struct main_inputs { int VertexInputs0_loc0 [[attribute(0)]]; uint loc1 [[attribute(1)]]; float VertexInputs1_loc2 [[attribute(2)]]; @@ -25,7 +25,7 @@ struct tint_symbol_inputs { half loc4 [[attribute(4)]]; }; -float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1, half loc4) { +float4 main_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, VertexInputs1 inputs1, half loc4) { uint const foo = (inputs0.vertex_index + instance_index); int const i = inputs0.loc0; uint const u = loc1; @@ -36,9 +36,9 @@ float4 tint_symbol_inner(VertexInputs0 inputs0, uint loc1, uint instance_index, return float4(0.0f); } -vertex tint_symbol_outputs tint_symbol(uint VertexInputs0_vertex_index [[vertex_id]], tint_symbol_inputs inputs [[stage_in]], uint instance_index [[instance_id]]) { - VertexInputs0 const v_1 = VertexInputs0{.vertex_index=VertexInputs0_vertex_index, .loc0=inputs.VertexInputs0_loc0}; - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(v_1, inputs.loc1, instance_index, VertexInputs1{.loc2=inputs.VertexInputs1_loc2, .loc3=inputs.VertexInputs1_loc3, .loc5=inputs.VertexInputs1_loc5}, inputs.loc4); +vertex main_outputs v_1(uint VertexInputs0_vertex_index [[vertex_id]], main_inputs inputs [[stage_in]], uint instance_index [[instance_id]]) { + VertexInputs0 const v_2 = VertexInputs0{.vertex_index=VertexInputs0_vertex_index, .loc0=inputs.VertexInputs0_loc0}; + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(v_2, inputs.loc1, instance_index, VertexInputs1{.loc2=inputs.VertexInputs1_loc2, .loc3=inputs.VertexInputs1_loc3, .loc5=inputs.VertexInputs1_loc5}, inputs.loc4); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_output_builtins.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_output_builtins.wgsl.expected.ir.msl index 2e54c72042f..e165d8a224f 100644 --- a/test/tint/types/functions/shader_io/vertex_output_builtins.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_output_builtins.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(1.0f, 2.0f, 3.0f, 4.0f); } -vertex tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +vertex main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_output_builtins_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_output_builtins_struct.wgsl.expected.ir.msl index ced63b74652..3be69232f08 100644 --- a/test/tint/types/functions/shader_io/vertex_output_builtins_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_output_builtins_struct.wgsl.expected.ir.msl @@ -5,16 +5,16 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.position=float4(1.0f, 2.0f, 3.0f, 4.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_position = tint_symbol_inner().position; +vertex main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_position = main_inner().position; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_output_locations_struct.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_output_locations_struct.wgsl.expected.ir.msl index 650fef3e5bd..a5b8bae1c7a 100644 --- a/test/tint/types/functions/shader_io/vertex_output_locations_struct.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_output_locations_struct.wgsl.expected.ir.msl @@ -9,7 +9,7 @@ struct VertexOutputs { float4 position; }; -struct tint_symbol_outputs { +struct main_outputs { int VertexOutputs_loc0 [[user(locn0)]] [[flat]]; uint VertexOutputs_loc1 [[user(locn1)]] [[flat]]; float VertexOutputs_loc2 [[user(locn2)]]; @@ -17,17 +17,17 @@ struct tint_symbol_outputs { float4 VertexOutputs_position [[position]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f), .position=float4(0.0f)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_loc0 = v.loc0; - tint_wrapper_result.VertexOutputs_loc1 = v.loc1; - tint_wrapper_result.VertexOutputs_loc2 = v.loc2; - tint_wrapper_result.VertexOutputs_loc3 = v.loc3; - tint_wrapper_result.VertexOutputs_position = v.position; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_loc0 = v_1.loc0; + tint_wrapper_result.VertexOutputs_loc1 = v_1.loc1; + tint_wrapper_result.VertexOutputs_loc2 = v_1.loc2; + tint_wrapper_result.VertexOutputs_loc3 = v_1.loc3; + tint_wrapper_result.VertexOutputs_position = v_1.position; return tint_wrapper_result; } diff --git a/test/tint/types/functions/shader_io/vertex_output_locations_struct_f16.wgsl.expected.ir.msl b/test/tint/types/functions/shader_io/vertex_output_locations_struct_f16.wgsl.expected.ir.msl index 11207a3d16a..f693794773c 100644 --- a/test/tint/types/functions/shader_io/vertex_output_locations_struct_f16.wgsl.expected.ir.msl +++ b/test/tint/types/functions/shader_io/vertex_output_locations_struct_f16.wgsl.expected.ir.msl @@ -11,7 +11,7 @@ struct VertexOutputs { half3 loc5; }; -struct tint_symbol_outputs { +struct main_outputs { int VertexOutputs_loc0 [[user(locn0)]] [[flat]]; uint VertexOutputs_loc1 [[user(locn1)]] [[flat]]; float VertexOutputs_loc2 [[user(locn2)]]; @@ -21,19 +21,19 @@ struct tint_symbol_outputs { half3 VertexOutputs_loc5 [[user(locn5)]]; }; -VertexOutputs tint_symbol_inner() { +VertexOutputs main_inner() { return VertexOutputs{.loc0=1, .loc1=1u, .loc2=1.0f, .loc3=float4(1.0f, 2.0f, 3.0f, 4.0f), .position=float4(0.0f), .loc4=2.25h, .loc5=half3(3.0h, 5.0h, 8.0h)}; } -vertex tint_symbol_outputs tint_symbol() { - VertexOutputs const v = tint_symbol_inner(); - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.VertexOutputs_loc0 = v.loc0; - tint_wrapper_result.VertexOutputs_loc1 = v.loc1; - tint_wrapper_result.VertexOutputs_loc2 = v.loc2; - tint_wrapper_result.VertexOutputs_loc3 = v.loc3; - tint_wrapper_result.VertexOutputs_position = v.position; - tint_wrapper_result.VertexOutputs_loc4 = v.loc4; - tint_wrapper_result.VertexOutputs_loc5 = v.loc5; +vertex main_outputs v() { + VertexOutputs const v_1 = main_inner(); + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.VertexOutputs_loc0 = v_1.loc0; + tint_wrapper_result.VertexOutputs_loc1 = v_1.loc1; + tint_wrapper_result.VertexOutputs_loc2 = v_1.loc2; + tint_wrapper_result.VertexOutputs_loc3 = v_1.loc3; + tint_wrapper_result.VertexOutputs_position = v_1.position; + tint_wrapper_result.VertexOutputs_loc4 = v_1.loc4; + tint_wrapper_result.VertexOutputs_loc5 = v_1.loc5; return tint_wrapper_result; } diff --git a/test/tint/types/module_scope_const.wgsl.expected.ir.msl b/test/tint/types/module_scope_const.wgsl.expected.ir.msl index 0097f9ad9de..98098b01c15 100644 --- a/test/tint/types/module_scope_const.wgsl.expected.ir.msl +++ b/test/tint/types/module_scope_const.wgsl.expected.ir.msl @@ -1,5 +1,5 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { } diff --git a/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl b/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl index 0d658999856..bfbf9058e00 100644 --- a/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl +++ b/test/tint/types/module_scope_private_initializers.wgsl.expected.ir.msl @@ -6,7 +6,7 @@ struct tint_module_vars_struct { thread float* b; }; -kernel void tint_symbol() { +kernel void v() { thread float a = 1.0f; thread float b = 0.0f; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.a=(&a), .b=(&b)}; diff --git a/test/tint/types/module_scope_used_in_functions.wgsl.expected.ir.msl b/test/tint/types/module_scope_used_in_functions.wgsl.expected.ir.msl index b5403381d5c..8210b53fa3a 100644 --- a/test/tint/types/module_scope_used_in_functions.wgsl.expected.ir.msl +++ b/test/tint/types/module_scope_used_in_functions.wgsl.expected.ir.msl @@ -21,8 +21,8 @@ struct tint_module_vars_struct { const constant tint_array* tint_storage_buffer_sizes; }; -struct tint_symbol_2 { - float tint_symbol_1; +struct tint_symbol_1 { + float tint_symbol; }; void no_uses() { @@ -47,7 +47,7 @@ void foo(float a, tint_module_vars_struct tint_module_vars) { no_uses(); } -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.w) = 0.0f; } @@ -55,8 +55,8 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul foo(1.0f, tint_module_vars); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]], const device float2* uniforms [[buffer(1)]], device tint_array* storages [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]], const device float2* uniforms [[buffer(1)]], device tint_array* storages [[buffer(0)]], const constant tint_array* tint_storage_buffer_sizes [[buffer(30)]]) { thread float p = 0.0f; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.p=(&p), .w=(&(*v_2).tint_symbol_1), .uniforms=uniforms, .storages=storages, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; - tint_symbol_inner(tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.p=(&p), .w=(&(*v_3).tint_symbol), .uniforms=uniforms, .storages=storages, .tint_storage_buffer_sizes=tint_storage_buffer_sizes}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/types/module_scope_var.wgsl.expected.ir.msl b/test/tint/types/module_scope_var.wgsl.expected.ir.msl index 74e7e0bd5d3..4cad93b7d8a 100644 --- a/test/tint/types/module_scope_var.wgsl.expected.ir.msl +++ b/test/tint/types/module_scope_var.wgsl.expected.ir.msl @@ -31,11 +31,11 @@ struct tint_module_vars_struct { threadgroup float* wg_var; }; -struct tint_symbol_2 { - float tint_symbol_1; +struct tint_symbol_1 { + float tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.wg_var) = 0.0f; } @@ -53,7 +53,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul (*tint_module_vars.wg_var) = 42.0f; } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { thread bool bool_var = false; thread int i32_var = 0; thread uint u32_var = 0u; @@ -64,6 +64,6 @@ kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], t thread float2x3 m2x3_var = float2x3(0.0f); thread tint_array arr_var = {}; thread S struct_var = {}; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.bool_var=(&bool_var), .i32_var=(&i32_var), .u32_var=(&u32_var), .f32_var=(&f32_var), .v2i32_var=(&v2i32_var), .v3u32_var=(&v3u32_var), .v4f32_var=(&v4f32_var), .m2x3_var=(&m2x3_var), .arr_var=(&arr_var), .struct_var=(&struct_var), .wg_var=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.bool_var=(&bool_var), .i32_var=(&i32_var), .u32_var=(&u32_var), .f32_var=(&f32_var), .v2i32_var=(&v2i32_var), .v3u32_var=(&v3u32_var), .v4f32_var=(&v4f32_var), .m2x3_var=(&m2x3_var), .arr_var=(&arr_var), .struct_var=(&struct_var), .wg_var=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl b/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl index f11d22ce283..92e71a58602 100644 --- a/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl +++ b/test/tint/types/module_scope_var_conversions.wgsl.expected.ir.msl @@ -24,7 +24,7 @@ struct tint_module_vars_struct { thread bool4* v4bool_var5; }; -kernel void tint_symbol() { +kernel void v() { thread bool bool_var1 = true; thread bool bool_var2 = true; thread bool bool_var3 = true; diff --git a/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl b/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl index e1354a46b2b..95645a334f8 100644 --- a/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl +++ b/test/tint/types/module_scope_var_initializers.wgsl.expected.ir.msl @@ -30,7 +30,7 @@ struct tint_module_vars_struct { thread S* struct_var; }; -kernel void tint_symbol() { +kernel void v() { thread bool bool_var = false; thread int i32_var = 0; thread uint u32_var = 0u; diff --git a/test/tint/types/module_scope_vars_pointers.wgsl.expected.ir.msl b/test/tint/types/module_scope_vars_pointers.wgsl.expected.ir.msl index 4cb1c4aec1c..eb7e1ede620 100644 --- a/test/tint/types/module_scope_vars_pointers.wgsl.expected.ir.msl +++ b/test/tint/types/module_scope_vars_pointers.wgsl.expected.ir.msl @@ -6,11 +6,11 @@ struct tint_module_vars_struct { threadgroup float* w; }; -struct tint_symbol_2 { - float tint_symbol_1; +struct tint_symbol_1 { + float tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.w) = 0.0f; } @@ -21,8 +21,8 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul (*p_ptr) = x; } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v [[threadgroup(0)]]) { +kernel void v(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_1 [[threadgroup(0)]]) { thread float p = 0.0f; - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.p=(&p), .w=(&(*v).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.p=(&p), .w=(&(*v_1).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/types/sampler.wgsl.expected.ir.msl b/test/tint/types/sampler.wgsl.expected.ir.msl index 34415ffafbd..32879ce350a 100644 --- a/test/tint/types/sampler.wgsl.expected.ir.msl +++ b/test/tint/types/sampler.wgsl.expected.ir.msl @@ -8,7 +8,7 @@ struct tint_module_vars_struct { sampler sc; }; -fragment void tint_symbol(texture2d t [[texture(0)]], depth2d d [[texture(1)]], sampler s [[sampler(0)]], sampler sc [[sampler(1)]]) { +fragment void v(texture2d t [[texture(0)]], depth2d d [[texture(1)]], sampler s [[sampler(0)]], sampler sc [[sampler(1)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t=t, .d=d, .s=s, .sc=sc}; float4 a = tint_module_vars.t.sample(tint_module_vars.s, float2(1.0f)); float4 b = tint_module_vars.d.gather_compare(tint_module_vars.sc, float2(1.0f), 1.0f); diff --git a/test/tint/types/short_names/short_names.wgsl.expected.ir.msl b/test/tint/types/short_names/short_names.wgsl.expected.ir.msl index d36d581e0f2..44c9d542763 100644 --- a/test/tint/types/short_names/short_names.wgsl.expected.ir.msl +++ b/test/tint/types/short_names/short_names.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner(uint VertexIndex) { +float4 main_inner(uint VertexIndex) { return float4(0.0f, 0.0f, 0.0f, 1.0f); } -vertex tint_symbol_outputs tint_symbol(uint VertexIndex [[vertex_id]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(VertexIndex); +vertex main_outputs v(uint VertexIndex [[vertex_id]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(VertexIndex); return tint_wrapper_result; } diff --git a/test/tint/types/struct_members.wgsl.expected.ir.msl b/test/tint/types/struct_members.wgsl.expected.ir.msl index c75796974ab..709a20764d1 100644 --- a/test/tint/types/struct_members.wgsl.expected.ir.msl +++ b/test/tint/types/struct_members.wgsl.expected.ir.msl @@ -30,6 +30,6 @@ struct S { S_inner member_struct; }; -kernel void tint_symbol() { +kernel void v() { S const s = S{}; } diff --git a/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl b/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl index e2b8d70b26f..8c67ca07cde 100644 --- a/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/depth/2d.wgsl.expected.ir.msl @@ -5,8 +5,8 @@ struct tint_module_vars_struct { depth2d t_f; }; -kernel void tint_symbol(depth2d t_f [[texture(0)]]) { +kernel void v(depth2d t_f [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f}; - uint const v = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); + uint const v_1 = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 dims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); } diff --git a/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl b/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl index 932084c9f01..7c9b1760724 100644 --- a/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl +++ b/test/tint/types/texture/depth/2d_array.wgsl.expected.ir.msl @@ -5,8 +5,8 @@ struct tint_module_vars_struct { depth2d_array t_f; }; -kernel void tint_symbol(depth2d_array t_f [[texture(0)]]) { +kernel void v(depth2d_array t_f [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f}; - uint const v = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); + uint const v_1 = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 dims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); } diff --git a/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl b/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl index 35e924065eb..6455c27aac0 100644 --- a/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl +++ b/test/tint/types/texture/depth/cube.wgsl.expected.ir.msl @@ -5,8 +5,8 @@ struct tint_module_vars_struct { depthcube t_f; }; -kernel void tint_symbol(depthcube t_f [[texture(0)]]) { +kernel void v(depthcube t_f [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f}; - uint const v = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); + uint const v_1 = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 dims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); } diff --git a/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl b/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl index 1b2372f366e..cca603c7c90 100644 --- a/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl +++ b/test/tint/types/texture/depth/cube_array.wgsl.expected.ir.msl @@ -5,8 +5,8 @@ struct tint_module_vars_struct { depthcube_array t_f; }; -kernel void tint_symbol(depthcube_array t_f [[texture(0)]]) { +kernel void v(depthcube_array t_f [[texture(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f}; - uint const v = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 dims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); + uint const v_1 = min(uint(0), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 dims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); } diff --git a/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl b/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl index 03526990fdf..4e3484bddcd 100644 --- a/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/multisampled/2d.wgsl.expected.ir.msl @@ -7,7 +7,7 @@ struct tint_module_vars_struct { texture2d_ms t_u; }; -kernel void tint_symbol(texture2d_ms t_f [[texture(0)]], texture2d_ms t_i [[texture(1)]], texture2d_ms t_u [[texture(2)]]) { +kernel void v(texture2d_ms t_f [[texture(0)]], texture2d_ms t_i [[texture(1)]], texture2d_ms t_u [[texture(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u}; uint2 fdims = uint2(tint_module_vars.t_f.get_width(), tint_module_vars.t_f.get_height()); uint2 idims = uint2(tint_module_vars.t_i.get_width(), tint_module_vars.t_i.get_height()); diff --git a/test/tint/types/texture/sampled/1d.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/1d.wgsl.expected.ir.msl index 1e8817dd2a7..760611a87b2 100644 --- a/test/tint/types/texture/sampled/1d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/sampled/1d.wgsl.expected.ir.msl @@ -7,7 +7,7 @@ struct tint_module_vars_struct { texture1d t_u; }; -kernel void tint_symbol(texture1d t_f [[texture(0)]], texture1d t_i [[texture(1)]], texture1d t_u [[texture(2)]]) { +kernel void v(texture1d t_f [[texture(0)]], texture1d t_i [[texture(1)]], texture1d t_u [[texture(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u}; min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); uint fdims = uint(tint_module_vars.t_f.get_width()); diff --git a/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl index 517534a5a52..f021d6e99df 100644 --- a/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/sampled/2d.wgsl.expected.ir.msl @@ -7,12 +7,12 @@ struct tint_module_vars_struct { texture2d t_u; }; -kernel void tint_symbol(texture2d t_f [[texture(0)]], texture2d t_i [[texture(1)]], texture2d t_u [[texture(2)]]) { +kernel void v(texture2d t_f [[texture(0)]], texture2d t_i [[texture(1)]], texture2d t_u [[texture(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u}; - uint const v = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); - uint const v_1 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); - uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1)); - uint const v_2 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); - uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2)); + uint const v_1 = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 fdims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); + uint const v_2 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); + uint2 idims = uint2(tint_module_vars.t_i.get_width(v_2), tint_module_vars.t_i.get_height(v_2)); + uint const v_3 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); + uint2 udims = uint2(tint_module_vars.t_u.get_width(v_3), tint_module_vars.t_u.get_height(v_3)); } diff --git a/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl index f6d0bc753f8..16fcad5a52e 100644 --- a/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl +++ b/test/tint/types/texture/sampled/2d_array.wgsl.expected.ir.msl @@ -7,12 +7,12 @@ struct tint_module_vars_struct { texture2d_array t_u; }; -kernel void tint_symbol(texture2d_array t_f [[texture(0)]], texture2d_array t_i [[texture(1)]], texture2d_array t_u [[texture(2)]]) { +kernel void v(texture2d_array t_f [[texture(0)]], texture2d_array t_i [[texture(1)]], texture2d_array t_u [[texture(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u}; - uint const v = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); - uint const v_1 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); - uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1)); - uint const v_2 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); - uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2)); + uint const v_1 = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 fdims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); + uint const v_2 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); + uint2 idims = uint2(tint_module_vars.t_i.get_width(v_2), tint_module_vars.t_i.get_height(v_2)); + uint const v_3 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); + uint2 udims = uint2(tint_module_vars.t_u.get_width(v_3), tint_module_vars.t_u.get_height(v_3)); } diff --git a/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl index 915706656e9..85c4059f787 100644 --- a/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/sampled/3d.wgsl.expected.ir.msl @@ -7,12 +7,12 @@ struct tint_module_vars_struct { texture3d t_u; }; -kernel void tint_symbol(texture3d t_f [[texture(0)]], texture3d t_i [[texture(1)]], texture3d t_u [[texture(2)]]) { +kernel void v(texture3d t_f [[texture(0)]], texture3d t_i [[texture(1)]], texture3d t_u [[texture(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u}; - uint const v = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint3 fdims = uint3(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v), tint_module_vars.t_f.get_depth(v)); - uint const v_1 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); - uint3 idims = uint3(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1), tint_module_vars.t_i.get_depth(v_1)); - uint const v_2 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); - uint3 udims = uint3(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2), tint_module_vars.t_u.get_depth(v_2)); + uint const v_1 = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint3 fdims = uint3(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1), tint_module_vars.t_f.get_depth(v_1)); + uint const v_2 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); + uint3 idims = uint3(tint_module_vars.t_i.get_width(v_2), tint_module_vars.t_i.get_height(v_2), tint_module_vars.t_i.get_depth(v_2)); + uint const v_3 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); + uint3 udims = uint3(tint_module_vars.t_u.get_width(v_3), tint_module_vars.t_u.get_height(v_3), tint_module_vars.t_u.get_depth(v_3)); } diff --git a/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl index fb85c3ea405..7fd60c8716a 100644 --- a/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl +++ b/test/tint/types/texture/sampled/cube.wgsl.expected.ir.msl @@ -7,12 +7,12 @@ struct tint_module_vars_struct { texturecube t_u; }; -kernel void tint_symbol(texturecube t_f [[texture(0)]], texturecube t_i [[texture(1)]], texturecube t_u [[texture(2)]]) { +kernel void v(texturecube t_f [[texture(0)]], texturecube t_i [[texture(1)]], texturecube t_u [[texture(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u}; - uint const v = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); - uint const v_1 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); - uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1)); - uint const v_2 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); - uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2)); + uint const v_1 = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 fdims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); + uint const v_2 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); + uint2 idims = uint2(tint_module_vars.t_i.get_width(v_2), tint_module_vars.t_i.get_height(v_2)); + uint const v_3 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); + uint2 udims = uint2(tint_module_vars.t_u.get_width(v_3), tint_module_vars.t_u.get_height(v_3)); } diff --git a/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl b/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl index 7cd027406b0..90f3ec77e05 100644 --- a/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl +++ b/test/tint/types/texture/sampled/cube_array.wgsl.expected.ir.msl @@ -7,12 +7,12 @@ struct tint_module_vars_struct { texturecube_array t_u; }; -kernel void tint_symbol(texturecube_array t_f [[texture(0)]], texturecube_array t_i [[texture(1)]], texturecube_array t_u [[texture(2)]]) { +kernel void v(texturecube_array t_f [[texture(0)]], texturecube_array t_i [[texture(1)]], texturecube_array t_u [[texture(2)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_f=t_f, .t_i=t_i, .t_u=t_u}; - uint const v = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); - uint2 fdims = uint2(tint_module_vars.t_f.get_width(v), tint_module_vars.t_f.get_height(v)); - uint const v_1 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); - uint2 idims = uint2(tint_module_vars.t_i.get_width(v_1), tint_module_vars.t_i.get_height(v_1)); - uint const v_2 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); - uint2 udims = uint2(tint_module_vars.t_u.get_width(v_2), tint_module_vars.t_u.get_height(v_2)); + uint const v_1 = min(uint(1), (tint_module_vars.t_f.get_num_mip_levels() - 1u)); + uint2 fdims = uint2(tint_module_vars.t_f.get_width(v_1), tint_module_vars.t_f.get_height(v_1)); + uint const v_2 = min(uint(1), (tint_module_vars.t_i.get_num_mip_levels() - 1u)); + uint2 idims = uint2(tint_module_vars.t_i.get_width(v_2), tint_module_vars.t_i.get_height(v_2)); + uint const v_3 = min(uint(1), (tint_module_vars.t_u.get_num_mip_levels() - 1u)); + uint2 udims = uint2(tint_module_vars.t_u.get_width(v_3), tint_module_vars.t_u.get_height(v_3)); } diff --git a/test/tint/types/texture/storage/1d.wgsl.expected.ir.msl b/test/tint/types/texture/storage/1d.wgsl.expected.ir.msl index 7bcc6c0808d..ad18eb3fc48 100644 --- a/test/tint/types/texture/storage/1d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/storage/1d.wgsl.expected.ir.msl @@ -20,7 +20,7 @@ struct tint_module_vars_struct { texture1d t_rgba32float; }; -kernel void tint_symbol(texture1d t_rgba8unorm [[texture(0)]], texture1d t_rgba8snorm [[texture(1)]], texture1d t_rgba8uint [[texture(2)]], texture1d t_rgba8sint [[texture(3)]], texture1d t_rgba16uint [[texture(4)]], texture1d t_rgba16sint [[texture(5)]], texture1d t_rgba16float [[texture(6)]], texture1d t_r32uint [[texture(7)]], texture1d t_r32sint [[texture(8)]], texture1d t_r32float [[texture(9)]], texture1d t_rg32uint [[texture(10)]], texture1d t_rg32sint [[texture(11)]], texture1d t_rg32float [[texture(12)]], texture1d t_rgba32uint [[texture(13)]], texture1d t_rgba32sint [[texture(14)]], texture1d t_rgba32float [[texture(15)]]) { +kernel void v(texture1d t_rgba8unorm [[texture(0)]], texture1d t_rgba8snorm [[texture(1)]], texture1d t_rgba8uint [[texture(2)]], texture1d t_rgba8sint [[texture(3)]], texture1d t_rgba16uint [[texture(4)]], texture1d t_rgba16sint [[texture(5)]], texture1d t_rgba16float [[texture(6)]], texture1d t_r32uint [[texture(7)]], texture1d t_r32sint [[texture(8)]], texture1d t_r32float [[texture(9)]], texture1d t_rg32uint [[texture(10)]], texture1d t_rg32sint [[texture(11)]], texture1d t_rg32float [[texture(12)]], texture1d t_rgba32uint [[texture(13)]], texture1d t_rgba32sint [[texture(14)]], texture1d t_rgba32float [[texture(15)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_rgba8unorm=t_rgba8unorm, .t_rgba8snorm=t_rgba8snorm, .t_rgba8uint=t_rgba8uint, .t_rgba8sint=t_rgba8sint, .t_rgba16uint=t_rgba16uint, .t_rgba16sint=t_rgba16sint, .t_rgba16float=t_rgba16float, .t_r32uint=t_r32uint, .t_r32sint=t_r32sint, .t_r32float=t_r32float, .t_rg32uint=t_rg32uint, .t_rg32sint=t_rg32sint, .t_rg32float=t_rg32float, .t_rgba32uint=t_rgba32uint, .t_rgba32sint=t_rgba32sint, .t_rgba32float=t_rgba32float}; uint dim1 = uint(tint_module_vars.t_rgba8unorm.get_width()); uint dim2 = uint(tint_module_vars.t_rgba8snorm.get_width()); diff --git a/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl b/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl index 71db1b57c0e..7c15c65c28b 100644 --- a/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/storage/2d.wgsl.expected.ir.msl @@ -20,7 +20,7 @@ struct tint_module_vars_struct { texture2d t_rgba32float; }; -kernel void tint_symbol(texture2d t_rgba8unorm [[texture(0)]], texture2d t_rgba8snorm [[texture(1)]], texture2d t_rgba8uint [[texture(2)]], texture2d t_rgba8sint [[texture(3)]], texture2d t_rgba16uint [[texture(4)]], texture2d t_rgba16sint [[texture(5)]], texture2d t_rgba16float [[texture(6)]], texture2d t_r32uint [[texture(7)]], texture2d t_r32sint [[texture(8)]], texture2d t_r32float [[texture(9)]], texture2d t_rg32uint [[texture(10)]], texture2d t_rg32sint [[texture(11)]], texture2d t_rg32float [[texture(12)]], texture2d t_rgba32uint [[texture(13)]], texture2d t_rgba32sint [[texture(14)]], texture2d t_rgba32float [[texture(15)]]) { +kernel void v(texture2d t_rgba8unorm [[texture(0)]], texture2d t_rgba8snorm [[texture(1)]], texture2d t_rgba8uint [[texture(2)]], texture2d t_rgba8sint [[texture(3)]], texture2d t_rgba16uint [[texture(4)]], texture2d t_rgba16sint [[texture(5)]], texture2d t_rgba16float [[texture(6)]], texture2d t_r32uint [[texture(7)]], texture2d t_r32sint [[texture(8)]], texture2d t_r32float [[texture(9)]], texture2d t_rg32uint [[texture(10)]], texture2d t_rg32sint [[texture(11)]], texture2d t_rg32float [[texture(12)]], texture2d t_rgba32uint [[texture(13)]], texture2d t_rgba32sint [[texture(14)]], texture2d t_rgba32float [[texture(15)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_rgba8unorm=t_rgba8unorm, .t_rgba8snorm=t_rgba8snorm, .t_rgba8uint=t_rgba8uint, .t_rgba8sint=t_rgba8sint, .t_rgba16uint=t_rgba16uint, .t_rgba16sint=t_rgba16sint, .t_rgba16float=t_rgba16float, .t_r32uint=t_r32uint, .t_r32sint=t_r32sint, .t_r32float=t_r32float, .t_rg32uint=t_rg32uint, .t_rg32sint=t_rg32sint, .t_rg32float=t_rg32float, .t_rgba32uint=t_rgba32uint, .t_rgba32sint=t_rgba32sint, .t_rgba32float=t_rgba32float}; uint2 dim1 = uint2(tint_module_vars.t_rgba8unorm.get_width(0u), tint_module_vars.t_rgba8unorm.get_height(0u)); uint2 dim2 = uint2(tint_module_vars.t_rgba8snorm.get_width(0u), tint_module_vars.t_rgba8snorm.get_height(0u)); diff --git a/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl b/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl index 0592be4b854..7412ae7bdc0 100644 --- a/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl +++ b/test/tint/types/texture/storage/2d_array.wgsl.expected.ir.msl @@ -20,7 +20,7 @@ struct tint_module_vars_struct { texture2d_array t_rgba32float; }; -kernel void tint_symbol(texture2d_array t_rgba8unorm [[texture(0)]], texture2d_array t_rgba8snorm [[texture(1)]], texture2d_array t_rgba8uint [[texture(2)]], texture2d_array t_rgba8sint [[texture(3)]], texture2d_array t_rgba16uint [[texture(4)]], texture2d_array t_rgba16sint [[texture(5)]], texture2d_array t_rgba16float [[texture(6)]], texture2d_array t_r32uint [[texture(7)]], texture2d_array t_r32sint [[texture(8)]], texture2d_array t_r32float [[texture(9)]], texture2d_array t_rg32uint [[texture(10)]], texture2d_array t_rg32sint [[texture(11)]], texture2d_array t_rg32float [[texture(12)]], texture2d_array t_rgba32uint [[texture(13)]], texture2d_array t_rgba32sint [[texture(14)]], texture2d_array t_rgba32float [[texture(15)]]) { +kernel void v(texture2d_array t_rgba8unorm [[texture(0)]], texture2d_array t_rgba8snorm [[texture(1)]], texture2d_array t_rgba8uint [[texture(2)]], texture2d_array t_rgba8sint [[texture(3)]], texture2d_array t_rgba16uint [[texture(4)]], texture2d_array t_rgba16sint [[texture(5)]], texture2d_array t_rgba16float [[texture(6)]], texture2d_array t_r32uint [[texture(7)]], texture2d_array t_r32sint [[texture(8)]], texture2d_array t_r32float [[texture(9)]], texture2d_array t_rg32uint [[texture(10)]], texture2d_array t_rg32sint [[texture(11)]], texture2d_array t_rg32float [[texture(12)]], texture2d_array t_rgba32uint [[texture(13)]], texture2d_array t_rgba32sint [[texture(14)]], texture2d_array t_rgba32float [[texture(15)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_rgba8unorm=t_rgba8unorm, .t_rgba8snorm=t_rgba8snorm, .t_rgba8uint=t_rgba8uint, .t_rgba8sint=t_rgba8sint, .t_rgba16uint=t_rgba16uint, .t_rgba16sint=t_rgba16sint, .t_rgba16float=t_rgba16float, .t_r32uint=t_r32uint, .t_r32sint=t_r32sint, .t_r32float=t_r32float, .t_rg32uint=t_rg32uint, .t_rg32sint=t_rg32sint, .t_rg32float=t_rg32float, .t_rgba32uint=t_rgba32uint, .t_rgba32sint=t_rgba32sint, .t_rgba32float=t_rgba32float}; uint2 dim1 = uint2(tint_module_vars.t_rgba8unorm.get_width(0u), tint_module_vars.t_rgba8unorm.get_height(0u)); uint2 dim2 = uint2(tint_module_vars.t_rgba8snorm.get_width(0u), tint_module_vars.t_rgba8snorm.get_height(0u)); diff --git a/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl b/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl index 28cfe37c222..6a8a2a16ab3 100644 --- a/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl +++ b/test/tint/types/texture/storage/3d.wgsl.expected.ir.msl @@ -20,7 +20,7 @@ struct tint_module_vars_struct { texture3d t_rgba32float; }; -kernel void tint_symbol(texture3d t_rgba8unorm [[texture(0)]], texture3d t_rgba8snorm [[texture(1)]], texture3d t_rgba8uint [[texture(2)]], texture3d t_rgba8sint [[texture(3)]], texture3d t_rgba16uint [[texture(4)]], texture3d t_rgba16sint [[texture(5)]], texture3d t_rgba16float [[texture(6)]], texture3d t_r32uint [[texture(7)]], texture3d t_r32sint [[texture(8)]], texture3d t_r32float [[texture(9)]], texture3d t_rg32uint [[texture(10)]], texture3d t_rg32sint [[texture(11)]], texture3d t_rg32float [[texture(12)]], texture3d t_rgba32uint [[texture(13)]], texture3d t_rgba32sint [[texture(14)]], texture3d t_rgba32float [[texture(15)]]) { +kernel void v(texture3d t_rgba8unorm [[texture(0)]], texture3d t_rgba8snorm [[texture(1)]], texture3d t_rgba8uint [[texture(2)]], texture3d t_rgba8sint [[texture(3)]], texture3d t_rgba16uint [[texture(4)]], texture3d t_rgba16sint [[texture(5)]], texture3d t_rgba16float [[texture(6)]], texture3d t_r32uint [[texture(7)]], texture3d t_r32sint [[texture(8)]], texture3d t_r32float [[texture(9)]], texture3d t_rg32uint [[texture(10)]], texture3d t_rg32sint [[texture(11)]], texture3d t_rg32float [[texture(12)]], texture3d t_rgba32uint [[texture(13)]], texture3d t_rgba32sint [[texture(14)]], texture3d t_rgba32float [[texture(15)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.t_rgba8unorm=t_rgba8unorm, .t_rgba8snorm=t_rgba8snorm, .t_rgba8uint=t_rgba8uint, .t_rgba8sint=t_rgba8sint, .t_rgba16uint=t_rgba16uint, .t_rgba16sint=t_rgba16sint, .t_rgba16float=t_rgba16float, .t_r32uint=t_r32uint, .t_r32sint=t_r32sint, .t_r32float=t_r32float, .t_rg32uint=t_rg32uint, .t_rg32sint=t_rg32sint, .t_rg32float=t_rg32float, .t_rgba32uint=t_rgba32uint, .t_rgba32sint=t_rgba32sint, .t_rgba32float=t_rgba32float}; uint3 dim1 = uint3(tint_module_vars.t_rgba8unorm.get_width(0u), tint_module_vars.t_rgba8unorm.get_height(0u), tint_module_vars.t_rgba8unorm.get_depth(0u)); uint3 dim2 = uint3(tint_module_vars.t_rgba8snorm.get_width(0u), tint_module_vars.t_rgba8snorm.get_height(0u), tint_module_vars.t_rgba8snorm.get_depth(0u)); diff --git a/test/tint/unicode/comments.wgsl.expected.ir.msl b/test/tint/unicode/comments.wgsl.expected.ir.msl index 00f22971b82..54e41171de3 100644 --- a/test/tint/unicode/comments.wgsl.expected.ir.msl +++ b/test/tint/unicode/comments.wgsl.expected.ir.msl @@ -1,5 +1,5 @@ #include using namespace metal; -fragment void tint_symbol() { +fragment void v() { } diff --git a/test/tint/unicode/identifiers.wgsl.expected.ir.msl b/test/tint/unicode/identifiers.wgsl.expected.ir.msl index 3ef862b5d0d..802afcb554d 100644 --- a/test/tint/unicode/identifiers.wgsl.expected.ir.msl +++ b/test/tint/unicode/identifiers.wgsl.expected.ir.msl @@ -1,11 +1,11 @@ #include using namespace metal; -float tint_symbol_2(int tint_symbol_3) { - return float(tint_symbol_3); +float v(int v_1) { + return float(v_1); } -fragment void tint_symbol_4() { - int tint_symbol_5 = 0; - float const tint_symbol_6 = tint_symbol_2(tint_symbol_5); +fragment void v_2() { + int v_3 = 0; + float const v_4 = v(v_3); } diff --git a/test/tint/var/inferred/function.wgsl.expected.ir.msl b/test/tint/var/inferred/function.wgsl.expected.ir.msl index 6c6f131bdec..a33b3256220 100644 --- a/test/tint/var/inferred/function.wgsl.expected.ir.msl +++ b/test/tint/var/inferred/function.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[color(0)]]; +struct main_outputs { + float4 tint_symbol [[color(0)]]; }; -float4 tint_symbol_inner() { +float4 main_inner() { return float4(0.0f); } -fragment tint_symbol_outputs tint_symbol() { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(); +fragment main_outputs v() { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(); return tint_wrapper_result; } diff --git a/test/tint/var/initialization/function/array/array_i32.wgsl.expected.ir.msl b/test/tint/var/initialization/function/array/array_i32.wgsl.expected.ir.msl index 18980f72f21..74de6561b0e 100644 --- a/test/tint/var/initialization/function/array/array_i32.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/function/array/array_i32.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ struct tint_array { T elements[N]; }; -kernel void tint_symbol() { +kernel void v() { tint_array, 2> zero = {}; tint_array, 2> init = tint_array, 2>{tint_array{1, 2, 3}, tint_array{4, 5, 6}}; } diff --git a/test/tint/var/initialization/function/array/i32.wgsl.expected.ir.msl b/test/tint/var/initialization/function/array/i32.wgsl.expected.ir.msl index 82c277e4061..675835a4c08 100644 --- a/test/tint/var/initialization/function/array/i32.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/function/array/i32.wgsl.expected.ir.msl @@ -13,7 +13,7 @@ struct tint_array { T elements[N]; }; -kernel void tint_symbol() { +kernel void v() { tint_array zero = {}; tint_array init = tint_array{1, 2, 3}; } diff --git a/test/tint/var/initialization/function/matrix.wgsl.expected.ir.msl b/test/tint/var/initialization/function/matrix.wgsl.expected.ir.msl index c89510a566a..6fd7853e6d2 100644 --- a/test/tint/var/initialization/function/matrix.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/function/matrix.wgsl.expected.ir.msl @@ -1,6 +1,6 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v_1() { float2x3 v = float2x3(0.0f); } diff --git a/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl b/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl index 404015910cc..99be7b08e20 100644 --- a/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/function/nested_structs.wgsl.expected.ir.msl @@ -21,7 +21,7 @@ int f(S3 s3) { return s3.s2.s1.i; } -kernel void tint_symbol(device int* out [[buffer(0)]]) { +kernel void v(device int* out [[buffer(0)]]) { tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.out=out}; (*tint_module_vars.out) = f(S3{.s2=S2{.s1=S1{.i=42}}}); } diff --git a/test/tint/var/initialization/function/scalar.wgsl.expected.ir.msl b/test/tint/var/initialization/function/scalar.wgsl.expected.ir.msl index e5caf0597e5..80489aecdc3 100644 --- a/test/tint/var/initialization/function/scalar.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/function/scalar.wgsl.expected.ir.msl @@ -1,6 +1,6 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v_1() { int v = 0; } diff --git a/test/tint/var/initialization/function/struct.wgsl.expected.ir.msl b/test/tint/var/initialization/function/struct.wgsl.expected.ir.msl index 35e22c5e291..85df004968a 100644 --- a/test/tint/var/initialization/function/struct.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/function/struct.wgsl.expected.ir.msl @@ -6,6 +6,6 @@ struct S { float b; }; -kernel void tint_symbol() { +kernel void v_1() { S v = {}; } diff --git a/test/tint/var/initialization/function/vector.wgsl.expected.ir.msl b/test/tint/var/initialization/function/vector.wgsl.expected.ir.msl index aa0c1ff5baa..1f883c1f3c6 100644 --- a/test/tint/var/initialization/function/vector.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/function/vector.wgsl.expected.ir.msl @@ -1,6 +1,6 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v_1() { int3 v = 0; } diff --git a/test/tint/var/initialization/private/array/array_i32.wgsl.expected.ir.msl b/test/tint/var/initialization/private/array/array_i32.wgsl.expected.ir.msl index 46d8436c7ba..8db75eb2ce1 100644 --- a/test/tint/var/initialization/private/array/array_i32.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/private/array/array_i32.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { thread tint_array, 2>* init; }; -kernel void tint_symbol() { +kernel void v() { thread tint_array, 2> zero = {}; thread tint_array, 2> init = tint_array, 2>{tint_array{1, 2, 3}, tint_array{4, 5, 6}}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&zero), .init=(&init)}; diff --git a/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl b/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl index 68dca796f70..b8711e90d43 100644 --- a/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/private/array/i32.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { thread tint_array* init; }; -kernel void tint_symbol() { +kernel void v() { thread tint_array zero = {}; thread tint_array init = tint_array{1, 2, 3}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&zero), .init=(&init)}; diff --git a/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl b/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl index c3a2200df0e..f7064415b76 100644 --- a/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/private/matrix.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { thread float2x3* v; }; -kernel void tint_symbol() { +kernel void v_1() { thread float2x3 v = float2x3(0.0f); tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&v)}; } diff --git a/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl b/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl index 4f0fa14ca99..a9f8bfe6307 100644 --- a/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/private/nested_structs.wgsl.expected.ir.msl @@ -18,7 +18,7 @@ struct tint_module_vars_struct { device int* out; }; -kernel void tint_symbol(device int* out [[buffer(0)]]) { +kernel void v(device int* out [[buffer(0)]]) { thread S3 P = S3{.s2=S2{.s1=S1{.i=42}}}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.P=(&P), .out=out}; (*tint_module_vars.out) = (*tint_module_vars.P).s2.s1.i; diff --git a/test/tint/var/initialization/private/scalar.wgsl.expected.ir.msl b/test/tint/var/initialization/private/scalar.wgsl.expected.ir.msl index 8baa322bc8f..3f13fbf0cd8 100644 --- a/test/tint/var/initialization/private/scalar.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/private/scalar.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { thread int* v; }; -kernel void tint_symbol() { +kernel void v_1() { thread int v = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&v)}; } diff --git a/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl b/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl index cb4b176bd41..bdc2a663eb9 100644 --- a/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/private/struct.wgsl.expected.ir.msl @@ -10,7 +10,7 @@ struct tint_module_vars_struct { thread S* v; }; -kernel void tint_symbol() { +kernel void v_1() { thread S v = {}; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&v)}; } diff --git a/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl b/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl index 40538ba3fa0..08697b0ee9d 100644 --- a/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/private/vector.wgsl.expected.ir.msl @@ -5,7 +5,7 @@ struct tint_module_vars_struct { thread int3* v; }; -kernel void tint_symbol() { +kernel void v_1() { thread int3 v = 0; tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&v)}; } diff --git a/test/tint/var/initialization/workgroup/array/array_i32.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/array/array_i32.wgsl.expected.ir.msl index 02aad413395..2c6a3dc3116 100644 --- a/test/tint/var/initialization/workgroup/array/array_i32.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/array/array_i32.wgsl.expected.ir.msl @@ -17,11 +17,11 @@ struct tint_module_vars_struct { threadgroup tint_array, 2>* zero; }; -struct tint_symbol_2 { - tint_array, 2> tint_symbol_1; +struct tint_symbol_1 { + tint_array, 2> tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v_1 = 0u; v_1 = tint_local_index; @@ -41,7 +41,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul tint_array, 2> v = (*tint_module_vars.zero); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_3 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_3).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_3(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_4 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_4).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/initialization/workgroup/array/i32.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/array/i32.wgsl.expected.ir.msl index ed037d377ef..e78da8472a6 100644 --- a/test/tint/var/initialization/workgroup/array/i32.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/array/i32.wgsl.expected.ir.msl @@ -17,11 +17,11 @@ struct tint_module_vars_struct { threadgroup tint_array* zero; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v_1 = 0u; v_1 = tint_local_index; @@ -41,7 +41,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul tint_array v = (*tint_module_vars.zero); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_3 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_3).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_3(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_4 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_4).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/initialization/workgroup/array/u32_large.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/array/u32_large.wgsl.expected.ir.msl index 346fecc44a2..60fbc08cc34 100644 --- a/test/tint/var/initialization/workgroup/array/u32_large.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/array/u32_large.wgsl.expected.ir.msl @@ -17,11 +17,11 @@ struct tint_module_vars_struct { threadgroup tint_array* zero; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { { uint v_1 = 0u; v_1 = tint_local_index; @@ -41,7 +41,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul tint_array v = (*tint_module_vars.zero); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_3 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_3).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_3(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_4 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_4).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/initialization/workgroup/array/u32_small.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/array/u32_small.wgsl.expected.ir.msl index baecf61415d..a9641ab60fa 100644 --- a/test/tint/var/initialization/workgroup/array/u32_small.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/array/u32_small.wgsl.expected.ir.msl @@ -17,11 +17,11 @@ struct tint_module_vars_struct { threadgroup tint_array* zero; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 3u)) { (*tint_module_vars.zero)[tint_local_index] = 0; } @@ -29,7 +29,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul tint_array v = (*tint_module_vars.zero); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_1).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_1(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_2 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.zero=(&(*v_2).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/initialization/workgroup/matrix.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/matrix.wgsl.expected.ir.msl index 5c6c7df7477..1afaef4d694 100644 --- a/test/tint/var/initialization/workgroup/matrix.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/matrix.wgsl.expected.ir.msl @@ -21,11 +21,11 @@ struct tint_module_vars_struct { threadgroup tint_array* v; }; -struct tint_symbol_2 { - tint_array tint_symbol_1; +struct tint_symbol_1 { + tint_array tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.v)[0u].packed = packed_float3(float2x3(float3(0.0f), float3(0.0f))[0u]); (*tint_module_vars.v)[1u].packed = packed_float3(float2x3(float3(0.0f), float3(0.0f))[1u]); @@ -36,7 +36,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul float2x3 const v_3 = float2x3(v_2, float3(v_1[1u].packed)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_4 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_4).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_4(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_5 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_5).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/initialization/workgroup/scalar.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/scalar.wgsl.expected.ir.msl index 1846e86f612..ef85950bc81 100644 --- a/test/tint/var/initialization/workgroup/scalar.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/scalar.wgsl.expected.ir.msl @@ -5,11 +5,11 @@ struct tint_module_vars_struct { threadgroup int* v; }; -struct tint_symbol_2 { - int tint_symbol_1; +struct tint_symbol_1 { + int tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.v) = 0; } @@ -17,7 +17,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul int const i = (*tint_module_vars.v); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_1).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_1(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_2 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_2).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/initialization/workgroup/struct.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/struct.wgsl.expected.ir.msl index 7916e20ecf1..d75d25887ce 100644 --- a/test/tint/var/initialization/workgroup/struct.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/struct.wgsl.expected.ir.msl @@ -10,18 +10,18 @@ struct tint_module_vars_struct { threadgroup S* v; }; -struct tint_symbol_2 { - S tint_symbol_1; +struct tint_symbol_1 { + S tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.v) = S{}; } threadgroup_barrier(mem_flags::mem_threadgroup); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_1 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_1).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_1(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_2 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_2).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/initialization/workgroup/vector.wgsl.expected.ir.msl b/test/tint/var/initialization/workgroup/vector.wgsl.expected.ir.msl index 5ebf763f4d2..814167b7f1c 100644 --- a/test/tint/var/initialization/workgroup/vector.wgsl.expected.ir.msl +++ b/test/tint/var/initialization/workgroup/vector.wgsl.expected.ir.msl @@ -5,11 +5,11 @@ struct tint_module_vars_struct { threadgroup packed_int3* v; }; -struct tint_symbol_2 { - packed_int3 tint_symbol_1; +struct tint_symbol_1 { + packed_int3 tint_symbol; }; -void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { +void main_inner(uint tint_local_index, tint_module_vars_struct tint_module_vars) { if ((tint_local_index < 1u)) { (*tint_module_vars.v) = packed_int3(int3(0)); } @@ -17,7 +17,7 @@ void tint_symbol_inner(uint tint_local_index, tint_module_vars_struct tint_modul int3 const v_1 = int3((*tint_module_vars.v)); } -kernel void tint_symbol(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_2* v_2 [[threadgroup(0)]]) { - tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_2).tint_symbol_1)}; - tint_symbol_inner(tint_local_index, tint_module_vars); +kernel void v_2(uint tint_local_index [[thread_index_in_threadgroup]], threadgroup tint_symbol_1* v_3 [[threadgroup(0)]]) { + tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.v=(&(*v_3).tint_symbol)}; + main_inner(tint_local_index, tint_module_vars); } diff --git a/test/tint/var/override/named/no_init/bool.wgsl.expected.ir.msl b/test/tint/var/override/named/no_init/bool.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/no_init/bool.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/no_init/bool.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/no_init/f32.wgsl.expected.ir.msl b/test/tint/var/override/named/no_init/f32.wgsl.expected.ir.msl index f8aac51b668..713635c681d 100644 --- a/test/tint/var/override/named/no_init/f32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/no_init/f32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (true) { } } diff --git a/test/tint/var/override/named/no_init/i32.wgsl.expected.ir.msl b/test/tint/var/override/named/no_init/i32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/no_init/i32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/no_init/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/no_init/u32.wgsl.expected.ir.msl b/test/tint/var/override/named/no_init/u32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/no_init/u32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/no_init/u32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/val_init/bool.wgsl.expected.ir.msl b/test/tint/var/override/named/val_init/bool.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/val_init/bool.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/val_init/bool.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/val_init/f32.wgsl.expected.ir.msl b/test/tint/var/override/named/val_init/f32.wgsl.expected.ir.msl index f8aac51b668..713635c681d 100644 --- a/test/tint/var/override/named/val_init/f32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/val_init/f32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (true) { } } diff --git a/test/tint/var/override/named/val_init/i32.wgsl.expected.ir.msl b/test/tint/var/override/named/val_init/i32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/val_init/i32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/val_init/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/val_init/u32.wgsl.expected.ir.msl b/test/tint/var/override/named/val_init/u32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/val_init/u32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/val_init/u32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/zero_init/bool.wgsl.expected.ir.msl b/test/tint/var/override/named/zero_init/bool.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/zero_init/bool.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/zero_init/bool.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/zero_init/f32.wgsl.expected.ir.msl b/test/tint/var/override/named/zero_init/f32.wgsl.expected.ir.msl index f8aac51b668..713635c681d 100644 --- a/test/tint/var/override/named/zero_init/f32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/zero_init/f32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (true) { } } diff --git a/test/tint/var/override/named/zero_init/i32.wgsl.expected.ir.msl b/test/tint/var/override/named/zero_init/i32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/zero_init/i32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/zero_init/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/named/zero_init/u32.wgsl.expected.ir.msl b/test/tint/var/override/named/zero_init/u32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/named/zero_init/u32.wgsl.expected.ir.msl +++ b/test/tint/var/override/named/zero_init/u32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/no_init/bool.wgsl.expected.ir.msl b/test/tint/var/override/numbered/no_init/bool.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/no_init/bool.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/no_init/bool.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/no_init/f32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/no_init/f32.wgsl.expected.ir.msl index f8aac51b668..713635c681d 100644 --- a/test/tint/var/override/numbered/no_init/f32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/no_init/f32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (true) { } } diff --git a/test/tint/var/override/numbered/no_init/i32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/no_init/i32.wgsl.expected.ir.msl index f8aac51b668..713635c681d 100644 --- a/test/tint/var/override/numbered/no_init/i32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/no_init/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (true) { } } diff --git a/test/tint/var/override/numbered/no_init/u32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/no_init/u32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/no_init/u32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/no_init/u32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/val_init/bool.wgsl.expected.ir.msl b/test/tint/var/override/numbered/val_init/bool.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/val_init/bool.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/val_init/bool.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/val_init/f32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/val_init/f32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/val_init/f32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/val_init/f32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/val_init/i32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/val_init/i32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/val_init/i32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/val_init/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/val_init/u32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/val_init/u32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/val_init/u32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/val_init/u32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/zero_init/bool.wgsl.expected.ir.msl b/test/tint/var/override/numbered/zero_init/bool.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/zero_init/bool.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/zero_init/bool.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/zero_init/f32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/zero_init/f32.wgsl.expected.ir.msl index f8aac51b668..713635c681d 100644 --- a/test/tint/var/override/numbered/zero_init/f32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/zero_init/f32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (true) { } } diff --git a/test/tint/var/override/numbered/zero_init/i32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/zero_init/i32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/zero_init/i32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/zero_init/i32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/override/numbered/zero_init/u32.wgsl.expected.ir.msl b/test/tint/var/override/numbered/zero_init/u32.wgsl.expected.ir.msl index 74d5ba0a9db..3bfb273b767 100644 --- a/test/tint/var/override/numbered/zero_init/u32.wgsl.expected.ir.msl +++ b/test/tint/var/override/numbered/zero_init/u32.wgsl.expected.ir.msl @@ -1,7 +1,7 @@ #include using namespace metal; -kernel void tint_symbol() { +kernel void v() { if (false) { } } diff --git a/test/tint/var/uses/instance_index.wgsl.expected.ir.msl b/test/tint/var/uses/instance_index.wgsl.expected.ir.msl index 546679fe730..5a223b853cd 100644 --- a/test/tint/var/uses/instance_index.wgsl.expected.ir.msl +++ b/test/tint/var/uses/instance_index.wgsl.expected.ir.msl @@ -1,16 +1,16 @@ #include using namespace metal; -struct tint_symbol_outputs { - float4 tint_symbol_1 [[position]]; +struct main_outputs { + float4 tint_symbol [[position]]; }; -float4 tint_symbol_inner(uint b) { +float4 main_inner(uint b) { return float4(float(b)); } -vertex tint_symbol_outputs tint_symbol(uint b [[instance_id]]) { - tint_symbol_outputs tint_wrapper_result = {}; - tint_wrapper_result.tint_symbol_1 = tint_symbol_inner(b); +vertex main_outputs v(uint b [[instance_id]]) { + main_outputs tint_wrapper_result = {}; + tint_wrapper_result.tint_symbol = main_inner(b); return tint_wrapper_result; }