diff --git a/core/hw/pvr/Renderer_if.cpp b/core/hw/pvr/Renderer_if.cpp index c4d4a019f..f47e6685f 100644 --- a/core/hw/pvr/Renderer_if.cpp +++ b/core/hw/pvr/Renderer_if.cpp @@ -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; } diff --git a/core/rend/gles/gles.cpp b/core/rend/gles/gles.cpp index 099ffa14b..cf9412b34 100755 --- a/core/rend/gles/gles.cpp +++ b/core/rend/gles/gles.cpp @@ -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);