Mesa (master): i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnr

Jason Ekstrand jekstrand at kemper.freedesktop.org
Thu Apr 14 23:00:41 UTC 2016


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

Author: Jason Ekstrand <jason.ekstrand at intel.com>
Date:   Tue Nov 24 11:24:57 2015 -0800

i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnr

The subnr field is in bytes so we don't need to multiply by type_sz.

Reviewed-by: Kristian Høgsberg <krh at bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 8802540..2448209 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -870,7 +870,7 @@ fs_inst::regs_read(int arg) const
              * unread portion at the beginning.
              */
             if (src[0].subnr)
-               region_length += src[0].subnr * type_sz(src[0].type);
+               region_length += src[0].subnr;
 
             return DIV_ROUND_UP(region_length, REG_SIZE);
          } else {




More information about the mesa-commit mailing list