swr: Handle indirect indices in GS
authorGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 20 Dec 2017 19:56:45 +0000 (13:56 -0600)
committerGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 10 Jan 2018 20:02:17 +0000 (14:02 -0600)
commit5c4081d66d4a45d20e7520c6b6411135780b6bdd
treebacc2499659b5b0fee3da20b2542a4b7dfb733df
parent41c36c4549e12b2627d8eb6599caa1e7bd61103f
swr: Handle indirect indices in GS

BuilderSWR::swr_gs_llvm_fetch_input() (and consequently
 swr_gs_llvm_fetch_input()), did not handle the case where
is_vindex_indirect or is_aindex_direct is set.

Implement it, using the code in draw_llvm.c as a guideline.

Fixes the following piglit tests:
dynamic_input_array_index (crash)
gs-input-array-vec4-index-rd
vs-output-array-vec4-index-wr-before-gs

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/swr_shader.cpp