3rdParty: backport some patches from simple64 to mupen64plus-video-parallel

This commit is contained in:
Rosalie Wanders committed 2025-05-29 00:55:26 +02:00
1 parent 188fa1b6f5
commit 183fb2b626
3 files changed
+23 -1

No files matched your search

+7 -1
View File
@@ -38,6 +38,7 @@
#include "m64p_types.h"
#include "m64p_config.h"
#include "m64p_plugin.h"
#include <string.h>
#include <stdint.h>
@@ -65,7 +66,7 @@ void (*render_callback)(int);
m64p_handle configVideoParallel = NULL;
#define PLUGIN_VERSION 0x000001
#define VIDEO_PLUGIN_API_VERSION 0x020200
#define VIDEO_PLUGIN_API_VERSION 0x020201
#define DP_INTERRUPT 0x20
uint32_t rdram_size;
@@ -291,6 +292,11 @@ EXPORT void CALL ProcessRDPList(void)
vk_process_commands();
}
EXPORT void CALL FullSync(void)
{
vk_full_sync();
}
EXPORT int CALL RomOpen(void)
{
window_fullscreen = false;
@@ -32,6 +32,10 @@ bool 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,
@@ -263,6 +267,7 @@ void vk_rasterize()
render_frame(device);
(*render_callback)(1);
wsi->end_frame();
frame_counter++;
wsi->begin_frame();
}
@@ -468,6 +473,13 @@ 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)
@@ -560,5 +572,8 @@ bool vk_init()
processor->set_quirks(quirks);
wsi->begin_frame();
last_frame_counter = 0;
frame_counter = 0;
return true;
}
@@ -32,6 +32,7 @@ extern "C"
bool vk_init();
void vk_destroy();
void vk_resize();
void vk_full_sync();
void vk_read_screen(unsigned char* dest);
#ifdef __cplusplus