From 42a18ca76057621ae7d8812b29ea2245d6ff282d Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 5 Aug 2015 16:29:30 +0300 Subject: [PATCH] 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 --- src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 284528d..1d3bdb4 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), -- 2.7.4