Esempio n. 1
0
	def dump(self):
		print "="*60

		self.poolinfo.dump()

		print "t", self.type
		print "r", self.ref
		for t, c in self.count.iteritems():
			print t.__name__, c
		print

		print codegen.evaluateCode(None, self.ast)
		print
Esempio n. 2
0
def processContext(compiler, trans, context):

    result = trans.process(context.code)
    s = codegen.evaluateCode(compiler, result)

    #print
    #print s
    #print

    context.shaderCode = s
Esempio n. 3
0
def processContext(compiler, trans, context):

    result = trans.process(context.code)
    s = codegen.evaluateCode(compiler, result)

    # print
    # print s
    # print

    context.shaderCode = s
Esempio n. 4
0
def process(context):
	rewriter = intrinsics.makeIntrinsicRewriter(context.compiler.extractor)

	gt = GLSLTranslator(context.code, context.pa, rewriter, context.trees.inputLUT, context.trees.outputLUT)
	result = gt.process(context.cfg)

	# HACK for debugging
	s = codegen.evaluateCode(context.compiler, result)
	if context.show:
		print s

	return compressGLSL(s)
Esempio n. 5
0
def process(context):
    rewriter = intrinsics.makeIntrinsicRewriter(context.compiler.extractor)

    gt = GLSLTranslator(context.code, context.pa, rewriter,
                        context.trees.inputLUT, context.trees.outputLUT)
    result = gt.process(context.cfg)

    # HACK for debugging
    s = codegen.evaluateCode(context.compiler, result)
    if context.show:
        print s

    return compressGLSL(s)
def processCode(compiler, prgm, exgraph, ioinfo, prepassInfo, poolInfo, context, shaderprgm):
	rewriter = intrinsics.makeIntrinsicRewriter(compiler.extractor)

	trans = GLSLTranslator(compiler, prepassInfo, poolInfo, rewriter, ioinfo, context)

	result = trans.process(context.code)

	uniblock = buildBlocks(prepassInfo, shaderprgm, context)

	s = codegen.evaluateCode(compiler, result, uniblock)

	#print
	#print s
	#print

	context.shaderCode = s
Esempio n. 7
0
def processCode(compiler, prgm, exgraph, ioinfo, prepassInfo, poolInfo,
                context, shaderprgm):
    rewriter = intrinsics.makeIntrinsicRewriter(compiler.extractor)

    trans = GLSLTranslator(compiler, prepassInfo, poolInfo, rewriter, ioinfo,
                           context)

    result = trans.process(context.code)

    uniblock = buildBlocks(prepassInfo, shaderprgm, context)

    s = codegen.evaluateCode(compiler, result, uniblock)

    #print
    #print s
    #print

    context.shaderCode = s