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-29 20:48:21 -0600
committerbobcatchris <83428450+bobcatchris@users.noreply.github.com>2026-11-30 05:18:03 -0600
commit08a1cc4a0298420fbdd809df05af009fa4547728 (patch)
tree25af247b9c6606c4173f14000a31020a2864326f /runtime/src/xma2_decoder.cpp
parentd367675c705c758f731ae9eb603839a4ebb2283c (diff)
leonida-gpu: add AVX2 fast path for 32-byte descriptor changed_records (D3D12-GPU-CHANGED-RECORDS-AVX2)
changed_records() scans ~400,000 32-byte descriptor slots per frame (mirroring ~40,000, d3d12/docs/findings.md). Previously, any dirty 512-byte chunk ran memcmp on the 16-record block and then ran 16 individual memcmp + memcpy calls. Add a runtime-detected AVX2 fast path for step == 32 that loads four 32-byte records (128 bytes) into ymm registers, checks all four with a single combined vpcmpeqb + vpand + vpmovmskb branch, and on mismatch stores the already-loaded new ymm vectors directly with _mm256_storeu_si256 (avoiding the double-scan and memcpy calls). Measured in --release on Ryzen 7 7800X3D (400k x 32-byte slots, 50 rounds, bit-exact parity verified): - 0% dirty: 325.9 -> 309.8 us/frame (1.05x) - 10% dirty: 432.5 -> 325.9 us/frame (1.33x) - 100% dirty: 611.3 -> 485.1 us/frame (1.26x) AI-assisted: Antigravity (Gemini 4 Neon)
Diffstat (limited to 'runtime/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions