aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authornotaz2011-08-13 00:47:16 +0300
committernotaz2011-08-13 00:57:33 +0300
commit19e7cf877b6a925517238c59485edf5fe85bf2a1 (patch)
tree1bbacecc3d242359ff21edae011ce9748db8330e /plugins
parentb094071f3a952169907415a7a8b38e9bdb2a4722 (diff)
downloadpcsx_rearmed-19e7cf877b6a925517238c59485edf5fe85bf2a1.tar.gz
pcsx_rearmed-19e7cf877b6a925517238c59485edf5fe85bf2a1.tar.bz2
pcsx_rearmed-19e7cf877b6a925517238c59485edf5fe85bf2a1.zip
gpu_neon: frameskip: skip blits until flipped
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gpu_neon/gpu.c2
-rw-r--r--plugins/gpu_neon/gpu.h1
-rw-r--r--plugins/gpu_neon/vout_fb.c22
3 files changed, 16 insertions, 9 deletions
diff --git a/plugins/gpu_neon/gpu.c b/plugins/gpu_neon/gpu.c
index 5bd4151..2db4379 100644
--- a/plugins/gpu_neon/gpu.c
+++ b/plugins/gpu_neon/gpu.c
@@ -113,7 +113,7 @@ void GPUwriteStatus(uint32_t data)
uint32_t cmd = data >> 24;
if (cmd < ARRAY_SIZE(gpu.regs)) {
- if (cmd != 0 && gpu.regs[cmd] == data)
+ if (cmd != 0 && cmd != 5 && gpu.regs[cmd] == data)
return;
gpu.regs[cmd] = data;
}
diff --git a/plugins/gpu_neon/gpu.h b/plugins/gpu_neon/gpu.h
index 033581e..cc202c5 100644
--- a/plugins/gpu_neon/gpu.h
+++ b/plugins/gpu_neon/gpu.h
@@ -74,6 +74,7 @@ struct psx_gpu {
uint32_t enabled:1;
uint32_t active:1;
uint32_t frame_ready:1;
+ uint32_t skipped_blits:5;
const int *advice;
} frameskip;
};
diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c
index b7cb41b..1dfa8ab 100644
--- a/plugins/gpu_neon/vout_fb.c
+++ b/plugins/gpu_neon/vout_fb.c
@@ -81,20 +81,29 @@ static void blit(void)
void GPUupdateLace(void)
{
- if (gpu.frameskip.enabled && !gpu.frameskip.frame_ready)
+ if (gpu.status.blanking || !gpu.state.fb_dirty)
return;
- if (!gpu.status.blanking && gpu.state.fb_dirty) {
- renderer_flush_queues();
- blit();
- gpu.state.fb_dirty = 0;
+ if (gpu.frameskip.enabled) {
+ if (!gpu.frameskip.frame_ready && gpu.frameskip.skipped_blits < 6) {
+ gpu.frameskip.skipped_blits++;
+ return;
+ }
+ gpu.frameskip.frame_ready = 0;
+ gpu.frameskip.skipped_blits = 0;
}
+
+ renderer_flush_queues();
+ blit();
+ gpu.state.fb_dirty = 0;
}
long GPUopen(void)
{
gpu.frameskip.enabled = cbs->frameskip;
gpu.frameskip.advice = &cbs->fskip_advice;
+ gpu.frameskip.active = 0;
+ gpu.frameskip.frame_ready = 1;
cbs->pl_vout_open();
screen_buf = cbs->pl_vout_flip();
@@ -110,9 +119,6 @@ long GPUclose(void)
void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_)
{
cbs = cbs_;
- gpu.frameskip.enabled = cbs->frameskip;
- gpu.frameskip.advice = &cbs->fskip_advice;
- gpu.frameskip.active = gpu.frameskip.frame_ready = 0;
}
// vim:shiftwidth=2:expandtab