Home | History | Annotate | Download | only in pixelflinger2

Lines Matching defs:Instance

109 struct Instance {
113 ~Instance() {
123 std::map<ShaderKey, Instance *> instances;
191 for (std::map<ShaderKey, Instance *>::iterator it=shader->executable->instances.begin();
193 (*it).second->~Instance();
386 static void CodeGen(Instance * instance, const char * mainName, gl_shader * shader,
392 // instance->module->dump();
394 BCCScriptRef & script = instance->script;
396 result = bccReadModule(script, "glsl", (LLVMModuleRef)instance->module, 0);
409 instance->function = (void (*)())bccGetFuncAddr(script, mainName);
410 assert(instance->function);
415 // printf("bcc_compile %s=%p \n", mainName, instance->function);
433 shader->executable->instances = std::map<ShaderKey, Instance *>();
438 Instance * instance = shader->executable->instances[shaderKey];
439 if (!instance) {
441 instance = hieralloc_zero(shader->executable, Instance);
442 instance->module = new llvm::Module("glsl", *(llvm::LLVMContext *)llvmCtx);
471 llvm::Module * module = glsl_ir_to_llvm_module(shader->ir, instance->module, gglState, shaderName);
522 CodeGen(instance, scanlineName, shader, program, gglState);
525 CodeGen(instance, mainName, shader, program, gglState);
527 shader->executable->instances[shaderKey] = instance;
528 // debug_printf("jit new shader '%s'(%p) \n", mainName, instance->function);
530 // debug_printf("use cached shader %p \n", instance->function);
533 shader->function = instance->function;