diff --git a/crates/metal2vulkan-runtime/src/degradation.rs b/crates/metal2vulkan-runtime/src/degradation.rs index 6f06960d4..2a19d3f48 100644 --- a/crates/metal2vulkan-runtime/src/degradation.rs +++ b/crates/metal2vulkan-runtime/src/degradation.rs @@ -2125,6 +2125,7 @@ degradations! { DeviceAnisotropicFilter = "device-anisotropic-filter"; DevicePointSize = "device-point-size"; ClippedCoverageSplit = "clipped-coverage-split"; + LoopedSampleOutputs = "looped-sample-outputs"; DeviceUnorm8LinearFilter = "device-unorm8-linear-filter"; HalfOutputFastMathBlend = "half-output-fast-math-blend"; /// Class: native device sampling. The device's own sampler answers the pipeline's diff --git a/crates/metal2vulkan-runtime/src/tests/degradation_codes.txt b/crates/metal2vulkan-runtime/src/tests/degradation_codes.txt index 30ed7a532..088f062d3 100644 --- a/crates/metal2vulkan-runtime/src/tests/degradation_codes.txt +++ b/crates/metal2vulkan-runtime/src/tests/degradation_codes.txt @@ -115,6 +115,7 @@ metal2vulkan-degrade-landed-visibility-results metal2vulkan-degrade-linear-attachment-clear-copies metal2vulkan-degrade-linear-attachment-copies metal2vulkan-degrade-linked-sampler-numbering +metal2vulkan-degrade-looped-sample-outputs metal2vulkan-degrade-memoryless-backed metal2vulkan-degrade-metal-level-below-host metal2vulkan-degrade-metal-level-not-macos diff --git a/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN b/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN index 4eb93c5a6..3dedc8c8e 100644 --- a/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN +++ b/crates/metal2vulkan-validation/fixtures/public/engine/TOOLCHAIN @@ -37,6 +37,7 @@ fixture color_groups_fetch: metal: Apple metal version 32023.921 (metalfe-32023. fixture con_fetch_coverage: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) fixture coverage_loop: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) fixture coverage_natural: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) +fixture coverage_outputs: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) fixture denormal_texels: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) fixture device_level: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) fixture dfl_float_denormals: metal: Apple metal version 32023.921 (metalfe-32023.921.6); macosx-sdk: 27.0 (26A425) diff --git a/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.air.ll b/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.air.ll new file mode 100644 index 000000000..c523537da --- /dev/null +++ b/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.air.ll @@ -0,0 +1,205 @@ +; Generated by scripts/regen-air-fixtures from coverage_outputs.metal (typed pointers; xcrun metal-as reassembles it). Do not edit. +; ModuleID = '-' +source_filename = "-" +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32" +target triple = "air64_v28-apple-macosx26.0.0" + +%"struct.metal::_atomic" = type { i32 } +%struct._texture_2d_ms_t = type opaque +%struct._sampler_t = type opaque + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +define <{ <4 x float> }> @cvo_vertex(i32 noundef %0) local_unnamed_addr #0 { + %2 = and i32 %0, 1 + %3 = tail call fast float @air.convert.f.f32.u.i32(i32 %2) #7 + %4 = insertelement <2 x float> undef, float %3, i64 0 + %5 = lshr i32 %0, 1 + %6 = tail call fast float @air.convert.f.f32.u.i32(i32 %5) #7 + %7 = insertelement <2 x float> %4, float %6, i64 1 + %8 = fmul fast <2 x float> %7, + %9 = fadd fast <2 x float> %8, + %10 = shufflevector <2 x float> %9, <2 x float> poison, <4 x i32> + %11 = shufflevector <4 x float> %10, <4 x float> , <4 x i32> + %12 = insertvalue <{ <4 x float> }> undef, <4 x float> %11, 0 + ret <{ <4 x float> }> %12 +} + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare float @air.convert.f.f32.u.i32(i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nounwind willreturn +define <4 x i32> @cvo_color(i32 noundef %0, <4 x float> noundef %1, %"struct.metal::_atomic" addrspace(1)* nocapture noundef "air-buffer-no-alias" %2, i32 addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %3) local_unnamed_addr #2 { + %5 = extractelement <4 x float> %1, i64 1 + %6 = tail call i32 @air.convert.u.i32.f.f32(float %5) #7 + %7 = load i32, i32 addrspace(2)* %3, align 4, !tbaa !39, !alias.scope !43, !noalias !46 + %8 = mul i32 %7, %6 + %9 = extractelement <4 x float> %1, i64 0 + %10 = tail call i32 @air.convert.u.i32.f.f32(float %9) #7 + %11 = add i32 %8, %10 + %12 = zext i32 %11 to i64 + %13 = getelementptr inbounds %"struct.metal::_atomic", %"struct.metal::_atomic" addrspace(1)* %2, i64 %12, i32 0 + %14 = tail call i32 @air.atomic.global.add.u.i32(i32 addrspace(1)* nocapture %13, i32 1, i32 0, i32 2, i1 true) #8 + %15 = insertelement <4 x i32> , i32 %14, i64 0 + %16 = insertelement <4 x i32> %15, i32 %0, i64 1 + ret <4 x i32> %16 +} + +; Function Attrs: mustprogress nofree nosync nounwind readnone willreturn +declare i32 @air.convert.u.i32.f.f32(float) local_unnamed_addr #1 + +; Function Attrs: mustprogress nounwind willreturn +define <{ <4 x i32>, i32 }> @cvo_masked(i32 noundef %0, <4 x float> noundef %1, %"struct.metal::_atomic" addrspace(1)* nocapture noundef "air-buffer-no-alias" %2, i32 addrspace(2)* nocapture noundef readonly align 4 dereferenceable(4) "air-buffer-no-alias" %3) local_unnamed_addr #2 { + %5 = extractelement <4 x float> %1, i64 1 + %6 = tail call i32 @air.convert.u.i32.f.f32(float %5) #7 + %7 = load i32, i32 addrspace(2)* %3, align 4, !tbaa !39, !alias.scope !48, !noalias !51 + %8 = mul i32 %7, %6 + %9 = extractelement <4 x float> %1, i64 0 + %10 = tail call i32 @air.convert.u.i32.f.f32(float %9) #7 + %11 = add i32 %8, %10 + %12 = zext i32 %11 to i64 + %13 = getelementptr inbounds %"struct.metal::_atomic", %"struct.metal::_atomic" addrspace(1)* %2, i64 %12, i32 0 + %14 = tail call i32 @air.atomic.global.add.u.i32(i32 addrspace(1)* nocapture %13, i32 1, i32 0, i32 2, i1 true) #8 + %15 = insertelement <4 x i32> , i32 %14, i64 0 + %16 = insertelement <4 x i32> %15, i32 %0, i64 1 + %17 = and i32 %14, 31 + %18 = shl nuw i32 1, %17 + %19 = insertvalue <{ <4 x i32>, i32 }> undef, <4 x i32> %16, 0 + %20 = insertvalue <{ <4 x i32>, i32 }> %19, i32 %18, 1 + ret <{ <4 x i32>, i32 }> %20 +} + +; Function Attrs: mustprogress nofree nounwind +define void @cvo_read(%struct._texture_2d_ms_t addrspace(1)* %0, i32 addrspace(1)* nocapture noundef writeonly "air-buffer-no-alias" %1, <2 x i32> noundef %2) local_unnamed_addr #3 { + %4 = tail call i32 @air.get_num_samples_texture_2d_ms(%struct._texture_2d_ms_t addrspace(1)* nocapture readonly %0) #9, !alias.scope !53, !noalias !56 + %5 = icmp eq i32 %4, 0 + br i1 %5, label %13, label %6 + +6: ; preds = %3 + %7 = extractelement <2 x i32> %2, i64 1 + %8 = tail call i32 @air.get_width_texture_2d_ms(%struct._texture_2d_ms_t addrspace(1)* nocapture readonly %0) #9, !alias.scope !53, !noalias !56 + %9 = mul i32 %8, %7 + %10 = extractelement <2 x i32> %2, i64 0 + %11 = add i32 %9, %10 + %12 = mul i32 %11, %4 + br label %14 + +13: ; preds = %14, %3 + ret void + +14: ; preds = %6, %14 + %15 = phi i32 [ 0, %6 ], [ %29, %14 ] + %16 = tail call %struct._sampler_t addrspace(2)* @air.get_read_sampler() #10 + %17 = tail call { <4 x i32>, i8 } @air.read_texture_2d_ms.u.v4i32(%struct._texture_2d_ms_t addrspace(1)* nocapture readonly %0, %struct._sampler_t addrspace(2)* %16, <2 x i32> %2, i32 %15, i32 1) #9 + %18 = extractvalue { <4 x i32>, i8 } %17, 0 + %19 = extractelement <4 x i32> %18, i64 3 + %20 = icmp eq i32 %19, 0 + %21 = extractelement <4 x i32> %18, i64 0 + %22 = extractelement <4 x i32> %18, i64 1 + %23 = shl i32 %22, 8 + %24 = or i32 %23, %21 + %25 = select i1 %20, i32 65535, i32 %24 + %26 = add i32 %15, %12 + %27 = zext i32 %26 to i64 + %28 = getelementptr inbounds i32, i32 addrspace(1)* %1, i64 %27 + store i32 %25, i32 addrspace(1)* %28, align 4, !tbaa !39, !alias.scope !56, !noalias !53 + %29 = add nuw i32 %15, 1 + %30 = icmp eq i32 %29, %4 + br i1 %30, label %13, label %14, !llvm.loop !58 +} + +; Function Attrs: mustprogress nounwind willreturn +declare i32 @air.atomic.global.add.u.i32(i32 addrspace(1)* nocapture, i32, i32, i32, i1) local_unnamed_addr #4 + +; Function Attrs: argmemonly mustprogress nofree nounwind readonly willreturn +declare i32 @air.get_num_samples_texture_2d_ms(%struct._texture_2d_ms_t addrspace(1)* nocapture readonly) local_unnamed_addr #5 + +; Function Attrs: inaccessiblememonly mustprogress nofree nounwind readonly willreturn +declare %struct._sampler_t addrspace(2)* @air.get_read_sampler() local_unnamed_addr #6 + +; Function Attrs: argmemonly mustprogress nofree nounwind readonly willreturn +declare { <4 x i32>, i8 } @air.read_texture_2d_ms.u.v4i32(%struct._texture_2d_ms_t addrspace(1)* nocapture readonly, %struct._sampler_t addrspace(2)*, <2 x i32>, i32, i32) local_unnamed_addr #5 + +; Function Attrs: argmemonly mustprogress nofree nounwind readonly willreturn +declare i32 @air.get_width_texture_2d_ms(%struct._texture_2d_ms_t addrspace(1)* nocapture readonly) local_unnamed_addr #5 + +attributes #0 = { mustprogress nofree nosync nounwind readnone willreturn "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "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" } +attributes #1 = { mustprogress nofree nosync nounwind readnone willreturn } +attributes #2 = { mustprogress nounwind willreturn "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" } +attributes #3 = { mustprogress nofree nounwind "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" } +attributes #4 = { mustprogress nounwind willreturn } +attributes #5 = { argmemonly mustprogress nofree nounwind readonly willreturn } +attributes #6 = { inaccessiblememonly mustprogress nofree nounwind readonly willreturn } +attributes #7 = { nounwind readnone willreturn } +attributes #8 = { nounwind willreturn } +attributes #9 = { argmemonly nounwind readonly willreturn } +attributes #10 = { inaccessiblememonly nounwind readonly willreturn } + +!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} +!air.vertex = !{!9} +!air.fragment = !{!14, !23} +!air.kernel = !{!27} +!air.compile_options = !{!33, !34, !35} +!llvm.ident = !{!36} +!air.version = !{!37} +!air.language_version = !{!38} + +!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]} +!1 = !{i32 1, !"wchar_size", i32 4} +!2 = !{i32 7, !"frame-pointer", i32 2} +!3 = !{i32 7, !"air.max_device_buffers", i32 31} +!4 = !{i32 7, !"air.max_constant_buffers", i32 31} +!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31} +!6 = !{i32 7, !"air.max_textures", i32 128} +!7 = !{i32 7, !"air.max_read_write_textures", i32 8} +!8 = !{i32 7, !"air.max_samplers", i32 16} +!9 = !{<{ <4 x float> }> (i32)* @cvo_vertex, !10, !12} +!10 = !{!11} +!11 = !{!"air.position", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"} +!12 = !{!13} +!13 = !{i32 0, !"air.vertex_id", !"air.arg_type_name", !"uint", !"air.arg_name", !"id"} +!14 = !{<4 x i32> (i32, <4 x float>, %"struct.metal::_atomic" addrspace(1)*, i32 addrspace(2)*)* @cvo_color, !15, !17} +!15 = !{!16} +!16 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"uint4"} +!17 = !{!18, !19, !20, !22} +!18 = !{i32 0, !"air.sample_mask_in", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"} +!19 = !{i32 1, !"air.position", !"air.center", !"air.no_perspective", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"} +!20 = !{i32 2, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.struct_type_info", !21, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"metal::_atomic", !"air.arg_name", !"runs"} +!21 = !{i32 0, i32 4, i32 0, !"uint", !"__s"} +!22 = !{i32 3, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"width"} +!23 = !{<{ <4 x i32>, i32 }> (i32, <4 x float>, %"struct.metal::_atomic" addrspace(1)*, i32 addrspace(2)*)* @cvo_masked, !24, !17} +!24 = !{!25, !26} +!25 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"uint4", !"air.arg_name", !"color"} +!26 = !{!"air.sample_mask", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"} +!27 = !{void (%struct._texture_2d_ms_t addrspace(1)*, i32 addrspace(1)*, <2 x i32>)* @cvo_read, !28, !29} +!28 = !{} +!29 = !{!30, !31, !32} +!30 = !{i32 0, !"air.texture", !"air.location_index", i32 0, i32 1, !"air.read", !"air.arg_type_name", !"texture2d_ms", !"air.arg_name", !"target"} +!31 = !{i32 1, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"out"} +!32 = !{i32 2, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint2", !"air.arg_name", !"g"} +!33 = !{!"air.compile.denorms_disable"} +!34 = !{!"air.compile.fast_math_enable"} +!35 = !{!"air.compile.framebuffer_fetch_enable"} +!36 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"} +!37 = !{i32 2, i32 8, i32 0} +!38 = !{!"Metal", i32 4, i32 0, i32 0} +!39 = !{!40, !40, i64 0} +!40 = !{!"int", !41, i64 0} +!41 = !{!"omnipotent char", !42, i64 0} +!42 = !{!"Simple C++ TBAA"} +!43 = !{!44} +!44 = distinct !{!44, !45, !"air-alias-scope-arg(3)"} +!45 = distinct !{!45, !"air-alias-scopes(cvo_color)"} +!46 = !{!47} +!47 = distinct !{!47, !45, !"air-alias-scope-arg(2)"} +!48 = !{!49} +!49 = distinct !{!49, !50, !"air-alias-scope-arg(3)"} +!50 = distinct !{!50, !"air-alias-scopes(cvo_masked)"} +!51 = !{!52} +!52 = distinct !{!52, !50, !"air-alias-scope-arg(2)"} +!53 = !{!54} +!54 = distinct !{!54, !55, !"air-alias-scope-textures"} +!55 = distinct !{!55, !"air-alias-scopes(cvo_read)"} +!56 = !{!57} +!57 = distinct !{!57, !55, !"air-alias-scope-arg(1)"} +!58 = distinct !{!58, !59} +!59 = !{!"llvm.loop.mustprogress"} diff --git a/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.ll b/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.ll new file mode 100644 index 000000000..a426be4ba --- /dev/null +++ b/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.ll @@ -0,0 +1,203 @@ +; Generated by scripts/regen-air-fixtures from coverage_outputs.metal (llvm-dis of coverage_outputs.air). Do not edit. +; ModuleID = '' +source_filename = "-" +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v16:16:16-v24:32:32-v32:32:32-v48:64:64-v64:64:64-v96:128:128-v128:128:128-v192:256:256-v256:256:256-v512:512:512-v1024:1024:1024-n8:16:32" +target triple = "air64_v28-apple-macosx26.0.0" + +%"struct.metal::_atomic" = type { i32 } + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +define <{ <4 x float> }> @cvo_vertex(i32 noundef %0) local_unnamed_addr #0 { + %2 = and i32 %0, 1 + %3 = tail call fast float @air.convert.f.f32.u.i32(i32 %2) #7 + %4 = insertelement <2 x float> undef, float %3, i64 0 + %5 = lshr i32 %0, 1 + %6 = tail call fast float @air.convert.f.f32.u.i32(i32 %5) #7 + %7 = insertelement <2 x float> %4, float %6, i64 1 + %8 = fmul fast <2 x float> %7, splat (float 2.000000e+00) + %9 = fadd fast <2 x float> %8, splat (float -1.000000e+00) + %10 = shufflevector <2 x float> %9, <2 x float> poison, <4 x i32> + %11 = shufflevector <4 x float> %10, <4 x float> , <4 x i32> + %12 = insertvalue <{ <4 x float> }> undef, <4 x float> %11, 0 + ret <{ <4 x float> }> %12 +} + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare float @air.convert.f.f32.u.i32(i32) local_unnamed_addr #1 + +; Function Attrs: mustprogress nounwind willreturn +define <4 x i32> @cvo_color(i32 noundef %0, <4 x float> noundef %1, ptr addrspace(1) noundef captures(none) "air-buffer-no-alias" %2, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %3) local_unnamed_addr #2 { + %5 = extractelement <4 x float> %1, i64 1 + %6 = tail call i32 @air.convert.u.i32.f.f32(float %5) #7 + %7 = load i32, ptr addrspace(2) %3, align 4, !tbaa !39, !alias.scope !43, !noalias !46 + %8 = mul i32 %7, %6 + %9 = extractelement <4 x float> %1, i64 0 + %10 = tail call i32 @air.convert.u.i32.f.f32(float %9) #7 + %11 = add i32 %8, %10 + %12 = zext i32 %11 to i64 + %13 = getelementptr inbounds %"struct.metal::_atomic", ptr addrspace(1) %2, i64 %12, i32 0 + %14 = tail call i32 @air.atomic.global.add.u.i32(ptr addrspace(1) captures(none) %13, i32 1, i32 0, i32 2, i1 true) #8 + %15 = insertelement <4 x i32> , i32 %14, i64 0 + %16 = insertelement <4 x i32> %15, i32 %0, i64 1 + ret <4 x i32> %16 +} + +; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none) +declare i32 @air.convert.u.i32.f.f32(float) local_unnamed_addr #1 + +; Function Attrs: mustprogress nounwind willreturn +define <{ <4 x i32>, i32 }> @cvo_masked(i32 noundef %0, <4 x float> noundef %1, ptr addrspace(1) noundef captures(none) "air-buffer-no-alias" %2, ptr addrspace(2) noundef readonly align 4 captures(none) dereferenceable(4) "air-buffer-no-alias" %3) local_unnamed_addr #2 { + %5 = extractelement <4 x float> %1, i64 1 + %6 = tail call i32 @air.convert.u.i32.f.f32(float %5) #7 + %7 = load i32, ptr addrspace(2) %3, align 4, !tbaa !39, !alias.scope !48, !noalias !51 + %8 = mul i32 %7, %6 + %9 = extractelement <4 x float> %1, i64 0 + %10 = tail call i32 @air.convert.u.i32.f.f32(float %9) #7 + %11 = add i32 %8, %10 + %12 = zext i32 %11 to i64 + %13 = getelementptr inbounds %"struct.metal::_atomic", ptr addrspace(1) %2, i64 %12, i32 0 + %14 = tail call i32 @air.atomic.global.add.u.i32(ptr addrspace(1) captures(none) %13, i32 1, i32 0, i32 2, i1 true) #8 + %15 = insertelement <4 x i32> , i32 %14, i64 0 + %16 = insertelement <4 x i32> %15, i32 %0, i64 1 + %17 = and i32 %14, 31 + %18 = shl nuw i32 1, %17 + %19 = insertvalue <{ <4 x i32>, i32 }> undef, <4 x i32> %16, 0 + %20 = insertvalue <{ <4 x i32>, i32 }> %19, i32 %18, 1 + ret <{ <4 x i32>, i32 }> %20 +} + +; Function Attrs: mustprogress nofree nounwind +define void @cvo_read(ptr addrspace(1) %0, ptr addrspace(1) noundef writeonly captures(none) "air-buffer-no-alias" %1, <2 x i32> noundef %2) local_unnamed_addr #3 { + %4 = tail call i32 @air.get_num_samples_texture_2d_ms(ptr addrspace(1) readonly captures(none) %0) #9, !alias.scope !53, !noalias !56 + %5 = icmp eq i32 %4, 0 + br i1 %5, label %13, label %6 + +6: ; preds = %3 + %7 = extractelement <2 x i32> %2, i64 1 + %8 = tail call i32 @air.get_width_texture_2d_ms(ptr addrspace(1) readonly captures(none) %0) #9, !alias.scope !53, !noalias !56 + %9 = mul i32 %8, %7 + %10 = extractelement <2 x i32> %2, i64 0 + %11 = add i32 %9, %10 + %12 = mul i32 %11, %4 + br label %14 + +13: ; preds = %14, %3 + ret void + +14: ; preds = %14, %6 + %15 = phi i32 [ 0, %6 ], [ %29, %14 ] + %16 = tail call ptr addrspace(2) @air.get_read_sampler() #10 + %17 = tail call { <4 x i32>, i8 } @air.read_texture_2d_ms.u.v4i32(ptr addrspace(1) readonly captures(none) %0, ptr addrspace(2) %16, <2 x i32> %2, i32 %15, i32 1) #9 + %18 = extractvalue { <4 x i32>, i8 } %17, 0 + %19 = extractelement <4 x i32> %18, i64 3 + %20 = icmp eq i32 %19, 0 + %21 = extractelement <4 x i32> %18, i64 0 + %22 = extractelement <4 x i32> %18, i64 1 + %23 = shl i32 %22, 8 + %24 = or i32 %23, %21 + %25 = select i1 %20, i32 65535, i32 %24 + %26 = add i32 %15, %12 + %27 = zext i32 %26 to i64 + %28 = getelementptr inbounds i32, ptr addrspace(1) %1, i64 %27 + store i32 %25, ptr addrspace(1) %28, align 4, !tbaa !39, !alias.scope !56, !noalias !53 + %29 = add nuw i32 %15, 1 + %30 = icmp eq i32 %29, %4 + br i1 %30, label %13, label %14, !llvm.loop !58 +} + +; Function Attrs: mustprogress nounwind willreturn +declare i32 @air.atomic.global.add.u.i32(ptr addrspace(1) captures(none), i32, i32, i32, i1) local_unnamed_addr #4 + +; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) +declare i32 @air.get_num_samples_texture_2d_ms(ptr addrspace(1) readonly captures(none)) local_unnamed_addr #5 + +; Function Attrs: mustprogress nofree nounwind willreturn memory(inaccessiblemem: read) +declare ptr addrspace(2) @air.get_read_sampler() local_unnamed_addr #6 + +; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) +declare { <4 x i32>, i8 } @air.read_texture_2d_ms.u.v4i32(ptr addrspace(1) readonly captures(none), ptr addrspace(2), <2 x i32>, i32, i32) local_unnamed_addr #5 + +; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read) +declare i32 @air.get_width_texture_2d_ms(ptr addrspace(1) readonly captures(none)) local_unnamed_addr #5 + +attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(none) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "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" } +attributes #1 = { mustprogress nofree nosync nounwind willreturn memory(none) } +attributes #2 = { mustprogress nounwind willreturn "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" } +attributes #3 = { mustprogress nofree nounwind "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" } +attributes #4 = { mustprogress nounwind willreturn } +attributes #5 = { mustprogress nofree nounwind willreturn memory(argmem: read) } +attributes #6 = { mustprogress nofree nounwind willreturn memory(inaccessiblemem: read) } +attributes #7 = { nounwind willreturn memory(none) } +attributes #8 = { nounwind willreturn } +attributes #9 = { nounwind willreturn memory(argmem: read) } +attributes #10 = { nounwind willreturn memory(inaccessiblemem: read) } + +!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} +!air.vertex = !{!9} +!air.fragment = !{!14, !23} +!air.kernel = !{!27} +!air.compile_options = !{!33, !34, !35} +!llvm.ident = !{!36} +!air.version = !{!37} +!air.language_version = !{!38} + +!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 27, i32 0]} +!1 = !{i32 1, !"wchar_size", i32 4} +!2 = !{i32 7, !"frame-pointer", i32 2} +!3 = !{i32 7, !"air.max_device_buffers", i32 31} +!4 = !{i32 7, !"air.max_constant_buffers", i32 31} +!5 = !{i32 7, !"air.max_threadgroup_buffers", i32 31} +!6 = !{i32 7, !"air.max_textures", i32 128} +!7 = !{i32 7, !"air.max_read_write_textures", i32 8} +!8 = !{i32 7, !"air.max_samplers", i32 16} +!9 = !{ptr @cvo_vertex, !10, !12} +!10 = !{!11} +!11 = !{!"air.position", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"} +!12 = !{!13} +!13 = !{i32 0, !"air.vertex_id", !"air.arg_type_name", !"uint", !"air.arg_name", !"id"} +!14 = !{ptr @cvo_color, !15, !17} +!15 = !{!16} +!16 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"uint4"} +!17 = !{!18, !19, !20, !22} +!18 = !{i32 0, !"air.sample_mask_in", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"} +!19 = !{i32 1, !"air.position", !"air.center", !"air.no_perspective", !"air.arg_type_name", !"float4", !"air.arg_name", !"position"} +!20 = !{i32 2, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.struct_type_info", !21, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"metal::_atomic", !"air.arg_name", !"runs"} +!21 = !{i32 0, i32 4, i32 0, !"uint", !"__s"} +!22 = !{i32 3, !"air.buffer", !"air.buffer_size", i32 4, !"air.location_index", i32 1, i32 1, !"air.read", !"air.address_space", i32 2, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"width"} +!23 = !{ptr @cvo_masked, !24, !17} +!24 = !{!25, !26} +!25 = !{!"air.render_target", i32 0, i32 0, !"air.arg_type_name", !"uint4", !"air.arg_name", !"color"} +!26 = !{!"air.sample_mask", !"air.arg_type_name", !"uint", !"air.arg_name", !"mask"} +!27 = !{ptr @cvo_read, !28, !29} +!28 = !{} +!29 = !{!30, !31, !32} +!30 = !{i32 0, !"air.texture", !"air.location_index", i32 0, i32 1, !"air.read", !"air.arg_type_name", !"texture2d_ms", !"air.arg_name", !"target"} +!31 = !{i32 1, !"air.buffer", !"air.location_index", i32 0, i32 1, !"air.read_write", !"air.address_space", i32 1, !"air.arg_type_size", i32 4, !"air.arg_type_align_size", i32 4, !"air.arg_type_name", !"uint", !"air.arg_name", !"out"} +!32 = !{i32 2, !"air.thread_position_in_grid", !"air.arg_type_name", !"uint2", !"air.arg_name", !"g"} +!33 = !{!"air.compile.denorms_disable"} +!34 = !{!"air.compile.fast_math_enable"} +!35 = !{!"air.compile.framebuffer_fetch_enable"} +!36 = !{!"Apple metal version 32023.921 (metalfe-32023.921.6)"} +!37 = !{i32 2, i32 8, i32 0} +!38 = !{!"Metal", i32 4, i32 0, i32 0} +!39 = !{!40, !40, i64 0} +!40 = !{!"int", !41, i64 0} +!41 = !{!"omnipotent char", !42, i64 0} +!42 = !{!"Simple C++ TBAA"} +!43 = !{!44} +!44 = distinct !{!44, !45, !"air-alias-scope-arg(3)"} +!45 = distinct !{!45, !"air-alias-scopes(cvo_color)"} +!46 = !{!47} +!47 = distinct !{!47, !45, !"air-alias-scope-arg(2)"} +!48 = !{!49} +!49 = distinct !{!49, !50, !"air-alias-scope-arg(3)"} +!50 = distinct !{!50, !"air-alias-scopes(cvo_masked)"} +!51 = !{!52} +!52 = distinct !{!52, !50, !"air-alias-scope-arg(2)"} +!53 = !{!54} +!54 = distinct !{!54, !55, !"air-alias-scope-textures"} +!55 = distinct !{!55, !"air-alias-scopes(cvo_read)"} +!56 = !{!57} +!57 = distinct !{!57, !55, !"air-alias-scope-arg(1)"} +!58 = distinct !{!58, !59} +!59 = !{!"llvm.loop.mustprogress"} diff --git a/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.metal b/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.metal new file mode 100644 index 000000000..f3329e3c8 --- /dev/null +++ b/crates/metal2vulkan-validation/fixtures/public/engine/coverage_outputs.metal @@ -0,0 +1,55 @@ +// The functions of the coverage outputs lane +// (validation/src/runtime_lane/coverage_outputs.rs), our own MSL: fragment functions that read +// [[sample_mask]], write memory, so that Metal runs them once per covered sample, and return a +// color, one also a sample mask. Each counts its runs per pixel in buffer 0 and returns the count +// before its run and the coverage it read. The triangle covers the lower left half of the target +// inside the viewport, so no clipping splits it. +#include +using namespace metal; + +struct Position { + float4 position [[position]]; +}; + +vertex Position cvo_vertex(uint id [[vertex_id]]) { + float2 p = float2(id & 1, id >> 1); + Position out; + out.position = float4(p * 2.0 - 1.0, 0.5, 1.0); + return out; +} + +fragment uint4 cvo_color(uint mask [[sample_mask]], float4 position [[position]], + device atomic_uint *runs [[buffer(0)]], + constant uint &width [[buffer(1)]]) { + uint pixel = uint(position.y) * width + uint(position.x); + uint run = atomic_fetch_add_explicit(&runs[pixel], 1u, memory_order_relaxed); + return uint4(run, mask, 0u, 1u); +} + +struct Masked { + uint4 color [[color(0)]]; + uint mask [[sample_mask]]; +}; + +// Each run keeps the sample whose index is its count. +fragment Masked cvo_masked(uint mask [[sample_mask]], float4 position [[position]], + device atomic_uint *runs [[buffer(0)]], + constant uint &width [[buffer(1)]]) { + uint pixel = uint(position.y) * width + uint(position.x); + uint run = atomic_fetch_add_explicit(&runs[pixel], 1u, memory_order_relaxed); + Masked out; + out.color = uint4(run, mask, 0u, 1u); + out.mask = 1u << run; + return out; +} + +// Each sample's texel of a multisampled target, (red, green) packed as red | green << 8, or +// 0xffff where nothing wrote it (alpha 0). +kernel void cvo_read(texture2d_ms target [[texture(0)]], device uint *out [[buffer(0)]], + uint2 g [[thread_position_in_grid]]) { + uint n = target.get_num_samples(); + for (uint s = 0; s < n; s++) { + uint4 c = target.read(g, s); + out[(g.y * target.get_width() + g.x) * n + s] = c.a == 0u ? 0xffffu : (c.r | c.g << 8); + } +} diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index 4097f9c7f..a7dd5e853 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -9f49e999bf3c63985dde7bb7e0811e1e7260a1761dc7b51fe45b60bf78598417 +1fca884dfd9a1082d0db28a0f0b69e64375612fc185b85dac2b71b49901086bc diff --git a/crates/metal2vulkan-validation/src/observation_contract/comparison.rs b/crates/metal2vulkan-validation/src/observation_contract/comparison.rs index 4ca79e520..56c1f1c18 100644 --- a/crates/metal2vulkan-validation/src/observation_contract/comparison.rs +++ b/crates/metal2vulkan-validation/src/observation_contract/comparison.rs @@ -329,6 +329,7 @@ pub fn allowance(note: PrecisionNote) -> Allowance { | N::DeviceAnisotropicFilter | N::DevicePointSize | N::ClippedCoverageSplit + | N::LoopedSampleOutputs | N::DeviceUnorm8LinearFilter | N::HalfOutputFastMathBlend | N::DeviceSampling diff --git a/crates/metal2vulkan-validation/src/runtime_lane.rs b/crates/metal2vulkan-validation/src/runtime_lane.rs index a990c1e34..e470388d4 100644 --- a/crates/metal2vulkan-validation/src/runtime_lane.rs +++ b/crates/metal2vulkan-validation/src/runtime_lane.rs @@ -320,6 +320,8 @@ mod coverage_alpha_rounding; #[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))] mod coverage_loop; #[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))] +mod coverage_outputs; +#[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))] mod creation_times; #[cfg(all(test, any(m2v_gpu, m2v_cpu_icd)))] mod cross_class_reads; diff --git a/crates/metal2vulkan-validation/src/runtime_lane/coverage_outputs.rs b/crates/metal2vulkan-validation/src/runtime_lane/coverage_outputs.rs new file mode 100644 index 000000000..223f9e38b --- /dev/null +++ b/crates/metal2vulkan-validation/src/runtime_lane/coverage_outputs.rs @@ -0,0 +1,260 @@ +//! Fragment functions that read `[[sample_mask]]`, write memory and return a color, on the device +//! the cfg selects, under the validation layer, over the owned fixture `coverage_outputs`. +//! +//! Metal runs such a function once per covered sample, lowest sample first, each run reading the +//! pixel's coverage, and writes each covered sample's color from that sample's own run, keeping +//! the sample only where the run's `[[sample_mask]]` output has its bit (our probe `co` on an +//! Apple M3 Max under macOS 27.0.1, at 2 and 4 samples, whole and partly covered pixels). +//! +//! Each pass draws the fixture's triangle, the lower left half of a 16 x 16 target inside the +//! viewport, into an `RGBA8Uint` target cleared to 0 at 2 and 4 samples, each run returning the +//! count of the pixel's runs before it (red) and the coverage it read (green), and reads each +//! sample back. Every device writes exactly the samples Metal writes and runs the function once +//! per covered sample, each run reading the pixel's coverage. A device that runs the function per +//! sample itself (MoltenVK on Apple's GPU, as written) writes each sample its own run's color, as +//! Metal; elsewhere the function runs once per pixel and its body once per covered sample, and +//! every written sample takes the last pass's color, announced as `looped-sample-outputs`. A +//! device that refuses the pipeline for what it lacks, or for its rasterizer's split of a clipped +//! triangle's fragments (lavapipe), says so and draws nothing. + +use super::degrade_notices::counts; +use super::{buffer_with, read_buffer, validated_device_with, Messages, ScratchCache, WAIT}; +use crate::air_library::AirLibrary; +use crate::gpu::TEST_DEVICE; +use metal2vulkan::error::Feature; +use metal2vulkan::metal::{PixelFormat, PrimitiveType, TextureType, TextureUsage}; +use metal2vulkan::pipeline::{ + ColorAttachmentDescriptor, ComputePipelineDescriptor, RenderPipelineDescriptor, StageSource, +}; +use metal2vulkan_devtools::{engine_dir, llvm_assemble}; +use metal2vulkan_runtime::{ + ClearColor, CommandBufferStatus, CommandQueue, Degradation, Device, Error, Library, LoadAction, + PipelineOptions, RenderPassDescriptor, ResourceOptions, Size, StoreAction, Texture, + TextureDescriptor, +}; + +/// The target's side. +const SIDE: u64 = 16; + +/// The pixels of the target. +const PIXELS: usize = (SIDE * SIDE) as usize; + +/// A sample nothing wrote, as `cvo_read` reads it. +const UNWRITTEN: u32 = 0xffff; + +struct Lane { + device: Device, + queue: CommandQueue, + library: Library, +} + +/// What a draw left: each pixel's samples as `cvo_read` reads them, each pixel's runs, and +/// whether the pipeline announced `looped-sample-outputs`. +struct Drawn { + samples: Vec, + runs: Vec, + looped: bool, +} + +impl Lane { + fn new(messages: &Messages, cache: &ScratchCache) -> Lane { + let device = validated_device_with(TEST_DEVICE, messages, cache.path(), |_| {}).unwrap(); + let bitcode = llvm_assemble(&engine_dir().join("coverage_outputs.ll")).unwrap(); + Lane { + queue: device.new_command_queue().unwrap(), + library: device.new_library_with_air(&bitcode).unwrap(), + device, + } + } + + fn function(&self, name: &str) -> StageSource { + StageSource::Function( + self.library + .new_function_with_name(name) + .unwrap() + .function_descriptor(), + ) + } + + /// The draw of `fragment` at `samples`, its notices taken from `messages`; `None` where the + /// device refuses the pipeline for what it lacks or for its rasterizer's split of a clipped + /// triangle's fragments (lavapipe), never for the coverage at sample rate. + fn draw(&self, messages: &Messages, fragment: &str, samples: u32) -> Option { + let what = format!("{fragment} at {samples}"); + let mut d = RenderPipelineDescriptor::new(self.function("cvo_vertex")); + d.fragment = Some(self.function(fragment)); + d.color_attachments[0] = Some(ColorAttachmentDescriptor::new(PixelFormat::RGBA8Uint)); + d.raster_sample_count = samples; + let pipeline = match self + .device + .new_render_pipeline_state(&d, &PipelineOptions::default()) + { + Ok(p) => p, + Err(Error::Unsupported(u)) if u.feature != Feature::PixelCoverageAtSampleRate => { + println!("{}: {what} refused: {u:?}", self.device.name()); + return None; + } + Err(e) => panic!("{what}: {e}"), + }; + let mut t = TextureDescriptor::texture_2d(PixelFormat::RGBA8Uint, SIDE, SIDE, false); + t.usage = TextureUsage::RENDER_TARGET | TextureUsage::SHADER_READ; + t.resource_options = ResourceOptions::private(); + t.texture_type = TextureType::Type2DMultisample; + t.sample_count = u64::from(samples); + let target = self.device.new_texture(&t).unwrap(); + let runs = buffer_with(&self.device, &[0; 4 * PIXELS]).unwrap(); + let width = buffer_with(&self.device, &(SIDE as u32).to_le_bytes()).unwrap(); + let mut pass = RenderPassDescriptor::new(); + let a = &mut pass.color_attachments[0]; + a.texture = Some(target.clone()); + a.load_action = LoadAction::Clear; + a.clear_color = ClearColor::new(0.0, 0.0, 0.0, 0.0); + a.store_action = StoreAction::Store; + let command_buffer = self.queue.command_buffer().unwrap(); + let mut e = command_buffer.render_command_encoder(&pass).unwrap(); + e.set_render_pipeline_state(&pipeline).unwrap(); + e.set_fragment_buffer(Some(&runs), 0, 0).unwrap(); + e.set_fragment_buffer(Some(&width), 0, 1).unwrap(); + e.draw_primitives(PrimitiveType::Triangle, 0, 3, 1, 0) + .unwrap(); + e.end_encoding().unwrap(); + command_buffer.commit().unwrap(); + command_buffer.wait_until_completed_for(WAIT).unwrap(); + assert_eq!(command_buffer.error(), None, "{what}"); + // The pipeline's notices, announced where it, or its variant for the pass, was made. + let looped = + counts(&messages.take_notices()).contains_key(&Degradation::LoopedSampleOutputs); + let words = |bytes: Vec| -> Vec { + bytes + .as_chunks::<4>() + .0 + .iter() + .map(|b| u32::from_le_bytes(*b)) + .collect() + }; + Some(Drawn { + samples: words(self.read(&target, samples)), + runs: words(read_buffer(&runs, 0, 4 * PIXELS as u64).unwrap()), + looped, + }) + } + + /// Each sample of `target` as `cvo_read` reads it, pixel by pixel. + fn read(&self, target: &Texture, samples: u32) -> Vec { + let state = self + .device + .new_compute_pipeline_state( + &ComputePipelineDescriptor::new(self.function("cvo_read")), + &PipelineOptions::default(), + ) + .unwrap(); + let length = 4 * PIXELS as u64 * u64::from(samples); + let out = buffer_with(&self.device, &vec![0xee; length as usize]).unwrap(); + let command_buffer = self.queue.command_buffer().unwrap(); + let mut encoder = command_buffer.compute_command_encoder().unwrap(); + encoder.set_compute_pipeline_state(&state).unwrap(); + encoder.set_buffer(Some(&out), 0, 0).unwrap(); + encoder.set_texture(Some(target), 0).unwrap(); + encoder + .dispatch_threads(Size::new(SIDE, SIDE, 1), Size::new(8, 8, 1)) + .unwrap(); + encoder.end_encoding().unwrap(); + command_buffer.commit().unwrap(); + command_buffer.wait_until_completed_for(WAIT).unwrap(); + assert_eq!(command_buffer.status(), CommandBufferStatus::Completed); + read_buffer(&out, 0, length).unwrap() + } +} + +/// The rank of sample `s` among the set bits of `mask`: the count of its runs before its own, +/// lowest sample first. +fn rank(mask: u32, s: u32) -> u32 { + (mask & ((1 << s) - 1)).count_ones() +} + +/// `cvo_color` and `cvo_masked` at 2 and 4 samples write the samples Metal writes, run once per +/// covered sample reading the pixel's coverage, and write each sample its own run's color where +/// the device runs them per sample (no `looped-sample-outputs`), else the last pass's. +#[test] +fn coverage_reading_color_writers_write_the_samples_metal_writes() { + let messages = Messages::default(); + let cache = ScratchCache::new().unwrap(); + let lane = Lane::new(&messages, &cache); + let name = lane.device.name().to_owned(); + let (mut whole, mut partial) = (0, 0); + for samples in [2u32, 4] { + let all = (1u32 << samples) - 1; + for (fragment, masked) in [("cvo_color", false), ("cvo_masked", true)] { + let made = lane.draw(&messages, fragment, samples); + // MoltenVK on Apple's GPU runs a memory writer per sample itself, and makes both. + let apple = name.starts_with("Apple"); + let Some(drawn) = made else { + assert!(!apple, "{name}: {fragment} at {samples} refused"); + continue; + }; + if apple { + assert!(!drawn.looped, "{name}: {fragment} at {samples} looped"); + } + println!( + "{name}: {fragment} at {samples}: {}", + if drawn.looped { + "looped, the last pass's color" + } else { + "run per sample" + } + ); + for px in 0..PIXELS { + let what = format!("{name}: {fragment} at {samples}, pixel {px}"); + let texels = &drawn.samples[px * samples as usize..][..samples as usize]; + let runs = drawn.runs[px]; + // The coverage the runs read, from any written sample (every run reads the same). + let written: Vec = (0..samples) + .filter(|&s| texels[s as usize] != UNWRITTEN) + .collect(); + let Some(&first) = written.first() else { + // Uncovered, or covered with every sample's mask output dropping its bit. + if !masked { + assert_eq!(runs, 0, "{what}: runs without a written sample"); + } + continue; + }; + let coverage = texels[first as usize] >> 8; + assert_ne!(coverage, 0, "{what}"); + assert_eq!(coverage & !all, 0, "{what}: coverage {coverage:#x}"); + assert_eq!(runs, coverage.count_ones(), "{what}: runs"); + let kept: Vec = (0..samples) + .filter(|&s| coverage & (1 << s) != 0) + .filter(|&s| !masked || rank(coverage, s) == s) + .collect(); + assert_eq!( + written, kept, + "{what}: written samples, coverage {coverage:#x}" + ); + for &s in &written { + let texel = texels[s as usize]; + let run = if drawn.looped { + coverage.count_ones() - 1 + } else { + rank(coverage, s) + }; + assert_eq!(texel, run | coverage << 8, "{what}: sample {s}"); + } + if coverage == all { + whole += 1; + } else { + partial += 1; + } + } + } + } + println!("{name}: {whole} whole pixels, {partial} partly covered"); + if whole + partial > 0 { + assert!(whole > 0 && partial > 0, "{whole} whole, {partial} partial"); + } + drop(lane); + let reported = messages.take(); + assert!( + reported.is_empty(), + "the validation layer reported: {reported:#?}" + ); +} diff --git a/crates/metal2vulkan/src/cache/codec.rs b/crates/metal2vulkan/src/cache/codec.rs index 845b4162f..554c80503 100644 --- a/crates/metal2vulkan/src/cache/codec.rs +++ b/crates/metal2vulkan/src/cache/codec.rs @@ -1137,7 +1137,7 @@ codec_enum! { TextureWriteRoundingMode { TowardZero, NearestEven } CompareFunction { Never, Less, Equal, LessEqual, Greater, NotEqual, GreaterEqual, Always } CoverageLoopRefusal { - Outputs, EarlyFragmentTests, Discard, QuadOperations, Attachments, InterpolationFunctions, + EarlyFragmentTests, Discard, QuadOperations, Attachments, InterpolationFunctions, } IoNumeric { Float, Uint, Sint } StageBuiltin { @@ -1398,6 +1398,7 @@ codec_enum! { DeviceAnisotropicFilter, DevicePointSize, ClippedCoverageSplit, + LoopedSampleOutputs, DeviceUnorm8LinearFilter, HalfOutputFastMathBlend, DeviceSampling, diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 6001cc594..d16ef355b 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -60,7 +60,7 @@ mod tests; /// unchanged version, and its bless records the version. Independent of the crate's version and of /// [`ARTIFACT_FORMAT_VERSION`]. The commit that bumps it says what changed; this comment keeps no /// history. -pub const SEMANTICS_VERSION: u32 = 1821; +pub const SEMANTICS_VERSION: u32 = 1822; /// The byte-layout version of encoded artifacts (`CompiledFunction::to_bytes` and the /// [`PipelineArtifact`] encodings). Every encoded artifact carries it, and a decode under another @@ -70,7 +70,7 @@ pub const SEMANTICS_VERSION: u32 = 1821; /// re-typed in an encoded type, its `codec` body or its `envelope`. A variant removed while its tag /// stays unused needs no bump: an entry holding it fails to decode, which is a miss. The commit that /// bumps it says what changed; this comment keeps no history. -pub const ARTIFACT_FORMAT_VERSION: u32 = 445; +pub const ARTIFACT_FORMAT_VERSION: u32 = 446; /// The version of what this crate's runtime does with a compiled pipeline: instantiating a binding /// plan (`BindingPlan::instantiate_*`: descriptor ranges, push bytes, root, argument, and handle @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 445; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 1514; +pub const RUNTIME_VERSION: u32 = 1515; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles diff --git a/crates/metal2vulkan/src/lower/fragment/coverage.rs b/crates/metal2vulkan/src/lower/fragment/coverage.rs index 84a22d5f6..85c1614ce 100644 --- a/crates/metal2vulkan/src/lower/fragment/coverage.rs +++ b/crates/metal2vulkan/src/lower/fragment/coverage.rs @@ -11,11 +11,13 @@ //! builds: //! //! ```text -//! main: rest = SampleMask[0] +//! main: rest = SampleMask[0]; kept = 0 //! loop { if rest == 0 { break } //! sample = FindILsb(rest) // the Private `loop_sample` //! call body +//! kept |= SampleMaskOut[0] & (1 << sample) // where the stage writes it //! rest &= rest - 1 } +//! SampleMaskOut[0] = kept // where the stage writes it //! return //! ``` //! @@ -31,11 +33,21 @@ //! where the whole quad runs, into a `Private` array (`stage_io::read_at_every_sample`), and each //! pass reads its sample's element. //! -//! One pixel-rate invocation cannot write each sample's outputs, so the loop is only for a -//! function whose side effects are its memory writes. A function it does not fit is refused -//! ([`CoverageLoopRefusal`]): by link in a pipeline of more than one sample, from the reason -//! its interface records (`StageIo::coverage_loop`), or, compiled for a multisampled pipeline once -//! its body showed the reason, by the compile layer. +//! Metal writes each covered sample's outputs (color, depth, stencil) from that sample's own run, +//! and keeps the sample only where the run's `[[sample_mask]]` output has the sample's bit (an M3 +//! Max under macOS 27.0.1, our probe `co`: the runs go lowest sample first). One pixel-rate +//! invocation writes one value per output, so a looping function's outputs are the last pass's, +//! written to the samples Metal's runs keep: where the stage writes `SampleMask` (the function's +//! own output, or the pipeline's private masks), the loop ORs each pass's word ANDed with its +//! sample's bit, and stores that union once the loop ends; elsewhere every covered sample is +//! written, as on Metal. Equal to Metal's where every pass computes the same outputs, and +//! recorded as `PrecisionNote::LoopedSampleOutputs`: Vulkan hands an invocation under sample +//! shading only its own sample's bit of the coverage, so no form runs each sample's pass in its +//! own invocation and reads the pixel's coverage. +//! +//! A function the loop does not fit is refused ([`CoverageLoopRefusal`]): by link in a pipeline of +//! more than one sample, from the reason its interface records (`StageIo::coverage_loop`), or, +//! compiled for a multisampled pipeline once its body showed the reason, by the compile layer. //! //! Metal's rasterizer splits a primitive it clips into pieces whose coverages it hands to //! separate runs, which no Vulkan rasterizer reproduces; the loop reads the pixel's coverage of the @@ -81,7 +93,7 @@ pub struct CoveragePlan { /// entry's loop (`wrap`). pub looped: bool, /// Why the function cannot loop, as far as its interface shows before its body is selected: - /// its outputs, its early tests, its attachments, or the device's interpolation functions. + /// its early tests, its attachments, or the device's interpolation functions. pub refusal: Option, /// The function writes memory, which a driver with /// `DriverWorkaround::MemoryWritingFragmentsRunPerSample` repeats per covered sample. @@ -99,8 +111,8 @@ pub struct CoveragePlan { /// An upper estimate of the words the looping entry adds around the body function: its function /// type, the entry function, the loop's blocks and merges, the mask's load, the bit's extraction, -/// the call, and the `rest` variable's loads and stores. -pub(super) const LOOP_WORDS: u64 = 96; +/// the call, the `rest` variable's loads and stores, and the union of the kept samples. +pub(super) const LOOP_WORDS: u64 = 144; fn invariant(msg: &'static str) -> Error { Error::Internal(InternalError::new(InternalKind::Invariant, msg)) @@ -209,9 +221,7 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { && !((sample_id || sample_varying) && position); let attachments = super::rog::declared(e) || used(&|r| matches!(r, ParamRole::ColorInput { .. } | ParamRole::Imageblock(_))); - let refusal = if !e.ep.outputs.is_empty() { - Some(CoverageLoopRefusal::Outputs) - } else if matches!( + let refusal = if matches!( e.ep.stage, AirStage::Fragment { early_fragment_tests: true @@ -226,6 +236,10 @@ pub(super) fn plan(cx: &mut SelectCx<'_>) -> Result<(), Error> { None }; let looped = cx.inputs.multisampled && refusal.is_none() && !driver_runs; + // Each pass's outputs land on every sample the passes keep, the last pass's (the module docs). + if looped && !e.ep.outputs.is_empty() { + cx.precision.insert(PrecisionNote::LoopedSampleOutputs); + } let whole_quad = p .workarounds .contains(&DriverWorkaround::InterpolationNeedsTheWholeQuad); @@ -348,18 +362,27 @@ pub(super) fn wrap( // Where the driver's interpolation needs the whole quad, the sample-qualified varyings at // every sample, before the quad's helpers leave the loop. crate::lower::stage_io::read_at_every_sample(&mut fb, plan, decl)?; - emit_loop(&mut fb, u32_, covered, sample, body)?; + let kept = match super::sample_mask_output(plan) { + Some(i) => Some(decl.stage_io.globals.get(i).copied().ok_or_else(|| { + invariant("a looping fragment function's sample mask output without its variable") + })?), + None => None, + }; + emit_loop(&mut fb, u32_, covered, sample, body, kept)?; Ok(fb.finish()?) } /// `rest = covered; loop { if rest == 0 { break } sample = FindILsb(rest); call body; -/// rest &= rest - 1 }; return`, in `fb`'s open block, `covered` the loaded `SampleMask[0]`. +/// rest &= rest - 1 }; return`, in `fb`'s open block, `covered` the loaded `SampleMask[0]`; where +/// the stage writes `SampleMask` (`out`, its variable), each pass's word ANDed with its sample's +/// bit is ORed into the word stored there once the loop ends. fn emit_loop( fb: &mut FunctionBuilder<'_>, u32_: crate::spirv::ids::TypeId, covered: crate::spirv::ids::Value, sample: GlobalId, body: FuncId, + out: Option, ) -> BResult<()> { let zero = fb.u32_const(0)?; let zero = fb.module().const_value(zero)?; @@ -368,6 +391,18 @@ fn emit_loop( let rest = fb.local_var(u32_, None)?; let rest = fb.var_ptr(rest)?; fb.store(rest, covered, MemAccess::default())?; + // The output word and the union of the samples the passes keep. + let out = match out { + Some(g) => { + let base = fb.module().global_value(g)?; + let word = fb.access_chain(base, &[zero])?; + let kept = fb.local_var(u32_, None)?; + let kept = fb.var_ptr(kept)?; + fb.store(kept, zero, MemAccess::default())?; + Some((word, kept)) + } + None => None, + }; let sample = fb.module().global_value(sample)?; fb.loop_( &mut (), @@ -389,10 +424,22 @@ fn emit_loop( fb.store(sample, s, MemAccess::default())?; fb.call(body, &[])?; let below = fb.binary(BinOp::ISub, left, one)?; + if let Some((word, kept)) = out { + let bit = fb.binary(BinOp::ShiftLeftLogical, one, s)?; + let written = fb.load(word, MemAccess::default())?; + let written = fb.binary(BinOp::BitwiseAnd, written, bit)?; + let union = fb.load(kept, MemAccess::default())?; + let union = fb.binary(BinOp::BitwiseOr, union, written)?; + fb.store(kept, union, MemAccess::default())?; + } let next = fb.binary(BinOp::BitwiseAnd, left, below)?; fb.store(rest, next, MemAccess::default()) }, ), )?; + if let Some((word, kept)) = out { + let union = fb.load(kept, MemAccess::default())?; + fb.store(word, union, MemAccess::default())?; + } fb.ret(None) } diff --git a/crates/metal2vulkan/src/lower/fragment/mod.rs b/crates/metal2vulkan/src/lower/fragment/mod.rs index d7b079dc3..a41a9af86 100644 --- a/crates/metal2vulkan/src/lower/fragment/mod.rs +++ b/crates/metal2vulkan/src/lower/fragment/mod.rs @@ -543,6 +543,21 @@ pub(crate) fn sample_mask_input(plan: &Plan) -> Option { }) } +/// The index of the stage's `SampleMask` output object, where it has one: the function's sample +/// mask output, or the one the pipeline's private masks write. +pub(super) fn sample_mask_output(plan: &Plan) -> Option { + plan.families.stage_io.objects.iter().position(|o| { + matches!( + o, + stage_io::IoObject::Builtin { + builtin: crate::spv::BuiltIn::SampleMask, + dir: IoDir::Output, + .. + } + ) + }) +} + /// `SampleMask[0]`, the invocation's coverage word, loaded from the input variable in the open /// block of the entry `fb` builds, and stored in the body's copy where it has one. pub(super) fn load_coverage( diff --git a/crates/metal2vulkan/src/pipeline/artifact.rs b/crates/metal2vulkan/src/pipeline/artifact.rs index 00deb822b..6472b5abe 100644 --- a/crates/metal2vulkan/src/pipeline/artifact.rs +++ b/crates/metal2vulkan/src/pipeline/artifact.rs @@ -1414,6 +1414,23 @@ pub enum PrecisionNote { /// Validation derives no tolerance and no explanation from it: C3 names it as the answer gap /// of a case that meets it (`ClippedPrimitiveSplit`). ClippedCoverageSplit, + /// A fragment function that reads `[[sample_mask]]`, runs once per covered sample on Metal + /// and writes an output (a color, depth, stencil or sample mask) is compiled for a + /// multisampled pipeline on a device that does not run it per sample itself: it runs once + /// per pixel and its body once per covered sample, lowest first, from a loop over the + /// coverage (`CoverageLoop::Looped`, `lower::fragment::coverage`). Metal writes each covered + /// sample's outputs from that sample's own run, which keeps the sample where its sample mask + /// output has the sample's bit (an M3 Max under macOS 27.0.1, our probe `co`). The invocation + /// writes the samples Metal's runs keep, each pass's sample mask ANDed with its sample's bit, + /// but every one of them takes the last pass's outputs, so a sample's output differs from + /// Metal's where the passes compute different outputs (from `[[sample_id]]`, a + /// sample-qualified varying, or memory an earlier pass wrote). Vulkan hands an invocation + /// under sample shading only its own sample's bit of the coverage, so no form runs each + /// sample's pass in its own invocation and reads the pixel's coverage. + /// + /// Validation derives no tolerance and no explanation from it: a difference stays a + /// mismatch for review. + LoopedSampleOutputs, /// The module hands an 8-bit unsigned normalized texture's linear sample to the device's /// filter, at the coordinate of Metal's footprint step (`lower::sampler::native`), on a /// device measured to filter that class within one code of Metal diff --git a/crates/metal2vulkan/src/pipeline/link/graphics.rs b/crates/metal2vulkan/src/pipeline/link/graphics.rs index 44cd8ab39..a685bcd54 100644 --- a/crates/metal2vulkan/src/pipeline/link/graphics.rs +++ b/crates/metal2vulkan/src/pipeline/link/graphics.rs @@ -83,16 +83,16 @@ //! (`StageInterface::writes_memory`) runs under the pipeline's sample shading at a minimum of 1.0 //! (`GraphicsState::sample_shading`, needing `sampleRateShading`), as one that reads //! `[[sample_id]]` does: once per covered sample, where a Vulkan stage without sample shading -//! runs at least once per pixel. Link refuses a function that runs per sample (one of those, or -//! one that reads a sample-qualified varying) beside `[[sample_mask]]` on every device, as -//! `Unsupported{PixelCoverageAtSampleRate, NotRepresentable}`: Vulkan gives an invocation under -//! sample shading only the bits of the samples it shades, a quad holds one sample index, and no -//! subgroup is promised to hold a pixel's other sample invocations, so no form gathers the -//! pixel's coverage. Except where its side effects are its memory writes: compiled for the -//! pipeline, such a function runs once per pixel, without sample shading, and its body once per -//! covered sample from a loop over the coverage (`StageIo::coverage_loop`); compiled without -//! `multisampled` it is `NeedsInput(Multisampled)`, and one the loop does not fit is refused for -//! the reason its interface records (`CoverageLoopRefusal`). On a driver that runs a +//! runs at least once per pixel. A function that runs per sample (one of those, or one that +//! reads a sample-qualified varying) beside `[[sample_mask]]` cannot run under sample shading: +//! Vulkan gives an invocation under sample shading only the bits of the samples it shades, a quad +//! holds one sample index, and no subgroup is promised to hold a pixel's other sample +//! invocations, so no form gathers the pixel's coverage. Compiled for the pipeline, such a +//! function runs once per pixel instead, without sample shading, and its body once per covered +//! sample from a loop over the coverage (`StageIo::coverage_loop`), its outputs the last pass's +//! (`PrecisionNote::LoopedSampleOutputs`); compiled without `multisampled` it is +//! `NeedsInput(Multisampled)`, and one the loop does not fit is refused for the reason its +//! interface records (`CoverageLoopRefusal`). On a driver that runs a //! memory-writing function once per covered sample itself (`CoverageLoop::DriverRunsPerSample`, //! MoltenVK on Apple's GPU) the function runs as written, without sample shading, and its other //! reads are checked as below. A per-sample function reads the pixel values Vulkan has no pixel @@ -850,9 +850,9 @@ fn sample_invocations( // Metal hands each of the pixel's sample invocations the pixel's coverage. A Vulkan // invocation under sample shading sees only its own samples' bits, and nothing gathers a // pixel's sample invocations: a quad holds one sample index, and no subgroup is promised to - // hold the rest. A function whose side effects are its memory writes runs once per pixel - // instead, compiled for the pipeline, and its body once per covered sample, without sample - // shading; any other is refused for the reason its interface records. A driver that runs a + // hold the rest. The function runs once per pixel instead, compiled for the pipeline, and its + // body once per covered sample, without sample shading; one the loop does not fit is refused + // for the reason its interface records. A driver that runs a // memory-writing function once per covered sample whatever the pipeline's sample shading hands // each run the pixel's coverage itself, as Metal does: the function's other reads are checked // as any per-sample function's, and the pipeline enables no sample shading, under which that diff --git a/crates/metal2vulkan/src/pipeline/stage_io.rs b/crates/metal2vulkan/src/pipeline/stage_io.rs index c9f8e9748..15709a280 100644 --- a/crates/metal2vulkan/src/pipeline/stage_io.rs +++ b/crates/metal2vulkan/src/pipeline/stage_io.rs @@ -459,7 +459,10 @@ pub enum CoverageLoop { #[default] NotNeeded, /// Compiled for a multisampled pipeline (`LoweringInputs::multisampled`), the function runs - /// once per pixel, without sample shading, and runs its body once per covered sample. + /// once per pixel, without sample shading, and runs its body once per covered sample. Its + /// outputs are the last pass's, written to each covered sample whose pass's sample mask keeps + /// it, where Metal writes each sample's from that sample's run + /// (`PrecisionNote::LoopedSampleOutputs`). Looped, /// The function loops over its covered samples when compiled for a multisampled pipeline, /// and was compiled without `multisampled`: link asks for it @@ -483,10 +486,6 @@ pub enum CoverageLoop { #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub enum CoverageLoopRefusal { - /// It writes an output (a color, depth, stencil, or sample mask): Metal writes each sample's - /// output from that sample's own run, which one pixel-rate invocation cannot. - /// `Unsupported{PixelCoverageAtSampleRate, NotRepresentable}`. - Outputs, /// It runs under `[[early_fragment_tests]]`: Metal then runs only the samples that pass the /// tests, each reading the coverage from before them, and a Vulkan invocation reads either /// coverage, never both. `Unsupported{PixelCoverageAtSampleRate, NotRepresentable}`. @@ -515,9 +514,7 @@ impl CoverageLoopRefusal { use crate::error::{Capability, Feature, Unsupported}; let f = Feature::PixelCoverageAtSampleRate; match self { - CoverageLoopRefusal::Outputs | CoverageLoopRefusal::EarlyFragmentTests => { - Unsupported::not_representable(f) - } + CoverageLoopRefusal::EarlyFragmentTests => Unsupported::not_representable(f), CoverageLoopRefusal::Discard | CoverageLoopRefusal::QuadOperations | CoverageLoopRefusal::Attachments => Unsupported::not_implemented(f), diff --git a/crates/metal2vulkan/src/tests/engine_coverage_loop.rs b/crates/metal2vulkan/src/tests/engine_coverage_loop.rs index d18f454e2..aa2033243 100644 --- a/crates/metal2vulkan/src/tests/engine_coverage_loop.rs +++ b/crates/metal2vulkan/src/tests/engine_coverage_loop.rs @@ -1,5 +1,6 @@ //! The loop over the covered samples over the owned fixtures `engine/rt6_attachmentless`, -//! `engine/sample_rate` and `engine/coverage_loop`: +//! `engine/sample_rate`, `engine/coverage_loop`, `engine/coverage_natural` and +//! `engine/coverage_outputs`: //! //! - `rt6_mark_coverage` reads `[[sample_mask]]` and writes memory, so Metal runs it once per //! covered sample, each run reading the pixel's coverage. Compiled for a multisampled pipeline it @@ -8,9 +9,12 @@ //! bits (`FindILsb`). Its interface says so (`CoverageLoop::Looped`); compiled on its own it says //! `Unlooped`, and link asks for `multisampled` (`NeedsInput(Multisampled)`) at four samples //! and takes it at one. -//! - `sample_rate_mask_in` returns a color beside `[[sample_mask]]` and `[[sample_id]]`: one -//! pixel-rate invocation cannot write each sample's color, so its interface records -//! `Refused(Outputs)` and link refuses it as not representable at four samples, as before. +//! - `sample_rate_mask_in` returns a color beside `[[sample_mask]]` and `[[sample_id]]`: it loops +//! as the memory writer does, its color the last pass's (`PrecisionNote::LoopedSampleOutputs`). +//! - `coverage_outputs`' memory writers return a color, one also a sample mask: they loop +//! wherever the device makes them, recording the note, the masked one storing the union of the +//! samples its passes keep after the loop; on MoltenVK on Apple's GPU each runs as written, +//! exactly, without the note. //! - `rt6_mark_sample` runs per sample without reading the coverage: no loop. //! - `coverage_loop`'s memory writers loop at four samples wherever the device makes them; each of //! its functions holding one thing the loop does not fit (early fragment tests, a discard, a @@ -36,6 +40,7 @@ use crate::device::{Device, DeviceDescription, DevicePolicy, DriverWorkaround}; use crate::error::{Error, Feature, Needs, RuntimeInput, Unsupported}; use crate::library::Library; use crate::metal::PixelFormat; +use crate::pipeline::artifact::PrecisionNote; use crate::pipeline::descriptor::{ ColorAttachmentDescriptor, FunctionDescriptor, RenderPipelineDescriptor, StageSource, }; @@ -318,7 +323,6 @@ fn a_coverage_reading_memory_writer_loops_over_its_covered_samples() { /// Metal; at one sample, where the coverage is the one sample's, it records nothing anywhere. #[test] fn a_multisampled_coverage_reader_off_apples_rasterizer_announces_the_split() { - use crate::pipeline::artifact::PrecisionNote; let Some(lib) = library("rt6_attachmentless") else { return; }; @@ -356,8 +360,8 @@ fn a_multisampled_coverage_reader_off_apples_rasterizer_announces_the_split() { /// The interface states the loop: `Looped` under `multisampled`, `Unlooped` without, and link asks /// a function compiled without it for `multisampled` at four samples and takes it at one; a /// function that runs per sample without reading the coverage has no loop; one with a color output -/// records why it has none, and link refuses it at four samples as before; on MoltenVK on Apple's -/// GPU the coverage reader runs as written (`DriverRunsPerSample`). +/// loops as well, recording `PrecisionNote::LoopedSampleOutputs`; on MoltenVK on Apple's GPU the +/// coverage reader runs as written (`DriverRunsPerSample`). #[test] fn the_interface_states_the_coverage_loop() { let (Some(attachmentless), Some(sample_rate)) = @@ -397,8 +401,8 @@ fn the_interface_states_the_coverage_loop() { ( &sample_rate, MASK_IN, - CoverageLoop::Refused(CoverageLoopRefusal::Outputs), - CoverageLoop::Refused(CoverageLoopRefusal::Outputs), + CoverageLoop::Unlooped, + CoverageLoop::Looped, ), ] { assert_eq!(state(lib, name, &none), alone, "{name} alone"); @@ -418,21 +422,27 @@ fn the_interface_states_the_coverage_loop() { ); dev.compile_render_pipeline(&render(&attachmentless, alone, 1, false), &budget) .expect("one sample"); - // A color output beside the coverage at sample rate stays not representable. - let refused = dev + // A color output beside the coverage at sample rate loops too, its color the last pass's. + let alone = StageSource::Compiled(compile(&sample_rate, MASK_IN, &none)); + assert_eq!( + dev.compile_render_pipeline(&render(&attachmentless, alone, 4, true), &budget) + .map(|_| ()), + Err(Error::NeedsInput(RuntimeInput::Multisampled)) + ); + let p = dev .compile_render_pipeline( &render(&attachmentless, function(&sample_rate, MASK_IN), 4, true), &budget, ) - .map(|_| ()); + .expect("the looping color writer"); + assert!(!p.graphics.sample_shading); + let s = shape(fragment_words(&p)); + assert!(s.loops && s.find_lsb && !s.sample_id, "{s:?}"); + assert!(p.stages.iter().any(|m| m + .precision_notes + .contains(&PrecisionNote::LoopedSampleOutputs))); assert_eq!( - refused, - Err(Error::Unsupported(Unsupported::not_representable( - Feature::PixelCoverageAtSampleRate - ))) - ); - assert_eq!( - CoverageLoopRefusal::Outputs.error(), + CoverageLoopRefusal::EarlyFragmentTests.error(), Error::Unsupported(Unsupported::not_representable( Feature::PixelCoverageAtSampleRate )) @@ -710,3 +720,90 @@ fn where_interpolation_needs_the_whole_quad_the_varyings_are_read_before_the_loo "{inside} pipelines read it inside the loop" ); } + +/// How many `BuiltIn SampleMask` decorations `words` holds: the input's, and the output's where +/// the module writes one. +fn sample_mask_decorations(words: &[u32]) -> usize { + let mut n = 0; + let mut i = 5; + while let Some(&w) = words.get(i) { + let (len, op) = ((w >> 16) as usize, w & 0xFFFF); + let at = |k: usize| words.get(i + k).copied().unwrap_or(u32::MAX); + n += usize::from( + op == OP_DECORATE && at(2) == DECORATION_BUILTIN && at(3) == BUILTIN_SAMPLE_MASK, + ); + if len == 0 { + break; + } + i += len; + } + n +} + +/// `coverage_outputs`' memory writers return a color beside `[[sample_mask]]`, one also a sample +/// mask, which Metal writes per covered sample, each from that sample's run (our probe `co`). At +/// two and four samples on every committed profile each loops, without sample shading, recording +/// `PrecisionNote::LoopedSampleOutputs`, or is refused for what the device lacks, never as the +/// coverage at sample rate; the masked one declares the `SampleMask` output beside the input. On +/// a driver that runs a memory writer once per covered sample (MoltenVK on Apple's GPU) each runs +/// as written, which is Metal's, without the loop or the note. +#[test] +fn coverage_reading_color_writers_loop_or_run_as_written() { + let Some(lib) = library("coverage_outputs") else { + return; + }; + let (mut looped, mut natural) = (0, 0); + for stem in stems() { + let dev = device(&stem); + let driver_runs = per_sample_defect(&dev).is_some(); + for (name, masks) in [("cvo_color", 1), ("cvo_masked", 2)] { + for samples in [2, 4] { + let what = format!("{name} on {stem} at {samples}"); + let mut d = RenderPipelineDescriptor::new(function(&lib, "cvo_vertex")); + d.fragment = Some(function(&lib, name)); + d.color_attachments[0] = + Some(ColorAttachmentDescriptor::new(PixelFormat::RGBA8Uint)); + d.raster_sample_count = samples; + match dev.compile_render_pipeline(&d, &Budget::standard()) { + Ok(p) => { + assert!(!p.graphics.sample_shading, "{what}"); + let words = fragment_words(&p); + let s = shape(words); + assert_eq!( + (s.loops, s.find_lsb, s.sample_id), + (!driver_runs, !driver_runs, false), + "{what}" + ); + assert_eq!(sample_mask_decorations(words), masks, "{what}"); + let noted = p.stages.iter().any(|m| { + m.precision_notes + .contains(&PrecisionNote::LoopedSampleOutputs) + }); + assert_eq!(noted, !driver_runs, "{what}"); + for m in &p.stages { + check_words_valid(&m.spirv, &p.requirements, dev.profile()) + .unwrap_or_else(|e| panic!("{what} {:?}: L3: {e}", m.stage)); + } + *if driver_runs { + &mut natural + } else { + &mut looped + } += 1; + } + Err(Error::Unsupported(u)) => { + assert_ne!( + u.feature, + Feature::PixelCoverageAtSampleRate, + "{what}: {u:?}" + ); + } + Err(e) => panic!("{what}: {e}"), + } + } + } + } + assert!( + looped >= 12 && natural >= 4, + "{looped} looped, {natural} as written" + ); +} diff --git a/crates/metal2vulkan/src/tests/fast_paths.rs b/crates/metal2vulkan/src/tests/fast_paths.rs index d2ef91f33..414310bed 100644 --- a/crates/metal2vulkan/src/tests/fast_paths.rs +++ b/crates/metal2vulkan/src/tests/fast_paths.rs @@ -208,6 +208,7 @@ fn notes() -> Vec<(&'static str, Ledger)> { DeviceAnisotropicFilter, DevicePointSize, ClippedCoverageSplit, + LoopedSampleOutputs, TessellationTriangleOrder, UnmeasuredGroupSpeculation, NotMipmappedAnisotropicFilter, diff --git a/crates/metal2vulkan/tests/air_input/coverage_outputs.txt b/crates/metal2vulkan/tests/air_input/coverage_outputs.txt new file mode 100644 index 000000000..ff6c5318e --- /dev/null +++ b/crates/metal2vulkan/tests/air_input/coverage_outputs.txt @@ -0,0 +1,251 @@ +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> }> +%t5 = type %t3 (i32) +%t6 = type float (i32) +%t10 = type <4 x i32> (i32, <4 x float>, ptr addrspace(1), ptr addrspace(2)) +%t11 = type i32 (float) +%t12 = type <{ <4 x i32>, i32 }> +%t13 = type %t12 (i32, <4 x float>, ptr addrspace(1), ptr addrspace(2)) +%t16 = type void (ptr addrspace(1), ptr addrspace(1), <2 x i32>) +%t18 = type i32 (ptr addrspace(1), i32, i32, i32, i1) +%t19 = type i32 (ptr addrspace(1)) +%t20 = type ptr addrspace(2) () +%t22 = type { <4 x i32>, i8 } +%t23 = type %t22 (ptr addrspace(1), ptr addrspace(2), <2 x i32>, i32, i32) +%t25 = type [2 x i32] +%t28 = type { i32 } ; "struct.metal::_atomic" +c14 = %t25 [27, 0] +c29 = <2 x float> [0x40000000, 0x40000000] +c30 = <2 x float> [0xBF800000, 0xBF800000] +c33 = <4 x i32> [0, 1, poison, poison] +c37 = <4 x float> [poison, poison, 0x3F000000, 0x3F800000] +c38 = <4 x i32> [0, 1, 6, 7] +c41 = <4 x i32> [poison, poison, 0, 1] + +define %t5 @f0 "cvo_vertex" memory(NoModRef, NoModRef, NoModRef) "approx-func-fp-math"="true" "frame-pointer"="all" "min-legal-vector-width"="0" "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" { +bb0: + %i0 = and i32 %a0, i32 1 + %i1 = tail call reassoc nnan ninf nsz arcp contract afn float @f1 [air Convert(Convert { dst: NumTy { elem: F32, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I32, lanes: 1 }, src_kind: Unsigned, src_fp8: None })](%i0) + %i2 = insertelement <2 x float> undef, %i1, i64 0 + %i3 = lshr i32 %a0, i32 1 + %i4 = tail call reassoc nnan ninf nsz arcp contract afn float @f1 [air Convert(Convert { dst: NumTy { elem: F32, lanes: 1 }, dst_kind: Float, src: NumTy { elem: I32, lanes: 1 }, src_kind: Unsigned, src_fp8: None })](%i3) + %i5 = insertelement %i2, %i4, i64 1 + %i6 = fmul reassoc nnan ninf nsz arcp contract afn <2 x float> %i5, <2 x float> c29 + %i7 = fadd reassoc nnan ninf nsz arcp contract afn <2 x float> %i6, <2 x float> c30 + %i8 = shufflevector <4 x float> %i7, <2 x float> poison, <0, 1, poison, poison> + %i9 = shufflevector <4 x float> %i8, <4 x float> c37, <0, 1, 6, 7> + %i10 = insertvalue %t3 undef %i9, 0 + ret %i10 +} + +declare %t6 @f1 "air.convert.f.f32.u.i32" memory(NoModRef, NoModRef, NoModRef) + +define %t10 @f2 "cvo_color" "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" %a2( nocapture "air-buffer-no-alias"="" ) %a3( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) { +bb0: + %i0 = extractelement %a1, i64 1 + %i1 = tail call i32 @f3 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None })](%i0) + %i2 = load i32, %a3, align 4 + %i3 = mul i32 %i2, %i1 + %i4 = extractelement %a1, i64 0 + %i5 = tail call i32 @f3 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None })](%i4) + %i6 = add i32 %i3, %i5 + %i7 = zext %i6 to i64 + %i8 = getelementptr inbounds %t28, %a2, %i7, i32 0 + %i9 = tail call i32 @f6 [air Atomic(Atomic { space: Global, op: Add, sign: Some(Unsigned), ty: NumTy { elem: I32, lanes: 1 }, order: Relaxed, failure: None, scope: Device, volatile: true, fetch: true, flags: None })](%i8, i32 1, i32 0, i32 2, i1 1) arg0( nocapture ) + %i10 = insertelement <4 x i32> c41, %i9, i64 0 + %i11 = insertelement %i10, %a0, i64 1 + ret %i11 +} + +declare %t11 @f3 "air.convert.u.i32.f.f32" memory(NoModRef, NoModRef, NoModRef) + +define %t13 @f4 "cvo_masked" "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" %a2( nocapture "air-buffer-no-alias"="" ) %a3( align 4 dereferenceable(4) Ref nocapture "air-buffer-no-alias"="" ) { +bb0: + %i0 = extractelement %a1, i64 1 + %i1 = tail call i32 @f3 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None })](%i0) + %i2 = load i32, %a3, align 4 + %i3 = mul i32 %i2, %i1 + %i4 = extractelement %a1, i64 0 + %i5 = tail call i32 @f3 [air Convert(Convert { dst: NumTy { elem: I32, lanes: 1 }, dst_kind: Unsigned, src: NumTy { elem: F32, lanes: 1 }, src_kind: Float, src_fp8: None })](%i4) + %i6 = add i32 %i3, %i5 + %i7 = zext %i6 to i64 + %i8 = getelementptr inbounds %t28, %a2, %i7, i32 0 + %i9 = tail call i32 @f6 [air Atomic(Atomic { space: Global, op: Add, sign: Some(Unsigned), ty: NumTy { elem: I32, lanes: 1 }, order: Relaxed, failure: None, scope: Device, volatile: true, fetch: true, flags: None })](%i8, i32 1, i32 0, i32 2, i1 1) arg0( nocapture ) + %i10 = insertelement <4 x i32> c41, %i9, i64 0 + %i11 = insertelement %i10, %a0, i64 1 + %i12 = and i32 %i9, i32 31 + %i13 = shl nuw i32 i32 1, %i12 + %i14 = insertvalue %t12 undef %i11, 0 + %i15 = insertvalue %i14 %i13, 1 + ret %i15 +} + +define %t16 @f5 "cvo_read" "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( Mod nocapture "air-buffer-no-alias"="" ) { +bb0: + %i0 = tail call i32 @f7 [air Texture(Texture { op: Query(NumSamples), image: ImageShape { dim: D2, array: false, ms: true, depth: false }, texel: None, coord16: false, form: Current, access: None })](%a0) arg0( Ref nocapture ) + %i1 = icmp eq %i0, i32 0 + br %i1, bb2, bb1 +bb1: + %i3 = extractelement %a2, i64 1 + %i4 = tail call i32 @f10 [air Texture(Texture { op: Query(Width), image: ImageShape { dim: D2, array: false, ms: true, depth: false }, texel: None, coord16: false, form: Current, access: None })](%a0) arg0( Ref nocapture ) + %i5 = mul i32 %i4, %i3 + %i6 = extractelement %a2, i64 0 + %i7 = add i32 %i5, %i6 + %i8 = mul i32 %i7, %i0 + br bb3 +bb2: + ret void +bb3: + %i11 = phi i32 [i32 0, bb1], [%i26, bb3] + %i12 = tail call ptr addrspace(2) @f8 [air Sampler(GetReadSampler)]() + %i13 = tail call %t22 @f9 [air Texture(Texture { op: Read, image: ImageShape { dim: D2, array: false, ms: true, depth: false }, texel: Some(Texel { ty: NumTy { elem: I32, lanes: 4 }, sign: Some(Unsigned) }), coord16: false, form: Current, access: Some(Read) })](%a0, %i12, %a2, %i11, i32 1) arg0( Ref nocapture ) + %i14 = extractvalue <4 x i32> %i13, 0 + %i15 = extractelement %i14, i64 3 + %i16 = icmp eq %i15, i32 0 + %i17 = extractelement %i14, i64 0 + %i18 = extractelement %i14, i64 1 + %i19 = shl i32 %i18, i32 8 + %i20 = or i32 %i19, %i17 + %i21 = select i32 %i16, i32 65535, %i20 + %i22 = add i32 %i11, %i8 + %i23 = zext %i22 to i64 + %i24 = getelementptr inbounds i32, %a1, %i23 + store %i21, %i24, align 4 + %i26 = add nuw i32 %i11, i32 1 + %i27 = icmp eq %i26, %i0 + br %i27, bb2, bb3, !llvm.loop LoopHints { unroll: Default, must_progress: true } +} + +declare %t18 @f6 "air.atomic.global.add.u.i32" %a0( nocapture ) + +declare %t19 @f7 "air.get_num_samples_texture_2d_ms" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture ) + +declare %t20 @f8 "air.get_read_sampler" memory(NoModRef, Ref, NoModRef) + +declare %t23 @f9 "air.read_texture_2d_ms.u.v4i32" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture ) + +declare %t19 @f10 "air.get_width_texture_2d_ms" memory(Ref, NoModRef, NoModRef) %a0( Ref nocapture ) +!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 = !"id" +!md17 = !"air.render_target" +!md18 = !"uint4" +!md19 = !"air.sample_mask_in" +!md20 = !"mask" +!md21 = !"air.center" +!md22 = !"air.no_perspective" +!md23 = !"air.buffer" +!md24 = !"air.location_index" +!md25 = !"air.read_write" +!md26 = !"air.address_space" +!md27 = !"air.struct_type_info" +!md28 = !"__s" +!md29 = !"air.arg_type_size" +!md30 = !"air.arg_type_align_size" +!md31 = !"metal::_atomic" +!md32 = !"runs" +!md33 = !"air.buffer_size" +!md34 = !"air.read" +!md35 = !"width" +!md36 = !"color" +!md37 = !"air.sample_mask" +!md38 = !"air.texture" +!md39 = !"texture2d_ms" +!md40 = !"target" +!md41 = !"out" +!md42 = !"air.thread_position_in_grid" +!md43 = !"uint2" +!md44 = !"g" +!md45 = !"air.compile.denorms_disable" +!md46 = !"air.compile.fast_math_enable" +!md47 = !"air.compile.framebuffer_fetch_enable" +!md48 = !"Apple metal version 32023.921 (metalfe-32023.921.6)" +!md49 = !"Metal" +!md50 = !"int" +!md51 = !"omnipotent char" +!md52 = !"Simple C++ TBAA" +!md53 = !"air-alias-scope-arg(3)" +!md54 = !"air-alias-scope-arg(2)" +!md55 = i32 2 +!md56 = %t25 c14 +!md57 = i32 1 +!md58 = i32 4 +!md59 = i32 7 +!md60 = i32 31 +!md61 = i32 128 +!md62 = i32 8 +!md63 = i32 16 +!md64 = ptr addrspace(0) @f0 +!md65 = i32 0 +!md66 = ptr addrspace(0) @f2 +!md67 = i32 3 +!md68 = ptr addrspace(0) @f4 +!md69 = ptr addrspace(0) @f5 +!md70 = i64 0 +!md71 = !{!md55, !md0, !md56} +!md72 = !{!md57, !md1, !md58} +!md73 = !{!md59, !md2, !md55} +!md74 = !{!md59, !md3, !md60} +!md75 = !{!md59, !md4, !md60} +!md76 = !{!md59, !md5, !md60} +!md77 = !{!md59, !md6, !md61} +!md78 = !{!md59, !md7, !md62} +!md79 = !{!md59, !md8, !md63} +!md80 = !{!md9, !md10, !md11, !md12, !md13} +!md81 = !{!md80} +!md82 = !{!md65, !md14, !md10, !md15, !md12, !md16} +!md83 = !{!md82} +!md84 = !{!md64, !md81, !md83} +!md85 = !{!md17, !md65, !md65, !md10, !md18} +!md86 = !{!md85} +!md87 = !{!md65, !md19, !md10, !md15, !md12, !md20} +!md88 = !{!md57, !md9, !md21, !md22, !md10, !md11, !md12, !md13} +!md89 = !{!md65, !md58, !md65, !md15, !md28} +!md90 = !{!md55, !md23, !md24, !md65, !md57, !md25, !md26, !md57, !md27, !md89, !md29, !md58, !md30, !md58, !md10, !md31, !md12, !md32} +!md91 = !{!md67, !md23, !md33, !md58, !md24, !md57, !md57, !md34, !md26, !md55, !md29, !md58, !md30, !md58, !md10, !md15, !md12, !md35} +!md92 = !{!md87, !md88, !md90, !md91} +!md93 = !{!md66, !md86, !md92} +!md94 = !{!md17, !md65, !md65, !md10, !md18, !md12, !md36} +!md95 = !{!md37, !md10, !md15, !md12, !md20} +!md96 = !{!md94, !md95} +!md97 = !{!md68, !md96, !md92} +!md98 = !{} +!md99 = !{!md65, !md38, !md24, !md65, !md57, !md34, !md10, !md39, !md12, !md40} +!md100 = !{!md57, !md23, !md24, !md65, !md57, !md25, !md26, !md57, !md29, !md58, !md30, !md58, !md10, !md15, !md12, !md41} +!md101 = !{!md55, !md42, !md10, !md43, !md12, !md44} +!md102 = !{!md99, !md100, !md101} +!md103 = !{!md69, !md98, !md102} +!md104 = !{!md45} +!md105 = !{!md46} +!md106 = !{!md47} +!md107 = !{!md48} +!md108 = !{!md55, !md62, !md65} +!md109 = !{!md49, !md58, !md65, !md65} +!md110 = !{!md52} +!md111 = !{!md51, !md110, !md70} +!md112 = !{!md50, !md111, !md70} +!md113 = !{!md112, !md112, !md70} +!"llvm.module.flags" = !{!md71, !md72, !md73, !md74, !md75, !md76, !md77, !md78, !md79} +!"air.vertex" = !{!md84} +!"air.fragment" = !{!md93, !md97} +!"air.kernel" = !{!md103} +!"air.compile_options" = !{!md104, !md105, !md106} +!"llvm.ident" = !{!md107} +!"air.version" = !{!md108} +!"air.language_version" = !{!md109} diff --git a/crates/metal2vulkan/tests/golden_hashes.tsv b/crates/metal2vulkan/tests/golden_hashes.tsv index 1d90c5e0a..2c8e07be2 100644 --- a/crates/metal2vulkan/tests/golden_hashes.tsv +++ b/crates/metal2vulkan/tests/golden_hashes.tsv @@ -363,6 +363,14 @@ engine/coverage_natural.ll eb8d2408c730c7fa nat_coverage 46573806ee71b2ad 465738 engine/coverage_natural.ll eb8d2408c730c7fa nat_coverage_at_pixel b21cc5f5a1c49098 b21cc5f5a1c49098 b565a360b186e9ec b565a360b186e9ec 590dc66385cbbb11 590dc66385cbbb11 b565a360b186e9ec b565a360b186e9ec b21cc5f5a1c49098 b21cc5f5a1c49098 590dc66385cbbb11 590dc66385cbbb11 b21cc5f5a1c49098 b21cc5f5a1c49098 590dc66385cbbb11 b565a360b186e9ec b21cc5f5a1c49098 590dc66385cbbb11 b8010bb55ab7bbec Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} engine/coverage_natural.ll eb8d2408c730c7fa nat_sample dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 dc5dd087038b9116 3fb5a0560629737e Unsupported{SampleRateShading; AnyOf[[Feature(SampleRateShading)]]} engine/coverage_natural.ll eb8d2408c730c7fa nat_varying 1507b9d87e5b7439 1507b9d87e5b7439 2a461c32b7e5a75e 2a461c32b7e5a75e b7a6adcd322183ea b7a6adcd322183ea 2a461c32b7e5a75e 2a461c32b7e5a75e 1507b9d87e5b7439 1507b9d87e5b7439 b7a6adcd322183ea b7a6adcd322183ea 1507b9d87e5b7439 1507b9d87e5b7439 b7a6adcd322183ea 2a461c32b7e5a75e 1507b9d87e5b7439 b7a6adcd322183ea 59aed161b9c9e945 Unsupported{SampleRateShading; AnyOf[[Feature(SampleRateShading)]]} +engine/coverage_outputs.air.ll e8569249cc4f5ff6 cvo_color a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 9fc722b1bc7428b3 9fc722b1bc7428b3 9fc722b1bc7428b3 9fc722b1bc7428b3 a4dad0c6a2ca1576 9bd96be6410f333d a4dad0c6a2ca1576 a4dad0c6a2ca1576 9bd96be6410f333d 9fc722b1bc7428b3 9fc722b1bc7428b3 9bd96be6410f333d f51fc1de3b1bf0ff Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} +engine/coverage_outputs.air.ll e8569249cc4f5ff6 cvo_masked e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 03ac1e0c71d25853 03ac1e0c71d25853 03ac1e0c71d25853 03ac1e0c71d25853 e2165c85938af1a4 b04c9fee6bcbd86f e2165c85938af1a4 e2165c85938af1a4 b04c9fee6bcbd86f 03ac1e0c71d25853 03ac1e0c71d25853 b04c9fee6bcbd86f 6815ca8eaa8df3af Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} +engine/coverage_outputs.air.ll e8569249cc4f5ff6 cvo_read 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 c6a1ad0f80cbfa72 c6a1ad0f80cbfa72 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 c6a1ad0f80cbfa72 23cf750a9068284d ffcc31af6a841247 ffcc31af6a841247 c6a1ad0f80cbfa72 0d1efb49ecfee918 0d1efb49ecfee918 6b61f58d7fce1242 6b61f58d7fce1242 6b61f58d7fce1242 +engine/coverage_outputs.air.ll e8569249cc4f5ff6 cvo_vertex 10c31f268959eb97 10c31f268959eb97 9c92da927a30796c 9c92da927a30796c 05f5d45c8a238978 05f5d45c8a238978 9c92da927a30796c 9c92da927a30796c 10c31f268959eb97 10c31f268959eb97 05f5d45c8a238978 05f5d45c8a238978 10c31f268959eb97 10c31f268959eb97 05f5d45c8a238978 9c92da927a30796c 10c31f268959eb97 05f5d45c8a238978 05f5d45c8a238978 05f5d45c8a238978 +engine/coverage_outputs.ll 74cb04c7db80a4c1 cvo_color a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 a4dad0c6a2ca1576 9fc722b1bc7428b3 9fc722b1bc7428b3 9fc722b1bc7428b3 9fc722b1bc7428b3 a4dad0c6a2ca1576 9bd96be6410f333d a4dad0c6a2ca1576 a4dad0c6a2ca1576 9bd96be6410f333d 9fc722b1bc7428b3 9fc722b1bc7428b3 9bd96be6410f333d f51fc1de3b1bf0ff Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} +engine/coverage_outputs.ll 74cb04c7db80a4c1 cvo_masked e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 e2165c85938af1a4 03ac1e0c71d25853 03ac1e0c71d25853 03ac1e0c71d25853 03ac1e0c71d25853 e2165c85938af1a4 b04c9fee6bcbd86f e2165c85938af1a4 e2165c85938af1a4 b04c9fee6bcbd86f 03ac1e0c71d25853 03ac1e0c71d25853 b04c9fee6bcbd86f 6815ca8eaa8df3af Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} +engine/coverage_outputs.ll 74cb04c7db80a4c1 cvo_read 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 c6a1ad0f80cbfa72 c6a1ad0f80cbfa72 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 0d1efb49ecfee918 c6a1ad0f80cbfa72 23cf750a9068284d ffcc31af6a841247 ffcc31af6a841247 c6a1ad0f80cbfa72 0d1efb49ecfee918 0d1efb49ecfee918 6b61f58d7fce1242 6b61f58d7fce1242 6b61f58d7fce1242 +engine/coverage_outputs.ll 74cb04c7db80a4c1 cvo_vertex 10c31f268959eb97 10c31f268959eb97 9c92da927a30796c 9c92da927a30796c 05f5d45c8a238978 05f5d45c8a238978 9c92da927a30796c 9c92da927a30796c 10c31f268959eb97 10c31f268959eb97 05f5d45c8a238978 05f5d45c8a238978 10c31f268959eb97 10c31f268959eb97 05f5d45c8a238978 9c92da927a30796c 10c31f268959eb97 05f5d45c8a238978 05f5d45c8a238978 05f5d45c8a238978 engine/denormal_texels.air.ll 78861bab0f1c4d78 denormal_texels a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf 11461b8d65357a66 11461b8d65357a66 11461b8d65357a66 a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf 11461b8d65357a66 11461b8d65357a66 11461b8d65357a66 engine/denormal_texels.ll 0076eb09c1cfe180 denormal_texels a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf 11461b8d65357a66 11461b8d65357a66 11461b8d65357a66 a9a53cdc67f3bfcf a9a53cdc67f3bfcf a9a53cdc67f3bfcf 11461b8d65357a66 11461b8d65357a66 11461b8d65357a66 engine/descriptor_limit_uniform_views.air.ll b2cf1c8ae8dee9cd descriptor_limit_atomic_load 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 8c318be002da6fa6 78019ef9bf63a568 16271f5896a7aea2 diff --git a/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv b/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv index df49cc8d3..595e7296d 100644 --- a/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv +++ b/crates/metal2vulkan/tests/public_fixture_expectations_engine.tsv @@ -509,6 +509,14 @@ engine/coverage_natural.ll nat_coverage ok ok ok ok ok ok ok ok ok ok ok ok ok o engine/coverage_natural.ll nat_coverage_at_pixel ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} engine/coverage_natural.ll nat_sample ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{SampleRateShading; AnyOf[[Feature(SampleRateShading)]]} engine/coverage_natural.ll nat_varying ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{SampleRateShading; AnyOf[[Feature(SampleRateShading)]]} +engine/coverage_outputs.air.ll cvo_read ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/coverage_outputs.air.ll cvo_vertex ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/coverage_outputs.air.ll cvo_color ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} +engine/coverage_outputs.air.ll cvo_masked ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} +engine/coverage_outputs.ll cvo_read ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/coverage_outputs.ll cvo_vertex ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok +engine/coverage_outputs.ll cvo_color ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} +engine/coverage_outputs.ll cvo_masked ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok Unsupported{StageStoresAndAtomics; AnyOf[[Feature(FragmentStoresAndAtomics)]]} engine/denormal_texels.air.ll denormal_texels ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/denormal_texels.ll denormal_texels ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok engine/descriptor_limit_uniform_views.air.ll descriptor_limit_uniform_views ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok ok diff --git a/docs/API.md b/docs/API.md index e4198d7c1..b6e885b32 100644 --- a/docs/API.md +++ b/docs/API.md @@ -2815,6 +2815,14 @@ fast forms record, and each `PrecisionNote`'s rustdoc states its bound. triangle that extends past the viewport as pieces whose shared edges cross pixels, and such a pixel's fragments can run once per piece, each reading that piece's coverage, where the device hands the pixel's fragment its coverage by the whole primitive (lavapipe by its own pieces). +- `metal2vulkan-degrade-looped-sample-outputs` (precision). `PrecisionNote::LoopedSampleOutputs`: A + fragment function that reads `[[sample_mask]]`, runs once per covered sample on Metal and writes + an output runs once per pixel in a multisampled pipeline, its body once per covered sample, on a + device that does not run it per sample itself (MoltenVK on Apple's GPU runs a memory writer per + sample itself, as written). The samples Metal writes are written, but each with the last + pass's outputs, where Metal writes each sample's from that sample's run: equal where every pass + computes the same outputs. Vulkan hands an invocation under sample shading only its own sample's + bit of the coverage. - `metal2vulkan-degrade-device-unorm8-linear-filter` (precision). `PrecisionNote::DeviceUnorm8LinearFilter`: The module hands an 8-bit unsigned normalized texture's linear sample to the device's filter, at the coordinate of Metal's footprint step diff --git a/docs/REFUSALS.md b/docs/REFUSALS.md index 4e5b16161..d3f08883a 100644 --- a/docs/REFUSALS.md +++ b/docs/REFUSALS.md @@ -14,14 +14,14 @@ Columns: - `none`: no public API path: malformed or non-Metal input, Apple-private calls, or a cap no valid program of ordinary size meets; - `?`: not assessed yet. -Generated at `edd12dcb5`. +Generated at `4446b2fc6`. ## Totals | Kind | Variants | With a site | Reach system | Reach app | Reach rare | Reach none | Unassessed | |---|---|---|---|---|---|---|---| | Translator and front-end refusals | 125 | 125 | 6 | 33 | 69 | 17 | 0 | -| Runtime gaps | 66 | 66 | 1 | 8 | 43 | 14 | 0 | +| Runtime gaps | 65 | 65 | 1 | 8 | 42 | 14 | 0 | | Apple-only calls | 5 | 5 | 0 | 0 | 0 | 5 | 0 | | Binder refusals at a device limit | 9 | 9 | 0 | 1 | 7 | 1 | 0 | | Translation caps | 14 | 14 | 0 | 0 | 7 | 7 | 0 | @@ -48,7 +48,7 @@ Generated at `edd12dcb5`. | `SimdWidth` | Simdgroup width 32 is not achievable for this usage, stage, and device | devices without VkProperty::MetalFragmentSimdgroups; devices without a capability the site computes (`width_needs(stage, st)`) | 2: `crates/metal2vulkan/src/device/subgroup.rs:377`, `crates/metal2vulkan/src/lower/simd/mod.rs:382` | `app`: simdgroup functions on a device whose subgroups cannot run 32 wide for the use | | `LocalSize` | A local size beyond a device limit on this axis (`None` | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/bind/dispatch.rs:475` | `app`: a threadgroup size past a smaller device's limit | | `IrreducibleConvergent` | An irreducible region containing a convergent instruction | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/structurize/irreducible.rs:108` | `rare`: irreducible loops around barriers or simd operations | -| `ComputeDerivativesWithSimd` | Compute derivatives in a flattened simd tier | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/dispatch.rs:476` | `rare`: derivatives in a kernel | +| `ComputeDerivativesWithSimd` | Compute derivatives in a flattened simd tier | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/dispatch.rs:485` | `rare`: derivatives in a kernel | | `ComputeDerivatives` | Derivatives outside fragment without compute-derivative support | devices without VkFeature::ComputeDerivativeGroupLinear; every device (no Vulkan mechanism); every device (not implemented) | 4: `crates/metal2vulkan/src/bind/dispatch.rs:320`, `crates/metal2vulkan/src/lower/sync/barrier.rs:486` (+2) | `rare`: derivatives in a kernel | | `QuadOperations` | Quad operations in a stage without quad support | devices without VkLimit::MinSubgroupSize; devices without VkProperty::SubgroupQuadOperationsInAllStages | 2: `crates/metal2vulkan/src/device/subgroup.rs:371`, `crates/metal2vulkan/src/device/subgroup.rs:405` | `app`: quad shuffles in kernels on devices without quad operations there | | `SimdgroupMatrix` | Simdgroup matrix operations | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/simd/matrix.rs:83` | `rare`: simdgroup matrix kernels | @@ -63,9 +63,9 @@ Generated at `edd12dcb5`. | `ThreadgroupMemorySize` | Threadgroup memory above the device limit | devices short of a device limit the site names; devices without VkLimit::MaxComputeSharedMemorySize; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/bind/plan/compute.rs:714`, `crates/metal2vulkan/src/memory/arena.rs:170` (+1) | `rare`: threadgroup memory past a smaller device's limit | | `CoherentMemory` | `coherent(device)` accesses (Vulkan memory model) | devices short of a Vulkan feature the site names | 1: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207` | `rare`: coherent(device) accesses | | `Int64Atomics` | 64-bit atomics | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`) | 2: `crates/metal2vulkan/src/lower/access/atomic.rs:624`, `crates/metal2vulkan/src/lower/access/atomic.rs:633` | `rare`: 64-bit atomics | -| `ImageAtomics` | Image atomics beyond 32-bit integers | devices without a capability the site computes (`gaps`); every device (no Vulkan mechanism) | 3: `crates/metal2vulkan-runtime/src/families/formats.rs:464`, `crates/metal2vulkan-runtime/src/families/formats.rs:468` (+1) | `rare`: texture atomics beyond 32-bit integers | +| `ImageAtomics` | Image atomics beyond 32-bit integers | devices without a capability the site computes (`gaps`); every device (no Vulkan mechanism) | 3: `crates/metal2vulkan-runtime/src/families/formats.rs:466`, `crates/metal2vulkan-runtime/src/families/formats.rs:470` (+1) | `rare`: texture atomics beyond 32-bit integers | | `DescriptorCount` | Too many descriptors of one kind in a stage or pipeline | devices short of a device limit the site names; devices without VkLimit::MaxUniformBufferRange | 3: `crates/metal2vulkan/src/lower/access/mod.rs:1688`, `crates/metal2vulkan/src/lower/select.rs:1641` (+1) | `app`: many textures or buffers in one stage on a smaller device | -| `BufferRange` | A buffer window beyond the descriptor range limits | devices without a capability the site computes (`needs`); devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism) | 7: `crates/metal2vulkan-runtime/src/function_table.rs:569`, `crates/metal2vulkan/src/bind/graphics.rs:3795` (+5) | `app`: a buffer window past a device's descriptor range | +| `BufferRange` | A buffer window beyond the descriptor range limits | devices without a capability the site computes (`needs`); devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism) | 7: `crates/metal2vulkan-runtime/src/function_table.rs:569`, `crates/metal2vulkan/src/bind/graphics.rs:3839` (+5) | `app`: a buffer window past a device's descriptor range | | `Int64Arithmetic` | 64-bit integer arithmetic | devices without VkFeature::ShaderInt64 | 2: `crates/metal2vulkan/src/lower/arith/legal.rs:582`, `crates/metal2vulkan/src/lower/select.rs:1133` | `rare`: 64-bit integers on a device without shaderInt64 | | `Float64Arithmetic` | 64-bit float arithmetic | devices without VkFeature::ShaderFloat64 | 2: `crates/metal2vulkan/src/device/metal.rs:230`, `crates/metal2vulkan/src/lower/arith/legal.rs:587` | `rare`: doubles (MSL has none outside Apple's own code) | | `Format` | A pixel format not supported for the required use | devices without VkFeature::ShaderStorageImageExtendedFormats; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`missing`); devices without a capability the site computes (`routes`); devices without a format's usage; every device (no Vulkan mechanism); every device (not implemented) | 121: `crates/metal2vulkan-runtime/src/binding_view.rs:146`, `crates/metal2vulkan-runtime/src/blit_plan.rs:523` (+119) | `system`: pixel formats a device lacks for a use (CoreVideo's 4:2:x and 10-bit formats among them) | @@ -84,27 +84,27 @@ Generated at `edd12dcb5`. | `PixelSamplerCompare` | A constexpr sampler with pixel coordinates and a compare function, which Apple's compiler rejects ("invalid values combination in sampler... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:115` | `none`: Apple's compiler rejects it | | `TexelBuffer` | Texture buffers beyond the device's texel-buffer limits | devices without a format's usage; every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/bind/instantiate.rs:882`, `crates/metal2vulkan/src/bind/instantiate.rs:888` (+1) | `app`: texture buffers past a device's texel-buffer limits | | `RasterOrderGroups` | Raster order groups without fragment shader interlock | devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::FragmentShaderSampleInterlock; devices without a capability the site computes (`alternatives`); every device (not implemented) | 4: `crates/metal2vulkan/src/device/metal.rs:242`, `crates/metal2vulkan/src/lower/fragment/rog.rs:151` (+2) | `rare`: raster order groups | -| `FramebufferFetch` | Framebuffer fetch without an ordered form on the device (rasterization-order attachment access, or the pixel interlock's storage form where the... | devices short of a Vulkan property the site names; devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::RasterizationOrderColorAttachmentAccess; devices without VkFeature::SampleRateShading; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`capability`); devices without a capability the site computes (`missing`); devices without a format's usage; drivers with a defect; every device (not implemented) | 24: `crates/metal2vulkan-runtime/src/families/features.rs:1018`, `crates/metal2vulkan-runtime/src/render.rs:5913` (+22) | `system`: programmable blending (framebuffer fetch); macOS 26.6.2's login reaches it (two WindowServer and RenderBox pipelines fetch RGB10A8_2P_XR10 attachments, the consumer's boots) | +| `FramebufferFetch` | Framebuffer fetch without an ordered form on the device (rasterization-order attachment access, or the pixel interlock's storage form where the... | devices short of a Vulkan property the site names; devices without VkFeature::FragmentShaderPixelInterlock; devices without VkFeature::RasterizationOrderColorAttachmentAccess; devices without VkFeature::SampleRateShading; devices without a capability the site computes; devices without a capability the site computes (`alternatives`); devices without a capability the site computes (`c`); devices without a capability the site computes (`capability`); devices without a capability the site computes (`missing`); devices without a format's usage; drivers with a defect; every device (not implemented) | 24: `crates/metal2vulkan-runtime/src/families/features.rs:1018`, `crates/metal2vulkan-runtime/src/render.rs:5931` (+22) | `system`: programmable blending (framebuffer fetch); macOS 26.6.2's login reaches it (two WindowServer and RenderBox pipelines fetch RGB10A8_2P_XR10 attachments, the consumer's boots) | | `PrimitiveId` | `[[primitive_id]]` in a fragment function | devices without a capability the site computes; every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/families/features.rs:1127`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:3211` (+1) | `rare`: primitive_id on a device without geometry or tessellation shaders, in an indexed draw or behind a mesh function | | `PrivatePrimitives` | One of Metal's private primitive types (a line loop, a triangle fan, quads, a quad strip) drawn in the pulled list form... | - | via a helper: 1: `crates/metal2vulkan/src/lower/stage_io/plan.rs:2601` | `rare`: a private primitive type drawn in the pulled list form (a vertex function that writes memory or the primitive_id varying, a vertex start past 2^31) on a device without device addresses | -| `VertexAmplification` | Vertex amplification | devices without VkFeature::Multiview; devices without VkFeature::MultiviewTessellationShader; devices without VkLimit::MaxMultiviewInstanceIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 5: `crates/metal2vulkan/src/bind/graphics.rs:4136`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312` (+3) | `rare`: vertex amplification | -| `LayeredRendering` | Layered rendering (`render_target_array_index`, `viewport_array_index`) | devices without VkFeature::ImageView2DOn3DImage; devices without VkFeature::MultiViewport; devices without VkFeature::ShaderOutputLayer; devices without VkFeature::ShaderOutputViewportIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/render_pass.rs:1673`, `crates/metal2vulkan-runtime/src/render_state.rs:1107` (+5) | `rare`: layered rendering on a device without its features | -| `ClipDistance` | Clip or cull distances | devices without VkFeature::ShaderClipDistance; devices without VkLimit::MaxClipDistances | 2: `crates/metal2vulkan/src/lower/mesh/mod.rs:956`, `crates/metal2vulkan/src/lower/mesh/mod.rs:964` | `rare`: clip distances on a device without them | -| `DualSourceBlending` | Dual-source blending | devices without VkFeature::DualSrcBlend; devices without VkLimit::MaxFragmentDualSrcAttachments | 5: `crates/metal2vulkan-runtime/src/families/formats.rs:386`, `crates/metal2vulkan/src/metal/state.rs:37` (+3) | `rare`: dual-source blending on a device without it | +| `VertexAmplification` | Vertex amplification | devices without VkFeature::Multiview; devices without VkFeature::MultiviewTessellationShader; devices without VkLimit::MaxMultiviewInstanceIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 5: `crates/metal2vulkan/src/bind/graphics.rs:4180`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312` (+3) | `rare`: vertex amplification | +| `LayeredRendering` | Layered rendering (`render_target_array_index`, `viewport_array_index`) | devices without VkFeature::ImageView2DOn3DImage; devices without VkFeature::MultiViewport; devices without VkFeature::ShaderOutputLayer; devices without VkFeature::ShaderOutputViewportIndex; devices without a capability the site computes (`needs`); every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/render_pass.rs:1669`, `crates/metal2vulkan-runtime/src/render_state.rs:1121` (+5) | `rare`: layered rendering on a device without its features | +| `ClipDistance` | Clip or cull distances | devices without VkFeature::ShaderClipDistance; devices without VkLimit::MaxClipDistances | 2: `crates/metal2vulkan/src/lower/mesh/mod.rs:960`, `crates/metal2vulkan/src/lower/mesh/mod.rs:968` | `rare`: clip distances on a device without them | +| `DualSourceBlending` | Dual-source blending | devices without VkFeature::DualSrcBlend; devices without VkLimit::MaxFragmentDualSrcAttachments | 5: `crates/metal2vulkan-runtime/src/families/formats.rs:387`, `crates/metal2vulkan/src/metal/state.rs:37` (+3) | `rare`: dual-source blending on a device without it | | `Barycentrics` | Barycentric coordinates | devices without VkFeature::FragmentShaderBarycentric; devices without VkFeature::GeometryShader; devices without a capability the site computes (`needs`); drivers with a defect; every device (not implemented) | 5: `crates/metal2vulkan/src/device/metal.rs:263`, `crates/metal2vulkan/src/lower/stage_io/plan.rs:1924` (+3) | `rare`: barycentric coordinates | -| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1114`, `crates/metal2vulkan/src/bind/graphics.rs:2731` (+4) | `rare`: stencil from the shader | -| `SampleRateShading` | Per-sample shading | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`needs`); every device (not implemented) | 3: `crates/metal2vulkan/src/pipeline/link/graphics.rs:844`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:846` (+1) | `rare`: per-sample shading | -| `PixelCoverageAtSampleRate` | The pixel's coverage (`[[sample_mask]]` read) in a fragment function that runs once per sample | drivers with a defect; every device (no Vulkan mechanism); every device (not implemented) | 3: `crates/metal2vulkan/src/lower/fragment/coverage.rs:296`, `crates/metal2vulkan/src/lower/simd/mod.rs:754` (+1) | `rare`: coverage read at sample rate | +| `StencilExport` | Stencil export | devices without VkExtension::ExtShaderStencilExport; every device (not implemented) | 6: `crates/metal2vulkan-runtime/src/families/features.rs:1114`, `crates/metal2vulkan/src/bind/graphics.rs:2752` (+4) | `rare`: stencil from the shader | +| `SampleRateShading` | Per-sample shading | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`needs`); every device (not implemented) | 3: `crates/metal2vulkan/src/pipeline/link/graphics.rs:832`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:834` (+1) | `rare`: per-sample shading | +| `PixelCoverageAtSampleRate` | The pixel's coverage (`[[sample_mask]]` read) in a fragment function that runs once per sample | drivers with a defect; every device (no Vulkan mechanism); every device (not implemented) | 3: `crates/metal2vulkan/src/lower/fragment/coverage.rs:310`, `crates/metal2vulkan/src/lower/simd/mod.rs:754` (+1) | `rare`: coverage read at sample rate | | `InterfaceComponents` | Too many interface components or locations | devices short of a device limit the site names; devices without VkLimit::MaxColorAttachments; devices without VkLimit::MaxVertexInputAttributes | 4: `crates/metal2vulkan/src/pipeline/compile/color_group.rs:202`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:301` (+2) | `rare`: too many varyings or attachments for a device | | `UnmatchedVarying` | A fragment input without a vertex producer (a Metal link error) | every device (no Vulkan mechanism) | 3: `crates/metal2vulkan/src/pipeline/link/varyings.rs:318`, `crates/metal2vulkan/src/pipeline/link/varyings.rs:537` (+1) | `none`: a Metal link error | | `KernelStageIn` | Kernel `[[stage_in]]` | every device (not implemented) | 3: `crates/metal2vulkan-runtime/src/indirect_execute.rs:376`, `crates/metal2vulkan/src/bind/dispatch.rs:871` (+1) | `rare`: kernel stage-in combinations Metal leaves unestablished | | `Tessellation` | Tessellation | devices without VkLimit::MaxPushConstantsSize; devices without VkLimit::MaxStorageBufferRange; devices without VkLimit::MaxTessellationGenerationLevel; every device (not implemented) | 13: `crates/metal2vulkan-air/src/canon/mod.rs:1256`, `crates/metal2vulkan-air/src/canon/mod.rs:1347` (+11) | `rare`: tessellation | -| `MeshShading` | | devices short of a device limit the site names; devices without VkLimit::MaxMeshOutputLayers; devices without VkLimit::MaxTaskPayloadSize; devices without a capability the site computes (`missing`); every device (not implemented) | 7: `crates/metal2vulkan/src/bind/graphics.rs:1642`, `crates/metal2vulkan/src/bind/graphics.rs:3110` (+5) | `rare`: mesh pipelines | +| `MeshShading` | | devices short of a device limit the site names; devices without VkLimit::MaxMeshOutputLayers; devices without VkLimit::MaxTaskPayloadSize; devices without a capability the site computes (`missing`); every device (not implemented) | 7: `crates/metal2vulkan/src/bind/graphics.rs:1663`, `crates/metal2vulkan/src/bind/graphics.rs:3131` (+5) | `rare`: mesh pipelines | | `TileShading` | | devices without VkLimit::MaxStorageBufferRange; devices without a format's usage; every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:520`, `crates/metal2vulkan/src/bind/plan/compute.rs:237` (+3) | `rare`: tile shaders (Apple GPU families) | | `Imageblocks` | An imageblock outside the forms implemented | devices without VkFeature::SampleRateShading; devices without a capability the site computes (`missing`); drivers with a defect; every device (not implemented) | 10: `crates/metal2vulkan/src/lower/access/imageblock.rs:98`, `crates/metal2vulkan/src/lower/access/mod.rs:908` (+8) | `rare`: imageblocks (Apple GPU families) | | `RayTracing` | | devices without a capability the site computes (`missing`); every device (no Vulkan mechanism); every device (not implemented) | 12: `crates/metal2vulkan/src/bind/acceleration.rs:202`, `crates/metal2vulkan/src/bind/acceleration.rs:216` (+10) | `rare`: ray tracing (out of scope by ruling) | | `Tensors` | | every device (not implemented) | 2: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32`, `crates/metal2vulkan/src/lower/select.rs:903` | `rare`: shader tensors | -| `RasterizationRateMap` | | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/fragment/mod.rs:931` | `rare`: rasterization rate maps | +| `RasterizationRateMap` | | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/fragment/mod.rs:946` | `rare`: rasterization rate maps | | `GpuEncodedIndirectCommands` | | devices short of a Vulkan feature the site names; devices without buffer device addresses (`addressed_needs`); every device (no Vulkan mechanism); every device (not implemented) | 17: `crates/metal2vulkan/src/bind/replay.rs:556`, `crates/metal2vulkan/src/bind/replay.rs:796` (+15) | `rare`: indirect command buffers encoded by a kernel | | `VulkanVersion` | The device's Vulkan version is below the 1.2 floor | devices without ApiVersion::V1_2 | 2: `crates/metal2vulkan/src/ash_interop/query.rs:927`, `crates/metal2vulkan/src/device/derive.rs:105` | `none`: a device below Vulkan 1.2 | | `Constant` | A bitcode constant record outside the typed model (block address, inline asm, `select` and other constant expressions the IR has no form for) | - | via a helper: 3: `crates/metal2vulkan-air/src/bitcode/constants.rs:210`, `crates/metal2vulkan-air/src/bitcode/constants.rs:268` (+1) | `none`: LLVM constant forms AIR does not emit | @@ -122,7 +122,7 @@ Generated at `edd12dcb5`. | `SamplerBicubicFilter` | A use of Metal's bicubic filter that no Metal reading establishes | every device (not implemented) | 5: `crates/metal2vulkan/src/bind/heap.rs:997`, `crates/metal2vulkan/src/bind/plan/resources.rs:1876` (+3) | `system`: bicubic filtering forms Metal does not establish; macOS 26.6.2 makes a runtime sampler with MTLSamplerMinMagFilterCubic (the consumer's boots), whose mip-filtered form is refused | | `GroupCount` | A dispatch whose threadgroup count on `axis` exceeds `maxComputeWorkGroupCount` by more than the binder splits into regions (`None` | every device (no Vulkan mechanism) | 5: `crates/metal2vulkan/src/bind/dispatch.rs:379`, `crates/metal2vulkan/src/bind/dispatch.rs:455` (+3) | `rare`: more threadgroups than a device dispatches, past the binder's split | | `IntersectionFunctionTable` | A ray intersection through intersection functions | every device (no Vulkan mechanism); every device (not implemented) | 9: `crates/metal2vulkan/src/bind/acceleration.rs:177`, `crates/metal2vulkan/src/bind/acceleration.rs:183` (+7) | `rare`: ray tracing (out of scope by ruling) | -| `IndependentBlending` | Color attachments whose write masks or blend states differ, as Metal sets them per attachment, on a device without `independentBlend`, where no... | devices without VkFeature::IndependentBlend | 2: `crates/metal2vulkan-runtime/src/render.rs:2192`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017` | `rare`: per-attachment blending on a device without independentBlend | +| `IndependentBlending` | Color attachments whose write masks or blend states differ, as Metal sets them per attachment, on a device without `independentBlend`, where no... | devices without VkFeature::IndependentBlend | 2: `crates/metal2vulkan-runtime/src/render.rs:2193`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:1005` | `rare`: per-attachment blending on a device without independentBlend | | `RasterSampleCount` | A `rasterSampleCount` outside the device's framebuffer sample counts for the pipeline's attachments (`framebuffer*SampleCounts`), and, for a color... | devices short of a Vulkan property the site names; devices without a capability the site computes | 2: `crates/metal2vulkan-runtime/src/families/limits.rs:1063`, `crates/metal2vulkan/src/pipeline/graphics.rs:563` | `app`: a sample count a device lacks for the attachments | | `TriangleFillLines` | The render encoder's `MTLTriangleFillModeLines` (`polygonMode` `LINE`) on a device without `fillModeNonSolid` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:347` | `app`: wireframe on a device without fillModeNonSolid | | `DepthClipClamp` | The render encoder's `MTLDepthClipModeClamp` (`depthClampEnable`) on a device without `depthClamp` | - | via a helper: 1: `crates/metal2vulkan/src/metal/state.rs:363` | `app`: depth clamp on a device without depthClamp | @@ -135,18 +135,18 @@ Generated at `edd12dcb5`. | `TextureSwizzle` | A texture swizzle whose Metal behavior is not measured | devices short of a Vulkan feature the site names; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/binding_view.rs:167`, `crates/metal2vulkan-runtime/src/texture.rs:999` (+5) | `app`: texture swizzles whose Metal behaviour is unmeasured | | `MipmapGeneration` | `generateMipmapsForTexture:` where the device's filter is not shown to give Metal's answer | devices without VkFeature::ShaderInt64; devices without a format's usage; every device (not implemented) | 7: `crates/metal2vulkan-runtime/src/blit_texture.rs:1890`, `crates/metal2vulkan-runtime/src/mipmap_pick.rs:37` (+5) | `app`: generateMipmapsForTexture: where the device's filter is not Metal's | | `HostMemory` | A buffer over the caller's host memory without a copy (`newBufferWithBytesNoCopy:`) | devices without VkExtension::ExtExternalMemoryHost; every device (no Vulkan mechanism); every device (not implemented) | 5: `crates/metal2vulkan-runtime/src/host_memory.rs:430`, `crates/metal2vulkan-runtime/src/host_memory.rs:470` (+3) | `system`: newBufferWithBytesNoCopy: where the device cannot import the memory | -| `GpuTimes` | A command buffer's GPU times (`GPUStartTime`, `GPUEndTime`) on a device whose queue family writes no timestamps (`timestampValidBits` 0) | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2876` | `rare`: GPU times on a queue without timestamps | +| `GpuTimes` | A command buffer's GPU times (`GPUStartTime`, `GPUEndTime`) on a device whose queue family writes no timestamps (`timestampValidBits` 0) | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2921` | `rare`: GPU times on a queue without timestamps | | `CountingVisibility` | A `Counting` visibility result (`MTLVisibilityResultModeCounting`) on a device without `occlusionQueryPrecise` | devices without VkFeature::OcclusionQueryPrecise | 1: `crates/metal2vulkan-runtime/src/visibility.rs:452` | `rare`: counting occlusion queries on a device without precise queries | | `ViewFormatReinterpretation` | A texture view whose format has other components, or components of other widths, than its texture's (`RGBA8Unorm` as `R32Uint`), on a device whose... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/view_plan.rs:573` | `app`: a view of another component layout on a portability subset (MoltenVK) | | `SeparateMultisampledDepthStencil` | A render pass whose depth and stencil attachments are separate multisampled textures that it loads or may store, on a device without maintenance8,... | - | via a helper: 7: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:188`, `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:294` (+5) | `rare`: separate multisampled depth and stencil textures | -| `PixelCoverage` | The fragment's coverage (`[[sample_mask]]` read) in a fragment function of a pipeline of more than one sample that runs once per pixel | drivers with a defect | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1225`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:783` | `rare`: coverage reads at pixel rate in a multisampled pipeline | -| `CentroidVarying` | A centroid varying (`[[centroid_perspective]]`, `[[centroid_no_perspective]]`) in a fragment function of a pipeline of more than one sample | drivers with a defect | 1: `crates/metal2vulkan/src/pipeline/link/graphics.rs:801` | `rare`: centroid varyings in a multisampled pipeline | +| `PixelCoverage` | The fragment's coverage (`[[sample_mask]]` read) in a fragment function of a pipeline of more than one sample that runs once per pixel | drivers with a defect | 2: `crates/metal2vulkan-runtime/src/families/features.rs:1225`, `crates/metal2vulkan/src/pipeline/link/graphics.rs:771` | `rare`: coverage reads at pixel rate in a multisampled pipeline | +| `CentroidVarying` | A centroid varying (`[[centroid_perspective]]`, `[[centroid_no_perspective]]`) in a fragment function of a pipeline of more than one sample | drivers with a defect | 1: `crates/metal2vulkan/src/pipeline/link/graphics.rs:789` | `rare`: centroid varyings in a multisampled pipeline | | `PrivateMemory` | A stage whose private memory (its `thread` variables and arrays, and the constants it holds per thread) takes more Function storage a thread than... | - | via a helper: 1: `crates/metal2vulkan/src/lower/select.rs:1171` | `rare`: very large per-thread arrays | | `SparseTextures` | A sparse heap (`MTLHeapTypeSparse`), or a texture made from one, on a device without what a sparse resident image of it needs, which `missing` names | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/sparse/texture.rs:32` | `rare`: sparse heaps on a device without sparse images | | `TimelineSemaphores` | Command buffers and events, which the runtime completes and signals through timeline semaphores (core in Vulkan 1.2), on a device whose... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/device/create.rs:1115` | `none`: a device below the runtime's floor | | `Reflection` | Reflection of an argument whose answer Metal's has not been measured for (`reflection`) | every device (not implemented) | 9: `crates/metal2vulkan/src/bind/argument_buffer.rs:626`, `crates/metal2vulkan/src/reflection/derive.rs:178` (+7) | `rare`: reflection of argument kinds Metal's answer is unmeasured for | | `HeapTextureTiling` | A texture of a heap whose memory the device's optimal images do not take (a `Shared` heap on a device whose optimal images take no host-visible... | every device (no Vulkan mechanism) | 1: `crates/metal2vulkan-runtime/src/texture/heap.rs:632` | `app`: textures in Shared heaps on a device whose optimal images take no host memory | -| `ViewportDepthRange` | A viewport depth range past `[0, 1]` (`setViewport:`), which Metal takes and the runtime draws natively (`VK_EXT_depth_range_unrestricted`) or... | drivers with a defect | 1: `crates/metal2vulkan-runtime/src/render_state.rs:1216` | `rare`: viewport depth outside [0, 1] | +| `ViewportDepthRange` | A viewport depth range past `[0, 1]` (`setViewport:`), which Metal takes and the runtime draws natively (`VK_EXT_depth_range_unrestricted`) or... | drivers with a defect | 1: `crates/metal2vulkan-runtime/src/render_state.rs:1230` | `rare`: viewport depth outside [0, 1] | | `UndeclaredTextureUsage` | A shader write to a texture made without `ShaderWrite` (or `ShaderAtomic`), or a read of one made without `ShaderRead`, which plain Metal runs,... | every device (not implemented) | 2: `crates/metal2vulkan-runtime/src/binding_view.rs:141`, `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:72` | `app`: a shader write to a texture made without ShaderWrite, which plain Metal runs | | `RenderTargetSize` | A render pass whose render area or layers are past the device's framebuffer limits (`Capability::Limit` names `MaxFramebufferWidth`,... | devices short of a device limit the site names | 1: `crates/metal2vulkan-runtime/src/render_pass.rs:1275` | `rare`: a render area past a device's framebuffer limits | | `IndirectRenderState` | A render state a function sets on an indirect render command (`render_command::set_cull_mode`, `set_front_facing_winding`,... | every device (not implemented) | 1: `crates/metal2vulkan/src/lower/access/encode.rs:568` | `rare`: render state set by a kernel on an indirect command | @@ -171,27 +171,27 @@ Generated at `edd12dcb5`. | `HeapTextureMemory` | A heap texture whose image the heap's memory type does not take | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/texture/heap.rs:1512`, `crates/metal2vulkan-runtime/src/texture/heap.rs:1519` (+3) | `app`: a heap texture the heap's memory type does not take | | `FunctionTablePastMaxBufferLength` | A visible-function table of more entries than one buffer of the device's `max_buffer_length` holds words for, or than its size word holds | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/function_table.rs:622` | `none`: a function table past one buffer | | `IndirectCommandBufferPastMaxBufferLength` | An indirect command buffer of more commands than one buffer of the device's `max_buffer_length` holds the records of | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:523` | `none`: an ICB past one buffer | -| `IndirectRenderCommands` | What indirect command buffers lack of their render commands | every device (runtime piece not built) | 15: `crates/metal2vulkan-runtime/src/compute.rs:1291`, `crates/metal2vulkan-runtime/src/compute.rs:1376` (+13) | `rare`: indirect render commands' remaining pieces | -| `IndirectImageblockSize` | An indirect compute command's imageblock side past 65535, which Metal keeps | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3408` | `none`: an imageblock side past 65535 | +| `IndirectRenderCommands` | What indirect command buffers lack of their render commands | every device (runtime piece not built) | 15: `crates/metal2vulkan-runtime/src/compute.rs:1317`, `crates/metal2vulkan-runtime/src/compute.rs:1402` (+13) | `rare`: indirect render commands' remaining pieces | +| `IndirectImageblockSize` | An indirect compute command's imageblock side past 65535, which Metal keeps | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3434` | `none`: an imageblock side past 65535 | | `CommandReplay` | The device replay of indirect command buffers | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/binding.rs:723`, `crates/metal2vulkan-runtime/src/binding.rs:726` | `rare`: the device replay of indirect command buffers | | `RenderAttachments` | Render attachments and their binding forms | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1794` | `rare`: render attachment forms not built | | `AccelerationStructures` | Acceleration structures | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/binding.rs:1797` | `rare`: ray tracing (out of scope by ruling) | | `FeatureEnable` | A feature a created device would enable that the runtime's feature chain has no member for, or whose structure no enabled extension exposes | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1166` | `none`: device creation with a feature the runtime's chain lacks | | `ExtensionEnable` | An extension a created device would enable that the device lists under none of the names the runtime knows for it | devices without the feature or extension it names | 1: `crates/metal2vulkan-runtime/src/enables.rs:1157` | `none`: device creation with an extension under an unknown name | -| `Render` | Render pipelines, passes and draws | every device (runtime piece not built) | 23: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404`, `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460` (+21) | `system`: render pass, resolve and attachment forms not built (20 sites: see the appendix) | +| `Render` | Render pipelines, passes and draws | every device (runtime piece not built) | 23: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404`, `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:461` (+21) | `system`: render pass, resolve and attachment forms not built (20 sites: see the appendix) | | `TexelsPastBufferLength` | A 2D array over a buffer whose texels run past the buffer's length, which Metal makes over bytes its buffer's allocation has past the length | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/buffer_texture.rs:261`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105` | `rare`: a 2D array over a buffer past its length | | `OverlappingSurfaceRows` | A texture of an IOSurface plane (`Buffer::new_texture_with_iosurface_plane`, the stand-in for `newTextureWithDescriptor:iosurface:plane:`) whose... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:263` | `rare`: an IOSurface plane whose rows overlap | -| `SamplePositionsAtBegin` | A render pass whose custom sample positions Vulkan takes only through what the runtime does not build | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145`, `crates/metal2vulkan-runtime/src/render_pass.rs:1865` (+1) | `rare`: custom sample positions Vulkan takes only at begin | +| `SamplePositionsAtBegin` | A render pass whose custom sample positions Vulkan takes only through what the runtime does not build | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145`, `crates/metal2vulkan-runtime/src/render_pass.rs:1861` (+1) | `rare`: custom sample positions Vulkan takes only at begin | | `SharedEventAcrossDevices` | A shared event handle opened on a device other than its event's | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/event.rs:385` | `rare`: a shared event opened on another device | -| `ViewportDepthRange` | A viewport depth range past `[0, 1]`, which Metal takes, on a device without the features to take it natively or by the vertex stage's... | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:341`, `crates/metal2vulkan-runtime/src/render_state.rs:1039` (+5) | `rare`: viewport depth outside [0, 1] without the device features | -| `NonFiniteDepthBias` | NaN or infinite depth bias factors whose effect differs between flat and sloped triangles, or a draw whose bias adds a clamp that moves a... | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/render_state.rs:1603`, `crates/metal2vulkan-runtime/src/render_state.rs:1606` (+3) | `rare`: NaN or infinite depth bias | +| `ViewportDepthRange` | A viewport depth range past `[0, 1]`, which Metal takes, on a device without the features to take it natively or by the vertex stage's... | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:341`, `crates/metal2vulkan-runtime/src/render_state.rs:1053` (+5) | `rare`: viewport depth outside [0, 1] without the device features | +| `NonFiniteDepthBias` | NaN or infinite depth bias factors whose effect differs between flat and sloped triangles, or a draw whose bias adds a clamp that moves a... | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/render_state.rs:1617`, `crates/metal2vulkan-runtime/src/render_state.rs:1620` (+3) | `rare`: NaN or infinite depth bias | | `DepthNeverWithoutAttachment` | A draw under a depth compare of `Never` in a pass without a depth attachment, which fails every fragment, whose fragment function writes color... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147` | `rare`: depth compare Never with no depth attachment | -| `HiddenDepthStencil` | A draw whose depth/stencil state uses depth or the stencil that the pass lacks, which plain Metal tests against a hidden `float` depth of 1.0 and... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563`, `crates/metal2vulkan-runtime/src/render.rs:6636` | `app`: a depth-stencil state using depth or stencil the pass lacks | -| `IndirectDrawArguments` | An indirect draw whose arguments the binding plan asks to read on the CPU (`DrawCommands::indirect_needs_arguments`) | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/index_bounds.rs:102`, `crates/metal2vulkan-runtime/src/render.rs:3321` (+3) | `rare`: indirect draws whose arguments the CPU must read | -| `DepthStencilResolve` | A depth/stencil resolve no Vulkan resolve mode of the device states | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441`, `crates/metal2vulkan-runtime/src/resolve.rs:1388` (+5) | `rare`: depth/stencil resolve modes a device lacks | -| `TileAtSampleCount` | The tile memory of a render pass of a sample count Apple's GPUs lack (theirs are 1, 2 and 4), which a Vulkan device may have | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render_pass.rs:1615`, `crates/metal2vulkan-runtime/src/render_pass.rs:937` | `none`: tile memory at a sample count Apple's GPUs lack | -| `ImageblockMasters` | A draw or tile dispatch whose imageblock is of another size than the pass's, or a draw whose fragment function's layouts are of another alignment... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:7370`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929` | `rare`: imageblocks of mixed sizes in one pass | -| `TileAndFragmentImageblocks` | A render pass that reaches its imageblock storage, from a draw whose fragment function declares an explicit imageblock or a tile dispatch whose... | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/render.rs:7362`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions | +| `HiddenDepthStencil` | A draw whose depth/stencil state uses depth or the stencil that the pass lacks, which plain Metal tests against a hidden `float` depth of 1.0 and... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:564`, `crates/metal2vulkan-runtime/src/render.rs:6654` | `app`: a depth-stencil state using depth or stencil the pass lacks | +| `IndirectDrawArguments` | An indirect draw whose arguments the binding plan asks to read on the CPU (`DrawCommands::indirect_needs_arguments`) | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/index_bounds.rs:102`, `crates/metal2vulkan-runtime/src/render.rs:3322` (+3) | `rare`: indirect draws whose arguments the CPU must read | +| `DepthStencilResolve` | A depth/stencil resolve no Vulkan resolve mode of the device states | every device (runtime piece not built) | 7: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441`, `crates/metal2vulkan-runtime/src/resolve.rs:1392` (+5) | `rare`: depth/stencil resolve modes a device lacks | +| `TileAtSampleCount` | The tile memory of a render pass of a sample count Apple's GPUs lack (theirs are 1, 2 and 4), which a Vulkan device may have | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render_pass.rs:1611`, `crates/metal2vulkan-runtime/src/render_pass.rs:937` | `none`: tile memory at a sample count Apple's GPUs lack | +| `ImageblockMasters` | A draw or tile dispatch whose imageblock is of another size than the pass's, or a draw whose fragment function's layouts are of another alignment... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:7425`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929` | `rare`: imageblocks of mixed sizes in one pass | +| `TileAndFragmentImageblocks` | A render pass that reaches its imageblock storage, from a draw whose fragment function declares an explicit imageblock or a tile dispatch whose... | every device (runtime piece not built) | 3: `crates/metal2vulkan-runtime/src/render.rs:7417`, `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796` (+1) | `rare`: explicit imageblocks shared by tile and fragment functions | | `Metal4Api` | Metal 4's API (`MTL4CommandQueue`, `MTL4CommandBuffer`, `MTL4ArgumentTable`, `MTL4Compiler` and the rest), with the features only its programming... (not scheduled) | every device (runtime piece not built) | family audit only: 3: `crates/metal2vulkan-runtime/src/families/features.rs:1487`, `crates/metal2vulkan-runtime/src/families/limits.rs:1026` (+1) | `app`: Metal 4 (the API is missing: METAL-COVERAGE.md) | | `CounterSampleBuffers` | Counter sample buffers (`MTLCounterSampleBuffer`) and the commands that sample into them (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/limits.rs:1017` | `app`: GPU counters and timestamps by sample buffer (missing API) | | `ResidencySets` | Residency sets (`MTLResidencySet`) (not scheduled) | every device (runtime piece not built) | family audit only: 2: `crates/metal2vulkan-runtime/src/families/features.rs:1469`, `crates/metal2vulkan-runtime/src/families/limits.rs:1019` | `app`: residency sets (missing API) | @@ -204,7 +204,7 @@ Generated at `edd12dcb5`. | `ShaderLogging` | Shader logging (`MTLLogState`, a shader's `os_log`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1468` | `rare`: shader os_log | | `DeviceNotifications` | Device notifications (`MTLCopyAllDevicesWithObserver`) (not scheduled) | every device (runtime piece not built) | family audit only: 1: `crates/metal2vulkan-runtime/src/families/features.rs:1472` | `rare`: device hotplug notifications (deprecated) | | `RateMapRegions` | A draw in a rate-mapped pass that the region path does not draw, for the compile layer's reason (`rate_mapped_pass.rs`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:396` | `rare`: draws in rate-mapped passes the region path does not draw | -| `LayeredPass` | A layered render pass (`renderTargetArrayLength` 2 or more) that needs a step of one layer | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/color_resolve.rs:890` | `rare`: layered passes needing a per-layer color resolve | +| `LayeredPass` | A layered render pass (`renderTargetArrayLength` 2 or more) that needs a step of one layer | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/color_resolve.rs:928` | `rare`: layered passes needing a per-layer color resolve | | `FunctionOptions` | A function descriptor's options beyond `CompileToBinary` and `StoreFunctionInMetalPipelinesScript` (`Library::new_function_with_descriptor`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:215` | `rare`: function descriptor options beyond CompileToBinary | | `OverlappingTextureCopies` | A blit copy between overlapping regions of one texture's texels (`copyFromTexture:...` with the source's region meeting the destination's, through... (not scheduled) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/blit_texture.rs:1340` | `rare`: overlapping texture copies (Metal races) | | `RebindTextures` | `Buffer::rebind_bytes_no_copy` of a no-copy buffer with a live texture over its bytes, given memory at another offset in its page than the old | every device (runtime piece not built) | 5: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:637`, `crates/metal2vulkan-runtime/src/texture/heap.rs:2743` (+3) | `none`: a runtime extension's rebind with a live texture | @@ -215,16 +215,15 @@ Generated at `edd12dcb5`. | `MappedTextureSampling` | A command that would sample a texture of an address-mode map (`TextureDescriptor::address_mode_map`) where the runtime cannot map it at bind... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/address_map.rs:158` | `none`: a runtime extension's texture (address_mode_map) sampled where the runtime cannot map it; no Metal API path | | `LibrarySource` | A library compiled from Metal Shading Language source | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/library.rs:107` | `app`: a library compiled from Metal source (newLibraryWithSource:); the runtime takes metallibs and AIR | | `RestartedStrip` | An indexed strip after `set_primitive_restart_enabled` with an index Vulkan does not restart at, which the runtime draws as a list an index... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:71` | `none`: a strip after the Apple-private setPrimitiveRestartEnabled:index: whose rewrite pass cannot run as Metal draws | -| `PrivatePrimitives` | A draw of one of Metal's private primitive types (`DrawPrimitiveType` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:8095`, `crates/metal2vulkan-runtime/src/render/restart.rs:72` | `none`: a draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a list past a u32 or one storage range, indices or arguments an unordered earlier draw wrote | +| `PrivatePrimitives` | A draw of one of Metal's private primitive types (`DrawPrimitiveType` | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/render.rs:8150`, `crates/metal2vulkan-runtime/src/render/restart.rs:72` | `none`: a draw of an Apple-private primitive type (OpenGL on Metal's quads and kin) whose list cannot draw as Metal draws: a list past a u32 or one storage range, indices or arguments an unordered earlier draw wrote | | `ProvokingVertex` | A draw under Apple's last provoking vertex (`setProvokingVertexMode:` 1) on a device without `VK_EXT_provoking_vertex`'s last vertex, which the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/restart.rs:73` | `none`: a draw after the Apple-private setProvokingVertexMode: 1, on a device without the last provoking vertex, whose rotated list cannot draw as Metal draws | -| `PrimitiveIdIndices` | An indexed draw (`drawIndexedPrimitives:`) of a pipeline whose fragment function reads `[[primitive_id]]` on a device whose fragment stage cannot... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render.rs:8106` | `rare`: an indexed draw of a primitive_id pipeline, on a device without geometry or tessellation shaders, whose indices the encoder wrote since its last barrier | +| `PrimitiveIdIndices` | An indexed draw (`drawIndexedPrimitives:`) of a pipeline whose fragment function reads `[[primitive_id]]` on a device whose fragment stage cannot... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render.rs:8161` | `rare`: an indexed draw of a primitive_id pipeline, on a device without geometry or tessellation shaders, whose indices the encoder wrote since its last barrier | | `RotatedTexture` | A rotated texture (`TextureDescriptor::rotation`) where the runtime does not build what Metal does | every device (runtime piece not built) | 9: `crates/metal2vulkan-runtime/src/blit_texture.rs:1669`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:715` (+7) | `rare`: a rotated drawable's views, blits with images over overlapping rows, rows past its buffer | | `DetachTextures` | A texture over a no-copy buffer's or heap's bytes (a heap's texture, or a texture over the buffer or over one of the heap's buffers) that no... | every device (runtime piece not built) | 8: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:641`, `crates/metal2vulkan-runtime/src/buffer_texture.rs:622` (+6) | `none`: a runtime extension's detach with a texture no stand-in presents exactly | | `TextureBufferLevels` | A texture buffer of more than one level (`TextureDescriptor::mipmap_level_count`, up to its width's full chain) from the device's, a heap's or the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:540` | `rare`: a texture buffer of more than one level (public, unusual) | | `WriteSwizzle` | A texture of `TextureDescriptor::write_swizzle_enabled` whose swizzle is not the default, with `ShaderWrite` or `RenderTarget` usage, from the... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:547` | `none`: Apple-private writeSwizzleEnabled with a swizzle that writes | | `DetachedTexelAccess` | `Texture::replace_region` or `get_bytes` of a texture whose bytes (a no-copy buffer's or heap's) are detached (`detach_backing`) | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/texture.rs:4986` | `none`: CPU texel access while a runtime extension detached the bytes | | `SurfaceDepthStencil` | A use of a texture of a depth or stencil format (`Depth16Unorm`, `Depth32Float`, `Depth32Float_Stencil8`, `Stencil8`, `X32_Stencil8`) over a plane... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/blit_texture.rs:269`, `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57` | `rare`: a blit of the stencil of a Depth32Float_Stencil8 texture over a plane of an IOSurface with planes, or a pass on an X32_Stencil8 one's view as Depth32Float_Stencil8 | -| `ExtendedRangeResolve` | The multisample resolve (`MultisampleResolve`, `StoreAndMultisampleResolve`) of a color attachment of an extended-range format (`BGRA10_XR`,... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/resolve.rs:604` | `rare`: a multisample resolve of a BGRA10_XR, BGR10_XR or sRGB twin attachment (EDR content drawn multisampled) | | `MultisampledBufferCopy` | A blit copy between a buffer and a multisampled texture (`copyFromBuffer:...toTexture:` into, or `copyFromTexture:...toBuffer:` out of, a texture... | every device (runtime piece not built) | 2: `crates/metal2vulkan-runtime/src/blit_texture.rs:536`, `crates/metal2vulkan-runtime/src/blit_texture.rs:693` | `rare`: a buffer<->multisampled-texture copy on a device without sample-rate shading, an integer multisample attachment at the count, or the copy format's storage; and, where maintenance8's depth/colour copies are missing or wrong, what the sample-rate draws cannot move: a 16-bit depth, or a depth or stencil texture they cannot sample or render to (emulated elsewhere; the consumer's Maps pans and screensaver make the copy) | | `MultisampledBufferLayout` | A blit copy between a buffer and a multisampled texture (as for `MultisampledBufferCopy`) in one of two buffer layouts that plain Metal copies by... | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/sample_interleave.rs:1029` | `rare`: a buffer<->multisampled-texture copy at a bytesPerRow of 0 from an offset that is a multiple of 16, or of pixels of 32 bytes or more at a pitch below a row or off the pixel: Metal copies these by rules not yet reduced, and its API validation rejects them | | `ColorAttachmentGroups` | What a render pass the device draws in color groups does not build | every device (runtime piece not built) | 1: `crates/metal2vulkan-runtime/src/render/color_groups.rs:106` | `app`: in a render pass of more color attachments than the device draws at once (five or more on a device of four), or one at an index past them: a pipeline state of other colors, a tile state, an execution of render commands, a draw reading another group's attachment | @@ -233,10 +232,10 @@ Generated at `edd12dcb5`. | Variant | What it blocks | Where | Sites | Reach | |---|---|---|---|---| -| `ProtectedContent` | Protection options whose answer on Metal is not measured (`command_buffer/protection.rs`) | every device (Apple-private, Metal's answer not measured) | 3: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2414`, `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126` (+1) | `none`: Apple-private (no public header) | -| `LineWidth` | A line width other than 1 (`setLineWidth:`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:189` | `none`: Apple-private (no public header) | -| `ViewportTransformDisabled` | The viewport transform turned off (`setViewportTransformEnabled:NO`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:191` | `none`: Apple-private (no public header) | -| `VertexAmplificationMode` | `setVertexAmplificationMode:value:` of a count (the value's set bits in mode 1, else the value) of 0, whose copies change from run to run on... | every device (Apple-private, Metal's answer not measured) | 2: `crates/metal2vulkan-runtime/src/apple_only.rs:195`, `crates/metal2vulkan-runtime/src/apple_only.rs:320` | `none`: Apple-private (no public header) | +| `ProtectedContent` | Protection options whose answer on Metal is not measured (`command_buffer/protection.rs`) | every device (Apple-private, Metal's answer not measured) | 3: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2452`, `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126` (+1) | `none`: Apple-private (no public header) | +| `LineWidth` | A line width other than 1 (`setLineWidth:`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:190` | `none`: Apple-private (no public header) | +| `ViewportTransformDisabled` | The viewport transform turned off (`setViewportTransformEnabled:NO`) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/apple_only.rs:192` | `none`: Apple-private (no public header) | +| `VertexAmplificationMode` | `setVertexAmplificationMode:value:` of a count (the value's set bits in mode 1, else the value) of 0, whose copies change from run to run on... | every device (Apple-private, Metal's answer not measured) | 2: `crates/metal2vulkan-runtime/src/apple_only.rs:196`, `crates/metal2vulkan-runtime/src/apple_only.rs:321` | `none`: Apple-private (no public header) | | `SurfaceClientDirection` | A texture over an IOSurface made with `kIOSurfaceClientDirection` (`newTextureWithDescriptor:iosurface:plane:` of such a surface) | every device (Apple-private, Metal's answer not measured) | 1: `crates/metal2vulkan-runtime/src/buffer_texture.rs:417` | `none`: an IOSurface key in no public header | ## 4. Binder refusals at a device limit (`BindError`) @@ -246,9 +245,9 @@ Generated at `edd12dcb5`. | `DescriptorRangeExceeded` | A descriptor-form slot's window exceeds the descriptor range limit (Profile F) | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:655` | `app`: a buffer window past a device's descriptor range | | `TexelBufferTooLarge` | A texel buffer exceeds `maxTexelBufferElements` | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:894` | `rare`: a texture buffer past maxTexelBufferElements | | `HeapTooLarge` | The set-1 heap's elements (one per resident texture a handle can name, plus the null element) exceed the pipeline's heap capacity | at the device's limit | 7: `crates/metal2vulkan/src/bind/heap.rs:1014`, `crates/metal2vulkan/src/bind/heap.rs:1748` (+5) | `rare`: more resident textures than the pipeline's heap holds (bindless at scale) | -| `TessellationFactorRange` | The tessellation factors a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`),... | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3790` | `rare`: tessellation factors past one storage descriptor | -| `PatchIndexRange` | The patch indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3834` | `rare`: patch indices past one storage descriptor | -| `ControlPointIndexRange` | The control-point indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3872` | `rare`: control-point indices past one storage descriptor | +| `TessellationFactorRange` | The tessellation factors a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`),... | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3834` | `rare`: tessellation factors past one storage descriptor | +| `PatchIndexRange` | The patch indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3878` | `rare`: patch indices past one storage descriptor | +| `ControlPointIndexRange` | The control-point indices a draw reads span more bytes (`needed`) than one storage-buffer descriptor can bind (`limit`, `maxStorageBufferRange`) | at the device's limit | 1: `crates/metal2vulkan/src/bind/graphics.rs:3916` | `rare`: control-point indices past one storage descriptor | | `MissingStageInRegion` | The kernel reads the compute encoder's stage-in region (a `[[stage_in]]` attribute stepping by thread position, or `[[grid_origin]]` or... | at the device's limit | 1: `crates/metal2vulkan/src/bind/dispatch.rs:796` | `none`: a stage-in region never set, which Metal leaves undefined | | `UniformViewAliased` | A `device` buffer slot the pipeline reads through a uniform view (Profile F's per-stage storage-buffer fallback,... | at the device's limit | 1: `crates/metal2vulkan/src/bind/instantiate.rs:609` | `rare`: Profile F's uniform-view fallback aliased by a write | | `MissingDeviceAddress` | A device-address slot received a buffer without a device address | at the device's limit | 1: `crates/metal2vulkan/src/bind/plan/slots.rs:133` | `rare`: a slot reached through a pointer loaded from memory, bound with inline bytes or on a device without device addresses | @@ -308,7 +307,7 @@ Each refusal's sites, with the function that builds it. - `feature::SimdWidth`: `crates/metal2vulkan/src/device/subgroup.rs:377 (subgroup_tier)`; `crates/metal2vulkan/src/lower/simd/mod.rs:382 (finish)` - `feature::LocalSize`: `crates/metal2vulkan/src/bind/dispatch.rs:475 (regions)` - `feature::IrreducibleConvergent`: `crates/metal2vulkan/src/structurize/irreducible.rs:108 (refuse_tangled)` -- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:476 (plan_kernel)` +- `feature::ComputeDerivativesWithSimd`: `crates/metal2vulkan/src/lower/dispatch.rs:485 (plan_kernel)` - `feature::ComputeDerivatives`: `crates/metal2vulkan/src/bind/dispatch.rs:320 (check_local)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:486 (select_derivative)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:495 (select_derivative)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:499 (select_derivative)` - `feature::QuadOperations`: `crates/metal2vulkan/src/device/subgroup.rs:371 (subgroup_tier)`; `crates/metal2vulkan/src/device/subgroup.rs:405 (subgroup_tier)` - `feature::SimdgroupMatrix`: `crates/metal2vulkan/src/lower/simd/matrix.rs:83 (not_implemented)` @@ -323,12 +322,12 @@ Each refusal's sites, with the function that builds it. - `feature::ThreadgroupMemorySize`: `crates/metal2vulkan/src/bind/plan/compute.rs:714 (plan)`; `crates/metal2vulkan/src/memory/arena.rs:170 (check)`; `crates/metal2vulkan/src/memory/plan.rs:494 (too_large)` - `feature::CoherentMemory`: `crates/metal2vulkan/src/lower/sync/memory_model.rs:207 (check)` - `feature::Int64Atomics`: `crates/metal2vulkan/src/lower/access/atomic.rs:624 (select)`; `crates/metal2vulkan/src/lower/access/atomic.rs:633 (select)` -- `feature::ImageAtomics`: `crates/metal2vulkan-runtime/src/families/formats.rs:464 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:468 (atomic_gap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:900 (atomic_format)` +- `feature::ImageAtomics`: `crates/metal2vulkan-runtime/src/families/formats.rs:466 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:470 (atomic_gap)`; `crates/metal2vulkan/src/lower/texture/slot.rs:900 (atomic_format)` - `feature::DescriptorCount`: `crates/metal2vulkan/src/lower/access/mod.rs:1688 (accept_placement)`; `crates/metal2vulkan/src/lower/select.rs:1641 (finish)`; `crates/metal2vulkan/src/pipeline/link.rs:1135 (limit_error)` -- `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs:569 (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs:3795 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3839 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3877 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:661 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1184 (place_slots)` +- `feature::BufferRange`: `crates/metal2vulkan-runtime/src/function_table.rs:569 (past_storage_buffer_range)`; `crates/metal2vulkan/src/bind/graphics.rs:3839 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3883 (patch_binding)`; `crates/metal2vulkan/src/bind/graphics.rs:3921 (patch_binding)`; `crates/metal2vulkan/src/bind/instantiate.rs:661 (bind_buffers)`; `crates/metal2vulkan/src/lower/access/function_table.rs:226 (select)`; `crates/metal2vulkan/src/lower/access/mod.rs:1184 (place_slots)` - `feature::Int64Arithmetic`: `crates/metal2vulkan/src/lower/arith/legal.rs:582 (check_scalar)`; `crates/metal2vulkan/src/lower/select.rs:1133 (selector_form)` - `feature::Float64Arithmetic`: `crates/metal2vulkan/src/device/metal.rs:230 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/legal.rs:587 (check_scalar)` -- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs:146 (binding_view)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:523 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:530 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:545 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:602 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:694 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2206 (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:519 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:582 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:614 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:851 (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:270 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:298 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:344 (copy_unit)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:346 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:526 (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs:1625 (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs:1628 (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs:227 (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs:271 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:291 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:306 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:353 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:392 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:474 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:508 (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs:522 (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs:544 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:670 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:787 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:907 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:2311 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1031 (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1373 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1713 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1806 (attachment_format)`; `crates/metal2vulkan-runtime/src/resolve.rs:409 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:616 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:176 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:303 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:656 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:663 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2084 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3633 (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:498 (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:534 (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1951 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:121 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:389 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:495 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:150 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:381 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:394 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:401 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:413 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:423 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:291 (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:184 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1134 (plain_texture)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1814 (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs:193 (require_filter_features)`; `crates/metal2vulkan/src/bind/plan/resources.rs:959 (plain_texture)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:304 (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:328 (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs:259 (shadow_copy_in_module)`; `crates/metal2vulkan/src/bind/unused_bits.rs:687 (unused_bits_module)`; `crates/metal2vulkan/src/lower/access/tile.rs:1029 (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs:160 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:166 (select_param)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1243 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1264 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1270 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1276 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1301 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1478 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1947 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2054 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2081 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2100 (select_output)`; `crates/metal2vulkan/src/lower/sampler/select.rs:1093 (select_extended)`; `crates/metal2vulkan/src/lower/sampler/select.rs:691 (texel_in)`; `crates/metal2vulkan/src/lower/stage_io/extended_color.rs:77 (plan)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2355 (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:896 (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs:83 (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2366 (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3008 (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3180 (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3350 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3387 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3720 (select_write)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1035 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1048 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1054 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:739 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:742 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:753 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:771 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:791 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:815 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:826 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:873 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:908 (atomic_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:917 (atomic_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1693 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1695 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1825 (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs:2788 (storage_choice_viewed)`; `crates/metal2vulkan/src/metal/format/mod.rs:2806 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2814 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2911 (held_storage_choice)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1100 (extended_write_mask)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:428 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:474 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:546 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:969 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:990 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:449 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:593 (alpha_in_red_blend)` +- `feature::Format`: `crates/metal2vulkan-runtime/src/binding_view.rs:146 (binding_view)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:523 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:530 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:545 (check_formats)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:602 (pair_unit)`; `crates/metal2vulkan-runtime/src/blit_plan.rs:694 (plan_levels_copy)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:2206 (through_buffer)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:519 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:582 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:614 (make_texture_over)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:851 (texture_buffer_texel)`; `crates/metal2vulkan-runtime/src/color_resolve.rs:172 (of_attachment)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:270 (colour_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:298 (copy_unit)`; `crates/metal2vulkan-runtime/src/copy_plan.rs:344 (copy_unit)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:346 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:526 (usable_twin)`; `crates/metal2vulkan-runtime/src/families/features.rs:1625 (read_write_tier)`; `crates/metal2vulkan-runtime/src/families/formats.rs:1630 (sparse_missing)`; `crates/metal2vulkan-runtime/src/families/formats.rs:228 (none)`; `crates/metal2vulkan-runtime/src/families/formats.rs:272 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:292 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:307 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:354 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:393 (answers)`; `crates/metal2vulkan-runtime/src/families/formats.rs:476 (atomic_gap)`; `crates/metal2vulkan-runtime/src/families/formats.rs:510 (lacking)`; `crates/metal2vulkan-runtime/src/families/formats.rs:524 (unsupported)`; `crates/metal2vulkan-runtime/src/image_plan.rs:544 (check_own_memory)`; `crates/metal2vulkan-runtime/src/image_plan.rs:670 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:787 (plan_held)`; `crates/metal2vulkan-runtime/src/image_plan.rs:907 (plan_held)`; `crates/metal2vulkan-runtime/src/render.rs:2312 (viewing)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1031 (check_target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1369 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1709 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1802 (attachment_format)`; `crates/metal2vulkan-runtime/src/resolve.rs:418 (unmodelled_resolve)`; `crates/metal2vulkan-runtime/src/resolve.rs:620 (color)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:176 (checked_twin)`; `crates/metal2vulkan-runtime/src/sample_copy.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/sample_interleave.rs:303 (interleave_merge)`; `crates/metal2vulkan-runtime/src/shadow.rs:673 (unmerged)`; `crates/metal2vulkan-runtime/src/shadow.rs:680 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:2084 (texture_as)`; `crates/metal2vulkan-runtime/src/texture.rs:3633 (two_planes_refused)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:498 (astc_texels)`; `crates/metal2vulkan-runtime/src/texture/decoded_twin.rs:534 (etc_texels)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1951 (planned_heap_texture)`; `crates/metal2vulkan-runtime/src/texture/surface_two_planes.rs:80 (refused)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:121 (converted_storage)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:389 (ycbcr_write_shadow)`; `crates/metal2vulkan-runtime/src/texture/ycbcr_image.rs:497 (new_render_shadow)`; `crates/metal2vulkan-runtime/src/two_planes.rs:150 (unmeasured)`; `crates/metal2vulkan-runtime/src/view_plan.rs:381 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:394 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:401 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:413 (check_format)`; `crates/metal2vulkan-runtime/src/view_plan.rs:423 (check_format)`; `crates/metal2vulkan-runtime/src/ycbcr.rs:301 (refused)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:184 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1134 (plain_texture)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1814 (extended_sampler)`; `crates/metal2vulkan/src/bind/plan/resources.rs:193 (require_filter_features)`; `crates/metal2vulkan/src/bind/plan/resources.rs:959 (plain_texture)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:304 (finish)`; `crates/metal2vulkan/src/bind/sample_interleave.rs:328 (interleave_split_module)`; `crates/metal2vulkan/src/bind/shadow_copy_in.rs:259 (shadow_copy_in_module)`; `crates/metal2vulkan/src/bind/unused_bits.rs:687 (unused_bits_module)`; `crates/metal2vulkan/src/lower/access/tile.rs:1029 (storage_format)`; `crates/metal2vulkan/src/lower/fragment/color.rs:160 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:166 (select_param)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1243 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1264 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1270 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1276 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1301 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1478 (plan)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1947 (select_read)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2054 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2081 (select_output)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:2100 (select_output)`; `crates/metal2vulkan/src/lower/sampler/select.rs:1093 (select_extended)`; `crates/metal2vulkan/src/lower/sampler/select.rs:691 (texel_in)`; `crates/metal2vulkan/src/lower/stage_io/extended_color.rs:77 (plan)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2355 (entry)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:896 (zeroed_output)`; `crates/metal2vulkan/src/lower/stage_io/word_color.rs:83 (plan)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2366 (select)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3008 (cross_class)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3180 (select_image)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3350 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3387 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3720 (select_write)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1035 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1048 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:1054 (declare_slot)`; `crates/metal2vulkan/src/lower/texture/slot.rs:739 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:742 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:753 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:771 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:791 (storage_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:815 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:826 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:873 (ulong_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:908 (atomic_format)`; `crates/metal2vulkan/src/lower/texture/slot.rs:917 (atomic_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1697 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1699 (vk_format)`; `crates/metal2vulkan/src/metal/format/mod.rs:1829 (candidates)`; `crates/metal2vulkan/src/metal/format/mod.rs:2798 (storage_choice_viewed)`; `crates/metal2vulkan/src/metal/format/mod.rs:2816 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2824 (held_storage_choice)`; `crates/metal2vulkan/src/metal/format/mod.rs:2921 (held_storage_choice)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1088 (extended_write_mask)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:462 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:534 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:957 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:978 (reads_alpha_to_coverage)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:449 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:593 (alpha_in_red_blend)` - `feature::DivergentImplicitLod`: `crates/metal2vulkan/src/lower/sampler/select.rs:352 (select_sampling)` - `feature::ImplicitLodOutsideFragment`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:136 (query_min_level)`; `crates/metal2vulkan/src/lower/sampler/select.rs:229 (query_level_measured)`; `crates/metal2vulkan/src/lower/sampler/select.rs:255 (query_min_level)` - `feature::MinLodClamp`: `crates/metal2vulkan/src/lower/sampler/select.rs:1572 (select_one)`; `crates/metal2vulkan/src/lower/sampler/select.rs:973 (min_lod)` @@ -344,27 +343,27 @@ Each refusal's sites, with the function that builds it. - `feature::PixelSamplerCompare`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:115 (lowered)` - `feature::TexelBuffer`: `crates/metal2vulkan/src/bind/instantiate.rs:882 (texel_ranges)`; `crates/metal2vulkan/src/bind/instantiate.rs:888 (texel_ranges)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1147 (plain_texture)` - `feature::RasterOrderGroups`: `crates/metal2vulkan/src/device/metal.rs:242 (unsupported_features)`; `crates/metal2vulkan/src/lower/fragment/rog.rs:151 (mode)`; `crates/metal2vulkan/src/lower/fragment/rog.rs:172 (mode)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:158 (finish)` -- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1018 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5913 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:120 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:147 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:518 (planes_merge)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:190 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/sample_planes.rs:477 (finish)`; `crates/metal2vulkan/src/device/metal.rs:252 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1218 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1236 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1250 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1281 (srgb8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1330 (packed16)`; `crates/metal2vulkan/src/lower/fragment/color.rs:215 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:279 (unordered)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:195 (not_implemented)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:272 (depth_test_form)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:318 (stencil_test_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1128 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1219 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1256 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1901 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:821 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)` +- `feature::FramebufferFetch`: `crates/metal2vulkan-runtime/src/families/features.rs:1018 (state)`; `crates/metal2vulkan-runtime/src/render.rs:5931 (next_instance)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:120 (lacks)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:147 (new)`; `crates/metal2vulkan-runtime/src/sample_planes.rs:518 (planes_merge)`; `crates/metal2vulkan/src/bind/extended_shadow.rs:190 (extended_shadow_module)`; `crates/metal2vulkan/src/bind/sample_planes.rs:477 (finish)`; `crates/metal2vulkan/src/device/metal.rs:252 (unsupported_features)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1218 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1236 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1250 (unorm8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1281 (srgb8)`; `crates/metal2vulkan/src/lower/arith/extended_range/blend.rs:1330 (packed16)`; `crates/metal2vulkan/src/lower/fragment/color.rs:215 (select_param)`; `crates/metal2vulkan/src/lower/fragment/color.rs:279 (unordered)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:195 (not_implemented)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:272 (depth_test_form)`; `crates/metal2vulkan/src/lower/fragment/depth_test.rs:318 (stencil_test_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1128 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1219 (storage_form)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1256 (extended_range_blend)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:1901 (plan_sample)`; `crates/metal2vulkan/src/lower/fragment/fetch.rs:821 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/fetch.rs:164 (storage_attachments)` - `feature::PrimitiveId`: `crates/metal2vulkan-runtime/src/families/features.rs:1127 (state)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:3211 (finish)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:240 (check_primitive_id)` - `feature::PrivatePrimitives`: `crates/metal2vulkan/src/lower/stage_io/plan.rs:2601 (indices_feature)` -- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:4136 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312 (own_index_store)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:718 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:258 (vertex_amplification)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:228 (control_plan)` -- `feature::LayeredRendering`: `crates/metal2vulkan-runtime/src/render_pass.rs:1673 (target)`; `crates/metal2vulkan-runtime/src/render_state.rs:1107 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:796 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:815 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1313 (own_index_store)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:150 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:172 (refused)` -- `feature::ClipDistance`: `crates/metal2vulkan/src/lower/mesh/mod.rs:956 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:964 (select)` -- `feature::DualSourceBlending`: `crates/metal2vulkan-runtime/src/families/formats.rs:386 (answers)`; `crates/metal2vulkan/src/metal/state.rs:37 (blend_factor)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1157 (check_outputs)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:463 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:538 (rotated_blend)` +- `feature::VertexAmplification`: `crates/metal2vulkan/src/bind/graphics.rs:4180 (multiview_instances)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1312 (own_index_store)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:718 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:258 (vertex_amplification)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:228 (control_plan)` +- `feature::LayeredRendering`: `crates/metal2vulkan-runtime/src/render_pass.rs:1669 (target)`; `crates/metal2vulkan-runtime/src/render_state.rs:1121 (needs_viewports)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:800 (target_index)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:819 (target_index)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1313 (own_index_store)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:150 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:172 (refused)` +- `feature::ClipDistance`: `crates/metal2vulkan/src/lower/mesh/mod.rs:960 (select)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:968 (select)` +- `feature::DualSourceBlending`: `crates/metal2vulkan-runtime/src/families/formats.rs:387 (answers)`; `crates/metal2vulkan/src/metal/state.rs:37 (blend_factor)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1145 (check_outputs)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:463 (rotated_blend)`; `crates/metal2vulkan/src/pipeline/rotated_blend.rs:538 (rotated_blend)` - `feature::Barycentrics`: `crates/metal2vulkan/src/device/metal.rs:263 (unsupported_features)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1924 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:745 (param)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:148 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/geometry.rs:170 (refused)` -- `feature::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1114 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2731 (shadow_stencil_words)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:157 (device_form)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:168 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:55 (shadow_stencil)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:73 (shadow_stencil)` -- `feature::SampleRateShading`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:844 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:846 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:928 (sample_invocations)` -- `feature::PixelCoverageAtSampleRate`: `crates/metal2vulkan/src/lower/fragment/coverage.rs:296 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:754 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:879 (sample_invocations)` +- `feature::StencilExport`: `crates/metal2vulkan-runtime/src/families/features.rs:1114 (state)`; `crates/metal2vulkan/src/bind/graphics.rs:2752 (shadow_stencil_words)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:157 (device_form)`; `crates/metal2vulkan/src/lower/fragment/stencil.rs:168 (not_implemented)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:55 (shadow_stencil)`; `crates/metal2vulkan/src/pipeline/link/stencil.rs:73 (shadow_stencil)` +- `feature::SampleRateShading`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:832 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:834 (sample_invocations)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:916 (sample_invocations)` +- `feature::PixelCoverageAtSampleRate`: `crates/metal2vulkan/src/lower/fragment/coverage.rs:310 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:754 (select_param)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:867 (sample_invocations)` - `feature::InterfaceComponents`: `crates/metal2vulkan/src/pipeline/compile/color_group.rs:202 (refusal)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:301 (graphics_state)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:409 (assign)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:90 (limit_error)` - `feature::UnmatchedVarying`: `crates/metal2vulkan/src/pipeline/link/varyings.rs:318 (mesh_fragment)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:537 (varyings)`; `crates/metal2vulkan/src/pipeline/link/varyings.rs:548 (varyings)` - `feature::KernelStageIn`: `crates/metal2vulkan-runtime/src/indirect_execute.rs:376 (record)`; `crates/metal2vulkan/src/bind/dispatch.rs:871 (instantiate)`; `crates/metal2vulkan/src/lower/stage_io/stage_in.rs:133 (select)` -- `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs:1256 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:1347 (post_check)`; `crates/metal2vulkan/src/bind/graphics.rs:3993 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1508 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1794 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:828 (param)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:150 (not_implemented)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:489 (plan_entry)`; `crates/metal2vulkan/src/metal/vertex.rs:219 (fetch_as)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:212 (control_plan)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:292 (check_fragment)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:316 (push_offset)` -- `feature::MeshShading`: `crates/metal2vulkan/src/bind/graphics.rs:1642 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3110 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:517 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:556 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:590 (plan_entry)`; `crates/metal2vulkan/src/memory/plan.rs:2056 (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs:102 (records)` +- `feature::Tessellation`: `crates/metal2vulkan-air/src/canon/mod.rs:1256 (post_check)`; `crates/metal2vulkan-air/src/canon/mod.rs:1347 (post_check)`; `crates/metal2vulkan/src/bind/graphics.rs:4037 (tessellation_dispatch)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:519 (select)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1508 (primitive_id_output)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:1794 (input_builtin)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:828 (param)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:150 (not_implemented)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:489 (plan_entry)`; `crates/metal2vulkan/src/metal/vertex.rs:219 (fetch_as)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:212 (control_plan)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:292 (check_fragment)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:316 (push_offset)` +- `feature::MeshShading`: `crates/metal2vulkan/src/bind/graphics.rs:1663 (plan)`; `crates/metal2vulkan/src/bind/graphics.rs:3131 (mesh_limit)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:521 (check_payload)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:560 (plan_entry)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:594 (plan_entry)`; `crates/metal2vulkan/src/memory/plan.rs:2056 (reprs)`; `crates/metal2vulkan/src/pipeline/link/mesh.rs:102 (records)` - `feature::TileShading`: `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:520 (scratch)`; `crates/metal2vulkan/src/bind/plan/compute.rs:237 (tile_memory)`; `crates/metal2vulkan/src/lower/access/tile.rs:151 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:275 (tile_shading)`; `crates/metal2vulkan/src/pipeline/compile/api.rs:702 (tile_pipeline)` - `feature::Imageblocks`: `crates/metal2vulkan/src/lower/access/imageblock.rs:98 (imageblocks)`; `crates/metal2vulkan/src/lower/access/mod.rs:908 (select_param)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:104 (require)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:412 (reach)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:554 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:578 (plan_tests)`; `crates/metal2vulkan/src/lower/fragment/imageblock.rs:86 (not_implemented)`; `crates/metal2vulkan/src/lower/texture/mod.rs:2376 (select)`; `crates/metal2vulkan/src/lower/texture/slice.rs:139 (imageblocks)`; `crates/metal2vulkan/src/pipeline/link/imageblock.rs:50 (fragment_imageblock)` - `feature::RayTracing`: `crates/metal2vulkan/src/bind/acceleration.rs:202 (instance_record)`; `crates/metal2vulkan/src/bind/acceleration.rs:216 (instance_record)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1087 (primitive_data_read)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1202 (instance_count)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1245 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1257 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1282 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1297 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1312 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:344 (slot_of)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:385 (select_param)`; `crates/metal2vulkan/src/lower/select.rs:899 (route_air)` - `feature::Tensors`: `crates/metal2vulkan-air/src/canon/matmul2d/synth.rs:32 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:903 (route_air)` -- `feature::RasterizationRateMap`: `crates/metal2vulkan/src/lower/fragment/mod.rs:931 (select)` +- `feature::RasterizationRateMap`: `crates/metal2vulkan/src/lower/fragment/mod.rs:946 (select)` - `feature::GpuEncodedIndirectCommands`: `crates/metal2vulkan/src/bind/replay.rs:556 (preprocess)`; `crates/metal2vulkan/src/bind/replay.rs:796 (replay_preprocess_module)`; `crates/metal2vulkan/src/bind/replay/draws.rs:280 (draw_replay_preprocess)`; `crates/metal2vulkan/src/bind/replay/draws.rs:482 (draw_replay_module)`; `crates/metal2vulkan/src/bind/replay/flat.rs:247 (flat_dispatch_module)`; `crates/metal2vulkan/src/bind/replay/merged.rs:242 (draw_merge_module)`; `crates/metal2vulkan/src/lower/access/encode.rs:394 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:410 (needs)`; `crates/metal2vulkan/src/lower/access/encode.rs:527 (select_command)`; `crates/metal2vulkan/src/lower/access/mod.rs:1540 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1566 (plan_replay)`; `crates/metal2vulkan/src/lower/access/mod.rs:1569 (plan_replay)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2707 (merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:2763 (finish_merged)`; `crates/metal2vulkan/src/lower/stage_io/plan.rs:458 (param)`; `crates/metal2vulkan/src/pipeline/compile.rs:2126 (plan_one)`; `crates/metal2vulkan/src/pipeline/compile.rs:2131 (plan_one)` - `feature::VulkanVersion`: `crates/metal2vulkan/src/ash_interop/query.rs:927 (query)`; `crates/metal2vulkan/src/device/derive.rs:105 (with_deviations)` - `feature::Constant`: `crates/metal2vulkan-air/src/bitcode/constants.rs:210 (record)`; `crates/metal2vulkan-air/src/bitcode/constants.rs:268 (record)`; `crates/metal2vulkan/src/error/mod.rs:255 (from)` @@ -374,15 +373,15 @@ Each refusal's sites, with the function that builds it. - `feature::SubgroupOperations`: `crates/metal2vulkan-runtime/src/families/features.rs:1713 (simd)`; `crates/metal2vulkan/src/lower/simd/mod.rs:407 (finish)`; `crates/metal2vulkan/src/lower/simd/mod.rs:466 (full_quads)`; `crates/metal2vulkan/src/lower/simd/mod.rs:990 (select_group)` - `feature::DirectCall`: `crates/metal2vulkan-air/src/canon/mod.rs:1319 (post_check)` - `feature::WideSwitchLiteral`: `crates/metal2vulkan/src/structurize/emit.rs:207 (check_tree)` -- `feature::Lowering`: `crates/metal2vulkan/src/bind/plan/resources.rs:762 (level_views)`; `crates/metal2vulkan/src/lower/access/handle.rs:1062 (texture_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:1073 (sampler_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:318 (domain_kind)`; `crates/metal2vulkan/src/lower/access/imageblock.rs:175 (operand)`; `crates/metal2vulkan/src/lower/access/mod.rs:571 (not_lowered)`; `crates/metal2vulkan/src/lower/access/pulled.rs:76 (share)`; `crates/metal2vulkan/src/lower/arith/legal.rs:53 (not_lowered)`; `crates/metal2vulkan/src/lower/dispatch.rs:114 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:144 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:653 (plan)`; `crates/metal2vulkan/src/lower/fragment/mod.rs:123 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:168 (finish)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:149 (not_lowered)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:126 (not_lowered)`; `crates/metal2vulkan/src/lower/sampler/mod.rs:212 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:30 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:829 (not_lowered)`; `crates/metal2vulkan/src/lower/select.rs:918 (route_air)`; `crates/metal2vulkan/src/lower/simd/mod.rs:136 (not_lowered)`; `crates/metal2vulkan/src/lower/simd/mod.rs:747 (select_param)`; `crates/metal2vulkan/src/lower/simd/workgroup.rs:353 (check)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:96 (not_lowered)`; `crates/metal2vulkan/src/lower/stage_io/mod.rs:182 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:72 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:269 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:310 (select)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:146 (not_lowered)`; `crates/metal2vulkan/src/lower/texture/mod.rs:185 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3689 (select_write)`; `crates/metal2vulkan/src/memory/alloca.rs:54 (not_lowered)`; `crates/metal2vulkan/src/memory/leaf.rs:183 (not_lowered)`; `crates/metal2vulkan/src/memory/plan.rs:490 (not_lowered)`; `crates/metal2vulkan/src/memory/provenance.rs:665 (not_lowered)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:96 (patch_fetch_projection)` +- `feature::Lowering`: `crates/metal2vulkan/src/bind/plan/resources.rs:762 (level_views)`; `crates/metal2vulkan/src/lower/access/handle.rs:1062 (texture_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:1073 (sampler_target)`; `crates/metal2vulkan/src/lower/access/handle.rs:318 (domain_kind)`; `crates/metal2vulkan/src/lower/access/imageblock.rs:175 (operand)`; `crates/metal2vulkan/src/lower/access/mod.rs:571 (not_lowered)`; `crates/metal2vulkan/src/lower/access/pulled.rs:76 (share)`; `crates/metal2vulkan/src/lower/arith/legal.rs:53 (not_lowered)`; `crates/metal2vulkan/src/lower/dispatch.rs:117 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:144 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/discard.rs:653 (plan)`; `crates/metal2vulkan/src/lower/fragment/mod.rs:123 (not_lowered)`; `crates/metal2vulkan/src/lower/fragment/snapshot.rs:168 (finish)`; `crates/metal2vulkan/src/lower/mesh/mod.rs:153 (not_lowered)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:126 (not_lowered)`; `crates/metal2vulkan/src/lower/sampler/mod.rs:212 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:30 (refuse)`; `crates/metal2vulkan/src/lower/select.rs:829 (not_lowered)`; `crates/metal2vulkan/src/lower/select.rs:918 (route_air)`; `crates/metal2vulkan/src/lower/simd/mod.rs:136 (not_lowered)`; `crates/metal2vulkan/src/lower/simd/mod.rs:747 (select_param)`; `crates/metal2vulkan/src/lower/simd/workgroup.rs:353 (check)`; `crates/metal2vulkan/src/lower/stage_io/fetch.rs:96 (not_lowered)`; `crates/metal2vulkan/src/lower/stage_io/mod.rs:182 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/barrier.rs:72 (not_lowered)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:269 (not_implemented)`; `crates/metal2vulkan/src/lower/sync/memory_model.rs:310 (select)`; `crates/metal2vulkan/src/lower/tessellation/mod.rs:146 (not_lowered)`; `crates/metal2vulkan/src/lower/texture/mod.rs:185 (refuse)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3689 (select_write)`; `crates/metal2vulkan/src/memory/alloca.rs:54 (not_lowered)`; `crates/metal2vulkan/src/memory/leaf.rs:183 (not_lowered)`; `crates/metal2vulkan/src/memory/plan.rs:490 (not_lowered)`; `crates/metal2vulkan/src/memory/provenance.rs:665 (not_lowered)`; `crates/metal2vulkan/src/pipeline/link/tessellation/mod.rs:96 (patch_fetch_projection)` - `feature::SamplerAddressMode`: `crates/metal2vulkan/src/lower/sampler/constexpr.rs:176`; `crates/metal2vulkan/src/metal/sampler.rs:251 (check_sampler)` - `feature::AlphaToOne`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:282 (graphics_state)` - `feature::StageStoresAndAtomics`: `crates/metal2vulkan/src/lower/access/tile_memory.rs:72 (written)` - `feature::FunctionConstantArgument`: `crates/metal2vulkan-air/src/canon/interface.rs:899 (absent_values)`; `crates/metal2vulkan/src/lower/access/absent.rs:100 (require)` - `feature::SamplerBicubicFilter`: `crates/metal2vulkan/src/bind/heap.rs:997 (new)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1876 (bicubic_texels)`; `crates/metal2vulkan/src/bind/plan/slots.rs:503 (cubic_variant)`; `crates/metal2vulkan/src/lower/sampler/bicubic.rs:120 (refuse)`; `crates/metal2vulkan/src/lower/sampler/select.rs:35 (bicubic_refused)` -- `feature::GroupCount`: `crates/metal2vulkan/src/bind/dispatch.rs:379 (product)`; `crates/metal2vulkan/src/bind/dispatch.rs:455`; `crates/metal2vulkan/src/bind/dispatch.rs:953 (instantiate)`; `crates/metal2vulkan/src/bind/graphics.rs:3405 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3460 (emulated_draw)` +- `feature::GroupCount`: `crates/metal2vulkan/src/bind/dispatch.rs:379 (product)`; `crates/metal2vulkan/src/bind/dispatch.rs:455`; `crates/metal2vulkan/src/bind/dispatch.rs:953 (instantiate)`; `crates/metal2vulkan/src/bind/graphics.rs:3426 (mesh_draw)`; `crates/metal2vulkan/src/bind/graphics.rs:3483 (emulated_draw)` - `feature::IntersectionFunctionTable`: `crates/metal2vulkan/src/bind/acceleration.rs:177 (geometry_table_offset)`; `crates/metal2vulkan/src/bind/acceleration.rs:183 (geometry_table_offset)`; `crates/metal2vulkan/src/bind/acceleration.rs:188 (geometry_table_offset)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1222 (null_table)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1251 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:1272 (intersect)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:406 (table_of)`; `crates/metal2vulkan/src/lower/raytracing/mod.rs:422 (select_table)`; `crates/metal2vulkan/src/lower/select.rs:885 (route_air)` -- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2192 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1017 (uniform_blend)` +- `feature::IndependentBlending`: `crates/metal2vulkan-runtime/src/render.rs:2193 (check_pipeline)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:1005 (uniform_blend)` - `feature::RasterSampleCount`: `crates/metal2vulkan-runtime/src/families/limits.rs:1063 (sample_count)`; `crates/metal2vulkan/src/pipeline/graphics.rs:563 (sample_count_properties)` - `feature::TriangleFillLines`: `crates/metal2vulkan/src/metal/state.rs:347 (polygon_mode)` - `feature::DepthClipClamp`: `crates/metal2vulkan/src/metal/state.rs:363 (depth_clamp_enable)` @@ -395,18 +394,18 @@ Each refusal's sites, with the function that builds it. - `feature::TextureSwizzle`: `crates/metal2vulkan-runtime/src/binding_view.rs:167 (binding_view)`; `crates/metal2vulkan-runtime/src/texture.rs:999 (may_view)`; `crates/metal2vulkan/src/bind/plan/resources.rs:1102 (plain_texture)`; `crates/metal2vulkan/src/lower/sampler/select.rs:2587 (select_one)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3415 (select_read_as)`; `crates/metal2vulkan/src/lower/texture/mod.rs:3762 (select_write)`; `crates/metal2vulkan/src/lower/texture/slice.rs:307 (select)` - `feature::MipmapGeneration`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1890 (mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_pick.rs:37 (pick_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:262 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:270 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:275 (plan_mipmaps)`; `crates/metal2vulkan-runtime/src/mipmap_plan.rs:304 (plan_mipmaps)`; `crates/metal2vulkan/src/bind/mipmap_filter.rs:973 (mipmap_filter_module)` - `feature::HostMemory`: `crates/metal2vulkan-runtime/src/host_memory.rs:430 (not_importable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:470 (refuse_unwritable)`; `crates/metal2vulkan-runtime/src/host_memory.rs:689 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:694 (new)`; `crates/metal2vulkan-runtime/src/host_memory.rs:712 (new)` -- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2876 (gpu_times)` +- `feature::GpuTimes`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2921 (gpu_times)` - `feature::CountingVisibility`: `crates/metal2vulkan-runtime/src/visibility.rs:452 (check_mode)` - `feature::ViewFormatReinterpretation`: `crates/metal2vulkan-runtime/src/view_plan.rs:573 (reinterpretation_refused)` - `feature::SeparateMultisampledDepthStencil`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:188 (sampled_candidate)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:294 (by_draws)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:336 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:376 (scratch)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:777 (plan)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:658 (nan_write)`; `crates/metal2vulkan-runtime/src/texture/signed_depth.rs:191 (sample_strip)` -- `feature::PixelCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1225 (state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:783 (split_pixel_fragments)` -- `feature::CentroidVarying`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:801 (split_pixel_fragments)` +- `feature::PixelCoverage`: `crates/metal2vulkan-runtime/src/families/features.rs:1225 (state)`; `crates/metal2vulkan/src/pipeline/link/graphics.rs:771 (split_pixel_fragments)` +- `feature::CentroidVarying`: `crates/metal2vulkan/src/pipeline/link/graphics.rs:789 (split_pixel_fragments)` - `feature::PrivateMemory`: `crates/metal2vulkan/src/lower/select.rs:1171 (function_storage)` - `feature::SparseTextures`: `crates/metal2vulkan-runtime/src/sparse/texture.rs:32 (sparse_refusal)` - `feature::TimelineSemaphores`: `crates/metal2vulkan-runtime/src/device/create.rs:1115 (timeline_difference)` - `feature::Reflection`: `crates/metal2vulkan/src/bind/argument_buffer.rs:626 (unmeasured)`; `crates/metal2vulkan/src/reflection/derive.rs:178 (specialized_reads)`; `crates/metal2vulkan/src/reflection/derive.rs:212 (read_attributes)`; `crates/metal2vulkan/src/reflection/derive.rs:239 (gap_at)`; `crates/metal2vulkan/src/reflection/function.rs:172 (unmeasured)`; `crates/metal2vulkan/src/reflection/function.rs:366 (attribute)`; `crates/metal2vulkan/src/reflection/function.rs:437 (module_constants)`; `crates/metal2vulkan/src/reflection/linked.rs:125 (function)`; `crates/metal2vulkan/src/reflection/mod.rs:249 (stage)` - `feature::HeapTextureTiling`: `crates/metal2vulkan-runtime/src/texture/heap.rs:632 (tiling_refusal)` -- `feature::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render_state.rs:1216 (depth_ranges_refused)` +- `feature::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render_state.rs:1230 (depth_ranges_refused)` - `feature::UndeclaredTextureUsage`: `crates/metal2vulkan-runtime/src/binding_view.rs:141 (binding_view)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:72 (refused)` - `feature::RenderTargetSize`: `crates/metal2vulkan-runtime/src/render_pass.rs:1275 (framebuffer_fits)` - `feature::IndirectRenderState`: `crates/metal2vulkan/src/lower/access/encode.rs:568 (select_command)` @@ -426,27 +425,27 @@ Each refusal's sites, with the function that builds it. - `gap::HeapTextureMemory`: `crates/metal2vulkan-runtime/src/texture/heap.rs:1512 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:1519 (heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2061 (host_heap_plan)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2293 (memory_shadow)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:556 (memory_refusal)` - `gap::FunctionTablePastMaxBufferLength`: `crates/metal2vulkan-runtime/src/function_table.rs:622 (past_limit)` - `gap::IndirectCommandBufferPastMaxBufferLength`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:523 (new_indirect_command_buffer)` -- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1291 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1376 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4433 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:518 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1632 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7216 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7800 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8258 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8812 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1126 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2941 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:393 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:461 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:476 (execute_indirect_range)` -- `gap::IndirectImageblockSize`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3408 (set_imageblock_size)` +- `gap::IndirectRenderCommands`: `crates/metal2vulkan-runtime/src/compute.rs:1317 (execute_range)`; `crates/metal2vulkan-runtime/src/compute.rs:1402 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/depth_stencil.rs:85 (gpu_resource_id)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:4459 (render_state)`; `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:518 (new_indirect_command_buffer)`; `crates/metal2vulkan-runtime/src/pipeline/mod.rs:1632 (compile_error)`; `crates/metal2vulkan-runtime/src/render.rs:7271 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7855 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8313 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:8867 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/executions.rs:1127 (back_memoryless)`; `crates/metal2vulkan-runtime/src/render/executions.rs:2942 (record_forms)`; `crates/metal2vulkan-runtime/src/render/executions.rs:393 (execute_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:461 (execute_indirect_range)`; `crates/metal2vulkan-runtime/src/render/executions.rs:476 (execute_indirect_range)` +- `gap::IndirectImageblockSize`: `crates/metal2vulkan-runtime/src/indirect_command_buffer.rs:3434 (set_imageblock_size)` - `gap::CommandReplay`: `crates/metal2vulkan-runtime/src/binding.rs:723 (bind_into)`; `crates/metal2vulkan-runtime/src/binding.rs:726 (bind_into)` - `gap::RenderAttachments`: `crates/metal2vulkan-runtime/src/binding.rs:1794 (unexpected)` - `gap::AccelerationStructures`: `crates/metal2vulkan-runtime/src/binding.rs:1797 (unexpected)` - `gap::FeatureEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1166 (of)` - `gap::ExtensionEnable`: `crates/metal2vulkan-runtime/src/enables.rs:1157 (of)` -- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:460 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:684 (check_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:796 (attachment_twin)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:283 (check_sizes)`; `crates/metal2vulkan-runtime/src/kept_bytes.rs:138 (settle)`; `crates/metal2vulkan-runtime/src/linear_attachment.rs:293 (settle)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1169 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2242 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5959 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7894 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:516 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1317 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1680 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1734 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1795 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2028 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1035 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:1103 (color_copy)`; `crates/metal2vulkan-runtime/src/resolve.rs:1150 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1167 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1232 (destination)` +- `gap::Render`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:404 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:461 (stand_in_as)`; `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:685 (check_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:796 (attachment_twin)`; `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:283 (check_sizes)`; `crates/metal2vulkan-runtime/src/kept_bytes.rs:138 (settle)`; `crates/metal2vulkan-runtime/src/linear_attachment.rs:293 (settle)`; `crates/metal2vulkan-runtime/src/nan_clear.rs:204 (plan)`; `crates/metal2vulkan-runtime/src/pipeline/render.rs:1169 (imageblock_sample_length)`; `crates/metal2vulkan-runtime/src/render.rs:2243 (check_pipeline)`; `crates/metal2vulkan-runtime/src/render.rs:5977 (next_instance)`; `crates/metal2vulkan-runtime/src/render.rs:7949 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:516 (scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1317 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1676 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1730 (target)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1791 (attachment_format)`; `crates/metal2vulkan-runtime/src/render_pass.rs:2024 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:1039 (attach)`; `crates/metal2vulkan-runtime/src/resolve.rs:1107 (color_copy)`; `crates/metal2vulkan-runtime/src/resolve.rs:1154 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1171 (destination)`; `crates/metal2vulkan-runtime/src/resolve.rs:1236 (destination)` - `gap::TexelsPastBufferLength`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:261 (refusal_error)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:105 (surface_depth_twin)` - `gap::OverlappingSurfaceRows`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:263 (refusal_error)` -- `gap::SamplePositionsAtBegin`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145 (stencil_scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1865 (positioned_stand_in)`; `crates/metal2vulkan-runtime/src/sample_positions.rs:185 (grid)` +- `gap::SamplePositionsAtBegin`: `crates/metal2vulkan-runtime/src/depth_stencil_scratch.rs:145 (stencil_scratch)`; `crates/metal2vulkan-runtime/src/render_pass.rs:1861 (positioned_stand_in)`; `crates/metal2vulkan-runtime/src/sample_positions.rs:185 (grid)` - `gap::SharedEventAcrossDevices`: `crates/metal2vulkan-runtime/src/event.rs:385 (new_shared_event_with_handle)` -- `gap::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:341 (settings)`; `crates/metal2vulkan-runtime/src/render_state.rs:1039`; `crates/metal2vulkan-runtime/src/render_state.rs:1208 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1575 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1594 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:527 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:755 (compensation)` -- `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1603 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1606 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:365 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:463 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:605 (compensation)` +- `gap::ViewportDepthRange`: `crates/metal2vulkan-runtime/src/render/draw_shape.rs:341 (settings)`; `crates/metal2vulkan-runtime/src/render_state.rs:1053`; `crates/metal2vulkan-runtime/src/render_state.rs:1222 (depth_ranges_refused)`; `crates/metal2vulkan-runtime/src/render_state.rs:1589 (bias_holds)`; `crates/metal2vulkan-runtime/src/render_state.rs:1608 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:541 (depth_range)`; `crates/metal2vulkan-runtime/src/render_state.rs:769 (compensation)` +- `gap::NonFiniteDepthBias`: `crates/metal2vulkan-runtime/src/render_state.rs:1617 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:1620 (collapses)`; `crates/metal2vulkan-runtime/src/render_state.rs:379 (set_depth_bias)`; `crates/metal2vulkan-runtime/src/render_state.rs:477 (draw_viewports)`; `crates/metal2vulkan-runtime/src/render_state.rs:619 (compensation)` - `gap::DepthNeverWithoutAttachment`: `crates/metal2vulkan-runtime/src/depth_stencil.rs:147 (failing_draw)` -- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:563 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6636 (hidden_depth_stencil)` -- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:102 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3321 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7545 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7682 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7713 (draw_resident)` -- `gap::DepthStencilResolve`: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441 (draws_run)`; `crates/metal2vulkan-runtime/src/resolve.rs:1388 (plan)`; `crates/metal2vulkan-runtime/src/resolve.rs:787 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:885 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:905 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:946 (split_steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:958 (split_steps)` -- `gap::TileAtSampleCount`: `crates/metal2vulkan-runtime/src/render_pass.rs:1615 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:937` -- `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7370 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929 (dispatch_tiles_resident)` -- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7362 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:921 (dispatch_tiles_resident)` +- `gap::HiddenDepthStencil`: `crates/metal2vulkan-runtime/src/attachment_stand_in.rs:564 (hidden)`; `crates/metal2vulkan-runtime/src/render.rs:6654 (hidden_depth_stencil)` +- `gap::IndirectDrawArguments`: `crates/metal2vulkan-runtime/src/index_bounds.rs:102 (new)`; `crates/metal2vulkan-runtime/src/render.rs:3322 (draw_indexed_primitives_indirect)`; `crates/metal2vulkan-runtime/src/render.rs:7600 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7737 (draw_resident)`; `crates/metal2vulkan-runtime/src/render.rs:7768 (draw_resident)` +- `gap::DepthStencilResolve`: `crates/metal2vulkan-runtime/src/depth_stencil_resolve.rs:441 (draws_run)`; `crates/metal2vulkan-runtime/src/resolve.rs:1392 (plan)`; `crates/metal2vulkan-runtime/src/resolve.rs:791 (depth_stencil)`; `crates/metal2vulkan-runtime/src/resolve.rs:889 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:909 (steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:950 (split_steps)`; `crates/metal2vulkan-runtime/src/resolve.rs:962 (split_steps)` +- `gap::TileAtSampleCount`: `crates/metal2vulkan-runtime/src/render_pass.rs:1611 (layout)`; `crates/metal2vulkan-runtime/src/render_pass.rs:937` +- `gap::ImageblockMasters`: `crates/metal2vulkan-runtime/src/render.rs:7425 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:929 (dispatch_tiles_resident)` +- `gap::TileAndFragmentImageblocks`: `crates/metal2vulkan-runtime/src/render.rs:7417 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:796 (dispatch_tiles_resident)`; `crates/metal2vulkan-runtime/src/render/tile_dispatch.rs:921 (dispatch_tiles_resident)` - `gap::Metal4Api`: `crates/metal2vulkan-runtime/src/families/features.rs:1487 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1026 (state)`; `crates/metal2vulkan-runtime/src/families/mod.rs:362 (audit)` - `gap::CounterSampleBuffers`: `crates/metal2vulkan-runtime/src/families/limits.rs:1017 (state)` - `gap::ResidencySets`: `crates/metal2vulkan-runtime/src/families/features.rs:1469 (state)`; `crates/metal2vulkan-runtime/src/families/limits.rs:1019 (state)` @@ -459,7 +458,7 @@ Each refusal's sites, with the function that builds it. - `gap::ShaderLogging`: `crates/metal2vulkan-runtime/src/families/features.rs:1468 (state)` - `gap::DeviceNotifications`: `crates/metal2vulkan-runtime/src/families/features.rs:1472 (state)` - `gap::RateMapRegions`: `crates/metal2vulkan-runtime/src/rate_mapped_pass.rs:396 (refusal)` -- `gap::LayeredPass`: `crates/metal2vulkan-runtime/src/color_resolve.rs:890 (plan)` +- `gap::LayeredPass`: `crates/metal2vulkan-runtime/src/color_resolve.rs:928 (plan)` - `gap::FunctionOptions`: `crates/metal2vulkan-runtime/src/library.rs:215 (new_function_with_descriptor)` - `gap::OverlappingTextureCopies`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1340 (texture_copies_of_bytes)` - `gap::RebindTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:637 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2743 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2758 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2769 (rebound_heap_images)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2812 (dma_buf_heap_images_again)` @@ -470,30 +469,29 @@ Each refusal's sites, with the function that builds it. - `gap::MappedTextureSampling`: `crates/metal2vulkan-runtime/src/address_map.rs:158 (resolve)` - `gap::LibrarySource`: `crates/metal2vulkan-runtime/src/library.rs:107 (new_library_with_source)` - `gap::RestartedStrip`: `crates/metal2vulkan-runtime/src/render/restart.rs:71 (gap)` -- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:8095 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)` +- `gap::PrivatePrimitives`: `crates/metal2vulkan-runtime/src/render.rs:8150 (draw_resident)`; `crates/metal2vulkan-runtime/src/render/restart.rs:72 (gap)` - `gap::ProvokingVertex`: `crates/metal2vulkan-runtime/src/render/restart.rs:73 (gap)` -- `gap::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:8106 (draw_resident)` -- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1669 (texel_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:715 (turned_plane)`; `crates/metal2vulkan-runtime/src/rotated.rs:185 (new)`; `crates/metal2vulkan-runtime/src/rotated.rs:201 (new)`; `crates/metal2vulkan-runtime/src/shadow.rs:650 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:5156 (view)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:100 (check_rotated_reach)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:322 (copied_image)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:238 (new_usage_shadow)` +- `gap::PrimitiveIdIndices`: `crates/metal2vulkan-runtime/src/render.rs:8161 (draw_resident)` +- `gap::RotatedTexture`: `crates/metal2vulkan-runtime/src/blit_texture.rs:1669 (texel_copies)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:715 (turned_plane)`; `crates/metal2vulkan-runtime/src/rotated.rs:185 (new)`; `crates/metal2vulkan-runtime/src/rotated.rs:201 (new)`; `crates/metal2vulkan-runtime/src/shadow.rs:667 (unmerged)`; `crates/metal2vulkan-runtime/src/texture.rs:5156 (view)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:100 (check_rotated_reach)`; `crates/metal2vulkan-runtime/src/texture/rotation.rs:322 (copied_image)`; `crates/metal2vulkan-runtime/src/texture/usage_shadow.rs:238 (new_usage_shadow)` - `gap::DetachTextures`: `crates/metal2vulkan-runtime/src/buffer_descriptor.rs:641 (rebind_host_pages)`; `crates/metal2vulkan-runtime/src/buffer_texture.rs:622 (make_texture_over)`; `crates/metal2vulkan-runtime/src/detach.rs:172 (detach_host_pages)`; `crates/metal2vulkan-runtime/src/texture/heap.rs:2952 (heap_texture_at)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:143 (new_stand_in)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:248 (stand_in_while_detached)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:298 (stand_ins)`; `crates/metal2vulkan-runtime/src/texture/stand_in.rs:304 (stand_ins)` - `gap::TextureBufferLevels`: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:540 (check_made)` - `gap::WriteSwizzle`: `crates/metal2vulkan-runtime/src/texture_descriptor.rs:547 (check_made)` - `gap::DetachedTexelAccess`: `crates/metal2vulkan-runtime/src/texture.rs:4986 (refuse_detached_texels)` - `gap::SurfaceDepthStencil`: `crates/metal2vulkan-runtime/src/blit_texture.rs:269 (unit)`; `crates/metal2vulkan-runtime/src/texture/surface_depth.rs:57 (surface_depth_twin)` -- `gap::ExtendedRangeResolve`: `crates/metal2vulkan-runtime/src/resolve.rs:604 (color)` - `gap::MultisampledBufferCopy`: `crates/metal2vulkan-runtime/src/blit_texture.rs:536 (copy_from_buffer_to_texture)`; `crates/metal2vulkan-runtime/src/blit_texture.rs:693 (copy_from_texture_to_buffer)` - `gap::MultisampledBufferLayout`: `crates/metal2vulkan-runtime/src/sample_interleave.rs:1029 (plan)` - `gap::ColorAttachmentGroups`: `crates/metal2vulkan-runtime/src/render/color_groups.rs:106 (gap)` -- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2414 (commit_now)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126 (refuse_protected_state_encoder)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:52 (set)` -- `apple::LineWidth`: `crates/metal2vulkan-runtime/src/apple_only.rs:189 (check)` -- `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs:191 (check)` -- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:195 (check)`; `crates/metal2vulkan-runtime/src/apple_only.rs:320 (set_vertex_amplification_mode)` +- `apple::ProtectedContent`: `crates/metal2vulkan-runtime/src/command_buffer/mod.rs:2452 (commit_now)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:126 (refuse_protected_state_encoder)`; `crates/metal2vulkan-runtime/src/command_buffer/protection.rs:52 (set)` +- `apple::LineWidth`: `crates/metal2vulkan-runtime/src/apple_only.rs:190 (check)` +- `apple::ViewportTransformDisabled`: `crates/metal2vulkan-runtime/src/apple_only.rs:192 (check)` +- `apple::VertexAmplificationMode`: `crates/metal2vulkan-runtime/src/apple_only.rs:196 (check)`; `crates/metal2vulkan-runtime/src/apple_only.rs:321 (set_vertex_amplification_mode)` - `apple::SurfaceClientDirection`: `crates/metal2vulkan-runtime/src/buffer_texture.rs:417 (new_texture_with_iosurface_plane)` - `bind::DescriptorRangeExceeded`: `crates/metal2vulkan/src/bind/instantiate.rs:655 (bind_buffers)` - `bind::TexelBufferTooLarge`: `crates/metal2vulkan/src/bind/instantiate.rs:894 (texel_ranges)` - `bind::HeapTooLarge`: `crates/metal2vulkan/src/bind/heap.rs:1014 (new)`; `crates/metal2vulkan/src/bind/heap.rs:1748 (directory_bytes)`; `crates/metal2vulkan/src/bind/heap.rs:1863 (listed_sampler_tables)`; `crates/metal2vulkan/src/bind/heap.rs:1913 (placed)`; `crates/metal2vulkan/src/bind/heap.rs:2069 (heap_elements)`; `crates/metal2vulkan/src/bind/heap.rs:949 (new)`; `crates/metal2vulkan/src/bind/heap.rs:965 (new)` -- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3790 (patch_binding)` -- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3834 (patch_binding)` -- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3872 (patch_binding)` +- `bind::TessellationFactorRange`: `crates/metal2vulkan/src/bind/graphics.rs:3834 (patch_binding)` +- `bind::PatchIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3878 (patch_binding)` +- `bind::ControlPointIndexRange`: `crates/metal2vulkan/src/bind/graphics.rs:3916 (patch_binding)` - `bind::MissingStageInRegion`: `crates/metal2vulkan/src/bind/dispatch.rs:796 (instantiate)` - `bind::UniformViewAliased`: `crates/metal2vulkan/src/bind/instantiate.rs:609 (check_uniform_aliasing)` - `bind::MissingDeviceAddress`: `crates/metal2vulkan/src/bind/plan/slots.rs:133 (plan_buffer)`