i965/fs: Fix fs_inst::regs_read() for sources in the ATTR file.

Otherwise it would crash on Gen8 with scalar VS.  The issue can easily
be reproduced with the following patch, but I don't see any reason why
it wouldn't be possible to end up with an ATTR argument here even
without it.

CC: mesa-stable@lists.freedesktop.org
Reviewed-by: Connor Abbott <connor.w.abbott@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Francisco Jerez 2015-08-05 16:29:30 +03:00
parent e77a4a9b1f
commit 42a18ca760
1 changed files with 1 additions and 0 deletions

View File

@ -808,6 +808,7 @@ fs_inst::regs_read(int arg) const
case IMM:
return 1;
case GRF:
case ATTR:
case HW_REG:
return DIV_ROUND_UP(components_read(arg) *
src[arg].component_size(exec_size),