X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpulib%2Fgpu.c;h=70847abea074a82d1145c5e2434cf482d3c07ab6;hb=ddc0a02a811034532a8e013c14091b61a89439ba;hp=df0099c6b97c96caef4b8436566f2e9df44c4507;hpb=b243416b907e6ce366b051e77ed8a434f7668d5d;p=pcsx_rearmed.git diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index df0099c6..70847abe 100644 --- a/plugins/gpulib/gpu.c +++ b/plugins/gpulib/gpu.c @@ -333,6 +333,7 @@ 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; + // XXX: polylines are not properly handled while (pos < count && skip) { uint32_t *list = data + pos; cmd = list[0] >> 24; @@ -397,7 +398,8 @@ static noinline int do_cmd_buffer(uint32_t *data, int count) continue; } - if (gpu.frameskip.active && gpu.frameskip.allow) + // 0xex cmds might affect frameskip.allow, so pass to do_cmd_list_skip + if (gpu.frameskip.active && (gpu.frameskip.allow || ((data[pos] >> 24) & 0xf0) == 0xe0)) pos += do_cmd_list_skip(data + pos, count - pos, &cmd); else { pos += do_cmd_list(data + pos, count - pos, &cmd); @@ -580,6 +582,7 @@ long GPUfreeze(uint32_t type, struct GPUFreeze *freeze) memcpy(gpu.regs, freeze->ulControl, sizeof(gpu.regs)); memcpy(gpu.ex_regs, freeze->ulControl + 0xe0, sizeof(gpu.ex_regs)); gpu.status.reg = freeze->ulStatus; + gpu.cmd_len = 0; for (i = 8; i > 0; i--) { gpu.regs[i] ^= 1; // avoid reg change detection GPUwriteStatus((i << 24) | (gpu.regs[i] ^ 1)); @@ -598,7 +601,16 @@ void GPUupdateLace(void) flush_cmd_buffer(); renderer_flush_queues(); - if (gpu.status.blanking || !gpu.state.fb_dirty) + if (gpu.status.blanking) { + if (!gpu.state.blanked) { + vout_blank(); + gpu.state.blanked = 1; + gpu.state.fb_dirty = 1; + } + return; + } + + if (!gpu.state.fb_dirty) return; if (gpu.frameskip.set) { @@ -612,6 +624,7 @@ void GPUupdateLace(void) vout_update(); gpu.state.fb_dirty = 0; + gpu.state.blanked = 0; } void GPUvBlank(int is_vblank, int lcf)