pvr: reset nextContext in Reset(). Use tactx_Alloc for direct fb render
Fix crash with multipass renders Issue #634
This commit is contained in:
parent
430256266f
commit
58d1f7cee1
|
@ -268,8 +268,7 @@ void rend_vblank()
|
|||
if (!render_called && fb_dirty && FB_R_CTRL.fb_enable)
|
||||
{
|
||||
DEBUG_LOG(PVR, "Direct framebuffer write detected");
|
||||
TA_context *ctx = new TA_context();
|
||||
ctx->Alloc();
|
||||
TA_context *ctx = tactx_Alloc();
|
||||
ctx->rend.isRenderFramebuffer = true;
|
||||
rend_start_render(ctx);
|
||||
fb_dirty = false;
|
||||
|
|
|
@ -106,7 +106,7 @@ static std::mutex mtx_pool;
|
|||
static std::vector<TA_context*> ctx_pool;
|
||||
static std::vector<TA_context*> ctx_list;
|
||||
|
||||
static TA_context *tactx_Alloc()
|
||||
TA_context *tactx_Alloc()
|
||||
{
|
||||
TA_context *ctx = nullptr;
|
||||
|
||||
|
|
|
@ -348,6 +348,7 @@ struct TA_context
|
|||
{
|
||||
verify(tad.End() - tad.thd_root <= TA_DATA_SIZE);
|
||||
tad.Clear();
|
||||
nextContext = nullptr;
|
||||
rend_inuse.lock();
|
||||
rend.Clear();
|
||||
rend.proc_end = rend.proc_start = tad.thd_root;
|
||||
|
@ -377,6 +378,7 @@ extern tad_context ta_tad;
|
|||
|
||||
TA_context* tactx_Pop(u32 addr);
|
||||
void tactx_Term();
|
||||
TA_context *tactx_Alloc();
|
||||
|
||||
/*
|
||||
Ta Context
|
||||
|
|
Loading…
Reference in New Issue