From: Francisco Jerez Date: Wed, 5 Aug 2015 13:29:30 +0000 (+0300) Subject: i965/fs: Fix fs_inst::regs_read() for sources in the ATTR file. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42a18ca76057621ae7d8812b29ea2245d6ff282d;p=mesa.git 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 Reviewed-by: Jason Ekstrand --- diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 284528d1f84..1d3bdb42284 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -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),