1
1
// Copyright (c) Six Labors.
2
2
// Licensed under the Six Labors Split License.
3
3
4
+ using System . Runtime . InteropServices ;
4
5
using SixLabors . ImageSharp . Formats . Webp . Lossy ;
5
6
using SixLabors . ImageSharp . Tests . TestUtilities ;
6
7
@@ -244,13 +245,19 @@ public void Vp8Sse16X16_WithHardwareIntrinsics_Works() =>
244
245
245
246
// This will test the SSE2 version.
246
247
[ Fact ]
247
- public void Vp8Sse16X16_WithoutAVX2_Works ( ) =>
248
+ public void Vp8Sse16X16_WithoutAVX2_Works ( )
249
+ {
250
+ if ( RuntimeInformation . ProcessArchitecture == Architecture . Arm64 )
251
+ {
252
+ return ;
253
+ }
254
+
248
255
FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse16X16Test , HwIntrinsics . DisableAVX2 ) ;
256
+ }
249
257
250
258
// This will test the fallback scalar version.
251
259
[ Fact ]
252
- public void Vp8Sse16X16_WithoutSSE2_Works ( ) =>
253
- FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse16X16Test , HwIntrinsics . DisableSSE2 | HwIntrinsics . DisableAVX | HwIntrinsics . DisableArm64AdvSimd ) ;
260
+ public void Vp8Sse16X16_WithoutHwIntrinsics_Works ( ) => FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse16X16Test , HwIntrinsics . DisableHWIntrinsic ) ;
254
261
255
262
// This will test the AVX2 or ARM version.
256
263
[ Fact ]
@@ -259,13 +266,20 @@ public void Vp8Sse16X8_WithHardwareIntrinsics_Works() =>
259
266
260
267
// This will test the SSE2 version.
261
268
[ Fact ]
262
- public void Vp8Sse16X8_WithoutAVX2_Works ( ) =>
269
+ public void Vp8Sse16X8_WithoutAVX2_Works ( )
270
+ {
271
+ if ( RuntimeInformation . ProcessArchitecture == Architecture . Arm64 )
272
+ {
273
+ return ;
274
+ }
275
+
263
276
FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse16X8Test , HwIntrinsics . DisableAVX2 ) ;
277
+ }
264
278
265
279
// This will test the fallback scalar version.
266
280
[ Fact ]
267
281
public void Vp8Sse16X8_WithoutHardwareIntrinsics_Works ( ) =>
268
- FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse16X8Test , HwIntrinsics . DisableSSE2 | HwIntrinsics . DisableAVX | HwIntrinsics . DisableArm64AdvSimd ) ;
282
+ FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse16X8Test , HwIntrinsics . DisableHWIntrinsic ) ;
269
283
270
284
// This will test the AVX2 version or ARM version.
271
285
[ Fact ]
@@ -274,13 +288,20 @@ public void Vp8Sse4X4_WithHardwareIntrinsics_Works() =>
274
288
275
289
// This will test the SSE2 version.
276
290
[ Fact ]
277
- public void Vp8Sse4X4_WithoutAVX2_Works ( ) =>
291
+ public void Vp8Sse4X4_WithoutAVX2_Works ( )
292
+ {
293
+ if ( RuntimeInformation . ProcessArchitecture == Architecture . Arm64 )
294
+ {
295
+ return ;
296
+ }
297
+
278
298
FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse4X4Test , HwIntrinsics . DisableAVX2 ) ;
299
+ }
279
300
280
301
// This will test the fallback scalar version.
281
302
[ Fact ]
282
303
public void Vp8Sse4X4_WithoutHardwareIntrinsics_Works ( ) =>
283
- FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse4X4Test , HwIntrinsics . DisableSSE2 | HwIntrinsics . DisableAVX | HwIntrinsics . DisableArm64AdvSimd ) ;
304
+ FeatureTestRunner . RunWithHwIntrinsicsFeature ( RunVp8Sse4X4Test , HwIntrinsics . DisableHWIntrinsic ) ;
284
305
285
306
[ Fact ]
286
307
public void Mean16x4_WithHardwareIntrinsics_Works ( ) =>
0 commit comments