mirror of
https://github.com/stenzek/duckstation.git
synced 2026-11-07 09:36:00 -10:00
GPU: Use measured v2 fill and VRAM copy costs
Copies pay for each VRAM page opened, one per 128 pixels of a row.
This commit is contained in:
1 file changed
+4
-2
+4
-2
@@ -3974,7 +3974,8 @@ bool GPU::HandleFillRectangleCommand()
|
||||
GPUBackend::PushCommand(cmd);
|
||||
}
|
||||
|
||||
AddCommandTicks(46 + (((width / 8) + 9) * height + 1) / 2);
|
||||
// Measured v2 GPU cost.
|
||||
AddCommandTicks(10 + 5 * height + (width * height) / 12);
|
||||
EndCommand();
|
||||
return true;
|
||||
}
|
||||
@@ -4149,7 +4150,8 @@ bool GPU::HandleCopyRectangleVRAMToVRAMCommand()
|
||||
GPUBackend::PushCommand(cmd);
|
||||
}
|
||||
|
||||
AddCommandTicks(width * height);
|
||||
// Measured v2 GPU cost: 1.25 cycles per pixel, plus 21 cycles for each VRAM page opened, one per 128 pixels of a row.
|
||||
AddCommandTicks(50 + 21 * height * ((width + 127) / 128) + (width * height * 5) / 4);
|
||||
EndCommand();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user