Skip to content

Commit

Permalink
3rdParty: experimental changes to mupen64plus-video-parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosalie241 committed Mar 2, 2025
1 parent 9228e4a commit 750ac8f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 31 deletions.
7 changes: 1 addition & 6 deletions Source/3rdParty/mupen64plus-video-parallel/gfx_m64p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ void (*render_callback)(int);
m64p_handle configVideoParallel = NULL;

#define PLUGIN_VERSION 0x000001
#define VIDEO_PLUGIN_API_VERSION 0x020201
#define VIDEO_PLUGIN_API_VERSION 0x020200
#define DP_INTERRUPT 0x20

uint32_t rdram_size;
Expand Down Expand Up @@ -289,11 +289,6 @@ EXPORT void CALL ProcessRDPList(void)
vk_process_commands();
}

EXPORT void CALL FullSync(void)
{
vk_full_sync();
}

EXPORT int CALL RomOpen(void)
{
window_fullscreen = false;
Expand Down
25 changes: 1 addition & 24 deletions Source/3rdParty/mupen64plus-video-parallel/parallel_imp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ bool vk_synchronous, vk_divot_filter, vk_gamma_dither;
bool vk_vi_aa, vk_vi_scale, vk_dither_filter;
bool vk_interlacing;

static uint64_t rdp_sync_signal;
static uint64_t last_frame_counter;
static uint64_t frame_counter;

static const unsigned cmd_len_lut[64] = {
1, 1, 1, 1, 1, 1, 1, 1, 4, 6, 12, 14, 12, 14, 20, 22,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
Expand Down Expand Up @@ -259,7 +255,6 @@ void vk_rasterize()
render_frame(device);
(*render_callback)(1);
wsi->end_frame();
frame_counter++;
wsi->begin_frame();
}

Expand Down Expand Up @@ -446,15 +441,7 @@ void vk_process_commands()
// For synchronous RDP:
if (vk_synchronous)
{
if (frame_counter != last_frame_counter) // Only sync once per frame
{
rdp_sync_signal = processor->signal_timeline();
last_frame_counter = frame_counter;
}
else
{
rdp_sync_signal = 0;
}
processor->wait_for_timeline(processor->signal_timeline());
}

*gfx.MI_INTR_REG |= DP_INTERRUPT;
Expand All @@ -477,13 +464,6 @@ void vk_resize()
platform->do_resize();
}


void vk_full_sync()
{
if (vk_synchronous && rdp_sync_signal)
processor->wait_for_timeline(rdp_sync_signal);
}

void vk_destroy()
{
if (wsi)
Expand Down Expand Up @@ -576,8 +556,5 @@ bool vk_init()
processor->set_quirks(quirks);

wsi->begin_frame();

last_frame_counter = 0;
frame_counter = 0;
return true;
}
1 change: 0 additions & 1 deletion Source/3rdParty/mupen64plus-video-parallel/parallel_imp.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ extern "C"
bool vk_init();
void vk_destroy();
void vk_resize();
void vk_full_sync();
void vk_read_screen(unsigned char* dest);

#ifdef __cplusplus
Expand Down

0 comments on commit 750ac8f

Please sign in to comment.