i965: Allow indirect GS input indexing in the scalar backend.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 8 Nov 2015 02:58:59 +0000 (18:58 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 18 Nov 2015 23:42:36 +0000 (15:42 -0800)
commitfc19a0d2e422ea8e45bc5440a91f858f5f345884
tree052ea6e7eeaed345d23ec0ca486affa3438d54ff
parent09d610796c03ae5a238b999ace5ccc2d3effd700
i965: Allow indirect GS input indexing in the scalar backend.

This allows arbitrary non-constant indices on GS input arrays,
both for the vertex index, and any array offsets beyond that.

All indirects are handled via the pull model.  We could potentially
handle indirect addressing of pushed data as well, but it would add
additional code complexity, and we usually have to pull inputs anyway
due to the sheer volume of input data.  Plus, marking pushed inputs
as live due to indirect addressing could exacerbate register pressure
problems pretty badly.  We'd need to be careful.

v2: Use updated MOV_INDIRECT opcode.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/brw_fs.h
src/mesa/drivers/dri/i965/brw_fs_nir.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp