aco: add helpers for splitting stores
authorRhys Perry <pendingchaos02@gmail.com>
Thu, 16 Apr 2020 18:07:06 +0000 (19:07 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 24 Apr 2020 18:52:54 +0000 (18:52 +0000)
commit562353e1f1246bfe0f70315083b51d26d60d994b
treea3f9ee5750d1196f58b401f50310f6d2680b373f
parent211a9f2057321e6a3500d9b7873085621604e336
aco: add helpers for splitting stores

split_store_data() splits a vector and p_as_uniforms it if needed.

scan_write_mask()/advance_write_mask() are similar to
u_bit_scan_consecutive_range(), but makes it easier to only clear part of
the range and will also give ranges for zero'd bits.

split_buffer_store() is a helper for splitting VMEM/SMEM stores.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4639>
src/amd/compiler/aco_instruction_selection.cpp