Inheritance: InstructionVisitor
Example #1
0
        public CompiledShader Compile()
        {
            ShaderRequisitesVisitor reqs = new ShaderRequisitesVisitor (this);
            foreach (var i in insList)
                i.Visit (reqs);

            reqs.LoadExternalVars ();

            HeaderWriterVisitor header = new HeaderWriterVisitor (this);
            //Emit code to load used vars & consts
            foreach (var i in insList)
                i.Visit (header);

            EmitLoopVars ();

            EmitLoopStart ();

            CodeGenVisitor codegen = new CodeGenVisitor (this);
            foreach (var i in insList)
                i.Visit (codegen);

            EmitLoopTail ();

            return Finish ();
        }