Commit de6ccff6 authored by Libretro-Admin's avatar Libretro-Admin
Browse files
parent 43c1e56b
Pipeline #20059 passed with stages
in 12 minutes and 12 seconds
......@@ -80,6 +80,7 @@ cResetEvent re;
extern cResetEvent frame_finished;
static bool swap_pending;
static bool do_swap;
u32 fb_w_cur = 1;
int max_idx,max_mvo,max_op,max_pt,max_tr,max_vtx,max_modt, ovrn;
bool pend_rend = false;
......
......@@ -295,9 +295,16 @@ void SerializeTAContext(void **data, unsigned int *total_size)
const u32 taSize = ta_ctx->tad.thd_data - ta_ctx->tad.thd_root;
LIBRETRO_S(taSize);
LIBRETRO_SA(ta_ctx->tad.thd_root, taSize);
LIBRETRO_S(ta_ctx->tad.render_pass_count);
for (u32 i = 0; i < ta_ctx->tad.render_pass_count; i++)
{
u32 offset = (u32)(ta_ctx->tad.render_passes[i] - ta_ctx->tad.thd_root);
LIBRETRO_S(offset);
}
}
void UnserializeTAContext(void **data, unsigned int *total_size)
void UnserializeTAContext(void **data, unsigned int *total_size, serialize_version_enum version)
{
u32 address;
LIBRETRO_US(address);
......@@ -308,4 +315,18 @@ void UnserializeTAContext(void **data, unsigned int *total_size)
LIBRETRO_US(size);
LIBRETRO_USA(ta_ctx->tad.thd_root, size);
ta_ctx->tad.thd_data = ta_ctx->tad.thd_root + size;
if (version >= V12)
{
LIBRETRO_US(ta_ctx->tad.render_pass_count);
for (u32 i = 0; i < ta_ctx->tad.render_pass_count; i++)
{
u32 offset;
LIBRETRO_US(offset);
ta_ctx->tad.render_passes[i] = ta_ctx->tad.thd_root + offset;
}
}
else
{
ta_ctx->tad.render_pass_count = 0;
}
}
......@@ -275,4 +275,4 @@ void VDecEnd();
//must be moved to proper header
void FillBGP(TA_context* ctx);
void SerializeTAContext(void **data, unsigned int *total_size);
void UnserializeTAContext(void **data, unsigned int *total_size);
void UnserializeTAContext(void **data, unsigned int *total_size, serialize_version_enum version);
......@@ -133,6 +133,7 @@ extern int modem_sched;
//./core/hw/pvr/Renderer_if.o
extern bool pend_rend;
extern u32 fb_w_cur;
//./core/hw/pvr/pvr_mem.o
extern u32 YUV_tempdata[512/4];//512 bytes
......@@ -314,7 +315,7 @@ bool dc_serialize(void **data, unsigned int *total_size)
{
int i = 0;
int j = 0;
serialize_version_enum version = V11;
serialize_version_enum version = V12;
*total_size = 0 ;
......@@ -419,6 +420,7 @@ bool dc_serialize(void **data, unsigned int *total_size)
LIBRETRO_S(in_vblank);
LIBRETRO_S(clc_pvr_scanline);
LIBRETRO_S(fb_w_cur);
LIBRETRO_S(ta_fsm[2048]);
LIBRETRO_S(ta_fsm_cl);
......@@ -766,6 +768,7 @@ bool dc_unserialize(void **data, unsigned int *total_size, size_t actual_data_si
LIBRETRO_US(in_vblank);
LIBRETRO_US(clc_pvr_scanline);
fb_w_cur = 1;
if (version < V9)
{
LIBRETRO_US(i); // pvr_numscanlines
......@@ -786,6 +789,10 @@ bool dc_unserialize(void **data, unsigned int *total_size, size_t actual_data_si
LIBRETRO_SKIP(4 * 256); // ta_type_lut
LIBRETRO_SKIP(2048); // ta_fsm
}
if (version >= V12)
LIBRETRO_US(fb_w_cur);
else
fb_w_cur = 1;
LIBRETRO_US(ta_fsm[2048]);
LIBRETRO_US(ta_fsm_cl);
......@@ -814,7 +821,7 @@ bool dc_unserialize(void **data, unsigned int *total_size, size_t actual_data_si
KillTex = true;
pal_needs_update = true;
if (version >= V10)
UnserializeTAContext(data, total_size);
UnserializeTAContext(data, total_size, VCUR_LIBRETRO);
LIBRETRO_USA(vram.data, vram.size);
......
......@@ -908,4 +908,6 @@ enum serialize_version_enum {
V9,
V10,
V11,
V12,
VCUR_LIBRETRO = V12,
};
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment