i965/fs: Return zero from fs_inst::components_read for non-present sources.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 13 Aug 2016 01:33:58 +0000 (18:33 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Tue, 16 Aug 2016 23:31:59 +0000 (16:31 -0700)
commit61a02fb74c07d574b726a8b27517a02251aa4be4
treea00201e300a586cda23aa78d2537e7acd52b67de
parent0c754d1c4203d87dbb9d2dd882ef42686e6d01ec
i965/fs: Return zero from fs_inst::components_read for non-present sources.

This makes it easier for the caller to find out how many scalar
components are actually read by the instruction.  As a bonus we no
longer need to special-case BAD_FILE in the implementation of
fs_inst::regs_read.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp