7 Commits
Author SHA1 Message Date
libretroadmin 84f3745962 Texture cache: a fixed map, video memory locks and hashes in arenas
The cache's textures are in room made when the renderer starts - twice
as many as the pool has images, no fewer than 1024 - found by a fixed
open-addressing index (rend/tex_map.h, in place of the unordered_map).
A texture never moves; one taken away is made anew in its place. The
locks on video memory, and each page's list of them, are in arenas made
with it (texcache_reserve()), and the pieces' hashes in arenas by size.
Each says once when it runs out and more is made.

The pool has eight 8x8 and four 16x16 textures of each format whatever
their share, which gave none (some 100 KB), and eight 64x64 pictures
rendered to. A line logged is formatted on the stack.

Nine sites come off tools/vulkan/vk_allocs.allowed: the texture cache
allocates nothing during play. tools/rend/tex_map_test.sh checks the map
against a plain list, with ASan and UBSan. In CI.
2026-11-10 06:26:00 +01:00
LibretroAdmin 409cbff6e9 remove functions nothing calls
The linker was asked which functions of the core no code path reaches
(-ffunction-sections with --gc-sections --print-gc-sections), and each
one it named was then looked up by name across the whole source,
every platform's code and the tools included. These have no caller
anywhere:

  MemWrite32                         hw/pvr/pvr_mem.cpp
  pvr_ReadReg                        hw/pvr/pvr_regs.cpp
  rend_framePending                  hw/pvr/ta_ctx.cpp
  rend_init, rend_resize             hw/pvr/Renderer_if.cpp
  emit_WriteCodeCache                hw/sh4/dyna/driver.cpp
  bm_WriteBlockMap                   hw/sh4/dyna/blockmanager.cpp
  dec_Un_rNrN, dec_Un_frNfrM, dec_rz hw/sh4/sh4_opcode_list.cpp
  cpu_iWarn                          hw/sh4/interpr/sh4_opcodes.cpp
  get_nvmem_data                     hw/holly/sb_mem.cpp
  aica_Term                          hw/aica/aica_if.cpp
  reios_term                         reios/reios.cpp
  cryptoReset                        hw/naomi/decrypt.cpp
  printtoc                           imgread/common.cpp
  dc_start                           nullDC.cpp
  shutdown_thread_pool               rend/TexCache.cpp
  gl_DebugOutput                     rend/gl4/gles.cpp
  libPvr_GetRenderTarget,
  libPvr_GetRenderSurface            libretro/libretro.cpp
  VArray2::LockRegion                libretro/common.cpp
  LogManager::SetEnable              log/LogManagerLibretro.cpp
  set_user_data_dir,
  add_system_config_dir,
  add_system_data_dir                stdclass.cpp, with the three
                                     variables only they wrote

The two *_Term functions were empty. cryptoReset was not: but the
cartridge decryption it would have cleared starts itself afresh
whenever a key or an address is set.

Left alone, though the linker named them on x86-64: what the ARM,
ARM64 and x86 recompilers and the cached interpreter call (rdv_*,
emit_Write32, emit_SetBaseAddr, bm_GetStaleBlock, the block reference
counting, _vmem_ReadMem8SX32/16SX32, shil_opcode_name), cpu_iNimp,
which a build without an MMU calls, mmu_QACR_SQ, which is called but
inlined so that only its separate copy goes unused, and
archive_num_entries, which tools/archive uses.

libARM_Term, also empty and never called, stays for now: its file has
CRLF line endings, and a patch that touches it does not go through a
plain git am.
2026-10-06 14:52:51 +02:00
twinaphex e949b77e2c (Libretro) Further simplifications to LogManagerLibretro 2021-03-06 05:44:48 +01:00
twinaphex 9d1d21f4f4 Simplify LogManager for Libretro - don't use Listener interface at all,
simplify it
2021-03-06 05:31:04 +01:00
twinaphex 7eaf1e5fc3 Refactor LogManager code 2021-03-06 04:58:41 +01:00
twinaphex 9a914a17f4 Don't timestamp log events for libretro 2021-03-06 04:51:19 +01:00
twinaphex 915b8010a5 Add separate LogManagerLibretro.cpp - to leave LogManager.cpp untouched 2021-03-06 04:39:55 +01:00