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>
Thu, 14 Apr 2016 22:59:33 +0000 (15:59 -0700)
The subnr field is in bytes so we don't need to multiply by type_sz.

Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_fs.cpp

index 8802540f5f03e821e533a6d320834b07781d7ddb..24482096f17eca240c3e6bb71f3883a954cc6baa 100644 (file)
@@ -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 {