From 0ea511c7cd67ac66f5b86bce52571beab4dcf2e7 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sat, 14 Nov 2026 23:28:19 -0800 Subject: [PATCH] Re-bless the golden tables for the cof_offsets fixture RUNTIME 2339 (734e1cac02) added the owned fixture engine/cof_offsets without its golden rows. The bless job (m3-max-31560 on the M3, bless-job.sh) translated it and wrote its rows: the AIR input listing, six golden hashes and six engine expectations. Only rows for this fixture are added; no existing row changed. --- .../tests/air_input/cof_offsets.txt | 155 ++++++++++++++++++ crates/metal2vulkan/tests/golden_hashes.tsv | 6 + .../public_fixture_expectations_engine.tsv | 6 + 3 files changed, 167 insertions(+) create mode 100644 crates/metal2vulkan/tests/air_input/cof_offsets.txt diff --git a/crates/metal2vulkan/tests/air_input/cof_offsets.txt b/crates/metal2vulkan/tests/air_input/cof_offsets.txt new file mode 100644 index 000000000..f089cba3e --- /dev/null +++ b/crates/metal2vulkan/tests/air_input/cof_offsets.txt @@ -0,0 +1,155 @@ +target triple = "air64_v28-apple-macosx26.0.0" +source_filename = "-" +; datalayout DataLayout { endian: Little, pointers: {0: PointerSpec { size_bits: 64, abi_bits: 64, pref_bits: 64, index_bits: 64 }}, ints: {1: AlignSpec { abi_bits: 8, pref_bits: 8 }, 8: AlignSpec { abi_bits: 8, pref_bits: 8 }, 16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }}, floats: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }}, vectors: {16: AlignSpec { abi_bits: 16, pref_bits: 16 }, 24: AlignSpec { abi_bits: 32, pref_bits: 32 }, 32: AlignSpec { abi_bits: 32, pref_bits: 32 }, 48: AlignSpec { abi_bits: 64, pref_bits: 64 }, 64: AlignSpec { abi_bits: 64, pref_bits: 64 }, 96: AlignSpec { abi_bits: 128, pref_bits: 128 }, 128: AlignSpec { abi_bits: 128, pref_bits: 128 }, 192: AlignSpec { abi_bits: 256, pref_bits: 256 }, 256: AlignSpec { abi_bits: 256, pref_bits: 256 }, 512: AlignSpec { abi_bits: 512, pref_bits: 512 }, 1024: AlignSpec { abi_bits: 1024, pref_bits: 1024 }}, aggregate: AlignSpec { abi_bits: 0, pref_bits: 64 }, native_ints: [8, 16, 32], stack_align_bits: None, alloca_space: 0, program_space: 0, globals_space: 0, mangling: None, fn_ptr_align: None, non_integral: [] } +%t3 = type <{ <4 x float> }> +%t6 = type %t3 (i32, ptr addrspace(2)) +%t8 = type %t3 (i32, i32, ptr addrspace(1)) +%t9 = type <4 x float> (<4 x float>, ptr addrspace(2)) +%t11 = type [2 x i32] +c5 = %t11 [27, 2] +c18 = <2 x i32> [0, 1] +c23 = <2 x i32> [2, 3] +c26 = <4 x i32> [0, 1, poison, poison] +c28 = <4 x float> [poison, poison, 0x0, 0x3F800000] +c29 = <4 x i32> [0, 1, 6, 7] + +define %t6 @f0 "cof_constant" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="64" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a1( align 16 dereferenceable(16) Ref nocapture "air-buffer-no-alias"="" ) { +bb0: + %i0 = load <4 x float>, %a1, align 16 + %i1 = shufflevector <2 x float> %i0, <4 x float> poison, <0, 1> + %i2 = icmp eq %a0, i32 1 + %i3 = select reassoc nnan ninf nsz arcp contract afn float %i2, float 0x3F800000, float 0x0 + %i4 = insertelement <2 x float> undef, %i3, i64 0 + %i5 = icmp eq %a0, i32 2 + %i6 = select reassoc nnan ninf nsz arcp contract afn float %i5, float 0x3F800000, float 0x0 + %i7 = insertelement %i4, %i6, i64 1 + %i8 = shufflevector <2 x float> %i0, <4 x float> poison, <2, 3> + %i9 = fmul reassoc nnan ninf nsz arcp contract afn <2 x float> %i8, %i7 + %i10 = fadd reassoc nnan ninf nsz arcp contract afn <2 x float> %i9, %i1 + %i11 = shufflevector <4 x float> %i10, <2 x float> poison, <0, 1, poison, poison> + %i12 = shufflevector <4 x float> %i11, <4 x float> c28, <0, 1, 6, 7> + %i13 = insertvalue %t3 undef %i12, 0 + ret %i13 +} + +define %t8 @f1 "cof_device" memory(Ref, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="64" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a2( Ref nocapture "air-buffer-no-alias"="" ) { +bb0: + %i0 = zext %a1 to i64 + %i1 = getelementptr inbounds <4 x float>, %a2, %i0 + %i2 = load <4 x float>, %i1, align 16 + %i3 = shufflevector <2 x float> %i2, <4 x float> poison, <0, 1> + %i4 = icmp eq %a0, i32 1 + %i5 = select reassoc nnan ninf nsz arcp contract afn float %i4, float 0x3F800000, float 0x0 + %i6 = insertelement <2 x float> undef, %i5, i64 0 + %i7 = icmp eq %a0, i32 2 + %i8 = select reassoc nnan ninf nsz arcp contract afn float %i7, float 0x3F800000, float 0x0 + %i9 = insertelement %i6, %i8, i64 1 + %i10 = shufflevector <2 x float> %i2, <4 x float> poison, <2, 3> + %i11 = fmul reassoc nnan ninf nsz arcp contract afn <2 x float> %i10, %i9 + %i12 = fadd reassoc nnan ninf nsz arcp contract afn <2 x float> %i11, %i3 + %i13 = shufflevector <4 x float> %i12, <2 x float> poison, <0, 1, poison, poison> + %i14 = shufflevector <4 x float> %i13, <4 x float> c28, <0, 1, 6, 7> + %i15 = insertvalue %t3 undef %i14, 0 + ret %i15 +} + +define %t9 @f2 "cof_flat" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="128" "no-builtins"="" "no-infs-fp-math"="true" "no-nans-fp-math"="true" "no-signed-zeros-fp-math"="true" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "unsafe-fp-math"="true" %a1( align 16 dereferenceable(16) Ref nocapture "air-buffer-no-alias"="" ) { +bb0: + %i0 = load <4 x float>, %a1, align 16 + ret %i0 +} +!md0 = !"SDK Version" +!md1 = !"wchar_size" +!md2 = !"frame-pointer" +!md3 = !"air.max_device_buffers" +!md4 = !"air.max_constant_buffers" +!md5 = !"air.max_threadgroup_buffers" +!md6 = !"air.max_textures" +!md7 = !"air.max_read_write_textures" +!md8 = !"air.max_samplers" +!md9 = !"air.position" +!md10 = !"air.arg_type_name" +!md11 = !"float4" +!md12 = !"air.arg_name" +!md13 = !"position" +!md14 = !"air.vertex_id" +!md15 = !"uint" +!md16 = !"vid" +!md17 = !"air.buffer" +!md18 = !"air.buffer_size" +!md19 = !"air.location_index" +!md20 = !"air.read" +!md21 = !"air.address_space" +!md22 = !"air.arg_type_size" +!md23 = !"air.arg_type_align_size" +!md24 = !"q" +!md25 = !"air.instance_id" +!md26 = !"iid" +!md27 = !"air.render_target" +!md28 = !"air.center" +!md29 = !"air.no_perspective" +!md30 = !"air.arg_unused" +!md31 = !"c" +!md32 = !"air.compile.denorms_disable" +!md33 = !"air.compile.fast_math_enable" +!md34 = !"air.compile.framebuffer_fetch_enable" +!md35 = !"Apple metal version 32023.922 (metalfe-32023.922.4)" +!md36 = !"Metal" +!md37 = !"air-alias-scope-arg(1)" +!md38 = !"omnipotent char" +!md39 = !"Simple C++ TBAA" +!md40 = i32 2 +!md41 = %t11 c5 +!md42 = i32 1 +!md43 = i32 4 +!md44 = i32 7 +!md45 = i32 31 +!md46 = i32 128 +!md47 = i32 8 +!md48 = i32 16 +!md49 = ptr addrspace(0) @f0 +!md50 = i32 0 +!md51 = ptr addrspace(0) @f1 +!md52 = ptr addrspace(0) @f2 +!md53 = i64 0 +!md54 = !{!md40, !md0, !md41} +!md55 = !{!md42, !md1, !md43} +!md56 = !{!md44, !md2, !md40} +!md57 = !{!md44, !md3, !md45} +!md58 = !{!md44, !md4, !md45} +!md59 = !{!md44, !md5, !md45} +!md60 = !{!md44, !md6, !md46} +!md61 = !{!md44, !md7, !md47} +!md62 = !{!md44, !md8, !md48} +!md63 = !{!md9, !md10, !md11, !md12, !md13} +!md64 = !{!md63} +!md65 = !{!md50, !md14, !md10, !md15, !md12, !md16} +!md66 = !{!md42, !md17, !md18, !md48, !md19, !md50, !md42, !md20, !md21, !md40, !md22, !md48, !md23, !md48, !md10, !md11, !md12, !md24} +!md67 = !{!md65, !md66} +!md68 = !{!md49, !md64, !md67} +!md69 = !{!md42, !md25, !md10, !md15, !md12, !md26} +!md70 = !{!md40, !md17, !md19, !md50, !md42, !md20, !md21, !md42, !md22, !md48, !md23, !md48, !md10, !md11, !md12, !md24} +!md71 = !{!md65, !md69, !md70} +!md72 = !{!md51, !md64, !md71} +!md73 = !{!md27, !md50, !md50, !md10, !md11} +!md74 = !{!md73} +!md75 = !{!md50, !md9, !md28, !md29, !md10, !md11, !md12, !md13, !md30} +!md76 = !{!md42, !md17, !md18, !md48, !md19, !md50, !md42, !md20, !md21, !md40, !md22, !md48, !md23, !md48, !md10, !md11, !md12, !md31} +!md77 = !{!md75, !md76} +!md78 = !{!md52, !md74, !md77} +!md79 = !{!md32} +!md80 = !{!md33} +!md81 = !{!md34} +!md82 = !{!md35} +!md83 = !{!md40, !md47, !md50} +!md84 = !{!md36, !md43, !md50, !md50} +!md85 = !{!md39} +!md86 = !{!md38, !md85, !md53} +!md87 = !{!md86, !md86, !md53} +!"llvm.module.flags" = !{!md54, !md55, !md56, !md57, !md58, !md59, !md60, !md61, !md62} +!"air.vertex" = !{!md68, !md72} +!"air.fragment" = !{!md78} +!"air.compile_options" = !{!md79, !md80, !md81} +!"llvm.ident" = !{!md82} +!"air.version" = !{!md83} +!"air.language_version" = !{!md84} diff --git a/crates/metal2vulkan/tests/golden_hashes.tsv b/crates/metal2vulkan/tests/golden_hashes.tsv index 25932984c..e0a2bd3a6 100644 --- a/crates/metal2vulkan/tests/golden_hashes.tsv +++ b/crates/metal2vulkan/tests/golden_hashes.tsv @@ -374,6 +374,12 @@ engine/cfit_tile_memory.air.ll d3be5ba913fa0fed cfit_tile_memory_shift aa3c64015 engine/cfit_tile_memory.ll 6eeab1e390477d87 cfit_tile_memory_add 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 943c688a73508222 engine/cfit_tile_memory.ll 6eeab1e390477d87 cfit_tile_memory_dump 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e 6c2a13cf64297e1e engine/cfit_tile_memory.ll 6eeab1e390477d87 cfit_tile_memory_shift aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be aa3c64015d6370be 86bc77038da6afb3 aa3c64015d6370be 86bc77038da6afb3 aa3c64015d6370be aa3c64015d6370be 86bc77038da6afb3 86bc77038da6afb3 86bc77038da6afb3 +engine/cof_offsets.air.ll 9be4e2302112b8ae cof_constant 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 2c0e44fc3667fe1a 2c0e44fc3667fe1a 2c0e44fc3667fe1a 2c0e44fc3667fe1a 6eb0837a3a69c7d2 1d93dfc314d1d870 6eb0837a3a69c7d2 1d93dfc314d1d870 2c0e44fc3667fe1a 2c0e44fc3667fe1a 1d93dfc314d1d870 1d93dfc314d1d870 1d93dfc314d1d870 +engine/cof_offsets.air.ll 9be4e2302112b8ae cof_device 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e +engine/cof_offsets.air.ll 9be4e2302112b8ae cof_flat 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 9daf6d12e973dc72 9daf6d12e973dc72 9daf6d12e973dc72 9daf6d12e973dc72 6249723375b4f3b0 15cfa75589079d69 6249723375b4f3b0 15cfa75589079d69 9daf6d12e973dc72 9daf6d12e973dc72 15cfa75589079d69 15cfa75589079d69 15cfa75589079d69 +engine/cof_offsets.ll 476a9cf0efe74ac1 cof_constant 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 6eb0837a3a69c7d2 2c0e44fc3667fe1a 2c0e44fc3667fe1a 2c0e44fc3667fe1a 2c0e44fc3667fe1a 6eb0837a3a69c7d2 1d93dfc314d1d870 6eb0837a3a69c7d2 1d93dfc314d1d870 2c0e44fc3667fe1a 2c0e44fc3667fe1a 1d93dfc314d1d870 1d93dfc314d1d870 1d93dfc314d1d870 +engine/cof_offsets.ll 476a9cf0efe74ac1 cof_device 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e 2974c6a9d64a566e +engine/cof_offsets.ll 476a9cf0efe74ac1 cof_flat 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 6249723375b4f3b0 9daf6d12e973dc72 9daf6d12e973dc72 9daf6d12e973dc72 9daf6d12e973dc72 6249723375b4f3b0 15cfa75589079d69 6249723375b4f3b0 15cfa75589079d69 9daf6d12e973dc72 9daf6d12e973dc72 15cfa75589079d69 15cfa75589079d69 15cfa75589079d69 engine/color_groups.air.ll 91affcfe19856f8a cg_counts 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d 60aba53ef9ac9b3d Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]} 20039e432b1a1587 Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]} engine/color_groups.air.ll 91affcfe19856f8a cg_cover d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f d94e90638b11972f engine/color_groups.air.ll 91affcfe19856f8a cg_depth 614b0f79953b6c67 614b0f79953b6c67 614b0f79953b6c67 614b0f79953b6c67 614b0f79953b6c67 614b0f79953b6c67 4f7a56b5b095bd4e 4f7a56b5b095bd4e 4f7a56b5b095bd4e 4f7a56b5b095bd4e 614b0f79953b6c67 b868f980f349b9f5 4f7a56b5b095bd4e 614b0f79953b6c67 614b0f79953b6c67 614b0f79953b6c67 Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]} 614b0f79953b6c67 Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]} diff --git a/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv b/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv index 784765765..31946a6f6 100644 --- a/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv +++ b/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv @@ -522,6 +522,12 @@ engine/cfit_tile_memory.air.ll cfit_tile_memory_shift ok ok ok ok ok ok ok ok ok engine/cfit_tile_memory.ll cfit_tile_memory_add ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/cfit_tile_memory.ll cfit_tile_memory_dump ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/cfit_tile_memory.ll cfit_tile_memory_shift ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/cof_offsets.air.ll cof_constant ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/cof_offsets.air.ll cof_device ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/cof_offsets.air.ll cof_flat ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/cof_offsets.ll cof_constant ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/cof_offsets.ll cof_device ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/cof_offsets.ll cof_flat ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/color_groups.air.ll cg_cover ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/color_groups.air.ll cg_five ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]} ok Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]} engine/color_groups.air.ll cg_seven ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]} ok Unsupported{InterfaceComponents; AnyOf[[Limit { limit: MaxFragmentOutputAttachments, required: 5, available: 4 }]]}