Lightrec plugin: Drop lightrec_plugin_clear_block_caches()
authorPaul Cercueil <paul@crapouillou.net>
Fri, 17 May 2024 17:32:51 +0000 (19:32 +0200)
committerPaul Cercueil <paul@crapouillou.net>
Fri, 17 May 2024 17:33:50 +0000 (19:33 +0200)
It is now handled inside lightrec_set_cycles_per_opcode().

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Makefile
libpcsxcore/lightrec/internals.c [deleted file]
libpcsxcore/lightrec/internals.h [deleted file]
libpcsxcore/lightrec/plugin.c

index 9b5d245..55a7bb4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -120,8 +120,7 @@ OBJS += deps/lightrec/recompiler.o \
        deps/lightrec/reaper.o
 endif
 OBJS += deps/lightrec/tlsf/tlsf.o
-OBJS += libpcsxcore/lightrec/plugin.o \
-       libpcsxcore/lightrec/internals.o
+OBJS += libpcsxcore/lightrec/plugin.o
 OBJS += deps/lightning/lib/jit_disasm.o \
                deps/lightning/lib/jit_memory.o \
                deps/lightning/lib/jit_names.o \
diff --git a/libpcsxcore/lightrec/internals.c b/libpcsxcore/lightrec/internals.c
deleted file mode 100644 (file)
index e37d590..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-// internals: stuff lightrec's public API doesn't provide
-#include <assert.h>
-#include "lightrec-private.h"
-#include "blockcache.h"
-#include "internals.h"
-
-void lightrec_plugin_clear_block_caches(struct lightrec_state *state)
-{
-       if (state == NULL)
-               return;
-
-       lightrec_invalidate_all(state);
-       lightrec_free_block_cache(state->block_cache);
-       state->block_cache = lightrec_blockcache_init(state);
-       assert(state->block_cache);
-}
diff --git a/libpcsxcore/lightrec/internals.h b/libpcsxcore/lightrec/internals.h
deleted file mode 100644 (file)
index 2748016..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-struct lightrec_state;
-void lightrec_plugin_clear_block_caches(struct lightrec_state *state);
index 0b8e618..c8e6bf7 100644 (file)
@@ -10,7 +10,6 @@
 #endif
 
 #include "lightrec.h"
-#include "internals.h"
 #include "../cdrom.h"
 #include "../gpu.h"
 #include "../gte.h"
@@ -611,7 +610,6 @@ static void lightrec_plugin_apply_config()
        if (cycles_per_op_old && cycles_per_op_old != cycles_per_op) {
                SysPrintf("lightrec: reinit block cache for cycles_per_op %.2f\n",
                        cycles_per_op / 1024.f);
-               lightrec_plugin_clear_block_caches(lightrec_state);
        }
        cycles_per_op_old = cycles_per_op;
        lightrec_set_cycles_per_opcode(lightrec_state, cycles_per_op);