Exemplo n.º 1
0
        public void SubclassedTest()
        {
            TestRuntime.AssertNotVirtualMachine();

            using (var layer = new OpenGLLayer()) {
                Messaging.IntPtr_objc_msgSend(layer.Handle, Selector.GetHandle("copyCGLPixelFormatForDisplayMask:"));
            }
        }
Exemplo n.º 2
0
        public void GetCurrentDevice_Test()
        {
            TestRuntime.AssertNotVirtualMachine();

            theUnit unit = GetAudioUnitForTest();

            uint device = unit.GetCurrentDevice(AudioUnitScopeType.Global);

            Assert.IsTrue(device != 0);
        }
Exemplo n.º 3
0
        public void NullOverlaySceneTest()
        {
            // Issue: https://github.com/xamarin/xamarin-macios/issues/3392
            TestRuntime.AssertXcodeVersion(7, 0);
            TestRuntime.AssertNotVirtualMachine();

            var view = new SCNView(new CGRect(), (NSDictionary)null);

            Assert.NotNull(view, "View not null");
            Assert.DoesNotThrow(() => view.OverlayScene = null, "Should not throw");
        }
Exemplo n.º 4
0
        public void AVAudioIONodeTests_AudioUnitTest()
        {
            TestRuntime.AssertNotVirtualMachine();

            Asserts.EnsureYosemite();

            AVAudioEngine eng  = new AVAudioEngine();
            AVAudioIONode node = eng.OutputNode;
            AUUnit        unit = node.AudioUnit;

            unit.GetElementCount(AudioUnitScopeType.Global);
            // Make sure this doens't crash.
        }
        public void Metal()
        {
            TestRuntime.AssertDevice();
            TestRuntime.AssertXcodeVersion(10, 0);
            TestRuntime.AssertNotVirtualMachine();

            device = MTLDevice.SystemDefault;
            // some older hardware won't have a default
            if (device == null || !MPSKernel.Supports(device))
            {
                Assert.Inconclusive("Metal is not supported");
            }
        }
Exemplo n.º 6
0
        public void DoTest()
        {
            TestRuntime.AssertNotVirtualMachine();

            SetupAUGraph();

            // One of these has to be commented out depending on old\new build
            graph.AddRenderNotify(GraphRenderCallback);
            //graph.RenderCallback += HandleRenderCallback;

            AudioUnitStatus status = mMixer.SetRenderCallback(MixerRenderCallback);

            Assert.AreEqual(AudioUnitStatus.OK, status);

            WaitOnGraphAndMixerCallbacks();
        }
Exemplo n.º 7
0
        public void Metal()
        {
#if !MONOMAC
            TestRuntime.AssertXcodeVersion(7, 0);

            if (Runtime.Arch == Arch.SIMULATOR)
            {
                Assert.Inconclusive("Metal Performance Shaders is not supported in the simulator");
            }
#else
            TestRuntime.AssertXcodeVersion(9, 0);
            TestRuntime.AssertNotVirtualMachine();
#endif

            device = MTLDevice.SystemDefault;
            // some older hardware won't have a default
            if (device == null || !MPSKernel.Supports(device))
            {
                Assert.Inconclusive("Metal is not supported");
            }
        }
Exemplo n.º 8
0
        public void Metal()
        {
            TestRuntime.AssertDevice();
            TestRuntime.AssertXcodeVersion(10, 0);
            TestRuntime.AssertNotVirtualMachine();

            device = MTLDevice.SystemDefault;
            // some older hardware won't have a default
            if (device == null || !MPSKernel.Supports(device))
            {
                Assert.Inconclusive("Metal is not supported");
            }

            cache = NSArray <MPSImage> .FromNSObjects(
                new MPSImage (device, MPSImageDescriptor.GetImageDescriptor(MPSImageFeatureChannelFormat.Float32, 224, 224, 3)),
                new MPSImage (device, MPSImageDescriptor.GetImageDescriptor(MPSImageFeatureChannelFormat.Float32, 224, 224, 3)),
                new MPSImage (device, MPSImageDescriptor.GetImageDescriptor(MPSImageFeatureChannelFormat.Float32, 224, 224, 3)),
                new MPSImage (device, MPSImageDescriptor.GetImageDescriptor(MPSImageFeatureChannelFormat.Float32, 224, 224, 3)),
                new MPSImage (device, MPSImageDescriptor.GetImageDescriptor(MPSImageFeatureChannelFormat.Float32, 224, 224, 3))
                );
        }
Exemplo n.º 9
0
        public void Metal()
        {
            TestRuntime.AssertDevice();
            TestRuntime.AssertXcodeVersion(10, 0);
            TestRuntime.AssertNotVirtualMachine();

            device = MTLDevice.SystemDefault;
            // some older hardware won't have a default
            if (device == null || !MPSKernel.Supports(device))
            {
                Assert.Inconclusive("Metal is not supported");
            }

            cache = NSArray <MPSState> .FromNSObjects(
                new MPSState (device, MTLTextureDescriptor.CreateTexture2DDescriptor(MTLPixelFormat.RGBA32Float, 220, 220, false)),
                new MPSState (device, MTLTextureDescriptor.CreateTexture2DDescriptor(MTLPixelFormat.RGBA32Float, 221, 221, false)),
                new MPSState (device, MTLTextureDescriptor.CreateTexture2DDescriptor(MTLPixelFormat.RGBA32Float, 222, 222, false)),
                new MPSState (device, MTLTextureDescriptor.CreateTexture2DDescriptor(MTLPixelFormat.RGBA32Float, 223, 223, false)),
                new MPSState (device, MTLTextureDescriptor.CreateTexture2DDescriptor(MTLPixelFormat.RGBA32Float, 224, 224, false)),
                new MPSState (device, MTLTextureDescriptor.CreateTexture2DDescriptor(MTLPixelFormat.RGBA32Float, 225, 225, false))
                );
        }