[Mesa-dev] [PATCH 1/2] i965/fs: Fix fs_inst::regs_read() for sources in the ATTR file.

Francisco Jerez currojerez at riseup.net
Wed Aug 5 10:38:18 PDT 2015


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 shouldn't be possible to end up with an ATTR argument here even
without it.

CC: mesa-stable at lists.freedesktop.org
---
 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 cdf7988..f9773bd 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.4.6



More information about the mesa-dev mailing list