@@ -585,134 +585,134 @@ impl super::PrivateCapabilities {
585
585
} else {
586
586
mtl:: MTLReadWriteTextureTier :: TierNone
587
587
} ,
588
- resource_heaps : Self :: supports_any ( & device, RESOURCE_HEAP_SUPPORT ) ,
589
- argument_buffers : Self :: supports_any ( & device, ARGUMENT_BUFFER_SUPPORT ) ,
588
+ resource_heaps : Self :: supports_any ( device, RESOURCE_HEAP_SUPPORT ) ,
589
+ argument_buffers : Self :: supports_any ( device, ARGUMENT_BUFFER_SUPPORT ) ,
590
590
shared_textures : !os_is_mac,
591
591
mutable_comparison_samplers : Self :: supports_any (
592
- & device,
592
+ device,
593
593
MUTABLE_COMPARISON_SAMPLER_SUPPORT ,
594
594
) ,
595
- sampler_clamp_to_border : Self :: supports_any ( & device, SAMPLER_CLAMP_TO_BORDER_SUPPORT ) ,
595
+ sampler_clamp_to_border : Self :: supports_any ( device, SAMPLER_CLAMP_TO_BORDER_SUPPORT ) ,
596
596
sampler_lod_average : {
597
597
// TODO: Clarify minimum macOS version with Apple (43707452)
598
598
let need_version = if os_is_mac { ( 10 , 13 ) } else { ( 9 , 0 ) } ;
599
599
Self :: version_at_least ( major, minor, need_version. 0 , need_version. 1 )
600
600
} ,
601
- base_instance : Self :: supports_any ( & device, BASE_INSTANCE_SUPPORT ) ,
602
- base_vertex_instance_drawing : Self :: supports_any ( & device, BASE_VERTEX_INSTANCE_SUPPORT ) ,
603
- dual_source_blending : Self :: supports_any ( & device, DUAL_SOURCE_BLEND_SUPPORT ) ,
601
+ base_instance : Self :: supports_any ( device, BASE_INSTANCE_SUPPORT ) ,
602
+ base_vertex_instance_drawing : Self :: supports_any ( device, BASE_VERTEX_INSTANCE_SUPPORT ) ,
603
+ dual_source_blending : Self :: supports_any ( device, DUAL_SOURCE_BLEND_SUPPORT ) ,
604
604
low_power : !os_is_mac || device. is_low_power ( ) ,
605
605
headless : os_is_mac && device. is_headless ( ) ,
606
- layered_rendering : Self :: supports_any ( & device, LAYERED_RENDERING_SUPPORT ) ,
607
- function_specialization : Self :: supports_any ( & device, FUNCTION_SPECIALIZATION_SUPPORT ) ,
608
- depth_clip_mode : Self :: supports_any ( & device, DEPTH_CLIP_MODE ) ,
609
- texture_cube_array : Self :: supports_any ( & device, TEXTURE_CUBE_ARRAY_SUPPORT ) ,
606
+ layered_rendering : Self :: supports_any ( device, LAYERED_RENDERING_SUPPORT ) ,
607
+ function_specialization : Self :: supports_any ( device, FUNCTION_SPECIALIZATION_SUPPORT ) ,
608
+ depth_clip_mode : Self :: supports_any ( device, DEPTH_CLIP_MODE ) ,
609
+ texture_cube_array : Self :: supports_any ( device, TEXTURE_CUBE_ARRAY_SUPPORT ) ,
610
610
format_depth24_stencil8 : os_is_mac && device. d24_s8_supported ( ) ,
611
611
format_depth32_stencil8_filter : os_is_mac,
612
612
format_depth32_stencil8_none : !os_is_mac,
613
613
format_min_srgb_channels : if os_is_mac { 4 } else { 1 } ,
614
614
format_b5 : !os_is_mac,
615
615
format_bc : os_is_mac,
616
616
format_eac_etc : !os_is_mac,
617
- format_astc : Self :: supports_any ( & device, ASTC_PIXEL_FORMAT_FEATURES ) ,
618
- format_any8_unorm_srgb_all : Self :: supports_any ( & device, ANY8_UNORM_SRGB_ALL ) ,
619
- format_any8_unorm_srgb_no_write : !Self :: supports_any ( & device, ANY8_UNORM_SRGB_ALL )
617
+ format_astc : Self :: supports_any ( device, ASTC_PIXEL_FORMAT_FEATURES ) ,
618
+ format_any8_unorm_srgb_all : Self :: supports_any ( device, ANY8_UNORM_SRGB_ALL ) ,
619
+ format_any8_unorm_srgb_no_write : !Self :: supports_any ( device, ANY8_UNORM_SRGB_ALL )
620
620
&& !os_is_mac,
621
- format_any8_snorm_all : Self :: supports_any ( & device, ANY8_SNORM_RESOLVE ) ,
621
+ format_any8_snorm_all : Self :: supports_any ( device, ANY8_SNORM_RESOLVE ) ,
622
622
format_r16_norm_all : os_is_mac,
623
623
format_r32_all : !Self :: supports_any (
624
- & device,
624
+ device,
625
625
& [
626
626
MTLFeatureSet :: iOS_GPUFamily1_v1,
627
627
MTLFeatureSet :: iOS_GPUFamily2_v1,
628
628
] ,
629
629
) ,
630
630
format_r32_no_write : Self :: supports_any (
631
- & device,
631
+ device,
632
632
& [
633
633
MTLFeatureSet :: iOS_GPUFamily1_v1,
634
634
MTLFeatureSet :: iOS_GPUFamily2_v1,
635
635
] ,
636
636
) ,
637
637
format_r32float_no_write_no_filter : Self :: supports_any (
638
- & device,
638
+ device,
639
639
& [
640
640
MTLFeatureSet :: iOS_GPUFamily1_v1,
641
641
MTLFeatureSet :: iOS_GPUFamily2_v1,
642
642
] ,
643
643
) && !os_is_mac,
644
644
format_r32float_no_filter : !Self :: supports_any (
645
- & device,
645
+ device,
646
646
& [
647
647
MTLFeatureSet :: iOS_GPUFamily1_v1,
648
648
MTLFeatureSet :: iOS_GPUFamily2_v1,
649
649
] ,
650
650
) && !os_is_mac,
651
651
format_r32float_all : os_is_mac,
652
- format_rgba8_srgb_all : Self :: supports_any ( & device, RGBA8_SRGB ) ,
653
- format_rgba8_srgb_no_write : !Self :: supports_any ( & device, RGBA8_SRGB ) ,
654
- format_rgb10a2_unorm_all : Self :: supports_any ( & device, RGB10A2UNORM_ALL ) ,
655
- format_rgb10a2_unorm_no_write : !Self :: supports_any ( & device, RGB10A2UNORM_ALL ) ,
656
- format_rgb10a2_uint_color : !Self :: supports_any ( & device, RGB10A2UINT_COLOR_WRITE ) ,
657
- format_rgb10a2_uint_color_write : Self :: supports_any ( & device, RGB10A2UINT_COLOR_WRITE ) ,
658
- format_rg11b10_all : Self :: supports_any ( & device, RG11B10FLOAT_ALL ) ,
659
- format_rg11b10_no_write : !Self :: supports_any ( & device, RG11B10FLOAT_ALL ) ,
660
- format_rgb9e5_all : Self :: supports_any ( & device, RGB9E5FLOAT_ALL ) ,
661
- format_rgb9e5_no_write : !Self :: supports_any ( & device, RGB9E5FLOAT_ALL ) && !os_is_mac,
652
+ format_rgba8_srgb_all : Self :: supports_any ( device, RGBA8_SRGB ) ,
653
+ format_rgba8_srgb_no_write : !Self :: supports_any ( device, RGBA8_SRGB ) ,
654
+ format_rgb10a2_unorm_all : Self :: supports_any ( device, RGB10A2UNORM_ALL ) ,
655
+ format_rgb10a2_unorm_no_write : !Self :: supports_any ( device, RGB10A2UNORM_ALL ) ,
656
+ format_rgb10a2_uint_color : !Self :: supports_any ( device, RGB10A2UINT_COLOR_WRITE ) ,
657
+ format_rgb10a2_uint_color_write : Self :: supports_any ( device, RGB10A2UINT_COLOR_WRITE ) ,
658
+ format_rg11b10_all : Self :: supports_any ( device, RG11B10FLOAT_ALL ) ,
659
+ format_rg11b10_no_write : !Self :: supports_any ( device, RG11B10FLOAT_ALL ) ,
660
+ format_rgb9e5_all : Self :: supports_any ( device, RGB9E5FLOAT_ALL ) ,
661
+ format_rgb9e5_no_write : !Self :: supports_any ( device, RGB9E5FLOAT_ALL ) && !os_is_mac,
662
662
format_rgb9e5_filter_only : os_is_mac,
663
663
format_rg32_color : Self :: supports_any (
664
- & device,
664
+ device,
665
665
& [
666
666
MTLFeatureSet :: iOS_GPUFamily1_v1,
667
667
MTLFeatureSet :: iOS_GPUFamily2_v1,
668
668
] ,
669
669
) ,
670
670
format_rg32_color_write : !Self :: supports_any (
671
- & device,
671
+ device,
672
672
& [
673
673
MTLFeatureSet :: iOS_GPUFamily1_v1,
674
674
MTLFeatureSet :: iOS_GPUFamily2_v1,
675
675
] ,
676
676
) ,
677
677
format_rg32float_all : os_is_mac,
678
678
format_rg32float_color_blend : Self :: supports_any (
679
- & device,
679
+ device,
680
680
& [
681
681
MTLFeatureSet :: iOS_GPUFamily1_v1,
682
682
MTLFeatureSet :: iOS_GPUFamily2_v1,
683
683
] ,
684
684
) ,
685
685
format_rg32float_no_filter : !os_is_mac
686
686
&& !Self :: supports_any (
687
- & device,
687
+ device,
688
688
& [
689
689
MTLFeatureSet :: iOS_GPUFamily1_v1,
690
690
MTLFeatureSet :: iOS_GPUFamily2_v1,
691
691
] ,
692
692
) ,
693
693
format_rgba32int_color : Self :: supports_any (
694
- & device,
694
+ device,
695
695
& [
696
696
MTLFeatureSet :: iOS_GPUFamily1_v1,
697
697
MTLFeatureSet :: iOS_GPUFamily2_v1,
698
698
] ,
699
699
) ,
700
700
format_rgba32int_color_write : !Self :: supports_any (
701
- & device,
701
+ device,
702
702
& [
703
703
MTLFeatureSet :: iOS_GPUFamily1_v1,
704
704
MTLFeatureSet :: iOS_GPUFamily2_v1,
705
705
] ,
706
706
) ,
707
707
format_rgba32float_color : Self :: supports_any (
708
- & device,
708
+ device,
709
709
& [
710
710
MTLFeatureSet :: iOS_GPUFamily1_v1,
711
711
MTLFeatureSet :: iOS_GPUFamily2_v1,
712
712
] ,
713
713
) ,
714
714
format_rgba32float_color_write : !Self :: supports_any (
715
- & device,
715
+ device,
716
716
& [
717
717
MTLFeatureSet :: iOS_GPUFamily1_v1,
718
718
MTLFeatureSet :: iOS_GPUFamily2_v1,
@@ -724,7 +724,7 @@ impl super::PrivateCapabilities {
724
724
. supports_feature_set ( MTLFeatureSet :: macOS_GPUFamily1_v1) ,
725
725
format_depth32float_none : !device
726
726
. supports_feature_set ( MTLFeatureSet :: macOS_GPUFamily1_v1) ,
727
- format_bgr10a2_all : Self :: supports_any ( & device, BGR10A2_ALL ) ,
727
+ format_bgr10a2_all : Self :: supports_any ( device, BGR10A2_ALL ) ,
728
728
format_bgr10a2_no_write : !device
729
729
. supports_feature_set ( MTLFeatureSet :: macOS_GPUFamily1_v3) ,
730
730
max_buffers_per_stage : 31 ,
@@ -737,7 +737,7 @@ impl super::PrivateCapabilities {
737
737
1 << 28 // 256MB otherwise
738
738
} ,
739
739
max_texture_size : if Self :: supports_any (
740
- & device,
740
+ device,
741
741
& [
742
742
MTLFeatureSet :: iOS_GPUFamily3_v1,
743
743
MTLFeatureSet :: tvOS_GPUFamily2_v1,
@@ -746,7 +746,7 @@ impl super::PrivateCapabilities {
746
746
) {
747
747
16384
748
748
} else if Self :: supports_any (
749
- & device,
749
+ device,
750
750
& [
751
751
MTLFeatureSet :: iOS_GPUFamily1_v2,
752
752
MTLFeatureSet :: iOS_GPUFamily2_v2,
@@ -761,7 +761,7 @@ impl super::PrivateCapabilities {
761
761
max_texture_layers : 2048 ,
762
762
max_fragment_input_components : if os_is_mac { 128 } else { 60 } ,
763
763
max_color_render_targets : if Self :: supports_any (
764
- & device,
764
+ device,
765
765
& [
766
766
MTLFeatureSet :: iOS_GPUFamily2_v1,
767
767
MTLFeatureSet :: iOS_GPUFamily3_v1,
@@ -778,15 +778,15 @@ impl super::PrivateCapabilities {
778
778
4
779
779
} ,
780
780
max_total_threadgroup_memory : if Self :: supports_any (
781
- & device,
781
+ device,
782
782
& [
783
783
MTLFeatureSet :: iOS_GPUFamily4_v2,
784
784
MTLFeatureSet :: iOS_GPUFamily5_v1,
785
785
] ,
786
786
) {
787
787
64 << 10
788
788
} else if Self :: supports_any (
789
- & device,
789
+ device,
790
790
& [
791
791
MTLFeatureSet :: iOS_GPUFamily4_v1,
792
792
MTLFeatureSet :: macOS_GPUFamily1_v2,
@@ -799,7 +799,7 @@ impl super::PrivateCapabilities {
799
799
} ,
800
800
sample_count_mask,
801
801
supports_debug_markers : Self :: supports_any (
802
- & device,
802
+ device,
803
803
& [
804
804
MTLFeatureSet :: macOS_GPUFamily1_v2,
805
805
MTLFeatureSet :: macOS_GPUFamily2_v1,
0 commit comments