Texkill, palette_update on correct place.
- Texkill needs to be done before texture allocation, which is now done during parsing (texture-sync update) - palette_update needs to be called from the emu thread, before kicking off the render
This commit is contained in:
parent
9a5c3160a3
commit
29906d8416
|
@ -1,6 +1,7 @@
|
|||
#include "Renderer_if.h"
|
||||
#include "ta.h"
|
||||
#include "hw/pvr/pvr_mem.h"
|
||||
#include "rend/texcache.h"
|
||||
|
||||
/*
|
||||
|
||||
|
@ -179,6 +180,7 @@ void rend_start_render()
|
|||
printf("max: idx: %d, vtx: %d, op: %d, pt: %d, tr: %d, mvo: %d, modt: %d, ov: %d\n", max_idx, max_vtx, max_op, max_pt, max_tr, max_mvo, max_modt, ovrn);
|
||||
#endif
|
||||
if (QueueRender(ctx)) {
|
||||
palette_update();
|
||||
rs.Set();
|
||||
pend_rend = true;
|
||||
}
|
||||
|
|
|
@ -1361,6 +1361,13 @@ bool ProcessFrame(TA_context* ctx)
|
|||
ctx->rend_inuse.Lock();
|
||||
ctx->MarkRend();
|
||||
|
||||
if (KillTex)
|
||||
{
|
||||
void killtex();
|
||||
killtex();
|
||||
printf("Texture cache cleared\n");
|
||||
}
|
||||
|
||||
if (!ta_parse_vdrc(ctx))
|
||||
return false;
|
||||
|
||||
|
@ -1665,12 +1672,6 @@ bool RenderFrame()
|
|||
{
|
||||
glBindFramebuffer(GL_FRAMEBUFFER,0);
|
||||
}
|
||||
if (KillTex)
|
||||
{
|
||||
void killtex();
|
||||
killtex();
|
||||
printf("Texture cache cleared\n");
|
||||
}
|
||||
|
||||
//Clear depth
|
||||
//Color is cleared by the bgp
|
||||
|
@ -1703,8 +1704,6 @@ bool RenderFrame()
|
|||
glBufferData(GL_ARRAY_BUFFER,pvrrc.modtrig.bytes(),pvrrc.modtrig.head(),GL_STREAM_DRAW); glCheck();
|
||||
}
|
||||
|
||||
palette_update();
|
||||
|
||||
int offs_x=ds2s_offs_x+0.5f;
|
||||
//this needs to be scaled
|
||||
glScissor(offs_x+pvrrc.fb_X_CLIP.min/scale_x,(pvrrc.fb_Y_CLIP.min/scale_y)*dc2s_scale_h,(pvrrc.fb_X_CLIP.max-pvrrc.fb_X_CLIP.min+1)/scale_x*dc2s_scale_h,(pvrrc.fb_Y_CLIP.max-pvrrc.fb_Y_CLIP.min+1)/scale_y*dc2s_scale_h);
|
||||
|
|
Loading…
Reference in New Issue