i965/fs: Fix return value of fs_inst::regs_read() for BAD_FILE.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 16 Jul 2015 12:58:56 +0000 (15:58 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 29 Jul 2015 11:12:46 +0000 (14:12 +0300)
commit86ae788baefefdb2fa77fe3c242ad2d81c8e834e
treee938b2514bf31b469187b116d949dae863df1c20
parent5a5607a16ce7bf5eace2cf4b267af304aef05e90
i965/fs: Fix return value of fs_inst::regs_read() for BAD_FILE.

Typically BAD_FILE sources are used to mark a source as not present
what implies that no registers are read.  This will become much more
frequent with logical send opcodes which have a large number of
sources, many of them optionally used and marked as BAD_FILE when they
aren't applicable.  It will prove to be useful to be able to rely on
the value of regs_read() regardless of whether a source is present or
not.

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