diff options
author | notaz | 2012-08-01 02:01:48 +0300 |
---|---|---|
committer | notaz | 2012-08-01 02:54:48 +0300 |
commit | fbb4bfffdca204ecb0f228ad13e0b16fd5e5f77e (patch) | |
tree | 103fd8be9e153da7b446c08902fea1675e596b37 /plugins/gpulib | |
parent | ddc0a02a811034532a8e013c14091b61a89439ba (diff) | |
download | pcsx_rearmed-fbb4bfffdca204ecb0f228ad13e0b16fd5e5f77e.tar.gz pcsx_rearmed-fbb4bfffdca204ecb0f228ad13e0b16fd5e5f77e.tar.bz2 pcsx_rearmed-fbb4bfffdca204ecb0f228ad13e0b16fd5e5f77e.zip |
gpulib: don't lose a fill in frameskip mode
..if it's done just before flip
Diffstat (limited to 'plugins/gpulib')
-rw-r--r-- | plugins/gpulib/gpu.c | 12 | ||||
-rw-r--r-- | plugins/gpulib/gpu.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index 70847ab..46e92d1 100644 --- a/plugins/gpulib/gpu.c +++ b/plugins/gpulib/gpu.c @@ -92,6 +92,12 @@ static noinline void decide_frameskip(void) gpu.frameskip.active = 1; else gpu.frameskip.active = 0; + + if (!gpu.frameskip.active && gpu.frameskip.pending_fill[0] != 0) { + int dummy; + do_cmd_list(gpu.frameskip.pending_fill, 3, &dummy); + gpu.frameskip.pending_fill[0] = 0; + } } static noinline int decide_frameskip_allow(uint32_t cmd_e3) @@ -333,6 +339,8 @@ static noinline int do_cmd_list_skip(uint32_t *data, int count, int *last_cmd) int cmd = 0, pos = 0, len, dummy; int skip = 1; + gpu.frameskip.pending_fill[0] = 0; + // XXX: polylines are not properly handled while (pos < count && skip) { uint32_t *list = data + pos; @@ -342,7 +350,9 @@ static noinline int do_cmd_list_skip(uint32_t *data, int count, int *last_cmd) if (cmd == 0x02) { if ((list[2] & 0x3ff) > gpu.screen.w || ((list[2] >> 16) & 0x1ff) > gpu.screen.h) // clearing something large, don't skip - do_cmd_list(data + pos, 3, &dummy); + do_cmd_list(list, 3, &dummy); + else + memcpy(gpu.frameskip.pending_fill, list, 3 * 4); } else if ((cmd & 0xf4) == 0x24) { // flat textured prim diff --git a/plugins/gpulib/gpu.h b/plugins/gpulib/gpu.h index a508cdc..1cbe38c 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -85,6 +85,7 @@ struct psx_gpu { uint32_t frame_ready:1; const int *advice; uint32_t last_flip_frame; + uint32_t pending_fill[3]; } frameskip; }; |