diff --git a/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs index 9c467a1cc..a40ae2af5 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs @@ -149,11 +149,11 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg // 1. AllowAll - call avx/fma implementation // 2. DisableFMA - call avx without fma implementation // 3. DisableAvx - call sse implementation - // 4. DisableSIMD - call Vector4 fallback implementation + // 4. DisableHWIntrinsic - call Vector4 fallback implementation FeatureTestRunner.RunWithHwIntrinsicsFeature( RunTest, seed, - HwIntrinsics.AllowAll | HwIntrinsics.DisableFMA | HwIntrinsics.DisableAVX | HwIntrinsics.DisableSIMD); + HwIntrinsics.AllowAll | HwIntrinsics.DisableFMA | HwIntrinsics.DisableAVX | HwIntrinsics.DisableHWIntrinsic); } // Forward transform @@ -200,11 +200,11 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg // 1. AllowAll - call avx/fma implementation // 2. DisableFMA - call avx without fma implementation // 3. DisableAvx - call Vector4 implementation - // 4. DisableSIMD - call scalar fallback implementation + // 4. DisableHWIntrinsic - call scalar fallback implementation FeatureTestRunner.RunWithHwIntrinsicsFeature( RunTest, seed, - HwIntrinsics.AllowAll | HwIntrinsics.DisableFMA | HwIntrinsics.DisableAVX | HwIntrinsics.DisableSIMD); + HwIntrinsics.AllowAll | HwIntrinsics.DisableFMA | HwIntrinsics.DisableAVX | HwIntrinsics.DisableHWIntrinsic); } } } diff --git a/tests/ImageSharp.Tests/Formats/Png/PngEncoderFilterTests.cs b/tests/ImageSharp.Tests/Formats/Png/PngEncoderFilterTests.cs index 11e3fbb23..90fa5777b 100644 --- a/tests/ImageSharp.Tests/Formats/Png/PngEncoderFilterTests.cs +++ b/tests/ImageSharp.Tests/Formats/Png/PngEncoderFilterTests.cs @@ -39,7 +39,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png FeatureTestRunner.RunWithHwIntrinsicsFeature( RunTest, - HwIntrinsics.DisableSIMD); + HwIntrinsics.DisableHWIntrinsic); } [Fact] @@ -95,7 +95,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png FeatureTestRunner.RunWithHwIntrinsicsFeature( RunTest, - HwIntrinsics.DisableSIMD); + HwIntrinsics.DisableHWIntrinsic); } [Fact] @@ -137,7 +137,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png FeatureTestRunner.RunWithHwIntrinsicsFeature( RunTest, - HwIntrinsics.DisableSIMD); + HwIntrinsics.DisableHWIntrinsic); } [Fact] @@ -179,7 +179,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Png FeatureTestRunner.RunWithHwIntrinsicsFeature( RunTest, - HwIntrinsics.DisableSIMD); + HwIntrinsics.DisableHWIntrinsic); } [Fact] diff --git a/tests/ImageSharp.Tests/TestUtilities/FeatureTesting/FeatureTestRunner.cs b/tests/ImageSharp.Tests/TestUtilities/FeatureTesting/FeatureTestRunner.cs index 0d2f3fcef..fc0374bbd 100644 --- a/tests/ImageSharp.Tests/TestUtilities/FeatureTesting/FeatureTestRunner.cs +++ b/tests/ImageSharp.Tests/TestUtilities/FeatureTesting/FeatureTestRunner.cs @@ -356,10 +356,6 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities var key = (HwIntrinsics)Enum.Parse(typeof(HwIntrinsics), intrinsic); switch (intrinsic) { - case nameof(HwIntrinsics.DisableSIMD): - features.Add(key, "FeatureSIMD"); - break; - case nameof(HwIntrinsics.AllowAll): // Not a COMPlus value. We filter in calling method. @@ -390,23 +386,22 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities { // Use flags so we can pass multiple values without using params. // Don't base on 0 or use inverse for All as that doesn't translate to string values. - DisableSIMD = 1 << 0, - DisableHWIntrinsic = 1 << 1, - DisableSSE = 1 << 2, - DisableSSE2 = 1 << 3, - DisableAES = 1 << 4, - DisablePCLMULQDQ = 1 << 5, - DisableSSE3 = 1 << 6, - DisableSSSE3 = 1 << 7, - DisableSSE41 = 1 << 8, - DisableSSE42 = 1 << 9, - DisablePOPCNT = 1 << 10, - DisableAVX = 1 << 11, - DisableFMA = 1 << 12, - DisableAVX2 = 1 << 13, - DisableBMI1 = 1 << 14, - DisableBMI2 = 1 << 15, - DisableLZCNT = 1 << 16, - AllowAll = 1 << 17 + DisableHWIntrinsic = 1 << 0, + DisableSSE = 1 << 1, + DisableSSE2 = 1 << 2, + DisableAES = 1 << 3, + DisablePCLMULQDQ = 1 << 4, + DisableSSE3 = 1 << 5, + DisableSSSE3 = 1 << 6, + DisableSSE41 = 1 << 7, + DisableSSE42 = 1 << 8, + DisablePOPCNT = 1 << 9, + DisableAVX = 1 << 10, + DisableFMA = 1 << 11, + DisableAVX2 = 1 << 12, + DisableBMI1 = 1 << 13, + DisableBMI2 = 1 << 14, + DisableLZCNT = 1 << 15, + AllowAll = 1 << 16 } } diff --git a/tests/ImageSharp.Tests/TestUtilities/Tests/FeatureTestRunnerTests.cs b/tests/ImageSharp.Tests/TestUtilities/Tests/FeatureTestRunnerTests.cs index a46e4341d..6dd59a750 100644 --- a/tests/ImageSharp.Tests/TestUtilities/Tests/FeatureTestRunnerTests.cs +++ b/tests/ImageSharp.Tests/TestUtilities/Tests/FeatureTestRunnerTests.cs @@ -16,10 +16,10 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests public class FeatureTestRunnerTests { public static TheoryData Intrinsics => - new TheoryData + new() { { HwIntrinsics.DisableAES | HwIntrinsics.AllowAll, new string[] { "EnableAES", "AllowAll" } }, - { HwIntrinsics.DisableSIMD | HwIntrinsics.DisableHWIntrinsic, new string[] { "FeatureSIMD", "EnableHWIntrinsic" } }, + { HwIntrinsics.DisableHWIntrinsic, new string[] { "EnableHWIntrinsic" } }, { HwIntrinsics.DisableSSE42 | HwIntrinsics.DisableAVX, new string[] { "EnableSSE42", "EnableAVX" } } }; @@ -55,18 +55,6 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests HwIntrinsics.AllowAll); } -#if !NET7_0_OR_GREATER - // COMPlus_EnableSIMD isn't thing anymore. - // https://github.com/dotnet/runtime/issues/66206 - [Fact] - public void CanLimitHwIntrinsicSIMDFeatures() - { - FeatureTestRunner.RunWithHwIntrinsicsFeature( - () => Assert.False(Vector.IsHardwareAccelerated), - HwIntrinsics.DisableSIMD); - } -#endif - #if SUPPORTS_RUNTIME_INTRINSICS [Fact] public void CanLimitHwIntrinsicBaseFeatures() @@ -105,13 +93,6 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests switch ((HwIntrinsics)Enum.Parse(typeof(HwIntrinsics), intrinsic)) { -#if !NET7_0_OR_GREATER - // COMPlus_EnableSIMD isn't thing anymore. - // https://github.com/dotnet/runtime/issues/66206 - case HwIntrinsics.DisableSIMD: - Assert.False(Vector.IsHardwareAccelerated); - break; -#endif #if SUPPORTS_RUNTIME_INTRINSICS case HwIntrinsics.DisableHWIntrinsic: Assert.False(Sse.IsSupported); @@ -214,13 +195,6 @@ namespace SixLabors.ImageSharp.Tests.TestUtilities.Tests switch ((HwIntrinsics)Enum.Parse(typeof(HwIntrinsics), intrinsic)) { -#if !NET7_0_OR_GREATER - // COMPlus_EnableSIMD isn't thing anymore. - // https://github.com/dotnet/runtime/issues/66206 - case HwIntrinsics.DisableSIMD: - Assert.False(Vector.IsHardwareAccelerated, nameof(Vector.IsHardwareAccelerated)); - break; -#endif #if SUPPORTS_RUNTIME_INTRINSICS case HwIntrinsics.DisableHWIntrinsic: Assert.False(Sse.IsSupported);