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:
Unknown W. Brackets committed 2013-04-22 22:04:27 -07:00
1 parent b84dadfd3a
commit 85a23dac63
3 files changed
+13

No files matched your search

+6
View File
@@ -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;