Skip to content

aco: Use monotonic arena allocator to optimize spilling

Tony Wasserka requested to merge neobrain/mesa:opt_spiller_arena into main

Adds 3 2 commits on top of !11925 (merged), saving another 13% of runtime spent in the spiller in my test shader.

This change adds a bump allocator used selectively in the spiller to replaces the default general-purpose allocator. Bump-allocation allocates memory in big chunks and never releases it until spilling is done, at which point the entire allocation is freed at once. This removes most allocation (and deallocation) overhead at the expensive of increased memory use.

This requires C++17, so we'd need to bump the requirements before merging this change.

v2: changed it to use aco::monotonic_allocator and dropped the 2nd patch which avoids destructor calls (by Daniel Schürmann)

Edited by Daniel Schürmann

Merge request reports

Loading