mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-01 02:03:47 +01:00
Avoid framebuffer lookups for repeated prims.
There are usually many prims per framebuffer. This cuts time spent in SetRenderFramebuffer() from 1% to 0.13% (although a bit more time in ExecuteOp, not much.)
This commit is contained in:
1 parent
b84dadfd3a
commit
85a23dac63
3 files changed
+13
No files matched your search
@@ -290,6 +290,12 @@ void GuessDrawingSize(int &drawing_width, int &drawing_height) {
|
||||
}
|
||||
|
||||
void FramebufferManager::SetRenderFrameBuffer() {
|
||||
if (!gstate_c.framebufChanged && currentRenderVfb_) {
|
||||
currentRenderVfb_->last_frame_used = gpuStats.numFrames;
|
||||
return;
|
||||
}
|
||||
gstate_c.framebufChanged = false;
|
||||
|
||||
// Get parameters
|
||||
u32 fb_address = (gstate.fbptr & 0xFFE000) | ((gstate.fbwidth & 0xFF0000) << 8);
|
||||
int fb_stride = gstate.fbwidth & 0x3C0;
|
||||
|
||||
Reference in new issue
Block a user