Skip to content

nir/algebraic: Avoiding relocations

Emma Anholt requested to merge anholt/mesa:nir-algebraic-shrink into main

Chrome OS has noticed that Mesa's size has been increasing over time and it's putting us at risk of not being able to fit on 2GB-root devices soon. It turns out that much of Mesa's size was in all the internal pointers in nir_opt_algebraic's data tables. By turning those into indices into tables, we can shrink the size of the pointers, and also avoid relocations (which is to say giant piles of dirty memory per process using GL or vulkan drivers).

Reduces libvulkan_intel.so by 2.1MB (16%), and gallium similarly. No performance change results on shader-db yet (n=5), but that test is ongoing.

Edited by Emma Anholt

Merge request reports