Exemplo n.º 1
0
        private void CreateBackends(Options opts)
        {
            List <IBackend> backends = new List <IBackend>();

            try
            {
                ID3DCompiler fxc = m_Wrapper.CreateD3DCompiler(opts.D3DCompilerPath);
                backends.Add(new D3DCompilerBackend(fxc));
                try
                {
                    IAMDDriver driver = m_Wrapper.CreateAMDDriver(opts.DXXDriverPath);
                    backends.Add(new AMDDriverBackend(driver, fxc));
                }
                catch (System.Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            backends.Add(new CodeXLBackend(opts.CodeXLPath, opts.D3DCompilerPath, opts.TempPath));
            backends.Add(new GLSlangBackend(m_Wrapper));
            backends.Add(new GLSLOptimizerBackend(m_Wrapper));
            backends.Add(new PowerVRBackend(opts.PowerVRCompilerPath, opts.TempPath));
            backends.Add(new MaliSCBackend(opts.MaliSCRoot, opts.TempPath));
            m_Backends = backends;
        }
Exemplo n.º 2
0
        private void CreateBackends(Options opts)
        {
            List <IBackend> backends = new List <IBackend>();
            IIncludeHandler handler  = new IncludeHandler(opts.IncludePaths);

            try
            {
                ID3DCompiler  fxc  = m_Wrapper.CreateD3DCompiler(opts.D3DCompilerPath, handler);
                IDXILCompiler dxil = m_Wrapper.CreateDXILCompiler(opts.DXILCompilerPath, handler);

                backends.Add(new D3DCompilerBackend(fxc, dxil));
                try
                {
                    IAMDDriver driver = m_Wrapper.CreateAMDDriver(opts.DXXDriverPath);
                    backends.Add(new AMDDriverBackend(driver, fxc));
                }
                catch (System.Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            backends.Add(new CodeXLBackend(opts.CodeXLPath, opts.D3DCompilerPath, opts.TempPath));
            backends.Add(new GLSlangBackend(m_Wrapper, handler));
            backends.Add(new GLSLOptimizerBackend(m_Wrapper));
            backends.Add(new PowerVRBackend(opts.PowerVRCompilerPath, opts.TempPath));
            backends.Add(new MaliSCBackend(opts.MaliSCRoot, opts.TempPath));
            backends.Add(new RGABackend(opts.RGAPath, opts.TempPath, m_Wrapper, handler));

            if (File.Exists(opts.IntelShaderAnalyzerPath))
            {
                backends.Add(new IntelShaderAnalyzerBackend(opts));
            }

            m_Backends = backends;
        }