Fix TA overrun detection. Bump up verts to 2 MB, idx to 120K and TR

polys to 8K
This commit is contained in:
Flyinghead 2018-08-03 09:55:53 +02:00
parent 580408dc4c
commit fddf56c5a2
3 changed files with 10 additions and 4 deletions

View File

@ -184,12 +184,12 @@ struct TA_context
{
tad.Reset((u8*)OS_aligned_malloc(32, 8*1024*1024));
rend.verts.InitBytes(1024*1024,&rend.Overrun); //up to 1 mb of vtx data/frame = ~ 38k vtx/frame
rend.idx.Init(60*1024,&rend.Overrun); //up to 60K indexes ( idx have stripification overhead )
rend.verts.InitBytes(2*1024*1024,&rend.Overrun); //up to 2 MB of vtx data/frame = ~ 75k vtx/frame
rend.idx.Init(120*1024,&rend.Overrun); //up to 120K indexes ( idx have stripification overhead )
rend.global_param_op.Init(4096,&rend.Overrun);
rend.global_param_pt.Init(4096,&rend.Overrun);
rend.global_param_mvo.Init(4096,&rend.Overrun);
rend.global_param_tr.Init(4096,&rend.Overrun);
rend.global_param_tr.Init(8192,&rend.Overrun);
rend.modtrig.Init(8192,&rend.Overrun);

View File

@ -1490,11 +1490,14 @@ bool ta_parse_vdrc(TA_context* ctx)
rv = true; //whatever
}
bool overrun = ctx->rend.Overrun;
vd_ctx->rend = vd_rc;
vd_ctx = 0;
ctx->rend_inuse.Unlock();
ctx->rend.Overrun = overrun;
return rv;
}

View File

@ -1420,7 +1420,10 @@ bool ProcessFrame(TA_context* ctx)
CollectCleanup();
return true;
if (ctx->rend.Overrun)
printf("ERROR: TA context overrun\n");
return !ctx->rend.Overrun;
}
bool RenderFrame()