intel/vec4: Set up push ranges before we emit any code
authorJason Ekstrand <jason@jlekstrand.net>
Tue, 4 May 2021 15:40:17 +0000 (10:40 -0500)
committerMarge Bot <eric+marge@anholt.net>
Wed, 19 May 2021 14:38:13 +0000 (14:38 +0000)
commita881f2295f87642aeee7e767a598bab56f7e7ee5
treec7bda10aa4b5a3b5c9b240fffa69ee372ab25566
parentc35501ffe8f8cc6d7f9e68294e3774e2476516a5
intel/vec4: Set up push ranges before we emit any code

In order to avoid switching pull constants to push constants and then
having to back to pull, compute the push ranges up-front.  This way we
know by the time we emit code exactly what ranges are pushable.  This is
a bit inefficient in the case where the "normal" push constants get
compacted.  However, most apps don't use giant piles of dead uniforms
combined with substantial UBO use so this should be ok.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10571>
src/intel/compiler/brw_vec4.cpp
src/intel/compiler/brw_vec4.h
src/intel/compiler/brw_vec4_visitor.cpp