i965/fs: Fix regs_read() for MOV_INDIRECT with a non-zero subnr
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 24 Nov 2015 19:24:57 +0000 (11:24 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 14 Dec 2015 22:28:31 +0000 (14:28 -0800)
The subnr field is in bytes so we don't need to multiply by type_sz.

src/mesa/drivers/dri/i965/brw_fs.cpp

index 61b2a4ba80ed4ce400756692a0ba5022d2ca727d..b903fbed19696524ddf66693533734eeb1560a91 100644 (file)
@@ -867,7 +867,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 {