//called when entering sh4 thread , from the new thread context (for any thread speciacific init) s32 FASTCALL InitPvr(pvr_init_params* param) { memcpy(¶ms,param,sizeof(params)); extern void BuildTwiddleTables(); BuildTwiddleTables(); if ((!Regs_Init())) { //failed return rv_error; } if (!spg_Init()) { //failed return rv_error; } if (!rend_init()) { //failed return rv_error; } //olny the renderer cares about thread speciacific shit .. if (!rend_thread_start()) { return rv_error; } return rv_ok; }
s32 libPvr_Init(void) { ta_ctx_init(); //failed if (!spg_Init()) return rv_error; //failed if (!rend_init()) return rv_error; return rv_ok; }
s32 libPvr_Init() { if (!spg_Init()) { //failed return rv_error; } if (!rend_init()) { //failed return rv_error; } return rv_ok; }