Fix performance problem with RTT waiting

This commit is contained in:
Flyinghead 2018-05-11 19:08:54 +02:00
parent 43c125c208
commit b02eccd5c7
2 changed files with 5 additions and 12 deletions

View File

@ -198,7 +198,7 @@ TA_context* read_frame(const char* file, u8* vram_ref) {
bool rend_frame(TA_context* ctx, bool draw_osd) {
bool proc = renderer->Process(ctx);
#if !defined(TARGET_NO_THREADS)
if (!ctx->rend.isRTT)
if (!proc || !ctx->rend.isRTT)
// If rendering to texture, continue locking until the frame is rendered
re.Set();
#endif

View File

@ -134,17 +134,10 @@ bool QueueRender(TA_context* ctx)
}
if (rqueue) {
// If the queued frame is for rendering to a texture, we can't skip it, so we wait
if (ctx->rend.isRTT) {
frame_finished.Wait();
verify(!rqueue);
}
else
{
tactx_Recycle(ctx);
fskip++;
return false;
}
// FIXME if the discarded render is a RTT we'll have a texture missing. But waiting for the current frame to finish kills performance...
tactx_Recycle(ctx);
fskip++;
return false;
}
frame_finished.Reset();