upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/xma2_decoder.cpp
diff options
context:
space:
mode:
authorbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-30 18:02:27 -0600
committerbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-30 18:02:27 -0600
commit4959d6b630e1769210fcf688136a840744c9856a (patch)
treec4d7f162df245c402be0301aef1c6638ad0749b1 /runtime/src/xma2_decoder.cpp
parent4929a0e99d8695f0d83092f99f04ee678f03dfb4 (diff)
d3d12: hash a texture's memory with AES rounds, 2.9-5.9x faster (D3D12-GPU-TEXTURE-DIGEST-AES)
texture::digest, which tells whether a guarded texture's memory changed (at every check that is not skipped, and over all of it the first time), was a fold of 64x64-bit multiplications that ran at 23.5 GB/s at every size from 16 KiB to 256 MiB: the multiplications were its limit, not the memory. With AES-NI it is now eight 128-bit lanes of `aesenc` over 128 bytes at a time, each lane through two more rounds on its own before the lanes meet: 139, 121, 108, 114 and 70 GB/s on 16 KiB, 256 KiB, 2 MiB, 32 MiB and 256 MiB (Ryzen 7 7800X3D, best of five, `digest_speeds`). The folded one stays as the fallback. The digests are only compared with each other inside one run and none is written out, so the value may change; which version is used cannot change during a run. A first version, whose lanes met by one round, had pairs of one-bit changes with the same digest (1,328 in a million with four lanes). `no_two_changes_cancel_in_the_aes_digest` tries pairs of one-bit changes over 520 bytes and 4 KiB of noise and of zeros: none for the real digest and for the folded one, 83 for the eight-lane version met by one round (its negative control). AI-assisted: Claude Sonnet 5.5 Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'runtime/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions