Граф коммитов

14 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 6ad1cba473
[monotouch-test] Lower indirect command buffer availability. (#8886)
Apple's charts say indirect command buffers are available with MTLGpuFamilyCommon2.

That's not quite so, devices that support MTLGpuFamilyCommon2 may crash when
MTLDevice.CreateIndirectCommandBuffer is called.

So make the conditions for calling CreateIndirectCommandBuffer an intersection
of the previous condition for macOS (MTLFeatureSet.macOS_GPUFamily2_v1) + the
new condition (MTLGpuFamily.Common2) + Xcode 11+ (just to make things
simpler).

I've tested this on all our macOS bots, and it worked on all of them.

If it fails anywhere else (iOS devices), the next patch will remove the entire
test.
2020-06-18 17:55:20 +02:00
Rolf Bjarne Kvinge 1d269a12d0
[monotouch-test] Check for Metal compatibility for all platforms before creating indirect command buffers. Fixes #xamarin/maccore@2235. (#8863)
This fixes an iOS assertion (crash) when running on iPhone 6 with iOS 12+:

    2020-06-15 13:52:35.138 monotouchtest[6887:5713672] failed assertion 0 at line 54 in NopIndirectCommandBuffer

    =================================================================
    	Native Crash Reporting
    =================================================================
    Got a abrt while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    =================================================================
    	Native stacktrace:
    =================================================================
    	0x1060b23fc - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonosgen-2.0.dylib : mono_dump_native_crash_info
    	0x1060a8674 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonosgen-2.0.dylib : mono_handle_native_crash
    	0x1060b1948 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonosgen-2.0.dylib : sigabrt_signal_handler
    	0x20049e9fc - /usr/lib/system/libsystem_platform.dylib : <redacted>
    	0x2004a4094 - /usr/lib/system/libsystem_pthread.dylib : <redacted>
    	0x200383ea8 - /usr/lib/system/libsystem_c.dylib : abort
    	0x2029c5dac - /System/Library/Frameworks/Metal.framework/Metal : MTLGetWarningMode
    	0x2210cff78 - /System/Library/Extensions/AGXMetalA8.bundle/AGXMetalA8 :
    	0x20299fb80 - /System/Library/Frameworks/Metal.framework/Metal : <redacted>
    	0x103143c58 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libXamarin.iOS.dll.dylib : wrapper_managed_to_native_ObjCRuntime_Messaging_IntPtr_objc_msgSend_IntPtr_nuint_UInt64_intptr_intptr_intptr_System_nuint_ulong
    	0x102f4cbdc - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libXamarin.iOS.dll.dylib : Metal_MTLDevice_Extensions_CreateIndirectCommandBuffer_Metal_IMTLDevice_Metal_MTLIndirectCommandBufferDescriptor_System_nuint_Metal_MTLResourceOptions
    	0x101a8bd58 - /private/var/containers/Bundle/Application/B3C2F137-4C0F-48EF-A50A-8972FF268069/monotouchtest.app/libmonotouchtest.exe.dylib : MonoTouchFixtures_Metal_MTLDeviceTests_ReturnReleaseTest
    	[...]

Fixes https://github.com/xamarin/maccore/issues/2235.
2020-06-18 08:59:35 +02:00
Rolf Bjarne Kvinge 2b2f1d08dc
[tests] Remove Classic code from all tests. (#8702) 2020-05-28 16:35:09 +02:00
Rolf Bjarne Kvinge dc2c269f40
[tests] Use built-in feature checks to check for API non-crashyness. (#6640)
This also required adding a few missing Metal version enum values.

Fixes https://github.com/xamarin/maccore/issues/1800.
Fixes https://github.com/xamarin/maccore/issues/1801.
2019-07-24 07:10:10 -07:00
Rolf Bjarne Kvinge 8ab907a91e [monotouch-test] Don't check for the macOS system version when running on other platforms. 2019-07-11 19:04:14 +02:00
Rolf Bjarne Kvinge 58fcbe0189 [monotouch-test] Don't test API that crashes. 2019-06-26 14:17:14 +02:00
Rolf Bjarne Kvinge 46f098349e [tests] Version check fixes. 2019-06-26 10:15:46 +02:00
Rolf Bjarne Kvinge 9ed942659d Simplify nested usings. 2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 222a482fea Fix whitespace. 2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 40096a1eaf [tests] Use a higher offset when calling MTLBuffer.CreateTexture to try to comply with the requirements for the API.
Hopefully fixes this assertion:

> 07:42:06.7701360 validateStrideTextureParameters:1512: failed assertion `Linear texture: bytesPerRow (64) must be aligned to 256 bytes'

which doesn't happen on my machine.
2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 16e1b85289 [tests] MTLFunctionConstantValues didn't have a default ctor until Xcode 9. 2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 96517671f6 [Metal] Sprinkle [return: Release] on all 'new*' selectors. Fixes #5941.
Also add tests for all the API I could figure out how to use.

Fixes https://github.com/xamarin/xamarin-macios/issues/5941.
2019-05-31 06:32:58 +00:00
Rolf Bjarne Kvinge 285062208d
[tests] Make MTLDeviceTests work on macOS systems that don't support metal. (#4059) 2018-05-09 15:14:42 +02:00
Timothy Risi c628320cda [Metal] New bindings from Xcode 9 betas (#2457) 2017-09-05 08:45:03 -04:00