i965: Introduce the FIND_LIVE_CHANNEL pseudo-opcode.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 23 Apr 2015 11:42:53 +0000 (14:42 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 4 May 2015 14:44:17 +0000 (17:44 +0300)
commit715bc6d8b16a0bbdc17fe1e1e46b88a679bf312b
tree442dd3d1523c4eb84b1e01e89b1e43aab3f5789d
parentf2fad0dc80627e853eea558498f18a9fa769992e
i965: Introduce the FIND_LIVE_CHANNEL pseudo-opcode.

This instruction calculates the index of an arbitrary channel enabled
in the current execution mask.  It's expected to be used as input for
the BROADCAST opcode, but it's implemented as a separate instruction
rather than being baked into BROADCAST because FIND_LIVE_CHANNEL has
no dependencies so it can always be CSE'ed with other instances of the
same instruction within a basic block.

v2: Whitespace fixes.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_defines.h
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_eu_emit.c
src/mesa/drivers/dri/i965/brw_fs_generator.cpp
src/mesa/drivers/dri/i965/brw_shader.cpp
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp