diff options
author | notaz | 2011-08-13 02:13:13 +0300 |
---|---|---|
committer | notaz | 2011-08-13 02:15:08 +0300 |
commit | 5b745e5bbcb51267122821ed9dc1c8c2c77dc100 (patch) | |
tree | 32e183e310e5b3877f0f5928e55ef974a57b0b51 /plugins/gpu_neon | |
parent | 19e7cf877b6a925517238c59485edf5fe85bf2a1 (diff) | |
download | pcsx_rearmed-5b745e5bbcb51267122821ed9dc1c8c2c77dc100.tar.gz pcsx_rearmed-5b745e5bbcb51267122821ed9dc1c8c2c77dc100.tar.bz2 pcsx_rearmed-5b745e5bbcb51267122821ed9dc1c8c2c77dc100.zip |
gpu_neon: handle 0xEx cmds while frameskiping
otherwise things go out of sync
Diffstat (limited to 'plugins/gpu_neon')
-rw-r--r-- | plugins/gpu_neon/gpu.c | 6 | ||||
-rw-r--r-- | plugins/gpu_neon/gpu.h | 1 | ||||
-rw-r--r-- | plugins/gpu_neon/peops_if.c | 10 | ||||
-rw-r--r-- | plugins/gpu_neon/vout_fb.c | 2 |
4 files changed, 16 insertions, 3 deletions
diff --git a/plugins/gpu_neon/gpu.c b/plugins/gpu_neon/gpu.c index 2db4379..03b0c71 100644 --- a/plugins/gpu_neon/gpu.c +++ b/plugins/gpu_neon/gpu.c @@ -328,11 +328,12 @@ static int check_cmd(uint32_t *data, int count) start_vram_transfer(data[pos + 1], data[pos + 2], cmd == 0xc0); pos += len; } - - if (cmd == -1) + else if (cmd == -1) break; } + if (gpu.frameskip.active) + renderer_sync_ecmds(gpu.ex_regs); gpu.state.fb_dirty |= vram_dirty; return count - pos; @@ -498,6 +499,7 @@ long GPUfreeze(uint32_t type, GPUFreeze_t *freeze) gpu.regs[i] ^= 1; // avoid reg change detection GPUwriteStatus((i << 24) | (gpu.regs[i] ^ 1)); } + renderer_sync_ecmds(gpu.ex_regs); break; } diff --git a/plugins/gpu_neon/gpu.h b/plugins/gpu_neon/gpu.h index cc202c5..a0cdbf7 100644 --- a/plugins/gpu_neon/gpu.h +++ b/plugins/gpu_neon/gpu.h @@ -86,6 +86,7 @@ extern const unsigned char cmd_lengths[256]; void do_cmd_list(uint32_t *list, int count); int renderer_init(void); +void renderer_sync_ecmds(uint32_t * ecmds); void renderer_invalidate_caches(int x, int y, int w, int h); void renderer_flush_queues(void); diff --git a/plugins/gpu_neon/peops_if.c b/plugins/gpu_neon/peops_if.c index 04c2595..1a4072f 100644 --- a/plugins/gpu_neon/peops_if.c +++ b/plugins/gpu_neon/peops_if.c @@ -365,6 +365,16 @@ void do_cmd_list(unsigned int *list, int list_len) } } +void renderer_sync_ecmds(uint32_t *ecmds) +{ + cmdTexturePage((unsigned char *)&ecmds[1]); + cmdTextureWindow((unsigned char *)&ecmds[2]); + cmdDrawAreaStart((unsigned char *)&ecmds[3]); + cmdDrawAreaEnd((unsigned char *)&ecmds[4]); + cmdDrawOffset((unsigned char *)&ecmds[5]); + cmdSTP((unsigned char *)&ecmds[6]); +} + void renderer_invalidate_caches(int x, int y, int w, int h) { } diff --git a/plugins/gpu_neon/vout_fb.c b/plugins/gpu_neon/vout_fb.c index 1dfa8ab..b2b5b25 100644 --- a/plugins/gpu_neon/vout_fb.c +++ b/plugins/gpu_neon/vout_fb.c @@ -85,7 +85,7 @@ void GPUupdateLace(void) return; if (gpu.frameskip.enabled) { - if (!gpu.frameskip.frame_ready && gpu.frameskip.skipped_blits < 6) { + if (!gpu.frameskip.frame_ready && gpu.frameskip.skipped_blits < 9) { gpu.frameskip.skipped_blits++; return; } |