Exemplo n.º 1
0
        protected override void PlatformDispose()
        {
            // Dispose staging buffers
            foreach (DeviceBuffer buffer in _availableStagingBuffers)
            {
                buffer.Dispose();
            }
            _availableStagingBuffers.Clear();

            _d3d11ResourceFactory.Dispose();
            _mainSwapchain?.Dispose();
            _immediateContext.Dispose();

            ID3D11Debug deviceDebug = _device.QueryInterfaceOrNull <ID3D11Debug>();

            _device.Dispose();
            _dxgiAdapter.Dispose();

            // Report live objects using DXGI if available (DXGIGetDebugInterface1 will fail on pre Windows 8 OS).
            if (VorticeDXGI.DXGIGetDebugInterface1(out IDXGIDebug1 dxgiDebug).Success)
            {
                deviceDebug?.Dispose();
                dxgiDebug.ReportLiveObjects(VorticeDXGI.All, ReportLiveObjectFlags.Summary | ReportLiveObjectFlags.IgnoreInternal);
                dxgiDebug.Dispose();
            }
Exemplo n.º 2
0
        protected override void PlatformDispose()
        {
            // Dispose staging buffers
            foreach (DeviceBuffer buffer in _availableStagingBuffers)
            {
                buffer.Dispose();
            }
            _availableStagingBuffers.Clear();

            _d3d11ResourceFactory.Dispose();
            _mainSwapchain?.Dispose();
            _immediateContext.Dispose();

            ID3D11Debug deviceDebug = _device.QueryInterfaceOrNull <ID3D11Debug>();

            _device.Dispose();
            _dxgiAdapter?.Dispose();

            // Need to enable native debugging to see live objects in VisualStudio console.
            if (deviceDebug != null)
            {
                deviceDebug.ReportLiveDeviceObjects(ReportLiveDeviceObjectFlags.Summary | ReportLiveDeviceObjectFlags.Detail | ReportLiveDeviceObjectFlags.IgnoreInternal);
                deviceDebug.Dispose();
            }
        }
Exemplo n.º 3
0
        protected override void PlatformDispose()
        {
            _d3d11ResourceFactory.Dispose();
            _mainSwapchain?.Dispose();
            _immediateContext.Dispose();

            DeviceDebug deviceDebug = _device.QueryInterfaceOrNull <DeviceDebug>();

            _device.Dispose();

            if (deviceDebug != null)
            {
                deviceDebug.ReportLiveDeviceObjects(ReportingLevel.Summary);
                deviceDebug.ReportLiveDeviceObjects(ReportingLevel.Detail);
                deviceDebug.Dispose();
            }
        }
Exemplo n.º 4
0
        protected override void PlatformDispose()
        {
            _d3d11ResourceFactory.Dispose();
            _mainSwapchain?.Dispose();
            _immediateContext.Dispose();

            IDXGIDebug deviceDebug = _device.QueryInterfaceOrNull <IDXGIDebug>();

            _device.Dispose();
            _dxgiAdapter?.Dispose();

            if (deviceDebug != null)
            {
                deviceDebug.ReportLiveObjects(DXGI.All, ReportLiveObjectFlags.Summary);
                deviceDebug.ReportLiveObjects(DXGI.All, ReportLiveObjectFlags.Detail);
                deviceDebug.Dispose();
            }
        }