Skip to content

i965/fs: Lower large indirect temporary arrays to scratch

Faith Ekstrand requested to merge gfxstrand/mesa:review/nir-scratch into master

Even though we usually consider scratch access evil, some times you have to spill more to spill less. What normally happens with indirect arrays (which are not, themselves, all that common) is that the shader will lower the indirect array access to an if-ladder. While that's mostly ok, in the case of large arrays, we can end up with piles of live values which causes large amounts of spilling. Instead, this patch moves those large arrays to scratch where we can actually do indirect writes and reads easily. This helps a couple of benchmarks a little bit.

Merge request reports