i965/nir/vec4: Implement store_output intrinsic
authorEduardo Lima Mitev <elima@igalia.com>
Tue, 16 Jun 2015 19:31:49 +0000 (21:31 +0200)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 3 Aug 2015 16:40:47 +0000 (09:40 -0700)
commit662c4c99065381b8e265310d176cfdef6698ca57
tree51a4900a84d62a48b7866f14d439c79ac915054c
parent11ed02e1c81a2aa71b22b1d6847f58e41fd89271
i965/nir/vec4: Implement store_output intrinsic

This implementation is based on the current URB setup in vec4_visitor, which
requires the output register to be stored in the output_reg array at variable's
original shader location index. But since nir_lower_io() pass uses the value
in var->data.driver_location, we need to put there var->data.location instead,
prior to calling nir_lower_io(), so that we end up with the correct index
in const_index[0].

The driver_location is not used at all, so this patch also disables the
nir_assign_var_locations pass on non-scalar shaders.

Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
src/mesa/drivers/dri/i965/brw_nir.c
src/mesa/drivers/dri/i965/brw_vec4_nir.cpp