the rasteriser doesn't have to be done on line 144

thanks to the VRAM cache
This commit is contained in:
RSDuck 2021-01-26 19:05:21 +01:00
parent aceabe92e6
commit 4a28068295
1 changed files with 8 additions and 4 deletions

View File

@ -1124,6 +1124,14 @@ void StartScanline(u32 line)
{ {
if (VCount == 192) if (VCount == 192)
{ {
// in reality rendering already finishes at line 144
// and games might already start to modify texture memory.
// That doesn't matter for us because we cache the entire
// texture memory anyway and only update it before the start
//of the next frame.
// So we can give the rasteriser a bit more headroom
GPU3D::VCount144();
// VBlank // VBlank
DispStat[0] |= (1<<0); DispStat[0] |= (1<<0);
DispStat[1] |= (1<<0); DispStat[1] |= (1<<0);
@ -1144,10 +1152,6 @@ void StartScanline(u32 line)
if (Accelerated) GLCompositor::RenderFrame(); if (Accelerated) GLCompositor::RenderFrame();
#endif #endif
} }
else if (VCount == 144)
{
GPU3D::VCount144();
}
} }
NDS::ScheduleEvent(NDS::Event_LCD, true, HBLANK_CYCLES, StartHBlank, line); NDS::ScheduleEvent(NDS::Event_LCD, true, HBLANK_CYCLES, StartHBlank, line);