i965/vec4: Use MOV_INDIRECT instead of reladdr for indirect push constants
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 25 Nov 2015 17:36:34 +0000 (09:36 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 14 Apr 2016 22:59:33 +0000 (15:59 -0700)
commit056849772f66582fd7e8a181c3fb16955f84243b
tree336ddd4e9437b21f68b7a3a2395c7e85c97d7bc0
parent479e38ad63ab1421afe4f25d36f434ac2e12e817
i965/vec4: Use MOV_INDIRECT instead of reladdr for indirect push constants

This commit moves us to an instruction based model rather than a
register-based model for indirects.  This is more accurate anyway as we
have to emit instructions to resolve the reladdr.  It's also a lot simpler
because it gets rid of the recursive reladdr problem by design.

One side-effect of this is that we need a whole new algorithm in
move_uniform_array_access_to_pull_constants.  This new algorithm is much
more straightforward than the old one and is fairly similar to what we're
already doing in the FS backend.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Acked-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_vec4.cpp
src/mesa/drivers/dri/i965/brw_vec4.h
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp