Fix performance problem with RTT waiting
This commit is contained in:
parent
43c125c208
commit
b02eccd5c7
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue