anv/apply_pipeline_layout: Set the cursor in lower_res_reindex_intrinsic
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 14 Dec 2018 00:33:46 +0000 (18:33 -0600)
committerJason Ekstrand <jason@jlekstrand.net>
Tue, 8 Jan 2019 00:38:29 +0000 (00:38 +0000)
commitf8992eb5badf91e0d9ad3732d56a4e3d78fd1abf
treebc18ba3458fa2f55a200611aeee4c6e4f6a59172
parent42b2f3e91f6d6c4eead40ef91e5edde68019f23c
anv/apply_pipeline_layout: Set the cursor in lower_res_reindex_intrinsic

The loop through instructions doesn't set the cursor for us so unless we
set it somewhere, we may end up emitting instructions in the wrong
place.  The only reason why we haven't been bitten by this in the past
is that it only happens in a few variable pointers cases and the CTS
tests for those don't use much control flow so things were getting
emitted in the correct order by accident.

Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
src/intel/vulkan/anv_nir_apply_pipeline_layout.c