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

Francisco Jerez currojerez at kemper.freedesktop.org
Thu Aug 6 11:39:44 UTC 2015


Module: Mesa
Branch: master
Commit: 42a18ca76057621ae7d8812b29ea2245d6ff282d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=42a18ca76057621ae7d8812b29ea2245d6ff282d

Author: Francisco Jerez <currojerez at riseup.net>
Date:   Wed Aug  5 16:29:30 2015 +0300

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 at lists.freedesktop.org
Reviewed-by: Connor Abbott <connor.w.abbott at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

---

 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),




More information about the mesa-commit mailing list