Files
LibretroAdmin e961638263 Texture cache: hash whole buffers with libretro-common's encoding_crc32
Most of the texture cache's hashing is one whole buffer a frame: the
XFB, checked against its copy before it is shown. On x86-64 with
VPCLMULQDQ on ZMM, a whole buffer of 512 bytes or more is now the
CRC-32 of libretro-common's encoding_crc32, which folds 512 bits at a
time; smaller and sampled hashes, and every other CPU, keep the four
CRC32C chains. Folding 128 bits at a time is no quicker than the
chains, so PCLMULQDQ alone keeps them too.

Throughput here (Zen 5), chains against encoding_crc32:
  512 B 25 to 44 GB/s, 2 KiB 25 to 70, 32 KiB 26 to 91,
  a 600 KiB XFB 25 to 52-67.

encoding_crc32.c, its tables and crc32.h are copied unchanged from
libretro/libretro-common.

States keep texture cache hashes, and a copy whose picture is only on
the host would be lost to a mismatch: the first check of a copy a
state brought back also takes the old hash of its memory
(common_hash64_v1), and keeps the new one from then on. A state the
parent saved, loaded by this build, takes its XFB copy that way.
2026-11-10 03:53:30 +01:00
..
2026-11-07 14:23:51 +01:00
2026-11-09 21:34:27 +01:00
2026-01-25 16:12:15 +01:00
2026-11-09 18:35:17 +01:00
2026-01-25 16:12:15 +01:00
…