GPU: Skip zero-width or height fills

This commit is contained in:
Connor McLaughlin 2020-10-31 00:59:25 +10:00
parent 2e53bf914e
commit 61a4960380

View file

@ -459,7 +459,9 @@ bool GPU::HandleFillRectangleCommand()
Log_DebugPrintf("Fill VRAM rectangle offset=(%u,%u), size=(%u,%u)", dst_x, dst_y, width, height); Log_DebugPrintf("Fill VRAM rectangle offset=(%u,%u), size=(%u,%u)", dst_x, dst_y, width, height);
if (width > 0 && height > 0)
FillVRAM(dst_x, dst_y, width, height, color); FillVRAM(dst_x, dst_y, width, height, color);
m_stats.num_vram_fills++; m_stats.num_vram_fills++;
AddCommandTicks(46 + ((width / 8) + 9) * height); AddCommandTicks(46 + ((width / 8) + 9) * height);
EndCommand(); EndCommand();