Skip to content

Commit

Permalink
gpulib: add some missed sync and flush
Browse files Browse the repository at this point in the history
  • Loading branch information
notaz committed Sep 4, 2023
1 parent cb245e5 commit 5fe1a2b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/gpu_neon/psx_gpu/psx_gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4975,6 +4975,8 @@ void initialize_psx_gpu(psx_gpu_struct *psx_gpu, u16 *vram)
psx_gpu->texture_page_ptr = psx_gpu->vram_ptr;
psx_gpu->clut_ptr = psx_gpu->vram_ptr;

psx_gpu->viewport_start_x = psx_gpu->viewport_start_y = 0;
psx_gpu->viewport_end_x = psx_gpu->viewport_end_y = 0;
psx_gpu->mask_msb = 0;

psx_gpu->texture_window_x = 0;
Expand Down
5 changes: 5 additions & 0 deletions plugins/gpulib/gpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static noinline void do_reset(void)
gpu.screen.hres = gpu.screen.w = 256;
gpu.screen.vres = gpu.screen.h = 240;
gpu.screen.x = gpu.screen.y = 0;
renderer_sync_ecmds(gpu.ex_regs);
renderer_notify_res_change();
}

Expand Down Expand Up @@ -179,8 +180,12 @@ static noinline int decide_frameskip_allow(uint32_t cmd_e3)
return gpu.frameskip.allow;
}

static void flush_cmd_buffer(void);

static noinline void get_gpu_info(uint32_t data)
{
if (unlikely(gpu.cmd_len > 0))
flush_cmd_buffer();
switch (data & 0x0f) {
case 0x02:
case 0x03:
Expand Down

0 comments on commit 5fe1a2b

Please sign in to comment.