Exemplo n.º 1
0
        public static void SetErrorHandling(D3D11.Device d3dDevice)
        {
#if DEBUG
            s_parentDevice = d3dDevice;

            if (d3dDevice == null)
            {
                return;
            }


            if (s_infoQueue == null)
            {
                if ((s_parentDevice.CreationFlags & SharpDX.Direct3D11.DeviceCreationFlags.Debug) == SharpDX.Direct3D11.DeviceCreationFlags.Debug)
                {
                    s_infoQueue = s_parentDevice.QueryInterface <D3D11.InfoQueue>();

                    s_infoQueue.SetBreakOnSeverity(D3D11.MessageSeverity.Error, true);
                    s_infoQueue.SetBreakOnSeverity(D3D11.MessageSeverity.Warning, true);
                    s_infoQueue.SetBreakOnSeverity(D3D11.MessageSeverity.Corruption, true);
                    s_infoQueue.SetBreakOnSeverity(D3D11.MessageSeverity.Information, true);
                }
            }
#endif
        }
Exemplo n.º 2
0
 static private void InitDebugOutput()
 {
     if (VRage.MyCompilationSymbols.DX11Debug && VRage.MyCompilationSymbols.DX11DebugOutput)
     {
         DebugInfoQueue = Device.QueryInterface<InfoQueue>();
         DebugInfoQueue.SetBreakOnSeverity(MessageSeverity.Corruption, true);
         DebugInfoQueue.SetBreakOnSeverity(MessageSeverity.Error, true);
         DebugInfoQueue.MessageCountLimit = 4096;
         DebugInfoQueue.ClearStorageFilter();
     }
 }
Exemplo n.º 3
0
 static private void InitDebugOutput()
 {
     if (VRage.MyCompilationSymbols.DX11Debug && VRage.MyCompilationSymbols.DX11DebugOutput)
     {
         DebugInfoQueue = Device.QueryInterface<InfoQueue>();
         DebugInfoQueue.SetBreakOnSeverity(MessageSeverity.Corruption, true);
         DebugInfoQueue.SetBreakOnSeverity(MessageSeverity.Error, true);
         DebugInfoQueue.MessageCountLimit = 4096;
         DebugInfoQueue.ClearStorageFilter();
         if (! VRage.MyCompilationSymbols.DX11DebugOutputEnableInfo)
         {
             InfoQueueFilter filter = new InfoQueueFilter();
             filter.DenyList = new InfoQueueFilterDescription();
             filter.DenyList.Severities = new MessageSeverity[1];
             filter.DenyList.Severities[0] = MessageSeverity.Information;
             DebugInfoQueue.AddStorageFilterEntries(filter);
         }
     }
 }